From unknown Sat Jun 21 10:20:50 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#42300 <42300@debbugs.gnu.org> To: bug#42300 <42300@debbugs.gnu.org> Subject: Status: Visual bug in diff-mode Reply-To: bug#42300 <42300@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:20:50 +0000 retitle 42300 Visual bug in diff-mode reassign 42300 emacs submitter 42300 Gregory Heytings severity 42300 normal tag 42300 fixed patch confirmed thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 09 19:26:32 2020 Received: (at submit) by debbugs.gnu.org; 9 Jul 2020 23:26:32 +0000 Received: from localhost ([127.0.0.1]:41873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtfvy-0005s7-8m for submit@debbugs.gnu.org; Thu, 09 Jul 2020 19:26:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:57158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtc9P-0004D9-75 for submit@debbugs.gnu.org; Thu, 09 Jul 2020 15:24:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtc9P-0002nE-1D for bug-gnu-emacs@gnu.org; Thu, 09 Jul 2020 15:24:07 -0400 Received: from mx.sdf.org ([205.166.94.24]:58452) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtc9K-0006Ge-TN for bug-gnu-emacs@gnu.org; Thu, 09 Jul 2020 15:24:06 -0400 Received: from sdf.org (IDENT:ghe@faeroes.freeshell.org [205.166.94.9]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 069JNgVc021830 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Thu, 9 Jul 2020 19:23:43 GMT Received: (from ghe@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 069JNg9g021997; Thu, 9 Jul 2020 19:23:42 GMT Date: Thu, 9 Jul 2020 21:23:36 +0200 (CEST) From: Gregory Heytings To: bug-gnu-emacs@gnu.org Subject: Visual bug in diff-mode Message-ID: User-Agent: Alpine 2.21 (NEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Received-SPF: pass client-ip=205.166.94.24; envelope-from=ghe@sdf.org; helo=mx.sdf.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/09 15:23:57 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 09 Jul 2020 19:26:29 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Diff-mode was updated in Emacs 27, and it is now possible to use the fringe to indicate whether the lines were added, deleted, or are common. The face is omitted in the display property in the case common lines, which leads to the bug described below. Steps to reproduce: 1. start emacs -Q 2. (setq diff-font-lock-prettify t) 3. to make the bug clearly visible: (set-face-attribute 'fringe nil :background "red" :foreground "yellow") 4. open a diff file (with "common" lines, that is, lines starting with a space) 5. observe that the fringe in front of the common lines is red 6. press C-x C-+, the fringe in front of the common lines is now white 7. press -, the fringe in front of the common lines is now red again Fix: --- diff-mode.el.orig 2020-06-29 17:39:26.000000000 +0000 +++ diff-mode.el 2020-07-09 18:44:08.000000000 +0000 @@ -2518,7 +2518,7 @@ '((?+ . (left-fringe diff-fringe-add diff-indicator-added)) (?- . (left-fringe diff-fringe-del diff-indicator-removed)) (?! . (left-fringe diff-fringe-rep diff-indicator-changed)) - (?\s . (left-fringe diff-fringe-nul)))))) + (?\s . (left-fringe diff-fringe-nul fringe)))))) (put-text-property (match-beginning 0) (match-end 0) 'display spec)))) ;; Mimicks the output of Magit's diff. ;; FIXME: This has only been tested with Git's diff output. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 13 12:13:28 2020 Received: (at control) by debbugs.gnu.org; 13 Aug 2020 16:13:28 +0000 Received: from localhost ([127.0.0.1]:50781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6Fr6-0007fi-MM for submit@debbugs.gnu.org; Thu, 13 Aug 2020 12:13:28 -0400 Received: from mail-yb1-f172.google.com ([209.85.219.172]:33200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6Fr4-0007fT-Rx for control@debbugs.gnu.org; Thu, 13 Aug 2020 12:13:27 -0400 Received: by mail-yb1-f172.google.com with SMTP id p191so3620041ybg.0 for ; Thu, 13 Aug 2020 09:13:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=TiseYmdksBGFduD2OKFEF98qREUDhHznwKQnzB8594M=; b=RBIqmAs+FQiA6+5qdR6w8upa0hy5dh6W3PKk8rA8FBTaQ1f3/Leg4dM0a8uoba/7WK TQK96bBacD2H0FhSZCdjKa5gt6eWyRFJ0txEWxPN8lDXYkK73iSSPtLazdwedArP62Wj 2fG+Kg+E1irRl2Sn9Gr8ATa3sSfAOM+AZOhq8Gfae5lKF/8xIhN7C4JIiQEsF037o+nq Oz5+FAqvcZiFcT1nJwdxmiDI3CMkoYH5AzYaXr9oYP/ILzJvwGgiKExWK57nHtkvAntz 9hBarFPfM/JPKr2nREyoS35vvomJCLhDoWcLXxr7A5K4LkAH6Ki/ZZI7vSU9i4PMFYIT hPtA== X-Gm-Message-State: AOAM5339Wlk/mzatg5iEu4rLAHQyh7W2G1I+s7AurQVnyu7NiI74Zu4+ b6fpSCdlt/S1qGp8ODZwfT7Z9A0hrIkq9yxRCuS1Wa+fyzU= X-Google-Smtp-Source: ABdhPJzYm2rBa61OeRHKdBC4N5iNYM3Cnw3kFhe48Fs5Cq62v+K+Q+ccu+tcaXgdazl0ufVijrE02GLEPfKah78ii3c= X-Received: by 2002:a5b:410:: with SMTP id m16mr7514752ybp.309.1597335201225; Thu, 13 Aug 2020 09:13:21 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 13 Aug 2020 09:13:20 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Thu, 13 Aug 2020 09:13:20 -0700 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 42300 + patch thanks Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.219.172 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.219.172 listed in list.dnswl.org] 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 2.0 BLANK_SUBJECT Subject is present but empty X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) tags 42300 + patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 13 12:24:00 2020 Received: (at control) by debbugs.gnu.org; 13 Aug 2020 16:24:01 +0000 Received: from localhost ([127.0.0.1]:50800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6G1I-0001hz-GI for submit@debbugs.gnu.org; Thu, 13 Aug 2020 12:24:00 -0400 Received: from mail-ej1-f53.google.com ([209.85.218.53]:33717) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6G1G-0001hk-TO for control@debbugs.gnu.org; Thu, 13 Aug 2020 12:23:59 -0400 Received: by mail-ej1-f53.google.com with SMTP id jp10so6848303ejb.0 for ; Thu, 13 Aug 2020 09:23:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=QTCfBb6RjGhHlMAeRGFTDJLvcC97PCoPcvaVGP4YGIQ=; b=fqDxsJm9CPytBpBoMpe57gpO85kcNl7ho0Syon5HGCMpENcRPZ7MrnS8YxzI0qpRpC ANQ/A6mH6/1Pmm89aIQcFpIU2H0R+6kX9HZg1UFwLpmRqWm/Z7qu1RkJMp5psIwWGmGA g9NYh2YZLPeIawLW0RuI+pvHfQLq0boT6tKd310A3lmpqpG9ikYf4o05dR7MJXPAIFdL +LCTy6l1YxXT1QGA/DKg8KEfEqLaPX+LVFDCpunnmfTKKyYRkhWwJSQ6CPKJKh2xJ6jF mpkhGsfN/0uTXaJwqGVgjOVENErXNRr01euh5H+rNvVTSF2Fqlx/x8CvC1OP2yMsHZZ6 jhoA== X-Gm-Message-State: AOAM5322aLmLsGHKLcQ2SXG5LP8ZQHdMRQRs6YukkRF0FjW6HFZSTa/c g3HpGKmdMX1bylpIFRVve49ruuhshtdJ0wH+QZM= X-Google-Smtp-Source: ABdhPJznPQylsQf94PmgDCuuNz+PxccWSeVrUIU5Jh24zKoIc0jmpG9ooRnxuuz8beojl5fSzLclSywNDIXr9xR+LFo= X-Received: by 2002:a17:907:11dd:: with SMTP id va29mr5702972ejb.470.1597335833136; Thu, 13 Aug 2020 09:23:53 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 13 Aug 2020 09:23:52 -0700 From: Stefan Kangas In-Reply-To: (Gregory Heytings's message of "Thu, 9 Jul 2020 21:23:36 +0200 (CEST)") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Thu, 13 Aug 2020 09:23:52 -0700 Message-ID: Subject: Re: bug#42300: Visual bug in diff-mode To: Gregory Heytings Content-Type: text/plain; charset="UTF-8" Bcc: control@debbugs.gnu.org X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: 42300@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 42300 + confirmed found 42300 28.0.50 thanks Gregory Heytings writes: > Diff-mode was updated in Emacs 27, and it is now possible to use the fringe to > indicate whether the lines were added, deleted, or are common. The face is > omitted in the display property in the case common lines, which leads to the bug > described below. > > Steps to reproduce: > > 1. start emacs -Q > 2. (setq diff-font-lock-prettify t) > 3. to make the bug clearly visible: (set-face-attribute 'fringe nil :background "red" :foreground "yellow") > 4. open a diff file (with "common" lines, that is, lines starting with a space) > 5. observe that the fringe in front of the common lines is red > 6. press C-x C-+, the fringe in front of the common lines is now white > 7. press -, the fringe in front of the common lines is now red again I can reproduce this on current master, and verify that the below change fixes it. I'm not that familiar with diff-mode.ela nor font-locking so it's better that someone else takes a look and installs the fix. > --- diff-mode.el.orig 2020-06-29 17:39:26.000000000 +0000 > +++ diff-mode.el 2020-07-09 18:44:08.000000000 +0000 > @@ -2518,7 +2518,7 @@ > '((?+ . (left-fringe diff-fringe-add diff-indicator-added)) > (?- . (left-fringe diff-fringe-del diff-indicator-removed)) > (?! . (left-fringe diff-fringe-rep diff-indicator-changed)) > - (?\s . (left-fringe diff-fringe-nul)))))) > + (?\s . (left-fringe diff-fringe-nul fringe)))))) > (put-text-property (match-beginning 0) (match-end 0) 'display spec)))) > ;; Mimicks the output of Magit's diff. > ;; FIXME: This has only been tested with Git's diff output. Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 14 11:34:11 2020 Received: (at 42300) by debbugs.gnu.org; 14 Aug 2020 15:34:11 +0000 Received: from localhost ([127.0.0.1]:53563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6biU-0000p9-J6 for submit@debbugs.gnu.org; Fri, 14 Aug 2020 11:34:11 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6biS-0000oc-MV for 42300@debbugs.gnu.org; Fri, 14 Aug 2020 11:34:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=f2cjqKYYLL8uOaLLCeLvxf56i+MioeHN/grap4TQEaU=; b=Hhni7jnEQEBpC21BezbhOACpqd GMhOouu/NgWYCxVHQEkKW/7Othr5EYRYi2GBpHLxd7oOjDahpX5e4CZ/W9qFfCoFUC6DfEUcqcS2B 0Pi5DqDP1EnR1IdTXZ7PW3MECxzEd6YhQSFYLg6ij2PWkNamGqT5+dTKBXi8/ZFxYyLs=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k6biI-0003dn-WD; Fri, 14 Aug 2020 17:33:53 +0200 From: Lars Ingebrigtsen To: Stefan Kangas Subject: Re: bug#42300: Visual bug in diff-mode References: Date: Fri, 14 Aug 2020 17:33:49 +0200 In-Reply-To: (Stefan Kangas's message of "Thu, 13 Aug 2020 09:23:52 -0700") Message-ID: <87y2mh44yq.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Kangas writes: > I can reproduce this on current master, and verify that the below change > fixes it. > > I'm not that familiar with diff-mode.ela nor font-locking so it's better > that someone else takes a look and [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42300 Cc: Gregory Heytings , 42300@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Kangas writes: > I can reproduce this on current master, and verify that the below change > fixes it. > > I'm not that familiar with diff-mode.ela nor font-locking so it's better > that someone else takes a look and installs the fix. I'm not very familiar with that, either, but it seems "obviously correct", if I understand that code correctly. So I went ahead and pushed it to Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 14 11:34:11 2020 Received: (at control) by debbugs.gnu.org; 14 Aug 2020 15:34:11 +0000 Received: from localhost ([127.0.0.1]:53566 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6bid-0000pQ-9m for submit@debbugs.gnu.org; Fri, 14 Aug 2020 11:34:11 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6biY-0000os-UQ for control@debbugs.gnu.org; Fri, 14 Aug 2020 11:34:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9lBM8lPTmTtirEHwrjCtycprNFO4PJNr8tNzu9RoMiU=; b=YdV48vPabnEsOhY+XJREAA5VBz 3hQCHDD96zK4p43xK5JT1dQhYiSgyn8E8vizzF1ktyx67ids4mfYzyYNtgUJM/2M0YKIt0FRdst7K gP+r/BlwNEMXGJWlFBwMIjYNl1zyF8i6pH6FlAO0KXRnsdslUjlbdR0y0vGvg8IEZDTg=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k6biR-0003dv-6G for control@debbugs.gnu.org; Fri, 14 Aug 2020 17:34:01 +0200 Date: Fri, 14 Aug 2020 17:33:58 +0200 Message-Id: <87wo2144yh.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #42300 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 42300 fixed close 42300 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 42300 fixed close 42300 28.1 quit From unknown Sat Jun 21 10:20:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 12 Sep 2020 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator