[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Emacs and mutt



The problem is that if you have this line in your .muttrc:

	set editor = "/usr/bin/emacs -nw -f text-mode"

mutt will append the filename to it, giving

	/usr/bin/emacs -nw -f text-mode mutt-foo-1234-56

which tells emacs, "Start in same window, switch to text mode, then
load the new file."  The new file will be loaded in your normal
default mode.  If you go back to emacs's initial buffer, the one named
"*scratch*", you'll find that it's in text mode, just as you
requested.

The solution is to use a %s, which mutt substitutes with the filename:

	set editor = "/usr/bin/emacs -nw %s -f text-mode"

Now you're telling emacs to load your file, and then switch to text
mode.

BTW, to make sure it's in auto-fill (i.e., word-wrap) mode, you can say:

	set editor = "/usr/bin/emacs -nw %s -f text-mode -f turn-on-auto-fill"

--Pete



On Wed, Jul 24, 2002 at 10:01:17PM -0700, Paul Johnson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Thu, Jul 25, 2002 at 02:06:06PM +0930, Tom Cook wrote:
> > Using text mode or post mode?  If you want post mode then you need the
> > post-el package.  If you mean you tried editor="emacs-nw -f text-mode"
> > then I am stumped.  It works for me.  If you try this command from the
> > command line, does it start in text mode?
> 
> Using text-mode, it doesn't work from mutt.  On the command line, it works.
> 
> - -- 
> Baloo
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
> 
> iD8DBQE9P4YdNtWkM9Ny9xURArHqAKCEYWbjoRpg/8eRvFEbG5RBo8X3SwCeNdfE
> s1mmAS0enhQ2VyhRc8I5Hi0=
> =/sxj
> -----END PGP SIGNATURE-----
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: