From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ryan Kavanagh Newsgroups: gmane.emacs.help Subject: Re: Unexpected fill-paragraph behaviour in message-mode Date: Mon, 13 Feb 2023 09:41:13 -0500 Message-ID: <20230213144113.igujfoal7ervxifu@asteria.rak.ac> References: <87r0uu2wu3.fsf@rak.ac> <83edqtg037.fsf@gnu.org> 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="36120"; 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 15:42:25 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 1pRa2C-0009B4-Fa for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 13 Feb 2023 15:42:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRa1P-0007r2-SZ; Mon, 13 Feb 2023 09:41:35 -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 1pRa1N-0007Wd-Ho for help-gnu-emacs@gnu.org; Mon, 13 Feb 2023 09:41:33 -0500 Original-Received: from hades.rak.ac ([159.203.58.186]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRa1L-0005Xl-H6 for help-gnu-emacs@gnu.org; Mon, 13 Feb 2023 09:41:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rak.ac; s=aug2020.hades; t=1676299289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:openpgp:openpgp; bh=2T5GOF1xYK+NjcdT7odMOPyW8sth8f1ZlOxjx8MCdmM=; b=shRlb1XPWTq99e/AwN14bBlnUtExWjJMIFKnCnjtMttlROlnqL2yrfWvm4Mg2MbGy9PbUe ALsR6YOujt3ss60BPZW5lofTHDqdJmKipVAx0J7Xn31RmdIzy/WsDEB9u6KH7ojmqhF9MX Kl7PZ1OGN4edgCYx4ZXIHAZV9ZoiBjXoijhGiuD+tLUNXzprED0cdFDHwtB/Y/XeXTpCcd Urn18PzcuwdkO3ya5J65AxQBg2G2s2GtU6xhE0vzMP9XKJPrsBYv5SMNLvas9lAzdXPVxu DWXgoPQtGdItmUYlB0cY/oWjXYjam+EReU49UQmlatWxCk5wUnPC2vJ03jqhog== Original-Received: by hades.rak.ac (OpenSMTPD) with ESMTPSA id 5eda4339 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) auth=yes user=asteria for ; Mon, 13 Feb 2023 09:41:28 -0500 (EST) Original-Received: from localhost (asteria.rak.ac [local]) by asteria.rak.ac (OpenSMTPD) with ESMTPA id 8ead004e for ; Mon, 13 Feb 2023 14:41:13 +0000 (UTC) OpenPGP: id=4E469519ED677734268FBD958F7BF8FC4A11C97A; url=https://rak.ac/contact/4E469519ED677734268FBD958F7BF8FC4A11C97A.asc; preference=sign Content-Disposition: inline In-Reply-To: <83edqtg037.fsf@gnu.org> Received-SPF: pass client-ip=159.203.58.186; envelope-from=rak@rak.ac; helo=hades.rak.ac X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:142737 Archived-At: 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