all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bob Proulx <bob@proulx.com>
To: Philippe Delavalade <philippe.delavalade@orange.fr>
Cc: help-gnu-emacs@gnu.org
Subject: Re: emacs or mutt ?
Date: Wed, 13 Mar 2019 00:42:49 -0600	[thread overview]
Message-ID: <20190313001639720014061@bob.proulx.com> (raw)
In-Reply-To: <20190310102332.GA2029@magellan.machin.org>

Philippe Delavalade wrote:
> I don't know if it is the right place for this question because it truns
> around emacs but also around mutt.

I am using mutt and emacs to read and reply to this message.

> I encounter a problem with emacs and mutt under gnu/linux.

What is the GNU/Linux OS distribution?

> In .emacs I have the line :
> (add-hook 'text-mode-hook 'turn-on-auto-fill)
> 
> In .muttrc I have this line :
> set editor="emacs --eval '(text-mode)'"

In my muttrc file:

  set editor="emacs"

In my ~/.emacs file:

  (add-hook 'text-mode-hook
	  (lambda ()
	    (abbrev-mode 1)
	    (auto-fill-mode 1)))

post-mail-message is set to "\\(mutt-[a-zA-Z0-9-.]+-[0-9]+-[0-9]+\\(-[a-fA-F0-9]+\\)?\\|mutt[a-zA-Z0-9._-]\\{6\\}\\)\\'"

> Formerly, when writing a message with muut, the buffer was in text-mode
> and fill-mode was active.
> 
> Today, with emacs 26.1 instead of 25.3 and mutt 1.11.3 instead of
> 1.10.1, this is no more the case.

I am using emacs 26.1 and mutt 1.10.1.

> When I write a message in mutt, emacs is called but the buffer is in
> fundamental mode and I must type M-x auto-fill-mode :-(.
> 
> I tried in .muttrc
> set editor=emacs --debug-init --eval '(text-mode)'"
> but nothing wrong was detected.
> 
> Can someone give me an hint to resore the right comportment?

I think either post-mail-message should be set or perhaps use
something like this to set text-mode for mutt buffers.

(setq auto-mode-alist	 ; Note: RE matches full pathname, so
      (append		 ; '^' matches / in /dir/dir/filename
       '(
 	 ("^\\(/var\\)?/tmp/mutt" . text-mode)
 	 )
       auto-mode-alist))

By the way...  I also set this in mutt so that buffers are stored in
/var/tmp instead of /tmp since /tmp is purged on a reboot and an
accidental system crash would not preserve the draft.  But putting it
in /var/tmp will preserve the draft across a system crash and reboot.

  set tmpdir="/var/tmp"

Bob



      parent reply	other threads:[~2019-03-13  6:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-10 10:23 emacs or mutt ? Philippe Delavalade
2019-03-10 16:16 ` Joost Kremers
2019-03-10 22:08   ` Philippe Delavalade
2019-03-11  7:53     ` tomas
2019-03-11  9:39       ` Joost Kremers
2019-03-11  9:49         ` tomas
2019-03-13  1:47           ` 황병희
2019-03-13  8:30             ` tomas
2019-03-11  9:50     ` Joost Kremers
2019-03-13  6:42 ` Bob Proulx [this message]

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=20190313001639720014061@bob.proulx.com \
    --to=bob@proulx.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=philippe.delavalade@orange.fr \
    /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.