[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unexpected fill-paragraph behaviour in message-mode
From: |
Ryan Kavanagh |
Subject: |
Re: Unexpected fill-paragraph behaviour in message-mode |
Date: |
Mon, 13 Feb 2023 09:41:13 -0500 |
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?
> Without that separator, message-mode doesn't know where the headers
> end and the message body begins.
Quickly skimming message.el, it looks like message-mode (only?) supports
mail and news. In those cases, RFC 5322 §2.1 [0] and RFC 5536 §2 [1]
give the following separator:
The body is simply a sequence of characters that follows the header
section and is separated from the header section by an empty line
(i.e., a line with nothing preceding the CRLF).
Looking at the source in message.el, it usually finds the separation
between header and body using:
(re-search-forward
(concat "^" (regexp-quote mail-header-separator) "$")
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.
Best wishes,
Ryan
[0] https://www.rfc-editor.org/rfc/rfc5322#section-2.1
[1] https://www.rfc-editor.org/rfc/rfc5536#section-2
--
|)|/ Ryan Kavanagh | 4E46 9519 ED67 7734 268F
|\|\ https://rak.ac | BD95 8F7B F8FC 4A11 C97A
- 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 <=
- Re: Unexpected fill-paragraph behaviour in message-mode, Teemu Likonen, 2023/02/13
- 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