From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Unexpected fill-paragraph behaviour in message-mode Date: Mon, 13 Feb 2023 17:21:44 +0200 Message-ID: <834jrpfv5j.fsf@gnu.org> References: <87r0uu2wu3.fsf@rak.ac> <83edqtg037.fsf@gnu.org> <20230213144113.igujfoal7ervxifu@asteria.rak.ac> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18989"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 13 16:22:31 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRaf0-0004is-5Y for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 13 Feb 2023 16:22:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRaer-0005i4-Nc; Mon, 13 Feb 2023 10:22:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRaei-0005ez-Oa for help-gnu-emacs@gnu.org; Mon, 13 Feb 2023 10:22:12 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRaei-0004i6-DO for help-gnu-emacs@gnu.org; Mon, 13 Feb 2023 10:22:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=u3QvXzvAO8spSif9uKRZS0B23LdfWLqgyz6z9EDPGHE=; b=HVj8HpzwOw4p9Z5nf0np Drg/9apmNbLbcO9Mmu6WyEiNQd1AtQmf0o3GmAFSUViMP09EhJoGnOiHT7QPl9pZwKPu4s1wFMO4T Ci9Utut/iG2PV2H7OHL0rhgk6iaAG1zZdezX26rCrgVtwuAc/i4sMi9wkZVOWlHI2zwgEMB/daOVf hdThy81MNYuGfFaso5UmPo+Z71HroUoOae+WikaoINonGp0jUDr+at0z+7WTgtFlwUtES5FcSm2Rn 5xS/xoRWQZMxPXPXgJRDzfSuDUmgYBwwPtrAqlReheUCK4gnQfwxpGqOvXy1hyXG2zWAZN5DsIo5p vHR+rG1Y66dvCQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRaee-0000jW-OU for help-gnu-emacs@gnu.org; Mon, 13 Feb 2023 10:22:12 -0500 In-Reply-To: <20230213144113.igujfoal7ervxifu@asteria.rak.ac> (message from Ryan Kavanagh on Mon, 13 Feb 2023 09:41:13 -0500) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142740 Archived-At: > Date: Mon, 13 Feb 2023 09:41:13 -0500 > From: Ryan Kavanagh > > 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? Yes, use Emacs as $EDITOR (assuming those MUAs support that). Alternatively, use text-mode instead of message-mode. > > 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). Wrong place to look for the relevant stuff: those RFCs describes how email messages look _in_transit_, i.e. when they are sent over the wire. Here we are talking about the message in the edit buffer. Emacs removes the separator line before sending the message (actually, it sends the parts above and below the separator separately), so we are in full compliance with those RFCs. > 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. You could try that, but my response will be that message-mode is not meant for this job. It is a mode for composing email that is intended to be sent by Emacs MUA, not for editing arbitrary text.