From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pengji Zhang Newsgroups: gmane.emacs.bugs Subject: bug#72870: [PATCH] Flow fill texts after the last hard newline Date: Mon, 09 Sep 2024 12:04:02 +0800 Message-ID: <877cblcw25.fsf@pengjiz.com> References: <87cylr7gmj.fsf@pengjiz.com> <867cbnzysx.fsf@gnu.org> <878qw2uzo3.fsf@pengjiz.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22192"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72870@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 09 06:37:58 2024 Return-path: Envelope-to: geb-bug-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 1snWA1-0005aB-Ah for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 Sep 2024 06:37:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1snW8r-0008MC-0s; Mon, 09 Sep 2024 00:36:45 -0400 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 1snVe7-0004un-Mo for bug-gnu-emacs@gnu.org; Mon, 09 Sep 2024 00:04:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1snVe7-0004QF-De for bug-gnu-emacs@gnu.org; Mon, 09 Sep 2024 00:04:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=VR6cUnKFtwIxDxjluOzkv+y9RBhpB/UDxmzy9yeQahM=; b=CUKr9wB82ISnG/XBJTVyrkdTindMZiamuMZMoCpN2U8Gxkd2U/0NTNqQU01XkWnBc0f3MGpwKUN8Qh2M7fONArxr4qQWOnfVUowCADc49JszWBFoO5jJwex6w+QiHs+orrZARarJV2EMFn9wr8SQm0rAJtD4pfA42MwUauOvcvuoIVKp7gWB27l/a8iLx0YsxPnOnutHfqM+FZ53jXHtJPvCD0OeYTIErj6N+ZmAc20v9DVIP+4MzAKa4peo0ps9KAAwj+hKjE7zO3M09ji9AF9W6RfTBwK8oMNcl0MW/p+tZMggj09uQ2wYsxBWDXjLZeZHPs4U6kSaxJFwFiFoQw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1snVeA-0000pC-7F for bug-gnu-emacs@gnu.org; Mon, 09 Sep 2024 00:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pengji Zhang Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Sep 2024 04:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72870 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 72870-submit@debbugs.gnu.org id=B72870.17258546683082 (code B ref 72870); Mon, 09 Sep 2024 04:05:02 +0000 Original-Received: (at 72870) by debbugs.gnu.org; 9 Sep 2024 04:04:28 +0000 Original-Received: from localhost ([127.0.0.1]:60426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snVdc-0000nd-AR for submit@debbugs.gnu.org; Mon, 09 Sep 2024 00:04:28 -0400 Original-Received: from fhigh5-smtp.messagingengine.com ([103.168.172.156]:51347) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snVda-0000nK-39 for 72870@debbugs.gnu.org; Mon, 09 Sep 2024 00:04:26 -0400 Original-Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfhigh.phl.internal (Postfix) with ESMTP id A4C191140173; Mon, 9 Sep 2024 00:04:17 -0400 (EDT) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-09.internal (MEProxy); Mon, 09 Sep 2024 00:04:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pengjiz.com; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1725854657; x=1725941057; bh=VR6cUnKFtw IxDxjluOzkv+y9RBhpB/UDxmzy9yeQahM=; b=kyFiJ02VW1Upgt7cctdA4edbNI Vu1AjxR/rl8EsKuwX/3B05w1E43zL2VGq6aSn6JY5XakKbpusrkQOX0KNomyAT+S gtA/NFA73RiNMO9Lkr2DSXV1wJdK3QEABXmQNIMzxK+v0taervR2zPiBY7qfkJ/g ut0EPRMZ3M74BOijNI3XsfAy41bPFBsemg4nw3/5SvxfYefDaQmH0D92earkyLlR Hy66zh43hpC1yMhMLb/kwOChOtrd0FuWKoLIJ+9aZwc1OU+DBqtIp2HZOfzgIUrn GpFeYurL+sKxP81+pUnCyqLGz2OYcjCUnQOaChXCp5+2LjC22xJEfXdJuAKg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1725854657; x=1725941057; bh=VR6cUnKFtwIxDxjluOzkv+y9RBhp B/UDxmzy9yeQahM=; b=nl5BCZHqeOP4okuVwgw2UFIhwJpNQN78B93TsSZhC9kO C9k0taIogxJ0+cJu+TJT/Hu9F4+/pKt5RaGM1LOSAQn1PWtuQu1hOlv5O+Iu8NOu HUDncAJZIu/17sfGxBrxuKMrrp7ph8eAO/um/4gusy7hQLArS0ZJkWZTsPmR9ezl SnUX5jWkwW7Xh4GJsVnF7+XPbB5N86714ATKZ+Q3xibIodpZycVfG/9BtWX4Whmp Jzbq1HARHDiyFWGWjx333WVtJkeXWpoLCORBwM+z0dbcEDsRt1GFgDEGrA/K55PL YAOubejBVslcWLI7wy487dFHtegOpXkfNnnZe8jzTQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudeiiedgieekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefujghffffkgggtsehttdertddttddtnecu hfhrohhmpefrvghnghhjihcukghhrghnghcuoehmvgesphgvnhhgjhhiiidrtghomheqne cuggftrfgrthhtvghrnhepkeehjeeihfeigefghfduvdfgjeeljeffudeiheekheefffeh udeutddvjefgheetnecuffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgvsehpvghnghhjihiirdgtohhm pdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegvlh hiiiesghhnuhdrohhrghdprhgtphhtthhopeejvdekjedtseguvggssghughhsrdhgnhhu rdhorhhg X-ME-Proxy: Feedback-ID: i16614472:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 Sep 2024 00:04:16 -0400 (EDT) In-Reply-To: <878qw2uzo3.fsf@pengjiz.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291490 Archived-At: Pengji Zhang writes: > Eli Zaretskii writes: > >> AFAICT, this function exists for the special case of decoding >> email messages. Can email messages have flowed-encoded text >> without a hard newline at the end? > > I think you meant "encoding"? Anyway, if I understand it > correctly, an email message should always end with a newline, > but it is not necessarily a hard newline. For example, > 'message.el' inserts a normal newline: > > https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/gnus/message.el#n4944 I just realized this insertion of newline happens after encoding, so this is irrelevant here. Sorry. It seems that during encoding, no such a newline is added at all. To reproduce: - Run 'emacs -Q' - C-x m C-c C-b - M-x use-hard-newlines RET n - C-x f 10 RET - Eval: (dotimes (i 10) (insert "word ")) - RET RET - Eval: (dotimes (i 10) (insert "word ")) - M-q - C-u M-x mml-preview RET In the preview buffer, the first paragraph is filled but the second is not.