Re: debian emacs policy and configuring mutt
Jack O'Quin wrote:
Carel Fellinger writes:
> There is a space in the command, so you need quotes, try :
>
> set editor="emacs -nw"
Sorry, this doesn't seem to work - even <set editor=emacs> wouldn't do.
In both cases, mutt overrides these settings in .muttrc and uses vi for
composing mail.
Irritating enough - man mutt reports about a system wide configuration
file /etc/Muttrc which I thought would contain anything causing mutt
to use vi - but this file does not exist and I can't imagine mutt has
the editor=vi compiled into the binary code!
I would normally put "export EDITOR=emacsclient" in my .bash_profile
for stuff like this. Many programs will use $EDITOR, if defined. If
you're using csh, put something like "setenv EDITOR emacsclient" in
your .cshrc.
If mutt doesn't honor this convention, you may need to separately
define set editor="emacsclient" somewhere. I don't know.
I tried this entry in ~/.muttrc too - just on the fly - it didn't work
either.
For more please see below.
This is the "client interface" for emacs, specifically designed for
this purpose. It will attach to a running emacs, if possible, or
create a new one, if necessary. See man emacsclient(1).
info emacsclient talks about a previously running emacs + server. this is
part of the documentary:
" You typically does not call emacsclient directly. Instead,
you set the environment variable EDITOR to emacsclient and
let programs like 'vipw' or 'bug' or anything run it for
you, which will use an existing Emacs to visit the file.
For emacsclient to work, you need an already running Emacs
with a server. Within Emacs, call the function &pi0;server-
start'. (Your &pi0;.emacs' file can do this automatically if
you add the expression &pi0;(server-start)' to it.)
When you've finished editing the buffer, type &pi0;C-x #'
(&pi0;server-edit'). This saves the file and sends a message
back to the &pi0;emacsclient' program telling it to exit. The
programs that use &pi0;EDITOR' wait for the "editor" (actu
ally, &pi0;emacsclient') to exit. &pi0;C-x #' also checks for
other pending external requests to edit various files, and
selects the next such file.
"
This sounds pretty complicated.
Is this the way to configure mutt? I must admit I do not
quite understand why I need a server-start w i t h i n emacs!
The third part of this text additionaly is very confusing.
Robert
Reply to: