From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.help Subject: Re: Auto enable text-mode when editing email (from mutt) Date: Thu, 19 Feb 2009 23:35:24 +0200 Message-ID: <87ab8iyusj.fsf@iki.fi> References: <22109337.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1235079381 24552 80.91.229.12 (19 Feb 2009 21:36:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Feb 2009 21:36:21 +0000 (UTC) Cc: Help-gnu-emacs@gnu.org To: TheLonelyStar Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 19 22:37:31 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LaGa9-0005or-Er for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Feb 2009 22:37:21 +0100 Original-Received: from localhost ([127.0.0.1]:41126 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LaGYo-0007yZ-SZ for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Feb 2009 16:35:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LaGYT-0007yK-4B for help-gnu-emacs@gnu.org; Thu, 19 Feb 2009 16:35:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LaGYR-0007x0-GX for Help-gnu-emacs@gnu.org; Thu, 19 Feb 2009 16:35:36 -0500 Original-Received: from [199.232.76.173] (port=34998 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LaGYR-0007wr-C1 for Help-gnu-emacs@gnu.org; Thu, 19 Feb 2009 16:35:35 -0500 Original-Received: from mta-out.inet.fi ([195.156.147.13]:42157 helo=kirsi1.inet.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LaGYQ-0004s9-T8 for Help-gnu-emacs@gnu.org; Thu, 19 Feb 2009 16:35:35 -0500 Original-Received: from mithlond.arda.local (80.220.180.181) by kirsi1.inet.fi (8.5.014) id 48FC5AC9054BEFCE; Thu, 19 Feb 2009 23:35:24 +0200 Original-Received: from dtw by mithlond.arda.local with local (Exim 4.69) (envelope-from ) id 1LaGYG-0001z8-6z; Thu, 19 Feb 2009 23:35:24 +0200 In-Reply-To: <22109337.post@talk.nabble.com> (TheLonelyStar's message of "Thu\, 19 Feb 2009 12\:45\:47 -0800 \(PST\)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:62209 Archived-At: 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))))