all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Teemu Likonen <tlikonen@iki.fi>
To: TheLonelyStar <nabble2@lonely-star.org>
Cc: Help-gnu-emacs@gnu.org
Subject: Re: Auto enable text-mode when editing email (from mutt)
Date: Thu, 19 Feb 2009 23:35:24 +0200	[thread overview]
Message-ID: <87ab8iyusj.fsf@iki.fi> (raw)
In-Reply-To: <22109337.post@talk.nabble.com> (TheLonelyStar's message of "Thu\, 19 Feb 2009 12\:45\:47 -0800 \(PST\)")

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))))




  parent reply	other threads:[~2009-02-19 21:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
     [not found] <mailman.1214.1235076354.31690.help-gnu-emacs@gnu.org>
2009-02-21  9:42 ` Uwe Scholz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ab8iyusj.fsf@iki.fi \
    --to=tlikonen@iki.fi \
    --cc=Help-gnu-emacs@gnu.org \
    --cc=nabble2@lonely-star.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.