all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Auto enable text-mode when editing email (from mutt)
@ 2009-02-19 20:45 TheLonelyStar
  2009-02-19 21:14 ` tyler
  2009-02-19 21:35 ` Teemu Likonen
  0 siblings, 2 replies; 4+ messages in thread
From: TheLonelyStar @ 2009-02-19 20:45 UTC (permalink / raw)
  To: Help-gnu-emacs


Hi,

I use emacs to edit my emails (from mutt). It is started with this line:
/usr/bin/emacs -nw -q

Now, editing emails in text-mode instead of fundamental mode would be much
cooler!
How can I make emacs got to text-mode when invoked from mutt?

Thanks!
Nathan
-- 
View this message in context: http://www.nabble.com/Auto-enable-text-mode-when-editing-email-%28from-mutt%29-tp22109337p22109337.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Auto enable text-mode when editing email (from mutt)
  2009-02-19 20:45 Auto enable text-mode when editing email (from mutt) TheLonelyStar
@ 2009-02-19 21:14 ` tyler
  2009-02-19 21:35 ` Teemu Likonen
  1 sibling, 0 replies; 4+ messages in thread
From: tyler @ 2009-02-19 21:14 UTC (permalink / raw)
  To: help-gnu-emacs

TheLonelyStar <nabble2@lonely-star.org> writes:

> I use emacs to edit my emails (from mutt). It is started with this line:
> /usr/bin/emacs -nw -q
>
> Now, editing emails in text-mode instead of fundamental mode would be much
> cooler!
> How can I make emacs got to text-mode when invoked from mutt?
>

I haven't used mutt in a while, but I still have this in my .emacs:

(add-to-list 'auto-mode-alist '("/mutt" . mail-mode))

I believe that that will put all buffers visiting mutt files into
mail-mode automatically. You could switch that to text-mode, but you
might find that mail-mode covers what you want already.

Cheers,

Tyler

-- 
Friends don't let friends send Word documents

http://www.nothingisreal.com/dfki/no-word





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Auto enable text-mode when editing email (from mutt)
  2009-02-19 20:45 Auto enable text-mode when editing email (from mutt) TheLonelyStar
  2009-02-19 21:14 ` tyler
@ 2009-02-19 21:35 ` Teemu Likonen
  1 sibling, 0 replies; 4+ messages in thread
From: Teemu Likonen @ 2009-02-19 21:35 UTC (permalink / raw)
  To: TheLonelyStar; +Cc: Help-gnu-emacs

On 2009-02-19 12:45 (-0800), TheLonelyStar wrote:

> I use emacs to edit my emails (from mutt). It is started with this
> line: /usr/bin/emacs -nw -q
>
> Now, editing emails in text-mode instead of fundamental mode would be
> much cooler! How can I make emacs got to text-mode when invoked from
> mutt?

Maybe you want to use mail-mode instead? This should work:

    (add-to-list 'auto-mode-alist
                 '("\\`/tmp/mutt-[^/]+\\'" . mail-mode))

My suggestion for mail-mode settings:

    (add-hook 'mail-mode-hook
              '(lambda ()
                 (auto-fill-mode 1)
                 (set (make-local-variable 'tab-stop-list)
                      (number-sequence 4 100 4))
                 (setq indent-tabs-mode nil
                       fill-column 72)
                 (when (>= emacs-major-version 23)
                   (visual-line-mode 1))))




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Auto enable text-mode when editing email (from mutt)
       [not found] <mailman.1214.1235076354.31690.help-gnu-emacs@gnu.org>
@ 2009-02-21  9:42 ` Uwe Scholz
  0 siblings, 0 replies; 4+ messages in thread
From: Uwe Scholz @ 2009-02-21  9:42 UTC (permalink / raw)
  To: help-gnu-emacs

On Thu, 19 Feb 2009 12:45:47 -0800, TheLonelyStar wrote:

> Hi,
> 
> I use emacs to edit my emails (from mutt). It is started with this line:
> /usr/bin/emacs -nw -q
> 
> Now, editing emails in text-mode instead of fundamental mode would be
> much cooler!
> How can I make emacs got to text-mode when invoked from mutt?
> 
> Thanks!
> Nathan

Hello,

I prefer 'post-mode' for editing outgoing mail with emacs started from 
mutt. You can get it from here: http://sourceforge.net/projects/post-mode/

To use it, you have to put the el-file in a folder you want, lets say 
".emacs.stuff" and insert the following lines to your .emacs file:

(setq load-path (cons "~/.emacs.stuff" load-path))
(load "post")

This starts the post-mode every time, you start emacs. For running emacs 
using mutt I wrote an extra config-file with the postmode-entry and 
insert the line

set editor='emacs -nw -l ~/.emacs.mail'

in .muttrc.

Ciao, Uwe


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-02-21  9:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-19 20:45 Auto enable text-mode when editing email (from mutt) TheLonelyStar
2009-02-19 21:14 ` tyler
2009-02-19 21:35 ` Teemu Likonen
     [not found] <mailman.1214.1235076354.31690.help-gnu-emacs@gnu.org>
2009-02-21  9:42 ` Uwe Scholz

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.