On Tue, Jun 20, 2000 at 07:24:18PM -0700, Dale Morris wrote:
-> I've started using emacs as editor for mutt. I'm specified it in the
-> muttrc file and also have setup a script file(e-lisp) in /home/me/.mutt called
-> post.el which is a package for running emacs as an email editor with
-> mutt. It seems to be working fine, but I have a couple of
-> questions. 
-> 1.) what does emacs vs emacs client mean? I read that I must run emacs
-> and mutt on the same host.. I don't understand the overall picture
-> with this. Why/how is this different from specifying Pico in the
-> .muttrc file? What is a server? I had to include some lines in my
-> .emacs file about that.

Sigh, methinks this is a candidate for a Mutt FAQ, even though it is an
Emacs issue.

Emacs is a big, fat program, and susceptible to a lot of
customization. With all that, it can take a while to load ("Emacs Makes
Any Computer Slower"). It is simpler, and the Emacs Way, to leave Emacs
running during your session. To allow Mutt and other programs to feed
files to Emacs for editing, use emacsclient instead. So in your .muttrc,
specify emacsclient as your editor, not emacs. When you go to edit an
email, emacsclient will feed the file to an already running instance of
emacs (it will not launch emacs for you). When you are done, hit C-x #,
and move your focus back to mutt.

In this scheme of things, emacs is an editor server, and emacsclient lets
mutt and other programs be clients of the server.

You have to set this up in your .emacs. Because I run the same .emacs on
several different OSs, I have the following in my .emacs (which, BTW, is
posted on my web site):


(if (or (string-equal (getenv "OSTYPE") "Linux" )
        (string-equal (getenv "OSTYPE") "linux-gnu" ))
  (server-start))
; end gnuserv stuff


If you don't need the portability, this will do:


(server-start)



-> 
-> 2.) On the tool bar at the top of the emacs window, to the right of
-> Mule, is a category called Post. It has several commands concerning
-> quoting and signatures, also one for exiting "Save Message and Return
-> from Post" (C-c C-c), which I assume saves the compose buffer. But it
-> doesn't close emacs, it just leaves me in the *scratch* buffer and I
-> have to go ahead and close it with the C-xC-c command.  

This is specific to the post.el file you mentioned, assuming that the file
follows Emacs custom and is for a major mode called post mode. It operates
"correctly" for the client/server scheme I outlined above. You leave Emacs
running, ready for the next message.

I have a copy of post.el here; I may try it some day. In my copious free
time.



-- 

                -- C^2

No windows were crashed in the making of this email.

Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley

PGP signature

Reply via email to