[Tfug] Fwd: Conditional execution of .emacs?

Ryan Cresawn jrcresawn at gmail.com
Thu Jun 5 16:00:36 MST 2008


On Thu, Jun 5, 2008 at 2:26 PM, Claude Rubinson <rubinson at u.arizona.edu> wrote:
> Hi all,
>
> My emacs knowledge seems to be failing me here.  There are parts of my
> .emacs file that I want to execute depending upon how I start emacs
> up.  More specifically: in general, I use gnuclient/gnuserv.  However,
> under a few circumstances, I like to start up emacs within an xterm
> via "emacs -nw" (primarily I do so when I want to use R from within
> emacs).
>
> Invoking emacs as non-windowed wreaks havoc with gnuserv.  So, what
> I'd like to do is avoid (re)starting gnuserv when I invoke "emacs
> -nw".  Or, alternatively, only start gnuserv when emacs is started
> from X.
>
> Any ideas?
>
> Thanks!
>
> Claude

Claude,

At work we have an Exchange 2003 server with IMAP enabled.  I use
screen and inside it I have mutt and "emacs -nw" running all the time.
 I also query the LDAP server for contact information with lbdb but
that's beyond the scope of this e-mail.  I have in my .emacs file only
one line:

(server-start)

That line causes the server to start when I start emacs and accept
connections from emacsclient which I call from mutt to compose mail.
I'm using GNU Emacs 22.1.1 which is a stable package in Ubuntu 8.04.
I don't know if the server I use is the same as gnuserv but it just
works for me and it works well.  How do you start gnuserv and which
version of emacs are you running?  I have also found that compiling
emacs on Ubuntu 8.04 and OpenSolaris 2008.05 to be nothing more than
"./configure; make; make install".  I haven't tried to build it in
Debian 4.0 but I bet it would be just as easy.

Ryan




More information about the tfug mailing list