[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unexpected fill-paragraph behaviour in message-mode
From: |
Teemu Likonen |
Subject: |
Re: Unexpected fill-paragraph behaviour in message-mode |
Date: |
Mon, 13 Feb 2023 17:20:42 +0200 |
User-agent: |
Notmuch/0.37 (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) |
* 2023-02-13 09:41:13-0500, Ryan Kavanagh wrote:
> On Mon, Feb 13, 2023 at 03:35:08PM +0200, Eli Zaretskii wrote:
>> This problem doesn't happen if the buffer has the expected separator
>> line saying "--text follows this line--". Why are you trying to use
>> message-mode in a buffer that is not formatted as an email message?
>
> The line was missing because I use (neo)mutt as my email client and I
> decided to try setting my editor to "emacsclient -c", but mutt does
> not insert said separator. Is there an alternate mode I should be
> using when compose emails with non-emacs MUAs?
> It would be nice to be able to use emacs as an editor with non-emacs
> MUAs, so I wonder if I shouldn't file a bug report asking message.el to
> fallback on the RFC (and set mail-header-separator to "") in the cases
> where "--text follows this line--" is missing.
I use rarely Mutt but for those cases I have defined a derived major
mode from message-mode. See the code below. I set mail-header-separator
variable locally to empty string, and it should answer your basic
question.
(add-to-list 'auto-mode-alist '("/var/tmp/mutt-.*" . mutt-message-mode))
(defvar mutt-message-mode-map
(let ((map (make-sparse-keymap)))
map))
(define-derived-mode mutt-message-mode message-mode "Mutt"
"Major mode for editing mail."
(set-keymap-parent mutt-message-mode-map nil)
(abbrev-mode 0)
(mml-mode 0)
(setq-local mail-header-separator ""))
--
/// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/
// OpenPGP: 6965F03973F0D4CA22B9410F0F2CAE0E07608462
signature.asc
Description: PGP signature
- Unexpected fill-paragraph behaviour in message-mode, Ryan Kavanagh, 2023/02/12
- Re: Unexpected fill-paragraph behaviour in message-mode, Eli Zaretskii, 2023/02/13
- Re: Unexpected fill-paragraph behaviour in message-mode, Ryan Kavanagh, 2023/02/13
- Re: Unexpected fill-paragraph behaviour in message-mode,
Teemu Likonen <=
- Re: Unexpected fill-paragraph behaviour in message-mode, Eli Zaretskii, 2023/02/13
- Re: Unexpected fill-paragraph behaviour in message-mode, Ryan Kavanagh, 2023/02/14
- Re: Unexpected fill-paragraph behaviour in message-mode, Jean Louis, 2023/02/14
- Re: Unexpected fill-paragraph behaviour in message-mode, Emanuel Berg, 2023/02/15
- Re: Unexpected fill-paragraph behaviour in message-mode, Stefan Monnier, 2023/02/15
- Re: Unexpected fill-paragraph behaviour in message-mode, Jean Louis, 2023/02/13
Re: Unexpected fill-paragraph behaviour in message-mode, Stefan Monnier, 2023/02/15