From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alcor via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69920: Proposed fix - Toggling MIME inline attachment previews adds superfluous newlines Date: Fri, 22 Mar 2024 22:01:09 +0100 Message-ID: <87wmpuouay.fsf@tilde.club> References: <87bk78pywn.fsf@tilde.club> Reply-To: Alcor Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19729"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 69920@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 22 22:25:59 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 1rnmOk-0004zH-QG for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Mar 2024 22:25:59 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rnmOE-0003iz-45; Fri, 22 Mar 2024 17:25:26 -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 1rnmOA-0003ic-5W for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2024 17:25:22 -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 1rnmO9-0004wn-Pb for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2024 17:25:21 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rnmOn-0001mE-Uw for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2024 17:26:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87bk78pywn.fsf@tilde.club> Resent-From: Alcor Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Mar 2024 21:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69920 X-GNU-PR-Package: emacs Original-Received: via spool by 69920-submit@debbugs.gnu.org id=B69920.17111427206706 (code B ref 69920); Fri, 22 Mar 2024 21:26:01 +0000 Original-Received: (at 69920) by debbugs.gnu.org; 22 Mar 2024 21:25:20 +0000 Original-Received: from localhost ([127.0.0.1]:50355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnmO7-0001jx-7h for submit@debbugs.gnu.org; Fri, 22 Mar 2024 17:25:20 -0400 Original-Received: from tilde.club ([142.44.150.184]:44514 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnm1g-0000hr-2b for 69920@debbugs.gnu.org; Fri, 22 Mar 2024 17:02:08 -0400 Original-Received: from topazii.tilde.club (unknown [IPv6:2001:9e8:7cd:5200:bbe8:2b24:626f:ac56]) by tilde.club (Postfix) with ESMTPSA id DF07E2213F7A6 for <69920@debbugs.gnu.org>; Fri, 22 Mar 2024 21:01:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club DF07E2213F7A6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1711141286; bh=jFEcWCoi+atxHRzhjmo03aHTNFbiqEXrgwjZOKkVefA=; h=From:To:Subject:Date:From; b=hlxDnygvgvvqnT/+05piLjOoP7V1BHnd5mfajvhrbwbBNxSsEu7j757dUqe0qHmI+ scy+t+j8ICH5GrHbm6WoX0I60rGVMxizWcKI72SJmsi4sPAwPyafCY8gLa0zhBwxiJ VIQZnbKbXTXerv8KnQJL+1LbZfQNfVUdFunHY6/U= 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:281958 Archived-At: --=-=-= Content-Type: text/plain Hi Emacs maintainers, After some investigation, I noticed that `mm-inline-image' adds a newline via (insert "\n") directly after `insert-image' for unclear reasons. Removing the (insert "\n") form seems to resolve the issue (along with the other issues mentioned under "Additionally, the following can be observed") in the initial bug report message. A patch is included illustrating the change made, but I'm unfamiliar with the gnus codebase. It would be great if somebody more experienced took a look. Cheers, -A. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Do-not-add-a-superfluous-newline-after-insert-image.patch >From f04178b25010f1a91094bea6b4a0fcbc590b14b0 Mon Sep 17 00:00:00 2001 From: "F. Moukayed" Date: Fri, 22 Mar 2024 20:46:21 +0000 Subject: [PATCH] Do not add a superfluous newline after `insert-image'. * lisp/gnus/mm-view.el (mm-inline-image): Remove unnecessary (insert "\n") to resolve issues with toggling inline attachment previews (bug#69920). --- lisp/gnus/mm-view.el | 1 - 1 file changed, 1 deletion(-) diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 3a71920..50636de 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -99,7 +99,6 @@ This is only used if `mm-inline-large-images' is set to (- (nth 3 edges) (nth 1 edges))))))) image)) "x") - (insert "\n") (mm-handle-set-undisplayer handle (lambda () -- 2.34.1 --=-=-=--