GNU bug report logs - #61396
diff mode could distinguish changed from deleted lines

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Samuel Wales <samologist@HIDDEN>; dated Fri, 10 Feb 2023 03:26:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 13 Sep 2023 14:53:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 13 10:53:18 2023
Received: from localhost ([127.0.0.1]:35619 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qgRF0-0002CH-4M
	for submit <at> debbugs.gnu.org; Wed, 13 Sep 2023 10:53:18 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:44203)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qgREy-0002C5-4v
 for 61396 <at> debbugs.gnu.org; Wed, 13 Sep 2023 10:53:17 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 0B3FA441BD8;
 Wed, 13 Sep 2023 10:53:05 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1694616783;
 bh=jgalYovRBdKAPaR/Jh8Lu2LvxrnNrE0ZbQhD+4hrdhc=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=e9qdlDh1CJ8uGT2Carmr9JfYqyJwlmPQmIULvEjBXroHVgza0dO8f2Z1/MMkjR8Be
 qLb8oXCC0QbKhObi9XZkqTPjYbFvVHUtBf0xOV/U6eyhVmo1oA7+1SbsbLzCXA46q7
 YLa416yjs1QWgbYv2hpxGeTwCEhrQWF/vFbWpxlXJ5CN0WggEoI6+SwPmt5YIvQwsz
 kS+DPLDU5Bso9zFtjDQyinYMBC13phLXCUsxydqfKomTWc5V+ZbceMTbeRZ1pk8aoz
 1m7MMCGCiFkmp+mArSuSZZlXLmECAUXWLx2VvpfBdskG3y1J95808JWlyA/Us1jN5F
 WaWEbivucR7UQ==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 82BF9441BD5;
 Wed, 13 Sep 2023 10:53:03 -0400 (EDT)
Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 74AA9120401;
 Wed, 13 Sep 2023 10:53:03 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
In-Reply-To: <85f73356-3a11-c76c-dd9a-f2dc1f6ef504@HIDDEN> (Dmitry Gutov's
 message of "Wed, 13 Sep 2023 01:31:21 +0300")
Message-ID: <jwvr0n2jfm9.fsf-monnier+emacs@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <jwv8r9loe93.fsf-monnier+emacs@HIDDEN>
 <jwv34zjkprk.fsf-monnier+emacs@HIDDEN>
 <85f73356-3a11-c76c-dd9a-f2dc1f6ef504@HIDDEN>
Date: Wed, 13 Sep 2023 10:51:54 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.117 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, Samuel Wales <samologist@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Not quite ready indeed: the new option is unused (implied to be t, I guess).

Oops :-)
This said, it's not its only problem: the name of that var sucks as well.

> Just a single piece of feedback: I get where the idea is coming from (and
> it's good in theory), but I'm not loving the added bright spots of color
> where there previously were just toned down lighter backgrounds.

Yeah, I'm unsure about that.  I'm also somewhat annoyed by the extra
attention it brings to those "boring" additions and removals, but I'm
wondering if it's really because I want them to look more dull or if
it's just because of habit.

I have been bitten several times in the past when going through largish
diffs where I overlooked important things in the added/removed parts
because they were colored the same was as the unchanged parts of
changed lines and so I just glossed over them.

> If it were indicated differently somehow (though I'm not sure how), perhaps
> I'd like it more. As it is, though, the added value (quite minor since it's
> easy to see which hunk is "pure addition" already) doesn't seem to balance
> out the inconvenience.

Yeah, maybe I'd prefer colors that are halfway between
`diff-added/removed` and `diff-refine-added/removed`?
[ Wish we had dynamically-computed face colors for that.  ]


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 12 Sep 2023 22:31:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 12 18:31:41 2023
Received: from localhost ([127.0.0.1]:60253 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qgBv3-00085J-0N
	for submit <at> debbugs.gnu.org; Tue, 12 Sep 2023 18:31:41 -0400
Received: from out3-smtp.messagingengine.com ([66.111.4.27]:39405)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1qgBuy-000852-FR
 for 61396 <at> debbugs.gnu.org; Tue, 12 Sep 2023 18:31:39 -0400
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id 58FB05C011C;
 Tue, 12 Sep 2023 18:31:26 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Tue, 12 Sep 2023 18:31:26 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm3; t=
 1694557886; x=1694644286; bh=/A0zUtLunHfrXVfjlTJhRaBdrGzP6Qep1wj
 +I9jg3y8=; b=prqlYGNcWYd36VNW60faEWaRiX/5pTgaZpG8BjFx2co66LgVdd0
 M2M40qDf0ZZ0S/iuHA88nXY9GyqkD4qu/ODq4OovEPBxYp+lXSkUjP/aT6NVR1fj
 Ti1U9j03jN09atftvczaSyDXqZzaNEirfhcNajSqXL1DsNPHMrDKiQFG9miW45W5
 uVSfhMujRJ0gMU6Fgisexk2QUNBFT1E1nkCoTpC3v+4Aph2q/6FvIwudLBVrLUtq
 mNYyVZJYte7UZJ9dM2nR1k5iE5OdXDaocg/E5lzrzz9YSGEWG2KZeGl5mYu86+PQ
 CQWxLQuy76RT68MiP16xzFYz1FwMSv8sTeA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :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:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=
 1694557886; x=1694644286; bh=/A0zUtLunHfrXVfjlTJhRaBdrGzP6Qep1wj
 +I9jg3y8=; b=FM81a80/I+TyzadF0/kXVUFqr6EYm52h9saZwx5oHUbqDSZ9Hcf
 yZEDcfSz3rdw7ia2xLkmgG1proQHH9c3U1QYbWIwwgPACyWFTOPbk7o8MHJTU8ZR
 CvOqSk/SooHbKc/h9lTELm0D5CwRBdskYz27TBN3s4ni3Sq/timyPbMHHTW4XBsV
 Mt9Z19w8FU9uvE1taDpbPFjCuH7xTlB2b7rPixGVrwNRCBSh1M3ulUuAiudvjl0C
 89aYZTU/4sIts5pvAAsKKHU2bUdTGR7zqhkU6Pt5H0AX9sJg+cptIq7QfVgE/ye9
 T5DcaThTtAyh3wx9lolf/BOI9awoQNFbb5w==
X-ME-Sender: <xms:vuYAZWIVeJ9bC8M7fQfvmu3Ptr5JIbPFNPeQOx_LOk-lLhQ_aw4M3A>
 <xme:vuYAZeJCpcMVxnfZG_mkWaAPBcN8xbmdyoFGqtARLvm3PbqRXu_wSp0heXxSQSJAF
 _X5QVHc6Bf2l-OyUmY>
X-ME-Received: <xmr:vuYAZWveLGMvd_pmXpT-5wUiNZimTrGslEXgxnsEScGbq-ij6q16FnJaf_TbbHE>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeijedguddvucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi
 thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth
 htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel
 vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug
 hmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:vuYAZbZBdqOkJcI8LEB2_uIKz9jN8HdlomGZ5N-ed1nAMgn36-0b2w>
 <xmx:vuYAZdZCb3z1vkY8RqOZyOxzR6wn4YXXyL_fHoTqvoC8LUEl1D3XLw>
 <xmx:vuYAZXBVmqO8Z7yR3woc0Y8B6ozwjkOVB-aDsuIwLJmZE05kg49FHg>
 <xmx:vuYAZcyNsynNDPYlV6ZRcGoyhUdStuiftMqcPx7k0f7ig50qvqXJDA>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 12 Sep 2023 18:31:24 -0400 (EDT)
Message-ID: <85f73356-3a11-c76c-dd9a-f2dc1f6ef504@HIDDEN>
Date: Wed, 13 Sep 2023 01:31:21 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
Content-Language: en-US
To: Stefan Monnier <monnier@HIDDEN>,
 Samuel Wales <samologist@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <jwv8r9loe93.fsf-monnier+emacs@HIDDEN>
 <jwv34zjkprk.fsf-monnier+emacs@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <jwv34zjkprk.fsf-monnier+emacs@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.2 (--)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.2 (---)

On 13/09/2023 01:11, Stefan Monnier via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
>> - First, `diff -u` (contrary to `diff -c`) does not distinguish between
>>    `removed/added` and `modified` lines.   And `diff-mode` currently inherits
>>    this weakness.  I think there's a good case to be made for
>>    highlighting the "truly added" and "truly removed" lines differently
>>    from those that are modified.
>>    I'd argue that a "logical" choice would be to highlight them the same
>>    way as those parts highlighted by `diff-refine-hunk`
>>    (i.e. `diff-refine-removed` and `diff-refine-added`) since that's how
>>    refinement would highlight them if we were to ask it to.
> The patch below does that for the case of unified diffs.
> I kind of like the result.
> It's not quite ready for prime time, but I'd be interested to hear what
> other people think about it.

Not quite ready indeed: the new option is unused (implied to be t, I guess).

Just a single piece of feedback: I get where the idea is coming from 
(and it's good in theory), but I'm not loving the added bright spots of 
color where there previously were just toned down lighter backgrounds.

If it were indicated differently somehow (though I'm not sure how), 
perhaps I'd like it more. As it is, though, the added value (quite minor 
since it's easy to see which hunk is "pure addition" already) doesn't 
seem to balance out the inconvenience.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 12 Sep 2023 22:13:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 12 18:13:00 2023
Received: from localhost ([127.0.0.1]:60231 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qgBcy-0007bV-9A
	for submit <at> debbugs.gnu.org; Tue, 12 Sep 2023 18:13:00 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:8904)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qgBcv-0007bH-LC
 for 61396 <at> debbugs.gnu.org; Tue, 12 Sep 2023 18:12:59 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id DF5C5100106;
 Tue, 12 Sep 2023 18:12:46 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1694556765;
 bh=J4IMZKzXcIWuWPxp3hvpze5GLg6H1j4Q+EwXJcKAYRI=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=MDHA+4QpAJ7jl2jHwlga7KlGqs5Qy6WnS0hAWIa3bPKamG0R13tgu/NBr6FFxAxP4
 5rvrjhRxaU2yjf3ykaNjmttEJ2f+R/kqvoymLkUwF+8tAYTpOGwk2PkuzIe5pANQXf
 4sKleYpe4wRyRec5d7lgqdvaCrPKUu9/T2oYZDmYnNYK7PautK2A7MIq1ZgfF2kag+
 sylu53n9PugBkZZdPmLz+XX8bkPfAd7in2KjRLuj4TT+QNMexR1SFMcaIBwZoDjV0i
 MRRGEzf3ywp3cfDVomZSQoRbq3zFX0s1xzvLgl44zLG6mAG0l/r7pgZSTb4qeM+DWk
 /Kc8NPVksqXFw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id D01A31000A3;
 Tue, 12 Sep 2023 18:12:45 -0400 (EDT)
Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BF479120442;
 Tue, 12 Sep 2023 18:12:45 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Samuel Wales <samologist@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
In-Reply-To: <jwv8r9loe93.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Mon, 04 Sep 2023 17:06:06 -0400")
Message-ID: <jwv34zjkprk.fsf-monnier+emacs@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <jwv8r9loe93.fsf-monnier+emacs@HIDDEN>
Date: Tue, 12 Sep 2023 18:11:37 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.076 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> - First, `diff -u` (contrary to `diff -c`) does not distinguish between
>   `removed/added` and `modified` lines.   And `diff-mode` currently inherits
>   this weakness.  I think there's a good case to be made for
>   highlighting the "truly added" and "truly removed" lines differently
>   from those that are modified.
>   I'd argue that a "logical" choice would be to highlight them the same
>   way as those parts highlighted by `diff-refine-hunk`
>   (i.e. `diff-refine-removed` and `diff-refine-added`) since that's how
>   refinement would highlight them if we were to ask it to.

The patch below does that for the case of unified diffs.
I kind of like the result.
It's not quite ready for prime time, but I'd be interested to hear what
other people think about it.


        Stefan


diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index e8f22622935..d503652a9cf 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -2314,6 +2308,17 @@ diff-refine-hunk
             (end (progn (diff-end-of-hunk) (point))))
         (diff--refine-hunk beg end)))))
 
+(defun diff--refine-propertize (beg end face)
+  (let ((ol (make-overlay beg end)))
+    (overlay-put ol 'diff-mode 'fine)
+    (overlay-put ol 'evaporate t)
+    (overlay-put ol 'face face)))
+
+(defcustom diff-refine-nonmodified t
+  "If non-nil also highlight the added/removed lines.
+This is currently only implemented for `unified' diffs."
+  :type 'boolean)
+
 (defun diff--refine-hunk (start end)
   (require 'smerge-mode)
   (goto-char start)
@@ -2328,18 +2333,26 @@ diff--refine-hunk
     (goto-char beg)
     (pcase style
       ('unified
-       (while (re-search-forward "^-" end t)
+       (while (re-search-forward "^[-+]" end t)
          (let ((beg-del (progn (beginning-of-line) (point)))
                beg-add end-add)
-           (when (and (diff--forward-while-leading-char ?- end)
-                      ;; Allow for "\ No newline at end of file".
-                      (progn (diff--forward-while-leading-char ?\\ end)
-                             (setq beg-add (point)))
-                      (diff--forward-while-leading-char ?+ end)
-                      (progn (diff--forward-while-leading-char ?\\ end)
-                             (setq end-add (point))))
+           (cond
+            ((eq (char-after) ?+)
+             (diff--forward-while-leading-char ?+ end)
+             (diff--refine-propertize beg-del (point) 'diff-refine-added))
+            ((and (diff--forward-while-leading-char ?- end)
+                  ;; Allow for "\ No newline at end of file".
+                  (progn (diff--forward-while-leading-char ?\\ end)
+                         (setq beg-add (point)))
+                  (diff--forward-while-leading-char ?+ end)
+                  (progn (diff--forward-while-leading-char ?\\ end)
+                         (setq end-add (point))))
              (smerge-refine-regions beg-del beg-add beg-add end-add
-                                    nil #'diff-refine-preproc props-r props-a)))))
+                                    nil #'diff-refine-preproc props-r props-a))
+            (t ;; If we're here, it's because
+             ;; (diff--forward-while-leading-char ?+ end) failed.
+             (diff--refine-propertize beg-del (point) 'diff-refine-removed)
+             )))))
       ('context
        (let* ((middle (save-excursion (re-search-forward "^---" end t)))
               (other middle))





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 7 Sep 2023 02:35:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 06 22:35:03 2023
Received: from localhost ([127.0.0.1]:38227 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qe4rG-0007RO-PY
	for submit <at> debbugs.gnu.org; Wed, 06 Sep 2023 22:35:03 -0400
Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]:41459)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1qe4rE-0007Qq-Hs
 for 61396 <at> debbugs.gnu.org; Wed, 06 Sep 2023 22:35:01 -0400
Received: by mail-lf1-x130.google.com with SMTP id
 2adb3069b0e04-4f13c41c957so193043e87.1
 for <61396 <at> debbugs.gnu.org>; Wed, 06 Sep 2023 19:34:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1694054093; x=1694658893; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=jHhtKaCPOF8ccwWdwB2w5wh0g2/9LOU5Jpx1ZvRcSS4=;
 b=XYxQBOpSScX97SOC3tkZexZ+p44z9i6/NcBRfBsve8fF/8vfTx+AW7Uw491g3JsAOO
 cXybJnxpjFlYab29SpcJ0K9v4CVp1xhQcRwbj1vlNe4A90ggQBB0y9AnFFMzH+/Wu9QK
 kfoXkF0j34+Rw75Y+hVGS1/i8KglMo5c4G0zNeWEgK+wZxSzYqNoV1AJAHEJKfLH1Y+S
 7IWCr8TkPMP6Tga5pnzHpjyl4vR3UmaSF4ugUEpJC9rIHP0aWrXnuYGfzKcPbBHrXQlG
 2y2bVUK274fY0L7R5QnJiVJuez6QnTbAMbVC62PtJKWdb7b43dVCOoXcoJnGdqcG1TVT
 6EFw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1694054093; x=1694658893;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=jHhtKaCPOF8ccwWdwB2w5wh0g2/9LOU5Jpx1ZvRcSS4=;
 b=U4HP2jK9/ov7pY/ClkyfSuO/3RLJ//pvpqxwAZhqvOkW+8MQAsn/Xis3+A+VY70zUc
 0qibFZuL2hfOkb0vrCtDltL58lWgVGJGLvpFWgpe4TKxhzSETigPmy0aXyv2jEwIuNy3
 M7N4eF3p36W73V5/JtCDfNWF5kOAwSTjNwToVrdyz6IobvApygDqX7cEhqm1miOLB1OO
 tNtOyWftpyRoVE1H0VKlYTXt0Oi+tTdi/c1HXkyTKK2+A0gdKfVnp1j+IQc4B1MAoBwi
 SROTm52iKrLS+slvciUgW8hkzdp8rmK7rO2s3+lsKLL8bjJPsFFfPiHNYf5SaJA/3pYI
 +upw==
X-Gm-Message-State: AOJu0YwoKx0AlqQ++XEmZtzGS/6uqIhqXqHH3k/jBJhCY45iLscT/9kW
 Ma3IXEx7BzsmJgVdhAgaGBcKS/ov32QwJUSCAm8=
X-Google-Smtp-Source: AGHT+IG1AM1K/mOWJSu0v9G6AQ9Q/gJ0CcWM3Um0oV2WhLojaCqhZezvwi1sB4Fa1cVarZZRRyJk3co4cpAwS91IXyA=
X-Received: by 2002:a05:6512:3b91:b0:501:be72:93cf with SMTP id
 g17-20020a0565123b9100b00501be7293cfmr6085769lfv.4.1694054092765; Wed, 06 Sep
 2023 19:34:52 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a9a:4e10:0:b0:272:37a9:8c91 with HTTP; Wed, 6 Sep 2023
 19:34:51 -0700 (PDT)
In-Reply-To: <CAJcAo8umn=ciN1g5R5Xra7t739hjn_Gb_8=-vuyp4UaaUEr=FQ@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <jwv8r9loe93.fsf-monnier+emacs@HIDDEN>
 <CAJcAo8umn=ciN1g5R5Xra7t739hjn_Gb_8=-vuyp4UaaUEr=FQ@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Wed, 6 Sep 2023 19:34:51 -0700
Message-ID: <CAJcAo8vBJ1tjvMQMkrNgkSOprxn8wM8eAD1Y+GyKDu76GAwrZw@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

thank you for everybody's answers, and for stephan's reply which makes sense.

On 9/4/23, Samuel Wales <samologist@HIDDEN> wrote:
> the ability to jump would also be useful.
>
> --
> The Kafka Pandemic
>
> A blog about science, health, human rights, and misopathy:
> https://thekafkapandemic.blogspot.com
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 4 Sep 2023 22:38:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 04 18:38:57 2023
Received: from localhost ([127.0.0.1]:52898 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qdIDh-0005DC-BJ
	for submit <at> debbugs.gnu.org; Mon, 04 Sep 2023 18:38:57 -0400
Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]:41149)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1qdIDd-0005Ct-6w
 for 61396 <at> debbugs.gnu.org; Mon, 04 Sep 2023 18:38:56 -0400
Received: by mail-lf1-x12a.google.com with SMTP id
 2adb3069b0e04-500772c7889so390109e87.0
 for <61396 <at> debbugs.gnu.org>; Mon, 04 Sep 2023 15:38:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1693867127; x=1694471927; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=MmHyfrmW8vhDOc7LSCSRishZT32iuDgXO8wOGsnV9co=;
 b=IW+hJr94bJ2aQUaTWQ8cZIBIS5h2a5gR5mCw/Qm+wEvd88dm/dUD2mGGwm2C1RCunT
 5qhpxtrKm3BeXSZlAKmnHVe1TdJ9D0F427CkkZFhxqw1QDDaOMu1CE74D2WwAQstPXJL
 e0BKdV+lW5QEZX07g2T5jDQASKNnoMdZsBt+CIPVhwrBYO42gnBk0XoK2GPTbdakQ2C3
 P/K54TW4eoeroseO6V/hPibtvNlT6tU6zDxyqmkTuBTy4FKNKRoJ1x6P6yXTw86pb1Pz
 Cbh1ToQ2yy88WtZuTSRbaR7jl01EaJsWz2ivzCkdJkKsMQjB44SquLlxwfQGBQZT+mCj
 KaWw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1693867127; x=1694471927;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=MmHyfrmW8vhDOc7LSCSRishZT32iuDgXO8wOGsnV9co=;
 b=Q6zmrEKcNXV6I1OZ1jKghGIYqs/9WvsVCMIihRtitY5duxNabSaonE/t+nBS3YUwJx
 SH1wqmz76SLAmuTDubWnNZtYUU9dMYW19kbRkuuZuRJPRM3ztYxnIGoMEiDTqUhrhE7b
 RQE8pITfO6nJo1r8eVyNVmcLEWAr4yVTyu2XukeoeVLy49FaYtDIHsYF7esj4PECslFR
 4nsJ4btnJa+4vlV94JEV6/Yv3BpfK5Y7amhFfcHwn62hIYSrvb82ZGikbKsT4wEEsYfU
 iCMDpDbh2el+HG1aVogQ1uifZHDKdl8Znn/9rb82iN00wtIndFlZFYj0AYAuS3se+ORh
 p0NA==
X-Gm-Message-State: AOJu0YxsQKEGEhGZN412eTOALjvAj5O+EsfHqskErdUQxvjLxxK4vP+1
 I02QDeTkFfYwFCQIcSUlZXw+G/TiJn5G2SInlq3Ri2CV4RDOJ/LM
X-Google-Smtp-Source: AGHT+IG9EGbKqVIQl22utCK+g3ErmM2YmOVjiwv97vzsHBxItbwHTJfmUxqbA6o365ff5dRat5aAXpYLWg5Q8HOQkZk=
X-Received: by 2002:ac2:5921:0:b0:500:7fc1:3875 with SMTP id
 v1-20020ac25921000000b005007fc13875mr6302232lfi.5.1693867126682; Mon, 04 Sep
 2023 15:38:46 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a05:6520:430e:b0:272:37a9:8c91 with HTTP; Mon, 4 Sep 2023
 15:38:45 -0700 (PDT)
In-Reply-To: <jwv8r9loe93.fsf-monnier+emacs@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <jwv8r9loe93.fsf-monnier+emacs@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Mon, 4 Sep 2023 15:38:45 -0700
Message-ID: <CAJcAo8umn=ciN1g5R5Xra7t739hjn_Gb_8=-vuyp4UaaUEr=FQ@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

the ability to jump would also be useful.

-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 4 Sep 2023 21:06:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 04 17:06:20 2023
Received: from localhost ([127.0.0.1]:52781 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qdGm4-00007P-Cr
	for submit <at> debbugs.gnu.org; Mon, 04 Sep 2023 17:06:20 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54241)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qdGly-000073-Mb
 for 61396 <at> debbugs.gnu.org; Mon, 04 Sep 2023 17:06:19 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id E053610006B;
 Mon,  4 Sep 2023 17:06:08 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1693861567;
 bh=FC7GVXr0zMc3OSSyYna+OtN2/j+CfuKZxcfP3SGWiEk=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=QDkijb9fJQu9EMfN54upVuOFhoeVlyazGvfvs5wRzg3pV6ZRwoSEae1EYoj01xGCM
 WWdS9KomZ8eClm8jRIqJ108lnkcU1j6uqFrTYxmrwlzTo8RBQ2kqvNrkl7VK+eEl+h
 KNEIWea+VvH9XcZT+TfJOmUx8yjr9gYcof5I6HVQfsA5SlVjf6NT9AtpjEzVlkpO71
 eE5+SbUKvUO+CTWM0+fd1HT1v2orWOW5l3fDVkzNfLvYhqLUWVBUJOKdfcpf69VkIH
 vBX3M9ckvNG56M3ipUodfpMStPkOiKxpzkakzW4HkWKY9eIHUJmqen+uMcHoy52J0J
 dsfAYlQlEEeFw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id BC9CE100046;
 Mon,  4 Sep 2023 17:06:07 -0400 (EDT)
Received: from pastel (69-165-136-223.dsl.teksavvy.com [69.165.136.223])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9968612032C;
 Mon,  4 Sep 2023 17:06:07 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Samuel Wales <samologist@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
In-Reply-To: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 (Samuel Wales's message of "Thu, 9 Feb 2023 20:25:25 -0700")
Message-ID: <jwv8r9loe93.fsf-monnier+emacs@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
Date: Mon, 04 Sep 2023 17:06:06 -0400
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.119 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> in diff mode, with diff -u, if a line in A was added to
> in B, you can't tell by looking at the A version whether it was
> =deleted= in B or =changed= from A to B.  you have to
> manually find it in B and then compare.  here is an example:

It took me a bit of re-reading and thinking to form an opinion, but
IIUC there are 2 distinct issues at play:

- First, `diff -u` (contrary to `diff -c`) does not distinguish between
  `removed/added` and `modified` lines.   And `diff-mode` currently inherits
  this weakness.  I think there's a good case to be made for
  highlighting the "truly added" and "truly removed" lines differently
  from those that are modified.
  I'd argue that a "logical" choice would be to highlight them the same
  way as those parts highlighted by `diff-refine-hunk`
  (i.e. `diff-refine-removed` and `diff-refine-added`) since that's how
  refinement would highlight them if we were to ask it to.

- Second, `diff-refine-hunk` highlights the text actually added and the
  text actually removed within modified lines, but not the place where
  text is added/removed in the other version.
  [ As pointed out by Juri (thanks for Cc'ing me, BTW) this is linked to
    a comment I left in `smerge--refine-highlight-change`, tho that
    comment was thinking of a slightly different feature (namely the
    ability to jump from one version to the other, or the addition of
    a "phantom" cursor highlighting the corresponding place in the other
    version).  ]
  Here the problem is mostly that we don't have a standard way to
  highlight a "place" (which is something that occupies 0 pixels on
  screen).  But we could follow the (not unanimously appreciated) lead
  of `rectangle-mode` and insert a thin (highlighted) visual space to
  mark those places.  That should be not too hard to do, but it would
  have to be optional I think because it'd tend to break alignment, so
  some people may not find the upside significant enough to justify
  the downsides.


-- Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 3 Sep 2023 17:35:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 03 13:35:32 2023
Received: from localhost ([127.0.0.1]:46800 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qcr0W-0000wL-Ak
	for submit <at> debbugs.gnu.org; Sun, 03 Sep 2023 13:35:32 -0400
Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]:44121)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1qcr0T-0000va-E6
 for 61396 <at> debbugs.gnu.org; Sun, 03 Sep 2023 13:35:29 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 1D8B2E0005;
 Sun,  3 Sep 2023 17:35:22 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Samuel Wales <samologist@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
In-Reply-To: <CAJcAo8sA96RWEA7WqqbGONM0wz+1WnZHkU+04R-H1OaQUopeJQ@HIDDEN>
 (Samuel Wales's message of "Sat, 22 Jul 2023 23:04:10 -0700")
Organization: LINKOV.NET
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <86bklzs2su.fsf@HIDDEN>
 <CAJcAo8ssk=OoEFLpOd1VmOHJDEkQhWxW5nfAWaEjMO9axCJhDA@HIDDEN>
 <86fsbbnlaq.fsf@HIDDEN>
 <CAJcAo8tzY_8jLBfgWEhr4CHovK4XPuDfpXoe0QEJtNyt7HGAwg@HIDDEN>
 <CAJcAo8t7OnGRo00xZTnfT5=tG2=qLm-f_YmYkH9wGrxNfS=xnQ@HIDDEN>
 <CAJcAo8sA96RWEA7WqqbGONM0wz+1WnZHkU+04R-H1OaQUopeJQ@HIDDEN>
Date: Sun, 03 Sep 2023 20:29:14 +0300
Message-ID: <86lednyxyt.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>   -this is a line that ^looks deleted, but it is changed
> ...
>   +this is a line that REALLY looks deleted, but it is changed
>
> what is not indicated for the user is at the ^.  i would like it if
> diff mode if possible showed that text was deleted there.

Thanks for the feature request, this would be a very useful feature.
There is already a TODO item for implementing it:

  (defun smerge--refine-highlight-change (beg match-num1 match-num2 props)
    ;; TODO: Add a property pointing to the corresponding text in the
    ;; other region.

Maybe Stefan could suggest a hint on how better to proceed.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 11 Aug 2023 00:41:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 10 20:41:57 2023
Received: from localhost ([127.0.0.1]:44314 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qUGE1-00070A-8j
	for submit <at> debbugs.gnu.org; Thu, 10 Aug 2023 20:41:57 -0400
Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:57395)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1qUGDy-0006zw-35
 for 61396 <at> debbugs.gnu.org; Thu, 10 Aug 2023 20:41:55 -0400
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailout.west.internal (Postfix) with ESMTP id C1ADA320090B;
 Thu, 10 Aug 2023 20:41:47 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute5.internal (MEProxy); Thu, 10 Aug 2023 20:41:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm2; t=
 1691714507; x=1691800907; bh=uXfJTgvZH4e7miltpTVuhqoky7fksRtHgCC
 pVrzDGOk=; b=a9Kzd9/3tdzviCEMF9PNxsfyQyZChTDozlcYw9paRq2TERxtnvk
 SPkZMphWNotz4noMpmxe6/+N1BZFxsEcmpqzMmsNd1sysvlI5KnqqCaLs5qjQy+V
 c0m0AkwUeRtHYM9WQayJJj1PupKB+8N3Y2ZYIipnvCL4Wkjji6Yy74O1jgiK+nnw
 XmCWp3l1PlbkWm1BaDPqpLV2Uq9tWX11BQ9DC+vhGMVIvm4tAUTrVlkk0Cnh1H6m
 SJoaJVZj0Y17EABIeOzV6TUMc8vir5mqn5+xkOFueCTvOWcZTORQvuWXpkCraSuq
 AIonlfj+0z34J8pFBnApEPxclBHt9M/uxKw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :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:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1691714507; x=1691800907; bh=uXfJTgvZH4e7miltpTVuhqoky7fksRtHgCC
 pVrzDGOk=; b=j38A3U7dcOc6fFflUOwWH7huxnY3Bsg6A+IDOEfzPeWfEFlZARI
 NSMsnHs/9akNI6sbQ3UQyG5qvLkxfMLnnlfI1n6K78oDngOl1BCMKghXm4C0jUzS
 JkTodeFj4LXBe8yBRMQ2J0sTVKuq3rXx+4hGaCTpoCNG0pKzxmIS2vXcXn759cr0
 7rwq7Gb9a75X6Wh71OdckCfxbtLQTnzAsUsYqlaewnd8cXl1lVWcfeXvxfgenbBq
 o/CkBX5GD/hrKAahf6Ilm61PrA/p3dl+WqpMwUeK+C8f/jYJ1PI+g3WXA0/vsd9q
 NkLn9q7oylQ/CJhvykxlf1Y34vLQ+ut+kQg==
X-ME-Sender: <xms:yoPVZDOGQ_vZ2_AkbJaz-Eet9YRrE9YOWrnWUBRUaDxPj79JbSCN5g>
 <xme:yoPVZN8RTN9m8pcMjpmGkliNK_0KBTaMMph6dcJxTqee8xTOpy9fGvs973VekHtvb
 2kvF-_JXzaxGvOY8DQ>
X-ME-Received: <xmr:yoPVZCROZj40D4zHBu6EQtvvZJ2qJ_KX2pQv8bUYdzE82qZG4xMOC_j8M0L6Lvw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrleejgdefhecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht
 rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth
 gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv
 veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh
 hithhrhiesghhuthhovhdruggvvh
X-ME-Proxy: <xmx:yoPVZHsJ1wH9eJM2puO37w0JLe1mdcWFj3VjwCvm20s45B3hmfRTkg>
 <xmx:yoPVZLdPu57hUFRz2AMOl8s9KdXs1B_yYfa-uMYCACtJ2no3l_HDNw>
 <xmx:yoPVZD33-Y55KwcMtES-62AXIyLeJwecBbjPQKaWNTiwfiz-Vy24OA>
 <xmx:y4PVZMr85beU76HY3x4FrskROFIlO1SPhupcFFuNgbG08EeQ1egXgw>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 10 Aug 2023 20:41:45 -0400 (EDT)
Message-ID: <d828fef4-cfe4-ec28-5e49-b7cb6ac9b78b@HIDDEN>
Date: Fri, 11 Aug 2023 03:41:42 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
Content-Language: en-US
To: Samuel Wales <samologist@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <86bklzs2su.fsf@HIDDEN>
 <CAJcAo8ssk=OoEFLpOd1VmOHJDEkQhWxW5nfAWaEjMO9axCJhDA@HIDDEN>
 <86fsbbnlaq.fsf@HIDDEN>
 <CAJcAo8tzY_8jLBfgWEhr4CHovK4XPuDfpXoe0QEJtNyt7HGAwg@HIDDEN>
 <CAJcAo8t7OnGRo00xZTnfT5=tG2=qLm-f_YmYkH9wGrxNfS=xnQ@HIDDEN>
 <CAJcAo8sA96RWEA7WqqbGONM0wz+1WnZHkU+04R-H1OaQUopeJQ@HIDDEN>
 <CAJcAo8sC+=r3q_qYyee3wWcCtXofCuD0m3A+uH-kVKhS-r4CVw@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <CAJcAo8sC+=r3q_qYyee3wWcCtXofCuD0m3A+uH-kVKhS-r4CVw@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.8 (-)

On 11/08/2023 02:56, Samuel Wales wrote:
> can anybody think of a straightforward workaround for this as
> described below that the user can do if diff-mode does not do it
> [which it does not]?

If the diff-refine mechanism produces the kind of information you want, 
but does not show it the way you want, it should be possible to hack it 
to add some other highlights, etc, that are missing.

I don't have a patch for you, or an existing variable, though.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 10 Aug 2023 23:56:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 10 19:56:28 2023
Received: from localhost ([127.0.0.1]:44290 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qUFW0-0005vu-Jf
	for submit <at> debbugs.gnu.org; Thu, 10 Aug 2023 19:56:28 -0400
Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]:38184)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1qUFVv-0005vc-3Q
 for 61396 <at> debbugs.gnu.org; Thu, 10 Aug 2023 19:56:27 -0400
Received: by mail-lf1-x12d.google.com with SMTP id
 2adb3069b0e04-4fe8c1aec15so432134e87.1
 for <61396 <at> debbugs.gnu.org>; Thu, 10 Aug 2023 16:56:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1691711777; x=1692316577;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=SiKOmt213uXqXDO5L/R3TSuP2ZjxYxsTh3x/I5ktvRU=;
 b=Q+AulxBnkXRKL/l44WDHSnjvXto8HchayBK0mxM6uluI4hJo3LnpUlfGGtANkC5AYZ
 8OSafg/SfiVA9tIaqmIadl2hFpIxfxrYjLtMnkpJJodhcpSPRW+M93ma4qxOJKY/8bWc
 7YZJ7nvL5xKUqB1Nd1LP07OaSN0hQa4k4ufvMjrBmA3WHEuhmkYBZuqPqnKlAyQLnAii
 wPz6zTonHpnJd8hx9Usf5rDvY/olKyygdhu/sl9XT208S6CzQEfCq5WQ2wuFkDIFSgpf
 rL+fZ8cXsurqJA2Vfr8AQ4l8TNncHE6zr8lAlDCKX7wFc2YwVSUgzte+aZPNRxzB363z
 WujA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1691711777; x=1692316577;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=SiKOmt213uXqXDO5L/R3TSuP2ZjxYxsTh3x/I5ktvRU=;
 b=MhW/ySbewUn5p20zOoOIwXWFurtGywujqc3fT+eU/7WbSLE/Z+nbmY17NiQmYq4Nh0
 GkJHuIDZH4u+cBhLaWaZX4ejijOody7xZYVWQT7kQL0USIgmZPsik0if8eW8StxzySNU
 u4EPhrpDk9T86Zoxuw5dRFA98zw55kMJ2apfq8ydN7qVVA28xGAhZUUFuA6e2VT092Fb
 CZhmlseAB1xKhAf08dlpK6L6gC5iAr+4vyjtHPIMmFASdSmSe3wbMyNpXPPDwrwmTa5d
 k5lon3hrzukhNbGR9Mi/f9vBlQ2lymDpB+S2eIti5mlRQbBuLug/pgC/hNZsm/IhSQbD
 awjg==
X-Gm-Message-State: AOJu0YyXtkPfb+kVpEnxFkk496r71KXN98NSOp0cALABxxFY4Nx61xSg
 l05wEXd2Ax28lWjaeR5Tfe5zYNtR0D6cvCMJGmg=
X-Google-Smtp-Source: AGHT+IHiiOSD6aJ0nBNw380VxmWpzUQfkpFh/gk0M251jjEYEFqVrSgK4MF7fjEqFRsL4dZT7TsLD74E/d3xWCNzHxU=
X-Received: by 2002:ac2:5dc9:0:b0:4fd:e252:ffcc with SMTP id
 x9-20020ac25dc9000000b004fde252ffccmr104710lfq.5.1691711776868; Thu, 10 Aug
 2023 16:56:16 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a9a:7ac4:0:b0:270:13b:14c4 with HTTP; Thu, 10 Aug 2023
 16:56:16 -0700 (PDT)
In-Reply-To: <CAJcAo8sA96RWEA7WqqbGONM0wz+1WnZHkU+04R-H1OaQUopeJQ@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <86bklzs2su.fsf@HIDDEN>
 <CAJcAo8ssk=OoEFLpOd1VmOHJDEkQhWxW5nfAWaEjMO9axCJhDA@HIDDEN>
 <86fsbbnlaq.fsf@HIDDEN>
 <CAJcAo8tzY_8jLBfgWEhr4CHovK4XPuDfpXoe0QEJtNyt7HGAwg@HIDDEN>
 <CAJcAo8t7OnGRo00xZTnfT5=tG2=qLm-f_YmYkH9wGrxNfS=xnQ@HIDDEN>
 <CAJcAo8sA96RWEA7WqqbGONM0wz+1WnZHkU+04R-H1OaQUopeJQ@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Thu, 10 Aug 2023 16:56:16 -0700
Message-ID: <CAJcAo8sC+=r3q_qYyee3wWcCtXofCuD0m3A+uH-kVKhS-r4CVw@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: Juri Linkov <juri@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

can anybody think of a straightforward workaround for this as
described below that the user can do if diff-mode does not do it
[which it does not]?

i am pretty unsure what would do this.

thank you.

On 7/22/23, Samuel Wales <samologist@HIDDEN> wrote:
> so basically,
>
>   -this is a line that ^looks deleted, but it is changed
> ...
>   +this is a line that REALLY looks deleted, but it is changed

i.e. a mechanism to put a missing-text indicator where ^ is?

>
> what is not indicated for the user is at the ^.  i woul dlike it if
> diff mode if possible showed that text was deleted there.
>
> this allows you to look at only the - line and know that it is not a
> deleted line, possibly even mistakenly, but rather is part of a cange
> set, namely it and the + version of hte same line.  this would reduce
> user confusion considerably.

-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 25 Jul 2023 21:29:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 25 17:29:59 2023
Received: from localhost ([127.0.0.1]:47161 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qOPbT-0005bP-0W
	for submit <at> debbugs.gnu.org; Tue, 25 Jul 2023 17:29:59 -0400
Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:39365)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1qOPbR-0005bB-Eg
 for 61396 <at> debbugs.gnu.org; Tue, 25 Jul 2023 17:29:57 -0400
Received: by mail-lf1-x12c.google.com with SMTP id
 2adb3069b0e04-4fdb205baccso1724425e87.1
 for <61396 <at> debbugs.gnu.org>; Tue, 25 Jul 2023 14:29:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1690320591; x=1690925391;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :references:in-reply-to:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=gifO5MX3pPjubCX1Thoxbo2/L2+xPKFbmEmGZT2iIzY=;
 b=CgmK4gcdUlbFJztTeVrN3tH6tZhC2eZCAXpTXYbkqGG7nmoK2bfGlsHPKEJF8o/S5t
 SZtGr166cuq3nAw4Ud3CYhmcST02QZZPwjZxtMa7K/ym36z0ISi2b/bLBrCkYMs8tfT3
 S98tkgSsI3WKydbb6oYdL37/1VSXVb9kXm6sC/lt1ValU9N/Zz7zmBhByF0CIsFI6FxK
 /yVh6FBqQ46olXn8/a8N2kXEUy99pSSwnWyauPMXmit9bwK5ZYbZbWJTPRNnUwdsbsEV
 O4d5FPsGbAz2+CsSW8kd0HaoUCUDq7z1OTRFBFLrdQgfUpwHgqk0eOpl1Z5g8gGXY9gW
 v2yQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1690320591; x=1690925391;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :references:in-reply-to:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=gifO5MX3pPjubCX1Thoxbo2/L2+xPKFbmEmGZT2iIzY=;
 b=Uvgn4Zk2QWWPSNEy5LlKK3jPj7Gho9HTdtqE34/hergOLdos8WXH2FR/CsMpphN7Yd
 FQzAliDq0mV4+CHglnCIRqTZy47HP/Ctux+Oh7RCl9j0Z4PCZxhKPXEO2ah/3dJnkLwW
 i1ZvzAjPBnQ6bhCrlqoyGp13Bwy7MiIjKGyfApAvQck+XPI5SnWc9D8Fb5mtOxO9wzn1
 f7wKCQ/ji1rzKI3sfSIYuTfJH5WLnys284s9eeJpghJSQGEO4gjVO9XbrHT1opwC4EwQ
 l4UugW6ZLazQC7yE3mivXmjAe42R6FeIq6Y65iEBKrr9KFsxeUF2q2gwqEherBXIcoVp
 s2Zw==
X-Gm-Message-State: ABy/qLaXH3PaL5LgAN8EQ7gxEs/eEQuroUoYQV1UZTiL3OtEqLcbKlhz
 a809SOYQuW14k2zYq9gxe7eTomY+7U2VB0DDJWg=
X-Google-Smtp-Source: APBJJlHwC2mzQODY3Y82qmOEFQDx4kliok8XHYMHsm/mZyyrdeJld6ncZlacL/Zutgtp+aC31ckjaSvpXRNqTyTwCOI=
X-Received: by 2002:ac2:55a9:0:b0:4fd:b27a:d319 with SMTP id
 y9-20020ac255a9000000b004fdb27ad319mr70727lfg.0.1690320591106; Tue, 25 Jul
 2023 14:29:51 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a05:6520:11e2:b0:268:94be:fdc7 with HTTP; Tue, 25 Jul 2023
 14:29:49 -0700 (PDT)
In-Reply-To: <87y1j4jtqy.fsf@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <86bklzs2su.fsf@HIDDEN>
 <CAJcAo8ssk=OoEFLpOd1VmOHJDEkQhWxW5nfAWaEjMO9axCJhDA@HIDDEN>
 <86fsbbnlaq.fsf@HIDDEN>
 <CAJcAo8tzY_8jLBfgWEhr4CHovK4XPuDfpXoe0QEJtNyt7HGAwg@HIDDEN>
 <CAJcAo8t7OnGRo00xZTnfT5=tG2=qLm-f_YmYkH9wGrxNfS=xnQ@HIDDEN>
 <CAJcAo8sA96RWEA7WqqbGONM0wz+1WnZHkU+04R-H1OaQUopeJQ@HIDDEN>
 <87bkg1lied.fsf@HIDDEN>
 <CAJcAo8uUHLsZAU+q_44Tie-VVzswjQzHu6X79h4-H2SRA=w7UA@HIDDEN>
 <CAJcAo8v7HrRkz+ctNsxjSxyLTxhV5uK8AWJqQ3NjOZkjJqbz5Q@HIDDEN>
 <87y1j4jtqy.fsf@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Tue, 25 Jul 2023 14:29:49 -0700
Message-ID: <CAJcAo8uKJmJXi0EhK4+UcgxHU1vaEchTGgiBYQchJWHySf8DHQ@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: Robert Pluim <rpluim@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

yesk diff mode does not support this.

can it?

On 7/25/23, Robert Pluim <rpluim@HIDDEN> wrote:
>>>>>> On Mon, 24 Jul 2023 16:39:04 -0700, Samuel Wales
>>>>>> <samologist@HIDDEN> said:
>
>     Samuel> applying a face to line 1 does not make sense in this context=
.
> there
>     Samuel> is no text to apply a face to because it was deleted.
>
> Ah, I got the lines the wrong way round. I don=CA=BCt think diff mode
> supports this (but there is an indication on line 2 of which bit was
> added)
>
> Robert
> --
>


--=20
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 25 Jul 2023 08:11:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 25 04:11:27 2023
Received: from localhost ([127.0.0.1]:44594 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qOD8g-0002Th-VS
	for submit <at> debbugs.gnu.org; Tue, 25 Jul 2023 04:11:27 -0400
Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]:58764)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1qOD8f-0002TT-49
 for 61396 <at> debbugs.gnu.org; Tue, 25 Jul 2023 04:11:25 -0400
Received: by mail-lj1-x235.google.com with SMTP id
 38308e7fff4ca-2b93fba1f62so74980801fa.1
 for <61396 <at> debbugs.gnu.org>; Tue, 25 Jul 2023 01:11:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1690272679; x=1690877479;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=DYjRC+ocCJwpnZYQGIf7SwlaqslOE+zPrThYOsLYXko=;
 b=CNqtxXis5JEssfngdlj+WOO49WZq5jY5xNXBVSq2k7p8e3gDO6vyyp44lWheRv1Dk/
 y+nN/yeMZD+bX3DpJLY6B1ImixsFagzhICAK2+Puj0wdxiB7XUkKp0Fsjl2DCRY7s5eL
 Ah4KqPb4RsDt5b1qvj7pPBb2VVtLmIBiM3suAblYbPHUaRD2AyvOAute70n+sLvRSQEW
 ywTEsj0Vxsk5o+nKJzNur73Kot5lu2TPP3hX+1JfxzyEqlu+T85woXVerdum5IUJDXjU
 KrSJc2diFjhWimlhs5K21AJHH8vgay6rConru6GG/dkmKmkf9yULNaCLTguUHKV6ITmi
 59FQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1690272679; x=1690877479;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=DYjRC+ocCJwpnZYQGIf7SwlaqslOE+zPrThYOsLYXko=;
 b=Kb7dZpASKU1ULV+uPwZB7dLZAl8F3mxI0Je9pfrx29/BmUxWDVb+JNzie1rNTaWu8X
 mmdaXsAaMDnRHFH+RUHviddb8iMqrVc2PRbx3IiP3sJMHeZvMwYdPlAlh0OM8bDFr77R
 nWCVyCm0eFp7lMU23LV9JtgSnigRd/Kqx/yAtuczOEmHtufKMjM0zjmrnzFdqdDJr3YL
 zeh29ha0Jfz/YfbwIvWbL/0ZCAxRzNUzn3QK2cpjvIsKpIVF+bwOZvHNwCp3KNg1YLN0
 2lajmlx0NdVUpqeVODzR8nlFIIcIumqdSMGCutIf675GRmXLrXoMH7EGRLgJ9EJ+z5WM
 /2CA==
X-Gm-Message-State: ABy/qLZ8oo/rKJVc37jy8TuBhNuytC6RetckIKk9BPyGocbbiIfaeKuh
 ySOkiABCNc/o66dqHlRP1s0=
X-Google-Smtp-Source: APBJJlERCgRUup29BX65NjnzLZCmGL9XsaCZbBzoQtGC58eIxdajyBI6a0ckth8FE26K3SOVYjZIdA==
X-Received: by 2002:a2e:a30d:0:b0:2b6:f009:921a with SMTP id
 l13-20020a2ea30d000000b002b6f009921amr8015732lje.13.1690272678665; 
 Tue, 25 Jul 2023 01:11:18 -0700 (PDT)
Received: from rltb ([2a01:e0a:3f3:fb50:d4da:84d1:2100:1047])
 by smtp.gmail.com with ESMTPSA id
 13-20020a05600c22cd00b003fbcf032c55sm14973216wmg.7.2023.07.25.01.11.17
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 25 Jul 2023 01:11:18 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Samuel Wales <samologist@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
In-Reply-To: <CAJcAo8v7HrRkz+ctNsxjSxyLTxhV5uK8AWJqQ3NjOZkjJqbz5Q@HIDDEN>
 (Samuel Wales's message of "Mon, 24 Jul 2023 16:39:04 -0700")
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <86bklzs2su.fsf@HIDDEN>
 <CAJcAo8ssk=OoEFLpOd1VmOHJDEkQhWxW5nfAWaEjMO9axCJhDA@HIDDEN>
 <86fsbbnlaq.fsf@HIDDEN>
 <CAJcAo8tzY_8jLBfgWEhr4CHovK4XPuDfpXoe0QEJtNyt7HGAwg@HIDDEN>
 <CAJcAo8t7OnGRo00xZTnfT5=tG2=qLm-f_YmYkH9wGrxNfS=xnQ@HIDDEN>
 <CAJcAo8sA96RWEA7WqqbGONM0wz+1WnZHkU+04R-H1OaQUopeJQ@HIDDEN>
 <87bkg1lied.fsf@HIDDEN>
 <CAJcAo8uUHLsZAU+q_44Tie-VVzswjQzHu6X79h4-H2SRA=w7UA@HIDDEN>
 <CAJcAo8v7HrRkz+ctNsxjSxyLTxhV5uK8AWJqQ3NjOZkjJqbz5Q@HIDDEN>
Date: Tue, 25 Jul 2023 10:11:17 +0200
Message-ID: <87y1j4jtqy.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Mon, 24 Jul 2023 16:39:04 -0700, Samuel Wales <samologist@HIDDEN=
m> said:

    Samuel> applying a face to line 1 does not make sense in this context. =
 there
    Samuel> is no text to apply a face to because it was deleted.

Ah, I got the lines the wrong way round. I don=CA=BCt think diff mode
supports this (but there is an indication on line 2 of which bit was
added)

Robert
--=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 24 Jul 2023 23:39:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 24 19:39:15 2023
Received: from localhost ([127.0.0.1]:44331 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qO590-0002Ub-SM
	for submit <at> debbugs.gnu.org; Mon, 24 Jul 2023 19:39:15 -0400
Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]:39390)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1qO58x-0002UM-Iq
 for 61396 <at> debbugs.gnu.org; Mon, 24 Jul 2023 19:39:12 -0400
Received: by mail-lf1-x134.google.com with SMTP id
 2adb3069b0e04-4fdb205baccso1355677e87.1
 for <61396 <at> debbugs.gnu.org>; Mon, 24 Jul 2023 16:39:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1690241945; x=1690846745;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :references:in-reply-to:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=KALy7x72Cu3LTS4+TnMYJlTdh6pK+pIQ9a5pltXG/Ns=;
 b=lhNP5AwN2m0BALR61mUQXpYSKwuu9YJMropL8ARkgw4s9fPCbg//3T8MB/ihpmKhSt
 vmpu+gbsXArgKthEXdkFhYbv0M6XBozAi4y1Fa+qcePdUmZBCbGmePicKpK8hWrKcixV
 waiFeixpCOUeuikhtPVoMCokC2UIwWWG5ynsQlNF7SVs5xipiX8XnLsbRA25vk0JowfH
 4t6MvO9hDZ9a2FrKvUyPFBRr3Ve7XBSbkGQlPlJtjXdkmzIjB2/9ZhGh3EwfkJ9axzae
 +ytaPuvXTc+kRgqfzJ36pS4IsR8v7d/ORDsyqYWlT8AA2XeoEk/cWGYGkpYeZFBtXS+e
 CiMA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1690241946; x=1690846746;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :references:in-reply-to:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=KALy7x72Cu3LTS4+TnMYJlTdh6pK+pIQ9a5pltXG/Ns=;
 b=KD3FYh59rabX9thZP5+a91yYw8PprKpE4IGYNDsyO1i6ZYcLBQRDyX/GQwwsHJZI9y
 kn/2viREFUae81R3lAQklH1pRFv5cree6rj7wjSfeobFoaHzFRGuLYLZtq29QFnq/br7
 Bdd7AQReQv3EZ+M9ii+2C1KVHZEbWeZb13+TirUhU3f1s9xbAdgFD48OP9PY9G2YqZ0Z
 6LCT5+d12Vshu6gi1Pk+elv8nqNorxCrI5IjNgCW+jofnTwWJCNieVYZyJnDlFrQCRcZ
 ltnAz6b+7kXNlC6gYHvWgyJduUYawrxr50nVVa682F4ayEx29rzsKmqGhub15JNJfODW
 IuWg==
X-Gm-Message-State: ABy/qLYBjFMdI8LlV4Hivz4okirMi4CpNQKoVvSXwrTOCoRtbW6QdnWk
 qJCEORalkCZ3Pqu7X3xofp/D9OcPOYDnToRu+jTAAPpdaoTmZg==
X-Google-Smtp-Source: APBJJlFb9WbU2jkdiEvZFXH1/fN6/+V9VyXIwjIIUoZTd4SbaqVoBZC63hJa4XG4tdn3S3Z6P4WEcpAuN9kqIUcT1bo=
X-Received: by 2002:a19:ac4a:0:b0:4fb:9507:8d99 with SMTP id
 r10-20020a19ac4a000000b004fb95078d99mr4861081lfc.2.1690241945551; Mon, 24 Jul
 2023 16:39:05 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a05:6520:11e2:b0:268:94be:fdc7 with HTTP; Mon, 24 Jul 2023
 16:39:04 -0700 (PDT)
In-Reply-To: <CAJcAo8uUHLsZAU+q_44Tie-VVzswjQzHu6X79h4-H2SRA=w7UA@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <86bklzs2su.fsf@HIDDEN>
 <CAJcAo8ssk=OoEFLpOd1VmOHJDEkQhWxW5nfAWaEjMO9axCJhDA@HIDDEN>
 <86fsbbnlaq.fsf@HIDDEN>
 <CAJcAo8tzY_8jLBfgWEhr4CHovK4XPuDfpXoe0QEJtNyt7HGAwg@HIDDEN>
 <CAJcAo8t7OnGRo00xZTnfT5=tG2=qLm-f_YmYkH9wGrxNfS=xnQ@HIDDEN>
 <CAJcAo8sA96RWEA7WqqbGONM0wz+1WnZHkU+04R-H1OaQUopeJQ@HIDDEN>
 <87bkg1lied.fsf@HIDDEN>
 <CAJcAo8uUHLsZAU+q_44Tie-VVzswjQzHu6X79h4-H2SRA=w7UA@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Mon, 24 Jul 2023 16:39:04 -0700
Message-ID: <CAJcAo8v7HrRkz+ctNsxjSxyLTxhV5uK8AWJqQ3NjOZkjJqbz5Q@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: Robert Pluim <rpluim@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

applying a face to line 1 does not make sense in this context.  there
is no text to apply a face to because it was deleted.

On 7/24/23, Samuel Wales <samologist@HIDDEN> wrote:
> in 27.1 i am not getting this.
>
> i am getting this:
>
> file aaa: now is the time
> file bbb: now is the time for all good men
>
> now you diff this
> with result:
>
> line 1: -now is the time
> line 2: +now is the time /for all good men/
>
> line 1 does not indicate that anything was deleted.  i request that
> diff-mode do so, if possible.  line 2 is correct.
>
> what i need is an indication that something is lacking in line 1.  i
> do not need the text that is lacking.
>
>
> On 7/24/23, Robert Pluim <rpluim@HIDDEN> wrote:
>>>>>>> On Sat, 22 Jul 2023 23:04:10 -0700, Samuel Wales
>>>>>>> <samologist@HIDDEN> said:
>>
>>     Samuel> so basically,
>>     Samuel>   -this is a line that ^looks deleted, but it is changed
>>     Samuel> ...
>>     Samuel>   +this is a line that REALLY looks deleted, but it is
>> changed
>>
>>     Samuel> what is not indicated for the user is at the ^.  i woul dlik=
e
>> it
>> if
>>     Samuel> diff mode if possible showed that text was deleted there.
>>
>> That=CA=BCs what diff-mode does, if `diff-refine' is non-nil (which is t=
he
>> default nowadays), by applying the `diff-refine-removed' face.
>>
>> Robert
>> --
>>
>
>
> --
> The Kafka Pandemic
>
> A blog about science, health, human rights, and misopathy:
> https://thekafkapandemic.blogspot.com
>


--=20
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 24 Jul 2023 23:38:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 24 19:38:17 2023
Received: from localhost ([127.0.0.1]:44327 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qO585-0002Sv-FT
	for submit <at> debbugs.gnu.org; Mon, 24 Jul 2023 19:38:17 -0400
Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]:38957)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1qO582-0002Sh-VV
 for 61396 <at> debbugs.gnu.org; Mon, 24 Jul 2023 19:38:16 -0400
Received: by mail-lf1-x130.google.com with SMTP id
 2adb3069b0e04-4fb91513b1bso1359528e87.0
 for <61396 <at> debbugs.gnu.org>; Mon, 24 Jul 2023 16:38:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1690241888; x=1690846688;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :references:in-reply-to:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=mHTAbYU30OTu/ekbm6Nk0nP9sbREk1r6ilCVado3nX0=;
 b=PsZ/vbKfnSbdwpCLcNuA4uPZqf+PLfxTfDnXjYixBBZV8TYaKeW946NrfcEBDMk7Qn
 W3aS+hENp/bnP7H2eOz28cVRLnuVav3VZYyB1fFZ/TrDLsiZw0c6RaNdLExosI318pK3
 /DanmbuyB1HurlzXtK+ePmGYAnfflO+HA9sx/V2/uMUikK2GiogvMjzJMg4r7aFFRGow
 u+9RaZv6qmEVJZNEmsuUo9MwtlBteZv74lnNGI3/qCLtSDaNFRZmTIijrtjwb85TkBqh
 pCzSpy5R2qWFCftzcxUdrwXdutWAU+9lvPLutM6eLXIBdJSObkUcBVuCZjBs4maYdihO
 9LTg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1690241888; x=1690846688;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :references:in-reply-to:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=mHTAbYU30OTu/ekbm6Nk0nP9sbREk1r6ilCVado3nX0=;
 b=M9Cx48y7SGAmMEI/T5biG2gFXtNNiJV80IS9bQJ2vFqeQPhBmYK2OhPXwHRvpgtHGN
 CnBHmP7bfQBnMQvkVS1flamh/ipltPRwLT44YvzNH4EbvHrY/AWOi9kblzbi9pus6wga
 MGKvdJDfQPPqYtZlHgVHF+SLdDxAtgr2wsiia8EbUYY8IhvqL0m2unWZnqn1wqiMgCR1
 I9aeBDru0pXP6TUHZnLFzWBEw8HVtcLWbNtCLX3N6gb6xTFpRsuJ4Zp2fwcBwrGNqS2A
 tkhc6akbuqXxPa8zCvwTsKR4KCls8YDc1RRMHZ0Zu2o77ThXvYOK4aD1jHQuuwlaKE8u
 SdJQ==
X-Gm-Message-State: ABy/qLYfe8vHzhl8gZzhfqPUn5xaLirtACgUYVeTCSB8jcXdj6I7CVUj
 BIPeIsuG2i3EAWaxARHIXkgg6zGs6jad/2Vn2kc=
X-Google-Smtp-Source: APBJJlG1H60jOHX5DgEqS4kq8BALrBItigVv3q5ojIwP6YoF4rcjcASBssMczCvgOaVTsfcsBuUqgNb1GQoMLgDMYOI=
X-Received: by 2002:a19:740c:0:b0:4fd:bfc8:4312 with SMTP id
 v12-20020a19740c000000b004fdbfc84312mr4759604lfe.1.1690241887535; Mon, 24 Jul
 2023 16:38:07 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a05:6520:11e2:b0:268:94be:fdc7 with HTTP; Mon, 24 Jul 2023
 16:38:06 -0700 (PDT)
In-Reply-To: <87bkg1lied.fsf@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <86bklzs2su.fsf@HIDDEN>
 <CAJcAo8ssk=OoEFLpOd1VmOHJDEkQhWxW5nfAWaEjMO9axCJhDA@HIDDEN>
 <86fsbbnlaq.fsf@HIDDEN>
 <CAJcAo8tzY_8jLBfgWEhr4CHovK4XPuDfpXoe0QEJtNyt7HGAwg@HIDDEN>
 <CAJcAo8t7OnGRo00xZTnfT5=tG2=qLm-f_YmYkH9wGrxNfS=xnQ@HIDDEN>
 <CAJcAo8sA96RWEA7WqqbGONM0wz+1WnZHkU+04R-H1OaQUopeJQ@HIDDEN>
 <87bkg1lied.fsf@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Mon, 24 Jul 2023 16:38:06 -0700
Message-ID: <CAJcAo8uUHLsZAU+q_44Tie-VVzswjQzHu6X79h4-H2SRA=w7UA@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: Robert Pluim <rpluim@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

in 27.1 i am not getting this.

i am getting this:

file aaa: now is the time
file bbb: now is the time for all good men

now you diff this
with result:

line 1: -now is the time
line 2: +now is the time /for all good men/

line 1 does not indicate that anything was deleted.  i request that
diff-mode do so, if possible.  line 2 is correct.

what i need is an indication that something is lacking in line 1.  i
do not need the text that is lacking.


On 7/24/23, Robert Pluim <rpluim@HIDDEN> wrote:
>>>>>> On Sat, 22 Jul 2023 23:04:10 -0700, Samuel Wales
>>>>>> <samologist@HIDDEN> said:
>
>     Samuel> so basically,
>     Samuel>   -this is a line that ^looks deleted, but it is changed
>     Samuel> ...
>     Samuel>   +this is a line that REALLY looks deleted, but it is change=
d
>
>     Samuel> what is not indicated for the user is at the ^.  i woul dlike=
 it
> if
>     Samuel> diff mode if possible showed that text was deleted there.
>
> That=CA=BCs what diff-mode does, if `diff-refine' is non-nil (which is th=
e
> default nowadays), by applying the `diff-refine-removed' face.
>
> Robert
> --
>


--=20
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 24 Jul 2023 10:21:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 24 06:21:24 2023
Received: from localhost ([127.0.0.1]:41838 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qNsgu-0003JN-Fo
	for submit <at> debbugs.gnu.org; Mon, 24 Jul 2023 06:21:24 -0400
Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:59536)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1qNsgs-0003J8-BN
 for 61396 <at> debbugs.gnu.org; Mon, 24 Jul 2023 06:21:23 -0400
Received: by mail-wr1-x42b.google.com with SMTP id
 ffacd0b85a97d-3175d5ca8dbso644480f8f.2
 for <61396 <at> debbugs.gnu.org>; Mon, 24 Jul 2023 03:21:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1690194076; x=1690798876;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=PamSb1oNrrKfqNzmvEpbhmsaPt9uENG4/WOIQWuYgGQ=;
 b=DZC4BtqyBtS2ixVG0xFsyVGpHonbMsgCrM1bX2U+48fMgwRh915VqRw5PCWlReqApW
 PZVpzgGbTsJFTo3ut3SsBvJM49t6teY1F+rjzyFoo+8xlbSApu18Jaaf+iPQs/u1pWZ+
 7HOQMXRmSFmwMSil3lEvr650Kyd1SfpSHBfonE6uiDYYaPVyOPlXyAbUmSBZfr89c4Et
 OPeh+08h/ZustbZxEEZQQ8fenCx9O8H61qYuXs5rzyU+cgCXeY91J9XpNuEeBnfQhNPx
 Zk4wdkEuY8RzC9hvsFBYf9kCgdw59Dmg0gnnlHmwojNQ6uqRVKFWmTu0JNKs8qWE70LC
 ujvA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1690194076; x=1690798876;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=PamSb1oNrrKfqNzmvEpbhmsaPt9uENG4/WOIQWuYgGQ=;
 b=cssHi0oUXU/HFIdsqkVFoE1SXeL/Jq9+z9Svs8wOT8JwRAOBKYiP/7weDVMwZkUosC
 v+ZnCDo6YCF0JKsl+YNbtYYgKkWgvMPkTTOaENoSjJFjRb9/nOAOOmKtrjIKzpjYV2sG
 hVta/RgMyQsAlo6k1WoPFDUjXaX4+oV6KcDTuSwAW53rCB4gphHlHogRGOpG8WlUiRjh
 ixZb1dXNMyYcjedPGvGUk9YIGdHdAmpDY2gdcifXnoS+x0xNFBMupNs7pvfQWAtlQkzz
 ognp7ggXEXubHEz5cF/pKh89RduaI4Q5QirgQwpdzIzo9UBse+5PHuhdcREqgGHmqump
 kYZw==
X-Gm-Message-State: ABy/qLaX6Xq/GewhsnqMwZjA1cfq9cNzkzpLFD2Om+3yj09+HKOSeDAJ
 6nWIzJJcclEnumh+F5KMnAk=
X-Google-Smtp-Source: APBJJlGohKJ70L07b537A9KJtM5LQAS2/iTznXdcz9GBDMTbIH76ZVFFt7S605wzPApKK8ks8iMx2A==
X-Received: by 2002:a5d:5551:0:b0:317:3deb:a899 with SMTP id
 g17-20020a5d5551000000b003173deba899mr5167322wrw.1.1690194076247; 
 Mon, 24 Jul 2023 03:21:16 -0700 (PDT)
Received: from rltb ([2a01:e0a:3f3:fb50:8fe8:ceda:dc5c:9a05])
 by smtp.gmail.com with ESMTPSA id
 h4-20020adfe984000000b003175f00e555sm2560503wrm.97.2023.07.24.03.21.14
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 24 Jul 2023 03:21:15 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Samuel Wales <samologist@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
In-Reply-To: <CAJcAo8sA96RWEA7WqqbGONM0wz+1WnZHkU+04R-H1OaQUopeJQ@HIDDEN>
 (Samuel Wales's message of "Sat, 22 Jul 2023 23:04:10 -0700")
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <86bklzs2su.fsf@HIDDEN>
 <CAJcAo8ssk=OoEFLpOd1VmOHJDEkQhWxW5nfAWaEjMO9axCJhDA@HIDDEN>
 <86fsbbnlaq.fsf@HIDDEN>
 <CAJcAo8tzY_8jLBfgWEhr4CHovK4XPuDfpXoe0QEJtNyt7HGAwg@HIDDEN>
 <CAJcAo8t7OnGRo00xZTnfT5=tG2=qLm-f_YmYkH9wGrxNfS=xnQ@HIDDEN>
 <CAJcAo8sA96RWEA7WqqbGONM0wz+1WnZHkU+04R-H1OaQUopeJQ@HIDDEN>
Date: Mon, 24 Jul 2023 12:21:14 +0200
Message-ID: <87bkg1lied.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Sat, 22 Jul 2023 23:04:10 -0700, Samuel Wales <samologist@HIDDEN=
m> said:

    Samuel> so basically,
    Samuel>   -this is a line that ^looks deleted, but it is changed
    Samuel> ...
    Samuel>   +this is a line that REALLY looks deleted, but it is changed

    Samuel> what is not indicated for the user is at the ^.  i woul dlike i=
t if
    Samuel> diff mode if possible showed that text was deleted there.

That=CA=BCs what diff-mode does, if `diff-refine' is non-nil (which is the
default nowadays), by applying the `diff-refine-removed' face.

Robert
--=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 23 Jul 2023 06:04:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 23 02:04:21 2023
Received: from localhost ([127.0.0.1]:37832 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qNSCb-00089X-Ba
	for submit <at> debbugs.gnu.org; Sun, 23 Jul 2023 02:04:21 -0400
Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:39371)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1qNSCX-00089I-Nv
 for 61396 <at> debbugs.gnu.org; Sun, 23 Jul 2023 02:04:20 -0400
Received: by mail-lf1-x12f.google.com with SMTP id
 2adb3069b0e04-4fdb205baccso872708e87.1
 for <61396 <at> debbugs.gnu.org>; Sat, 22 Jul 2023 23:04:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1690092252; x=1690697052;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=CtcWazxUw/xcIaH/hMfIePt6xkT6PF3mMpjJEubzFKw=;
 b=adY7CY/WEgEyPQ9FyggyBL1j8vJP9ebk1hHpcUQds5Sj4VDEOaWXSPjPcTKDpmymLC
 KMAbu4/Hio037a3ZGfel8csORvrwa6q3oUHL6+319nZ+Zs0edrw99wFxtOJi8f9ProCa
 T34vlji67owG8z6e3S4VPtb4QVBMotLW+AWTFzMh1nF6jIsw7WvQyPHPSfkVDGHSABrg
 ldo+6FHjoRUzGB9qPEdyEZAjcZ7jG3WL70pRMRovB3/GPrkaontgcJTyWZe4mUr1IPPB
 GIf8+i1XZDUrYeCfTfpJT6T+j5UMBl/2wMVdFwUsY07ZPz4ps0iX6plyY8Vm0E/mhLJ8
 qbwA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1690092252; x=1690697052;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=CtcWazxUw/xcIaH/hMfIePt6xkT6PF3mMpjJEubzFKw=;
 b=eHXIJYNvDmybLQbDyHybZ3HfNWpmSoFnTXvsCOeweBDQeUpsfS0etkIVj1fu+L9NKZ
 GHABR/QytKsw1wXpEUsrPf57gwye7vTvz9Fj0PsKhT010gotdNljpYQi6p2rXjOZ+55E
 +OZzf53fkSPISkMQmCJqySlUYZ2M1u8csb/GTBAcM9KcPVxFfsJk5pDhddl2W9NdtaY8
 bBG7kvwYhwKOTtxUBnJGXr4YFXueI5km7RuLjwT4DEx4N/HXtFXZzKeqoAEl3uSFIb4q
 KfjH0/3oSh8M980thDzLNVrzfBCAh1t8oCMhWxN/a0FvbYLM3tq8JSGZoF1f+sFB2tAO
 nM+Q==
X-Gm-Message-State: ABy/qLbrGpMlx4unHa+xlLySO3F6XUE0tkzuo+UHhS1BgI0xWA3PTvYu
 jutl2SHmLpANejqlkL11V78Bc9kUCYtmTcUBzYU=
X-Google-Smtp-Source: APBJJlG/Ekb2YeEpHJO0+JBQ4jCr2zGkZFJo6fspPfQ6ytiz5yxDdQIjxlIO8Zy65zU3EErMmoGLSc49I2NI/vicI6s=
X-Received: by 2002:ac2:5e86:0:b0:4fb:9477:f713 with SMTP id
 b6-20020ac25e86000000b004fb9477f713mr2579711lfq.6.1690092251551; Sat, 22 Jul
 2023 23:04:11 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a9a:488e:0:b0:268:94be:fdc7 with HTTP; Sat, 22 Jul 2023
 23:04:10 -0700 (PDT)
In-Reply-To: <CAJcAo8t7OnGRo00xZTnfT5=tG2=qLm-f_YmYkH9wGrxNfS=xnQ@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <86bklzs2su.fsf@HIDDEN>
 <CAJcAo8ssk=OoEFLpOd1VmOHJDEkQhWxW5nfAWaEjMO9axCJhDA@HIDDEN>
 <86fsbbnlaq.fsf@HIDDEN>
 <CAJcAo8tzY_8jLBfgWEhr4CHovK4XPuDfpXoe0QEJtNyt7HGAwg@HIDDEN>
 <CAJcAo8t7OnGRo00xZTnfT5=tG2=qLm-f_YmYkH9wGrxNfS=xnQ@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Sat, 22 Jul 2023 23:04:10 -0700
Message-ID: <CAJcAo8sA96RWEA7WqqbGONM0wz+1WnZHkU+04R-H1OaQUopeJQ@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: Juri Linkov <juri@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

so basically,

  -this is a line that ^looks deleted, but it is changed
...
  +this is a line that REALLY looks deleted, but it is changed

what is not indicated for the user is at the ^.  i woul dlike it if
diff mode if possible showed that text was deleted there.

this allows you to look at only the - line and know that it is not a
deleted line, possibly even mistakenly, but rather is part of a cange
set, namely it and the + version of hte same line.  this would reduce
user confusion considerably.

On 2/12/23, Samuel Wales <samologist@HIDDEN> wrote:
> for purposes of showing what i mean, suppose you have approximately like:
>
> --- ...
> +++ ...
> @@ ... @@
> -1 hmm
> -2 hi
> -3
> +1 really?
> +2 there
> +3 for all good men
>
> [btw this is all merely an arbitrary quote from history from a diff
> tutorial.]
>
> now what does diff-mode do with this?  it usually does a pretty good
> job.  sometimes there are glitches.
>
> diff-mode leaves 1 2 3 characters alone.  it uses diff-removed and
> diff-added for them.
>
> --- ...
> +++ ...
> @@ -104,3 +104,3 @@
> -1 HMM
> -2 HI
> -3
> +1 REALLY?
> +2 THERE
> +3 FOR ALL GOOD MEN
>
> this output is correct.  hmm and really are different and hi and there
> are different.
>
> line 3 is special.  the - and + moieties are different.  but they are
> different specially.  that is because in - there is an /absence/ of
> for all good men.  diff-mode does not show absence.  there is no
> marker saying "soiemthing is absent".
>
> in - for line 3 it is also special for the user interpretation.  it
> could indicate that the line is entirely unique to A according to
> diff-mode.  OR it could indicate that it is in both A and B but
> different in B like 1 and 2.
>
> this is ambiguous.  an indicator reovs ambiguity.  the idea is merely
> one thing: indicating absence.
>
> the same idea is true of a hypothetical opposite case where 3 in +,
> not -, lacks an indicator.
>
> can it be done?  naturally, all of this is heuristic-ish to begin
> with, insofar as human interpretation is concerned.  that's why we
> have difftastic and histogram and all that stuff.  the solution --
> indicators for absence -- will also be.  that is ok.
>
> adjacency and blocks are not likely to be the solution.  if it is
> elaborate or special-cased, then it is likely impractical.
>
>
> On 2/12/23, Samuel Wales <samologist@HIDDEN> wrote:
>> below.
>>
>> On 2/12/23, Juri Linkov <juri@HIDDEN> wrote:
>>> But it seems that you want to check words on every line in the block
>>> for changes, and to categorize every line to three groups:
>>
>> i do not want what you described.
>>
>
>
> --
> The Kafka Pandemic
>
> A blog about science, health, human rights, and misopathy:
> https://thekafkapandemic.blogspot.com
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Mar 2023 21:15:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 08 16:15:00 2023
Received: from localhost ([127.0.0.1]:50333 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pa17j-0004za-JJ
	for submit <at> debbugs.gnu.org; Wed, 08 Mar 2023 16:14:59 -0500
Received: from lists.gnu.org ([209.51.188.17]:55880)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1pa17h-0004zS-Ge
 for submit <at> debbugs.gnu.org; Wed, 08 Mar 2023 16:14:58 -0500
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 <samologist@HIDDEN>)
 id 1pa17h-0003AG-AW
 for bug-gnu-emacs@HIDDEN; Wed, 08 Mar 2023 16:14:57 -0500
Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <samologist@HIDDEN>)
 id 1pa17e-0007rS-UT
 for bug-gnu-emacs@HIDDEN; Wed, 08 Mar 2023 16:14:56 -0500
Received: by mail-lj1-x230.google.com with SMTP id y14so17995028ljq.4
 for <bug-gnu-emacs@HIDDEN>; Wed, 08 Mar 2023 13:14:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20210112; t=1678310092;
 h=to:subject:message-id:date:from:references:in-reply-to:mime-version
 :from:to:cc:subject:date:message-id:reply-to;
 bh=dfiR6mU+fbte9AWOPRb+x28aWsRAyzk3mtvz1qirLCQ=;
 b=TErKM346zws8JfYg05b254Mmr30PNQcR9LBbAM6UBzVacFLHsngduZ5OtVqwp+1GK6
 uGTa346HlpRJShcBXZMXGWxS6ThikwaYnRWSSEOciMZyW7KzJEBTDjZmQYAlqTP0EMJw
 lBoOhsIrUfBj2ztlRsnFSS1VW+F3Qo2Fbd0n+r7ejRslGMzKP6wz++FvH7+Wg+ZRdhw8
 BmvLCh7OP/U3UAKpWXwmpCQtvnelUx9CeYXAoe1VuxPLIq2OOK7UYzh2N7tbnxhpb2II
 Y5HywSQnMMQON8iDYpF3yjndBMcB1SAMRIGITy1GK8FHomkBqOmOPRuMJZqNDOsjZKM/
 3A3g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112; t=1678310092;
 h=to:subject:message-id:date:from:references:in-reply-to:mime-version
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=dfiR6mU+fbte9AWOPRb+x28aWsRAyzk3mtvz1qirLCQ=;
 b=Q//3fm7gH1OMKlNkLKhWdnUqLwv95EEsCglca9vWW/N+bpeyHEs9siFqjnGrJCvoE8
 afn5IToEB42uVtCFnfKVCmF3nABm8bFyk+upZ4O09Abtv2KY5Bbm7yN+fwxwBRIHxQSz
 sST2KDd/vM2ZFqOFE9df0lwZruyO7uoXEPe44ilIvDf7eUTSpml6OpTO3bB8ykhvhKTZ
 Yw5IzJIwoQegzooWvDOY0m8M+Q4ImUyaDKpJ+n0Ndpcqs091lhTiBfR5DjHk/b966NhW
 0EnaocDyB0PpYDTc+e8M4qGU4QnUZg6ZnMhhyDhilW8tr/plgGNI5AR+ilPI1Zepb5p3
 SP1g==
X-Gm-Message-State: AO0yUKW8Y6Moi+3JmyrldwAF+h5YWjESnd5SagJIcwc4t6CAi5Qrbr7e
 aO2cTBgDL1Vyla3FSL5E1YvYnHRu2J+yjbl9sKelo+woDtEy0Q==
X-Google-Smtp-Source: AK7set9mORSkxPH7HpY4Fw3LCBfvXW1zCw161RSpIVCb1DzVfnLZbTRuFY/0LXOwXQYVcxpkyESK/Ad+9Vj15M0Qjvk=
X-Received: by 2002:a2e:a48e:0:b0:298:7006:c2c9 with SMTP id
 h14-20020a2ea48e000000b002987006c2c9mr1075133lji.3.1678310091934; Wed, 08 Mar
 2023 13:14:51 -0800 (PST)
MIME-Version: 1.0
Received: by 2002:aa6:ca07:0:b0:24f:57d9:a46d with HTTP; Wed, 8 Mar 2023
 13:14:50 -0800 (PST)
In-Reply-To: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Wed, 8 Mar 2023 14:14:50 -0700
Message-ID: <CAJcAo8sUdOE+Se-qP3Q0fNDbDyGf_nqQLWic0MJ3dn-Gz4ZnQw@HIDDEN>
Subject: Re: diff mode could distinguish changed from deleted lines
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=2a00:1450:4864:20::230;
 envelope-from=samologist@HIDDEN; helo=mail-lj1-x230.google.com
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, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

this problem is highly noticeable for me.

i am thinking just a thin vertical bar for removed text would be
possible and work well.

there is something i do that makes the problem even more noticeable.
imagine you want to improve the diff for human consumption as follows.
you keep the top --- +++ and first @@ lines.  then you group by
polarity.  what i mean by group by polarity is, you sort by - or + but
not by anything else.  that is, you put all - lines before + lines,
but you do not change the sequence of lines within - or +.  this might
sound strange but it makes for much better understandability in many
cases.

glitches that show up in normal diff-mode are often removed.  it is a
highly useful diff viewing experience, but of course is useless for
patches and so on.

doing this takes all the diff hunks and smushes them together.
deliberately.  you can look at - and know whether you have deleted
anything.  but because of this bug, you don't know whether it is a
true deletion, or whether you added something to the line in + unless
you also look at +.  this is in principle fixable.

however, you do not need to do this to notice the problem.  a big hunk
will have this problem also in many cases.

On 2/9/23, Samuel Wales <samologist@HIDDEN> wrote:
> in diff mode, with diff -u, if a line in A was added to
> in B, you can't tell by looking at the A version whether it was
> =deleted= in B or =changed= from A to B.  you have to
> manually find it in B and then compare.  here is an example:
>
>   -now is the time
>   +now is the time FOR ALL GOOD MEN
>
> the - line is in del face.  there is no indication on that
> line that the line is not deleted.
>
> if the lines are separated sufficiently, it is not obvious
> to the user whether it is a line that was deleted, or, as
> above, added to.  the del face is therefore ambiguous and can be
> potentially misleading to the user.
>
> ===
>
> the only thing that tells you non-confusingly that A was
> changed, or where, is if you look at B.
>
> this is not practical when there are many lines.
>
> a fix is to have a different face for changed lines.  i
> suggest a muted bg face.  another fix is to stick a colored
> marker INDICATOR in A where changes in B exist.
>
>   -now is the time^
>   +now is the time FOR ALL GOOD MEN
>
> where ^ is a colored marker -- actually just a changed bg
> for the newline in this case would work, but i don't think
> emacs supports that.
>
> thank you.
>
> --
> The Kafka Pandemic
>
> A blog about science, health, human rights, and misopathy:
> https://thekafkapandemic.blogspot.com
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 12 Feb 2023 22:48:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 12 17:48:14 2023
Received: from localhost ([127.0.0.1]:47117 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pRL8o-0007tX-EV
	for submit <at> debbugs.gnu.org; Sun, 12 Feb 2023 17:48:14 -0500
Received: from mail-lf1-f41.google.com ([209.85.167.41]:47078)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1pRL8l-0007si-R9
 for 61396 <at> debbugs.gnu.org; Sun, 12 Feb 2023 17:48:13 -0500
Received: by mail-lf1-f41.google.com with SMTP id bp15so16452702lfb.13
 for <61396 <at> debbugs.gnu.org>; Sun, 12 Feb 2023 14:48:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=P3TVbTh7xltJuH2pG4KZtmci46FjS+/IQiESUDDtCdk=;
 b=O4Bpea3+O6ekbrnJ3CcR7259e6WQz0/srrVcO6Llk2C+GC+F4Blv/IwsYhVYzbZVm1
 D/qD9hqejghY8aQtSO374/GC1Gu46oUUohjs4mJ0VItyqtlrEapVkU7HO8GOWrZnZpl9
 oDrwD1134+M/ltSlkeh+/jkjRttxkQPYU5afhjA7M2q3aQ2V9WGShKEB9lOxHoOLHx1K
 t8DmmAQJM12cgoy/Sw2MWN2oo7pepceiIVfFJTlVmj8eHdoOppA6KNNe7y7UKo3CotIK
 oX1x337P8EFhq3SrZxYXYwKU5yL/xS3BnVwv1shn0toHk7UoEArhWn/6bFH9sVzS2OiR
 bugA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=P3TVbTh7xltJuH2pG4KZtmci46FjS+/IQiESUDDtCdk=;
 b=b7mKWj/e3qIJcRXvx1apWYWUlGIMBHOu42fJY9+1GDybCNS1VlN8hprzj3euZlmrDd
 ffVRdc04O1eBJ9PoW6oGzW7T4WTyH3S59TvL8gjhkKO7eXaJhMK1sNKRurGg5YCklc8K
 sBj8lXtFoCT63NEsD2voAxVHzLIGAXAz8hefQpdfWjay1AJK8q5hnNPSoK1IVV7ZMFkp
 MMuQ7QTuFG3jeZTPUO10TH0KwOPtmfPbFZgNs4Gj9/lUnXRsR/2omlSAB6N/UmDcfwut
 VGh8hmopoRr0qicplOI7FntsG8zW48M2N1x7iQskfWNJ0NSMZxzIom3LGrmn7humwkTO
 ELkA==
X-Gm-Message-State: AO0yUKUlNTrdQtORJjxVAWPnUO04zOFIHTQKUrHz0AwCw/9ipO1Eqnny
 w3MLzV/mUCKU9blbvxtm0oOUXQA+SnAfoJhFcuk=
X-Google-Smtp-Source: AK7set9qBcSgvmd/bHQVCniQOALgt0tyEXyD2q1RpmUUGOegYdBU3YPH1NwIXAP8cT0zUyJD9RxTmPS0E662dkRQKwY=
X-Received: by 2002:ac2:4891:0:b0:4cc:db38:d84e with SMTP id
 x17-20020ac24891000000b004ccdb38d84emr3306086lfc.180.1676242085652; Sun, 12
 Feb 2023 14:48:05 -0800 (PST)
MIME-Version: 1.0
Received: by 2002:aa6:c266:0:b0:23b:5e81:46ba with HTTP; Sun, 12 Feb 2023
 14:48:04 -0800 (PST)
In-Reply-To: <CAJcAo8tzY_8jLBfgWEhr4CHovK4XPuDfpXoe0QEJtNyt7HGAwg@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <86bklzs2su.fsf@HIDDEN>
 <CAJcAo8ssk=OoEFLpOd1VmOHJDEkQhWxW5nfAWaEjMO9axCJhDA@HIDDEN>
 <86fsbbnlaq.fsf@HIDDEN>
 <CAJcAo8tzY_8jLBfgWEhr4CHovK4XPuDfpXoe0QEJtNyt7HGAwg@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Sun, 12 Feb 2023 15:48:04 -0700
Message-ID: <CAJcAo8t7OnGRo00xZTnfT5=tG2=qLm-f_YmYkH9wGrxNfS=xnQ@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: Juri Linkov <juri@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

for purposes of showing what i mean, suppose you have approximately like:

--- ...
+++ ...
@@ ... @@
-1 hmm
-2 hi
-3
+1 really?
+2 there
+3 for all good men

[btw this is all merely an arbitrary quote from history from a diff tutorial.]

now what does diff-mode do with this?  it usually does a pretty good
job.  sometimes there are glitches.

diff-mode leaves 1 2 3 characters alone.  it uses diff-removed and
diff-added for them.

--- ...
+++ ...
@@ -104,3 +104,3 @@
-1 HMM
-2 HI
-3
+1 REALLY?
+2 THERE
+3 FOR ALL GOOD MEN

this output is correct.  hmm and really are different and hi and there
are different.

line 3 is special.  the - and + moieties are different.  but they are
different specially.  that is because in - there is an /absence/ of
for all good men.  diff-mode does not show absence.  there is no
marker saying "soiemthing is absent".

in - for line 3 it is also special for the user interpretation.  it
could indicate that the line is entirely unique to A according to
diff-mode.  OR it could indicate that it is in both A and B but
different in B like 1 and 2.

this is ambiguous.  an indicator reovs ambiguity.  the idea is merely
one thing: indicating absence.

the same idea is true of a hypothetical opposite case where 3 in +,
not -, lacks an indicator.

can it be done?  naturally, all of this is heuristic-ish to begin
with, insofar as human interpretation is concerned.  that's why we
have difftastic and histogram and all that stuff.  the solution --
indicators for absence -- will also be.  that is ok.

adjacency and blocks are not likely to be the solution.  if it is
elaborate or special-cased, then it is likely impractical.


On 2/12/23, Samuel Wales <samologist@HIDDEN> wrote:
> below.
>
> On 2/12/23, Juri Linkov <juri@HIDDEN> wrote:
>> But it seems that you want to check words on every line in the block
>> for changes, and to categorize every line to three groups:
>
> i do not want what you described.
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 12 Feb 2023 22:16:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 12 17:16:31 2023
Received: from localhost ([127.0.0.1]:47109 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pRKe7-00073L-LP
	for submit <at> debbugs.gnu.org; Sun, 12 Feb 2023 17:16:31 -0500
Received: from mail-lj1-f177.google.com ([209.85.208.177]:39699)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1pRKe6-000735-0H
 for 61396 <at> debbugs.gnu.org; Sun, 12 Feb 2023 17:16:30 -0500
Received: by mail-lj1-f177.google.com with SMTP id a13so11162706ljq.6
 for <61396 <at> debbugs.gnu.org>; Sun, 12 Feb 2023 14:16:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=FekdQiBkGpiMfK3ZO8aORB9WI357QdX4K6TWCvHrncw=;
 b=i2nGIK8q+rNBwvlQZOHEgU2633swe6grWPPyab5z2HCNdTvYYzcf2aIymo5STBLNH4
 e+4I723zciOLNOaYPZm5tLsRQJx9EYu9UmYd9V7vzBafsTqkDNzj/nDFOujAMTTnw68D
 kZaHF6QV5TAlKrOYGpNbye2PkMT27Ed5DVsObn81GHwaP3T6QT63u5jx+tg37FJyzYCE
 9lgrKS1XTcX6IJpJf849UmbQtJTzfS9NYYsXP7fscVa3f2TLMCOfhTKk/owP4VJgjhth
 QueijY6XIO4iaYpkDvd5VjoSpIudbg9Hefi1OTSdd0wNvvxE2/LfxXfyJp1BZ65nA1P9
 EvQQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=FekdQiBkGpiMfK3ZO8aORB9WI357QdX4K6TWCvHrncw=;
 b=1EVKPn7DmsXHc7PjGSYesAXZywyLCLuBVZo4nxWdFsOHzG3KSACgKa4I1utIVqOCnp
 9a27m7t73/bNkLRzZEnov80cd/qK3DvQxAvOG5pHEnSAgFWwy/X+B22JBEbog1Rm1y92
 R0YNFoP7E1NyAzdagBzvKWqn+L4IOLpLYppGicpDSxO4pxeyS+p/OY1pO9wqhcxaY47I
 WWaoX6OYNtVPz9cdQLXc3SNmmiFLzyKQPr2tkpGYV9+COOjrd/O1lv+OnxtWtmdlxSfi
 O96FGq8QlY5YK97cLEonMIzDXSI1uBor9My8+kTeAD8BsgW61bxBsScdF1FustKuS5jz
 PKvw==
X-Gm-Message-State: AO0yUKWzdICXYHgKX8AcpUvfvt9UN75Ej80b2pOFWekkM16GUm9lex+n
 rkmwOGtzMEQnFB3msWaZMSwccyAJGP2NYEKo6ds=
X-Google-Smtp-Source: AK7set8CNJycMUD/WAGpYETwRHXyvouTT42B75mLF4UldOlSSJOttuf8XFk5CRDRNWp4N0SEERwK4C2y9Qsf1olg2IA=
X-Received: by 2002:a2e:5c02:0:b0:293:4041:b9e7 with SMTP id
 q2-20020a2e5c02000000b002934041b9e7mr951930ljb.213.1676240183790; Sun, 12 Feb
 2023 14:16:23 -0800 (PST)
MIME-Version: 1.0
Received: by 2002:aa6:c266:0:b0:23b:5e81:46ba with HTTP; Sun, 12 Feb 2023
 14:16:22 -0800 (PST)
In-Reply-To: <86fsbbnlaq.fsf@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <86bklzs2su.fsf@HIDDEN>
 <CAJcAo8ssk=OoEFLpOd1VmOHJDEkQhWxW5nfAWaEjMO9axCJhDA@HIDDEN>
 <86fsbbnlaq.fsf@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Sun, 12 Feb 2023 15:16:22 -0700
Message-ID: <CAJcAo8tzY_8jLBfgWEhr4CHovK4XPuDfpXoe0QEJtNyt7HGAwg@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: Juri Linkov <juri@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

below.

On 2/12/23, Juri Linkov <juri@HIDDEN> wrote:
> But it seems that you want to check words on every line in the block
> for changes, and to categorize every line to three groups:

i do not want what you described.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 12 Feb 2023 17:23:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 12 12:23:55 2023
Received: from localhost ([127.0.0.1]:46561 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pRG4w-0002Pl-Rf
	for submit <at> debbugs.gnu.org; Sun, 12 Feb 2023 12:23:55 -0500
Received: from relay10.mail.gandi.net ([217.70.178.230]:51873)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1pRG4v-0002PW-BH
 for 61396 <at> debbugs.gnu.org; Sun, 12 Feb 2023 12:23:53 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 13889240003;
 Sun, 12 Feb 2023 17:23:44 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Samuel Wales <samologist@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
In-Reply-To: <CAJcAo8ssk=OoEFLpOd1VmOHJDEkQhWxW5nfAWaEjMO9axCJhDA@HIDDEN>
 (Samuel Wales's message of "Sun, 12 Feb 2023 02:03:59 -0700")
Organization: LINKOV.NET
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <86bklzs2su.fsf@HIDDEN>
 <CAJcAo8ssk=OoEFLpOd1VmOHJDEkQhWxW5nfAWaEjMO9axCJhDA@HIDDEN>
Date: Sun, 12 Feb 2023 19:20:53 +0200
Message-ID: <86fsbbnlaq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> You can use such a heuristics that when the region with deleted lines
>> borders the region with added lines this means that both regions show
>> the changed lines.  So adjacent regions in the hunk = changed lines,
>> disconnected regions of added or deleted lines = separate
>> additions/deletions.
>
> i'm not sure that will work with alternate presentatin f difflll.
> what woul dbe good is for the internal diffing to notate not merely
> additions and deleteions but also absence of addionts.  a marker that
> something will be deleted. no matter where.

This depends on the definition of changed lines.  And what is their
granularity.  To me and to the diff command, the changed lines form
a block, and when there are some changes (additions or deletions) on lines
inside that block, then the whole block of lines is declared as changed.

But it seems that you want to check words on every line in the block
for changes, and to categorize every line to three groups:

1. if on the line marked with the '-' indicator, all words are marked
   by refinement as deleted (ignoring whitespace), or there are no
   refinements on the standalone nonadjacent '-' line, declare
   the whole line as deleted;
2. if on the line marked with the '+' indicator, all words are marked by
   refinement as added (ignoring whitespace), or there are no refinements
   on the standalone nonadjacent '+' line, declare the whole line as added;
3. Otherwise, it's changed.

Still it's impossible to classify lines even with such elaborate definition.
For example,

@@ -1,2 +3,4 @@
   '(function-1
     function-2
-    function-3)
+    function-3
+    function-4)

You might want to consider the line with "function-4" added, but its closing paren
comes from the line with "function-3", so it's a changed line, not added.

Probably we can't do anything better than what the current word refinement does.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 12 Feb 2023 09:04:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 12 04:04:09 2023
Received: from localhost ([127.0.0.1]:44036 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pR8HJ-0000EP-8Y
	for submit <at> debbugs.gnu.org; Sun, 12 Feb 2023 04:04:09 -0500
Received: from mail-lf1-f54.google.com ([209.85.167.54]:34438)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1pR8HG-0000DX-Hb
 for 61396 <at> debbugs.gnu.org; Sun, 12 Feb 2023 04:04:07 -0500
Received: by mail-lf1-f54.google.com with SMTP id cf42so14923058lfb.1
 for <61396 <at> debbugs.gnu.org>; Sun, 12 Feb 2023 01:04:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=QpJHooLZyow5cSa3dRWJ9Gt/Pk3c2iTLcnMDk5xrkus=;
 b=guE/GtJCbJSxR1X6ZKDWz5lyOeap+77SWjsXoS/AAczIFUtB/TfHrgoTFdR922Td3t
 fidg9zLTHn9eJLuiyeoKTZIksjS2q/N6TCPVEA6jSwKNn3xUHgnAj5cu19aus+TklwoJ
 uBXYq+VLsWRshtNpEMFFyp8PPAjLvq7LXspfqio6MlKbGsPM2cWHAT0IP/fimEybjXJ5
 79TiV4oKph0rLkHs8ck9j6zffqSZfS1DzUOe1fldwG2Y3bRCyvMj/IH3HHkaV6jgd1lC
 AF3cNjJbwg7rny90CQBFb/JKxSUH8HTdi73SV1c4q4GKo6VmmMSBDi70PZfT7jkwtqzr
 8J3g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=QpJHooLZyow5cSa3dRWJ9Gt/Pk3c2iTLcnMDk5xrkus=;
 b=rgdngYb6nBSJy4Fp4VLtJYDrMNZNF5wahtKc5/r/lQ0rWXgX2r67IFcaPQSt/WqMdr
 //Hy+x1lFHyhRNRQjrjVz9o3v/W/SfB9V+daTGZwQ1Ikxfh0N+PKqyyWRgITnJJZwAnv
 QDVN1xTXcxogCy+bwYtdyEsqcJuVsT5XACvy9UgfCm5EHrAznfon6uXUwZHRCNvp7O74
 wg26pK2oBd0UDcO9T362ytgBaGwgQYrj0dqFt2w2tpr1UOO1bJBy7MxMm0/StIclcPOb
 VrjmXPJPpeRvkGcaUn/V9b8vP11obGSxtQBcL3EV5UYaKn+ejj8PoHRGjC9j4Se4DTbL
 rC4w==
X-Gm-Message-State: AO0yUKXavpdZQO1JW5x+r/SaNY3WdE6e7RVKU1POdOp0c5inVF3asFds
 b30OIh8QDrtKx/TUkqmQFS9Od4MoYv7FiAfVpig=
X-Google-Smtp-Source: AK7set9JmawAhPxyJpQxDQu2eaArKUPvjy3LroeDjx93B3vN4otUJ0ZV+m3Azx3ZkM9Fv2erImkhSs1gOYJdZmYv5Fw=
X-Received: by 2002:ac2:4891:0:b0:4cc:db38:d84e with SMTP id
 x17-20020ac24891000000b004ccdb38d84emr3099382lfc.180.1676192640335; Sun, 12
 Feb 2023 01:04:00 -0800 (PST)
MIME-Version: 1.0
Received: by 2002:aa6:c266:0:b0:23b:5e81:46ba with HTTP; Sun, 12 Feb 2023
 01:03:59 -0800 (PST)
In-Reply-To: <86bklzs2su.fsf@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <86bklzs2su.fsf@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Sun, 12 Feb 2023 02:03:59 -0700
Message-ID: <CAJcAo8ssk=OoEFLpOd1VmOHJDEkQhWxW5nfAWaEjMO9axCJhDA@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: Juri Linkov <juri@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

i'm not sure that will work with alternate presentatin f difflll.
what woul dbe good is for the internal diffing to notate not merely
additions and deleteions but also absence of addionts.  a marker that
something will be deleted. no matter where.


On 2/12/23, Juri Linkov <juri@HIDDEN> wrote:
>> this is a bug against emacs diff-mode.
>>
>> diff is not responsible for diff-mode colors.  diff-mode is.
>
> You can use such a heuristics that when the region with deleted lines
> borders the region with added lines this means that both regions show
> the changed lines.  So adjacent regions in the hunk = changed lines,
> disconnected regions of added or deleted lines = separate
> additions/deletions.
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 12 Feb 2023 08:49:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 12 03:49:36 2023
Received: from localhost ([127.0.0.1]:44010 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pR83D-0008Hm-Su
	for submit <at> debbugs.gnu.org; Sun, 12 Feb 2023 03:49:36 -0500
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:60603)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1pR837-0008HP-5v
 for 61396 <at> debbugs.gnu.org; Sun, 12 Feb 2023 03:49:33 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 90488C0003;
 Sun, 12 Feb 2023 08:49:21 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Samuel Wales <samologist@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
In-Reply-To: <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 (Samuel Wales's message of "Sat, 11 Feb 2023 17:52:36 -0700")
Organization: LINKOV.NET
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
Date: Sun, 12 Feb 2023 10:31:13 +0200
Message-ID: <86bklzs2su.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> this is a bug against emacs diff-mode.
>
> diff is not responsible for diff-mode colors.  diff-mode is.

You can use such a heuristics that when the region with deleted lines
borders the region with added lines this means that both regions show
the changed lines.  So adjacent regions in the hunk = changed lines,
disconnected regions of added or deleted lines = separate additions/deletions.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 12 Feb 2023 02:54:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 11 21:54:38 2023
Received: from localhost ([127.0.0.1]:43680 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pR2Vh-0004Sr-S0
	for submit <at> debbugs.gnu.org; Sat, 11 Feb 2023 21:54:38 -0500
Received: from mail-lj1-f169.google.com ([209.85.208.169]:45968)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1pR2Vg-0004Se-41
 for 61396 <at> debbugs.gnu.org; Sat, 11 Feb 2023 21:54:36 -0500
Received: by mail-lj1-f169.google.com with SMTP id u27so10901010ljo.12
 for <61396 <at> debbugs.gnu.org>; Sat, 11 Feb 2023 18:54:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=8QFF/oP+12YmzZGsBLJ6IrIm22uSu+23yvuCpLYbqg8=;
 b=Pn8dYpiQHYA+Lo2FIjsSkOZNwTFKJFIEGSla6olaBSz0Y+avjPVtmdNBmB08HAGMA0
 tZ+sIeZ/755RqdSg3oiO+bByA66Sy3AgSYdPw0K1OUwntGujZKca52z/+CQI862eF+bS
 2vCGO++Pr32OUpb3kD/oAw4ILdxOIkTw1O7s9OLTTfyV99lEieQA5i/GgENyXwrJ02XS
 D5bCS8DhmujETEKdB69YUH45TI3IEvT3bLHy6zQI6+HpbKKIKNPrfBywil4bYJQo/PHQ
 US3HfhTCUBmMxwEK9T3NA4jUuhDh+LApou7YC2+EDcWQYn877sZZcVSpjuhvvXeTO46T
 7Dmw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=8QFF/oP+12YmzZGsBLJ6IrIm22uSu+23yvuCpLYbqg8=;
 b=qkOdvyd3RijpS0jsziZYgCFD4RWeUx/YgPsnWYBZ8yeS9HEHRQ/xxEaA/IqBx7kcL2
 EE9l2j26K3zAoDsPPtpTbHoMxMPdqe7Aa9b0x+X5255dp8fOJMiKBxJiSqaO4fPx5RdS
 px4HhqG8IfDj2vFPnG0xZb18CfJPQBxd1wgVq4oezVRqIZIn8H/kSzRVlpXyyw5ifjx6
 sKnJW9SCwJq9ojWqzMqOoXkdryqi0BB3kuKEaSGBR5vGVlPBLv+ZvUT33urK7EZjVD4n
 xh3joeWpYLb906oVBIn/XpZBCZxj5UvamwrtiyPD4jNeB9IXjlE2k5ZMpfR5RgoMmW1d
 Pbew==
X-Gm-Message-State: AO0yUKVS1xzMq+RItHTwFOdHLSicLAw0Z0Z+C7wuGxCYQkgmDiQyioTo
 bywiDqElSKu27UIZEiH29JkfEhXtdbr0tYVt0Zs=
X-Google-Smtp-Source: AK7set/RgfQUakgNIQu3hDX96Qbknq3Zmb21PHRAYLpspm6PzPapnZVExAHyx48hxkppAk4Wlv/TUHAXgPYmsPk3XHQ=
X-Received: by 2002:a2e:5c02:0:b0:293:4041:b9e7 with SMTP id
 q2-20020a2e5c02000000b002934041b9e7mr621690ljb.213.1676170470048; Sat, 11 Feb
 2023 18:54:30 -0800 (PST)
MIME-Version: 1.0
Received: by 2002:aa6:c266:0:b0:23b:5e81:46ba with HTTP; Sat, 11 Feb 2023
 18:54:29 -0800 (PST)
In-Reply-To: <8ce73315-b8ec-a717-3a4f-3e0afad440ee@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <3f18f8a6-7096-22ef-dca8-835a0d5760f2@HIDDEN>
 <CAJcAo8trMYQF0C-9Wic8UbROUY6w9drJfr6yHjkT=_1WF50-YQ@HIDDEN>
 <49a57f1c-b8de-6022-2f43-2d30d056496d@HIDDEN>
 <CAJcAo8vAixwTBf=8KFoeYYkvBXJRKoEYWU=JbvitkL4PVomThQ@HIDDEN>
 <8ce73315-b8ec-a717-3a4f-3e0afad440ee@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Sat, 11 Feb 2023 19:54:29 -0700
Message-ID: <CAJcAo8sSTkDxB5G3u54sV0C9_UpBB4qoFLRXb3tH1-QHM7sScQ@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: Dmitry Gutov <dgutov@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

now we are closer to being on the same page.

> There is nothing to color in A in this example.

that is the problem.  [approximately that is; see op for references to
indicators and faces.]


On 2/11/23, Dmitry Gutov <dgutov@HIDDEN> wrote:
> On 12/02/2023 04:12, Samuel Wales wrote:
>>> This is the feature which colors "FOR ALL GOOD MEN" from your example
>>> with a different background. It's enabled by default.
>> you are referring to coloring B.  this bug report is referring to
>> coloring or indicating A.  it is not referring to coloring B.  those
>> are orthogonal.
>
> There is nothing to color in A in this example.
>
> But if the change deleted some text, there would be indication in A.
> Same if the change both deleted and added text (making it a full-blown
> "change").
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 12 Feb 2023 02:17:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 11 21:17:11 2023
Received: from localhost ([127.0.0.1]:43639 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pR1vS-0003W0-MF
	for submit <at> debbugs.gnu.org; Sat, 11 Feb 2023 21:17:10 -0500
Received: from mail-ed1-f42.google.com ([209.85.208.42]:41523)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1pR1vQ-0003Vn-JF
 for 61396 <at> debbugs.gnu.org; Sat, 11 Feb 2023 21:17:09 -0500
Received: by mail-ed1-f42.google.com with SMTP id d40so7537521eda.8
 for <61396 <at> debbugs.gnu.org>; Sat, 11 Feb 2023 18:17:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:user-agent:mime-version:date:message-id
 :sender:from:to:cc:subject:date:message-id:reply-to;
 bh=MAdBMSav+X6VHbuK5HGxk910Xzy36nYF33k62LRtk0k=;
 b=T151e2XEdq3gmKjX/uULtppug7IzGogoiDS7LkKIhah7UmPWK+vmt6aTmo+NGi1ueb
 NV9BNwa1W6DMDSXK+Bw6S1UKXZW2l/m3fx8U5lnw870jdmdiXq2IIXMActNkJDjNDBJz
 FGf2/wISIBbobjE5H75LkQpUspHdVbDeFd3DtIXsvf1zU4wun06tWHHspUHlHgLPFoTz
 lQBwteKThfETkDt79DbA8guSabd+OIa954IC7DlG3UYU6uNaugMTdEDhuhzzBpJl8cAN
 661Ykgid3ylkqyin64C62qjLclo5sfcpGEHd8Fu2V4SKGXMUVwnI+HRBYoix+qIGIFwy
 K5dw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:user-agent:mime-version:date:message-id
 :sender:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=MAdBMSav+X6VHbuK5HGxk910Xzy36nYF33k62LRtk0k=;
 b=6HgERZeiqzxzD7c6pz2KJZfHdG+qKM2yVc+v8OHpXRHt2bDhJnHhaiAhP+CuUbzFmy
 kcBIMvW0kCrckqFYw7fKelVcXifwtulOsUBBsKfvfgKbyAjHZ8+I9lp/GebxhfrceOdj
 ivBIP0L2lkAL7p/oVfZtmmosCzcB2FjlvxSU+xL+QmNbCh2ETfKHBpsHLgdai9Ny0VRE
 2wOlwSCE2TKUwUHCEbBI9DZzda5pOUcNn5sk20MJw7xqvUz9kI7GpdPUm1Jfev3GOv2j
 c+WxS7OGOA+eB6vVgFUBPZSYT3zJAPCdJZV8fcZz41NLK074wCmVeTuM0i+2iaWLITk0
 M7Iw==
X-Gm-Message-State: AO0yUKWveNbrZXBxP6HtMQ/Foub1d0Cccvu7Bu/ZSj1tBI+AXtt5P3rk
 dB3MMpbZxkksTTdtGXf5kO4=
X-Google-Smtp-Source: AK7set9sRZj5AHliq/xwm0s3PKzTAdwKNAP/6NnmN+jkII7TyjT7iKA5rZzpOECTERITkqxmthq5dg==
X-Received: by 2002:a50:a44e:0:b0:4aa:b2d3:eb2f with SMTP id
 v14-20020a50a44e000000b004aab2d3eb2fmr20901990edb.38.1676168222758; 
 Sat, 11 Feb 2023 18:17:02 -0800 (PST)
Received: from [192.168.0.2] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id
 v23-20020a509557000000b004acba0afaa3sm1421828eda.21.2023.02.11.18.17.01
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 11 Feb 2023 18:17:02 -0800 (PST)
Message-ID: <8ce73315-b8ec-a717-3a4f-3e0afad440ee@HIDDEN>
Date: Sun, 12 Feb 2023 04:17:00 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.4.2
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
Content-Language: en-US
To: Samuel Wales <samologist@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <3f18f8a6-7096-22ef-dca8-835a0d5760f2@HIDDEN>
 <CAJcAo8trMYQF0C-9Wic8UbROUY6w9drJfr6yHjkT=_1WF50-YQ@HIDDEN>
 <49a57f1c-b8de-6022-2f43-2d30d056496d@HIDDEN>
 <CAJcAo8vAixwTBf=8KFoeYYkvBXJRKoEYWU=JbvitkL4PVomThQ@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <CAJcAo8vAixwTBf=8KFoeYYkvBXJRKoEYWU=JbvitkL4PVomThQ@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.9 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.9 (-)

On 12/02/2023 04:12, Samuel Wales wrote:
>> This is the feature which colors "FOR ALL GOOD MEN" from your example with a different background. It's enabled by default.
> you are referring to coloring B.  this bug report is referring to
> coloring or indicating A.  it is not referring to coloring B.  those
> are orthogonal.

There is nothing to color in A in this example.

But if the change deleted some text, there would be indication in A. 
Same if the change both deleted and added text (making it a full-blown 
"change").




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 12 Feb 2023 02:13:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 11 21:13:06 2023
Received: from localhost ([127.0.0.1]:43635 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pR1rV-0003Ph-Vv
	for submit <at> debbugs.gnu.org; Sat, 11 Feb 2023 21:13:06 -0500
Received: from mail-lf1-f41.google.com ([209.85.167.41]:39699)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1pR1rR-0003P9-Qi
 for 61396 <at> debbugs.gnu.org; Sat, 11 Feb 2023 21:13:04 -0500
Received: by mail-lf1-f41.google.com with SMTP id h24so14227497lfv.6
 for <61396 <at> debbugs.gnu.org>; Sat, 11 Feb 2023 18:13:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=+x1axRvJ+JOLrPE4bLm/YPwHcVhprM8AIsbIMlFaYDU=;
 b=Zr8OVx9wkWrEjUmc7lWJH6Cobbpjt7DfeTylliOerIeaoGWm6gzYDXmNVQi9tnltvM
 zvkCeTEAXSkouCwVf+05jrMNh2Jn3A9dHXaML5aXkFQpEOexLLyQzfJCyVxoqNi+RZTp
 PkuKpN4jJZw0wbONFFz3glVZ3odbCCnom0RxTnW+CYvFIgYcO5nukVK0FvLpoowA5oKd
 23rSG/m4+8oN9lrN+ifqiCkniU33tjeKQEJVciy/wMX4MAT027dIhGhQpBw6UNBt+pzw
 8nVMq3NrxErmKBxCxiGwJvOxAbydW8fWAib1NDPp6dRVekWXjYNTtP8B/AdVcp7urwRV
 uoYw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=+x1axRvJ+JOLrPE4bLm/YPwHcVhprM8AIsbIMlFaYDU=;
 b=EV8nXu3vlW09COeMNufYX+JI3kU/STqjTq3tdqJfheqW1UbywuzjwP229m/HWYC2iW
 A3LD/EGpIaApc3xK3TR32rSnVgUk+ZxPQ6Lny83elFDThVdwLrAf6vWLV601NPSV37M6
 NwZvZlINW3kveCZn9EH0IfPfNSIb+DyRzvbJwWR5fvnDuLJ6yTfxctic+YQJHVf2tU6e
 DRFfvceC8C1TzOrfbbMj3MqecfFBFinwPgrX5XWzDueA2BpO8IMvcjNnRU0kk6BqbTE3
 U1jWAOjRiABPkkFW9oznZFJOdpsyT9BTqsa8d92iLKXELTJsZT/6zS95laBDlVo4BNqH
 emTQ==
X-Gm-Message-State: AO0yUKXWqjnHHHtE0M2s9wdSwpTtTiIU/ARaAnB0+sT+d94vGDs3OgbP
 Grn+0BnoB9urDZX7Dki/Q9D5mP0qXptX2fIvT7A=
X-Google-Smtp-Source: AK7set8G+4LHVSbEju54Mvunzil/zTfaMmst4d+vTKhz7U2Q+1Sgbq1wsNf5HTCnTre3dD/JPNOV8AOVVNkREOIqN3U=
X-Received: by 2002:ac2:4c0b:0:b0:4db:3a6e:de30 with SMTP id
 t11-20020ac24c0b000000b004db3a6ede30mr113975lfq.78.1676167975679; Sat, 11 Feb
 2023 18:12:55 -0800 (PST)
MIME-Version: 1.0
Received: by 2002:aa6:c266:0:b0:23b:5e81:46ba with HTTP; Sat, 11 Feb 2023
 18:12:54 -0800 (PST)
In-Reply-To: <49a57f1c-b8de-6022-2f43-2d30d056496d@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <3f18f8a6-7096-22ef-dca8-835a0d5760f2@HIDDEN>
 <CAJcAo8trMYQF0C-9Wic8UbROUY6w9drJfr6yHjkT=_1WF50-YQ@HIDDEN>
 <49a57f1c-b8de-6022-2f43-2d30d056496d@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Sat, 11 Feb 2023 19:12:54 -0700
Message-ID: <CAJcAo8vAixwTBf=8KFoeYYkvBXJRKoEYWU=JbvitkL4PVomThQ@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: Dmitry Gutov <dgutov@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> This is the feature which colors "FOR ALL GOOD MEN" from your example with a different background. It's enabled by default.

you are referring to coloring B.  this bug report is referring to
coloring or indicating A.  it is not referring to coloring B.  those
are orthogonal.


On 2/11/23, Dmitry Gutov <dgutov@HIDDEN> wrote:
> On 12/02/2023 03:07, Samuel Wales wrote:
>> i do not understand your response.  where is this option?  what does
>> it do for diff-mode?  thanks.
>
> It's in diff-mode.el. You can always find the exact place of definition
> from the Customize interface.
>
>> i feel this thread is going all over the place without addressing the
>> op.  is the op difficult to understand?  i tried my best.
>
> This is the feature which colors "FOR ALL GOOD MEN" from your example
> with a different background. It's enabled by default.
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 12 Feb 2023 01:53:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 11 20:53:07 2023
Received: from localhost ([127.0.0.1]:43626 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pR1YB-0002wv-GV
	for submit <at> debbugs.gnu.org; Sat, 11 Feb 2023 20:53:07 -0500
Received: from mail-wm1-f54.google.com ([209.85.128.54]:45927)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1pR1Y9-0002wR-Kt
 for 61396 <at> debbugs.gnu.org; Sat, 11 Feb 2023 20:53:06 -0500
Received: by mail-wm1-f54.google.com with SMTP id
 m16-20020a05600c3b1000b003dc4050c94aso6599579wms.4
 for <61396 <at> debbugs.gnu.org>; Sat, 11 Feb 2023 17:53:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:user-agent:mime-version:date:message-id
 :sender:from:to:cc:subject:date:message-id:reply-to;
 bh=8bneUHkBp+BwS+lLmitXjYhLMIFR8WO9M+6XvkO7OcI=;
 b=pH2PDEF89bkC4uHvbS8grXBO/kwfOQgVikOgrNee5wAY0s4Ea6ADuMWkiqfNz3Mo0i
 oWbYyswOj1N9MQs0HF2FzhKcwk45hfeuIcaVuMYe50eOEm0++3cw9Vj31YCGaJ4nNniL
 wDejQnEklKZVvgS3DtjdE9wVJ+TxzJyY9ufME95pHoHmAm+wLu5tDlgx4lEoVGgbX15k
 PYYhiLYu32mf+xYRCSxYO6MVaqS89JU2CkEGaf6cxP/CzJEw/KMtC1t4ipND1zJ3M+F3
 0p+prwNzxUjC2rYHhoCErIUcgINgItLoV2LUeVCqQCSAPdLKE2GgmbLh12lKSHlZenVt
 /TVQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:user-agent:mime-version:date:message-id
 :sender:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=8bneUHkBp+BwS+lLmitXjYhLMIFR8WO9M+6XvkO7OcI=;
 b=dhlhghIphu6gwJZzoKcR8TXgtJHzErb0HViSLPFu0iT2/iyXHau+nQA80DolXxtM71
 95PKx1zzj16YEOiJIxr07YDllbpS8FrOBnN0b7VwG8CCUJzh+2fJNnQrmMCjBV67Ay/o
 cfnHG1hnurlhjO291L4rB+SaFiLKidRdzO0tx6AsKv8qBBQviG3/Q95uS7ZmMb2ShSZ2
 fmJ7pS12A2YwyBAMh0MTp4n+T37QwMRPP2ESOPCuhx8gr1zB8M67mnqFpmpf2QlKwSuh
 V0ndIRv/PNhY0TDxRp/8O7+oESQqHfoHssCIHVogfsO5pcq9C+hjXoIaVB/4LbIU4/2Y
 OPVA==
X-Gm-Message-State: AO0yUKWcP4FPwnXynTAq9n8iOg+vF9X8rtKcmZqdrirpJmOhrNtOgBAw
 H3EAjNXfRS+pya0uSwUKLhU=
X-Google-Smtp-Source: AK7set+FPOHgxBxohxcENnFJ8yMC1fiPXtvLQoZIuk8fsoptiPtlAZU2I5KBTgJz6/nvF3Z4rj8d0A==
X-Received: by 2002:a05:600c:a695:b0:3da:1f6a:7b36 with SMTP id
 ip21-20020a05600ca69500b003da1f6a7b36mr19982339wmb.0.1676166779618; 
 Sat, 11 Feb 2023 17:52:59 -0800 (PST)
Received: from [192.168.0.2] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id
 b5-20020a05600c150500b003dc47d458cdsm9187959wmg.15.2023.02.11.17.52.58
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 11 Feb 2023 17:52:59 -0800 (PST)
Message-ID: <49a57f1c-b8de-6022-2f43-2d30d056496d@HIDDEN>
Date: Sun, 12 Feb 2023 03:52:57 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.4.2
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
Content-Language: en-US
To: Samuel Wales <samologist@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <3f18f8a6-7096-22ef-dca8-835a0d5760f2@HIDDEN>
 <CAJcAo8trMYQF0C-9Wic8UbROUY6w9drJfr6yHjkT=_1WF50-YQ@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <CAJcAo8trMYQF0C-9Wic8UbROUY6w9drJfr6yHjkT=_1WF50-YQ@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.9 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.9 (-)

On 12/02/2023 03:07, Samuel Wales wrote:
> i do not understand your response.  where is this option?  what does
> it do for diff-mode?  thanks.

It's in diff-mode.el. You can always find the exact place of definition 
from the Customize interface.

> i feel this thread is going all over the place without addressing the
> op.  is the op difficult to understand?  i tried my best.

This is the feature which colors "FOR ALL GOOD MEN" from your example 
with a different background. It's enabled by default.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 12 Feb 2023 01:07:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 11 20:07:47 2023
Received: from localhost ([127.0.0.1]:43610 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pR0qI-0001nB-Ri
	for submit <at> debbugs.gnu.org; Sat, 11 Feb 2023 20:07:47 -0500
Received: from mail-lf1-f52.google.com ([209.85.167.52]:45955)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1pR0qF-0001mv-R6
 for 61396 <at> debbugs.gnu.org; Sat, 11 Feb 2023 20:07:45 -0500
Received: by mail-lf1-f52.google.com with SMTP id x40so14071653lfu.12
 for <61396 <at> debbugs.gnu.org>; Sat, 11 Feb 2023 17:07:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=O9oEJVS53YsRKvWspav8+VMSltWctQbax+kp3EJnJ7Q=;
 b=OoIbklOYy8RRRU4+B12XWwFryCgoloDfp5F+ucjluB26jSYA7AIcX874ZNs/y+QmBU
 STHz/rWQIeOpvGfFcKHdtROEpT9TaDqHwRT3drMtO6CnJmraS8aGxkeE6tpmY0yIADv7
 NJNL5SRxiqEOfd08F9IEQ1ofcG+sd4S9nCIrtRl3mAEFlw2bny6oO/7ITVoUR0oANX1P
 nhabcRaMyEtIOu0L5bUFv8qEQuFFASw7hQ/XM4rBGobdzu1KJEQUycg455NUibsx5osu
 F25FMLKMBel18jKETB9/F1EaWzdHMJ/+2jgwnpHnClvOxijK8Z8RVdywp9K+7w3z/Zx0
 XyCA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=O9oEJVS53YsRKvWspav8+VMSltWctQbax+kp3EJnJ7Q=;
 b=yLKqYwXpsP4dcgImSQkrDhBBy3uWDWY0tattAQmv5T1IzTTEh8BgObMw455Qzay/Dg
 WiIeIoX9mxFYKbk9VPPgtWRTwdgBdPpiHR4flcVSM1zYSRqfl+7cXMI7zZSRBl8ep2G8
 YuUfJQiNJ4qMgHQYkTwxWg9+1Rd10xtHHrTtZBRNaRUSMOZTs0qL4d9ame5yQwNfe/Mv
 yYkDM8qlvv4xexyNqV2gnMDWKQ19k5CIF/hZxrKjRlvKvZ8/o5QBzbVo+BQhaxfDB6QD
 449zv3QgZJMWPT+btYZmLma1Hr3atp5Vkg2KuKYOaYg6nymX07YGixSkRza9pVB9kJVE
 gnnQ==
X-Gm-Message-State: AO0yUKWH5FUWXA8jb5CPM52eKVuuFkq6Pog2a/9PJKP2Gix5ErTExuGa
 nmOv3wtatXKdTyMJfU/WAoUGeEC90U4oJyCI++s=
X-Google-Smtp-Source: AK7set9675A1DsfCxgQ5CWVGSWrgNeHa803WQZlUFImSgJiQ+eaRFhFSAyrL2TTWDWZiMV169W183lgP6OH6evxb9Kk=
X-Received: by 2002:ac2:420a:0:b0:4d5:a160:6182 with SMTP id
 y10-20020ac2420a000000b004d5a1606182mr2828915lfh.81.1676164057787; Sat, 11
 Feb 2023 17:07:37 -0800 (PST)
MIME-Version: 1.0
Received: by 2002:aa6:c266:0:b0:23b:5e81:46ba with HTTP; Sat, 11 Feb 2023
 17:07:36 -0800 (PST)
In-Reply-To: <3f18f8a6-7096-22ef-dca8-835a0d5760f2@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
 <3f18f8a6-7096-22ef-dca8-835a0d5760f2@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Sat, 11 Feb 2023 18:07:36 -0700
Message-ID: <CAJcAo8trMYQF0C-9Wic8UbROUY6w9drJfr6yHjkT=_1WF50-YQ@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: Dmitry Gutov <dgutov@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

i do not understand your response.  where is this option?  what does
it do for diff-mode?  thanks.

i feel this thread is going all over the place without addressing the
op.  is the op difficult to understand?  i tried my best.


On 2/11/23, Dmitry Gutov <dgutov@HIDDEN> wrote:
> On 12/02/2023 02:52, Samuel Wales wrote:
>> this is a bug against emacs diff-mode.
>>
>> diff is not responsible for diff-mode colors.  diff-mode is.
>
> See the user option 'diff-refine'.
>
> Coloring several lines using a "change" face, OTOH, can lose (or at
> least conceal) information: which lines were actually deleted, and which
> were added.
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 12 Feb 2023 01:05:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 11 20:05:02 2023
Received: from localhost ([127.0.0.1]:43605 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pR0ne-0001j1-9T
	for submit <at> debbugs.gnu.org; Sat, 11 Feb 2023 20:05:02 -0500
Received: from mail-ej1-f49.google.com ([209.85.218.49]:36373)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1pR0na-0001iP-AY
 for 61396 <at> debbugs.gnu.org; Sat, 11 Feb 2023 20:05:00 -0500
Received: by mail-ej1-f49.google.com with SMTP id lu11so24256839ejb.3
 for <61396 <at> debbugs.gnu.org>; Sat, 11 Feb 2023 17:04:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:user-agent:mime-version:date:message-id
 :sender:from:to:cc:subject:date:message-id:reply-to;
 bh=6qxspACXTysAljAspJu8v5fvznTrON/QORjjMnc0wys=;
 b=YY9iAJUpeN5uSNZhspSJXDPa6mDeA6QoUNrYhr+zwMdm94xygOSBN9tekonZS9opHD
 SwiUeNpvGZRKk8o8J66mXnp7J0rOZRhmruUHrpKyW3NnuQOoUXs6srehvih0MWVg335y
 z5FRzJ0IIlKz/UAmEvp9x/XmjsX+AILonCoHxOU05FM16A5E4FQsNrdKqXwsctycArM5
 yCtWDXaE20Elkk0xeTvNVDJqo9uk1f2F0jJvc+5Gtyv0uAR4lD9IEcT6YH3XJvTSstGT
 v86Ux+UrSaQcKlQ/duN04oI+lY31S+LjOVZmtosA5mLIKhrSEiTPJoeSsePyZafAo95V
 VI+A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:user-agent:mime-version:date:message-id
 :sender:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=6qxspACXTysAljAspJu8v5fvznTrON/QORjjMnc0wys=;
 b=WNFdKv5EOTvDyiMjJOvsRVEGgSOgYKh2acFYTE+mUUs6V/051HPT0KGkQJZvHJksn4
 Wb2GbfhUaHio5UsDi5K2ckoE8HWoHABzTVnjOem9iqLIVRRwRFUgBFsiK18wxT0VHHvX
 K/WUH96SwH4cwZQ2kuOz/iTcMnSLOZOc/o7rYiNAlkF1c+6wR/+/VP11YW5bCBU+5s2h
 q/t/eQRAt3zIh6sdUyo24DyRcGDLBbBw33sGJsyCrR2NAcOUcoWl39QqDubi7FJsdS5g
 2rMp9gGGeOmytsWZA1CCt/B80VsnbtbLY3crgLp4oSb1dN2nWCNV+buEjuoX5FQ1dk0Q
 KIQw==
X-Gm-Message-State: AO0yUKVIZz9Xri5imOwdP49s+3Wus/zQcVT5VxqZb9P0TSrqinMiEd0o
 o5N45V9wK3W7N+ZfjfDvkec=
X-Google-Smtp-Source: AK7set9jX9syTRCgGJXdVfdbKVVqG+3ntiURzRBehne9IX7uIUpSCPBXa4LlkgJtE/moQNC+lmOaMA==
X-Received: by 2002:a17:906:eb07:b0:87b:d41b:67dc with SMTP id
 mb7-20020a170906eb0700b0087bd41b67dcmr19400773ejb.74.1676163892471; 
 Sat, 11 Feb 2023 17:04:52 -0800 (PST)
Received: from [192.168.0.2] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id
 kl12-20020a170907994c00b00880d9530761sm4569263ejc.209.2023.02.11.17.04.51
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 11 Feb 2023 17:04:51 -0800 (PST)
Message-ID: <3f18f8a6-7096-22ef-dca8-835a0d5760f2@HIDDEN>
Date: Sun, 12 Feb 2023 03:04:50 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.4.2
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
Content-Language: en-US
To: Samuel Wales <samologist@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
 <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.9 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.9 (-)

On 12/02/2023 02:52, Samuel Wales wrote:
> this is a bug against emacs diff-mode.
> 
> diff is not responsible for diff-mode colors.  diff-mode is.

See the user option 'diff-refine'.

Coloring several lines using a "change" face, OTOH, can lose (or at 
least conceal) information: which lines were actually deleted, and which 
were added.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 12 Feb 2023 00:52:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 11 19:52:47 2023
Received: from localhost ([127.0.0.1]:43596 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pR0bn-0001P4-JW
	for submit <at> debbugs.gnu.org; Sat, 11 Feb 2023 19:52:47 -0500
Received: from mail-lf1-f52.google.com ([209.85.167.52]:47059)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1pR0bk-0001Oo-55
 for 61396 <at> debbugs.gnu.org; Sat, 11 Feb 2023 19:52:46 -0500
Received: by mail-lf1-f52.google.com with SMTP id bp15so14025010lfb.13
 for <61396 <at> debbugs.gnu.org>; Sat, 11 Feb 2023 16:52:44 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=8qnzHRz6otycoG4v/eHfatxwJE/oOF1jrZaxs9PDJEU=;
 b=YXDtpki7Kfi6tyT+Z6UW5mlOjBq1hfXGdG+bGAiy4zjqO4we3RMUz8Tfwm5VPRldLj
 f3wIaia66aQhNi2xDM1y7IPb60lIq6bLc5OqI8EKjfcI6Ip6AJjE2GDlU0gT2WuZwZHd
 aDneiO88+Md41FamjQpmzRKp2uWHkCrO/m5/oKOcOn6JRpzPrSLy3KBO9an1xEVbXLUk
 ZwU0PKUWv/3QuxBqnJ+eZz9klBg3+6Dc3UYycg/GEZEjkeZU9xIuB3a8nHvfA+oUFkjx
 gvq7GpycwmnwiffnCCNe+UhiLF+5dzwFE1zNv5E8Y2wuqURmYnsg0y8ftunk8ZebsTPr
 ZGIw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=8qnzHRz6otycoG4v/eHfatxwJE/oOF1jrZaxs9PDJEU=;
 b=Wk0RRw372jR3EIA6uJlLGo1XI6cSpa/R4f3gM5vTSB50pyIlcVP1hMSyuTQ1c0Wnh9
 tCSOZUYf1Zlm5I7vrYl9zeDuWv9gkQQLzJuov04f56XPP2fc9RXEcGsnmqxmgn09zW1x
 7x/on8NTGsU0TIP18eRdlXF+JId3PchiKjVpF1OLa5IQJFG4fdIo6Bq+cH+3Li6sQGJV
 /7y3ulLXsYeb1dIxAzlsR2Gz7UYZoUZ/Ybe6jUm83LD7JEKS3hd4gP3JpKPlSUHzWotH
 pJzFY82i31tqd0w6ec+uXCsRtzK3DWqrqtLxNTZR/+Q/P1H7E6ko5xfkN+Xi7sjTyU9l
 Vyqw==
X-Gm-Message-State: AO0yUKUIJfSWKQxnR9lP8234kbKRHYOYdkzZ24CGOO5XB2dLT4GzQ4ay
 MyFXFTSh+eM/Vki2Pd7E4SGVse78QzVf+aBA02U=
X-Google-Smtp-Source: AK7set/Db30yGcmtDrXiFrE4exTOTbf1rSmo4ernr5qU/omiB6GhEy4eOyUHpbrTZvN5ZxtJdo/YKK/ZeE/jCLpKX/A=
X-Received: by 2002:ac2:4c0b:0:b0:4db:3a6e:de30 with SMTP id
 t11-20020ac24c0b000000b004db3a6ede30mr88596lfq.78.1676163157641; Sat, 11 Feb
 2023 16:52:37 -0800 (PST)
MIME-Version: 1.0
Received: by 2002:aa6:c266:0:b0:23b:5e81:46ba with HTTP; Sat, 11 Feb 2023
 16:52:36 -0800 (PST)
In-Reply-To: <86y1p4m9cg.fsf@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 <86y1p4m9cg.fsf@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Sat, 11 Feb 2023 17:52:36 -0700
Message-ID: <CAJcAo8tPtDnTSk295NEHeA8z+9EnuNGE1tKyYEw34TeJPHpckg@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: Juri Linkov <juri@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

this is a bug against emacs diff-mode.

diff is not responsible for diff-mode colors.  diff-mode is.


On 2/11/23, Juri Linkov <juri@HIDDEN> wrote:
>> i think it is in diff-mode in emacs, at least when it is displaying diff
>> -u.
>>
>> in particular, the idea is whether it can be solved using emacs
>> features such as faces.
>>
>> it is true that diff and friends can often do colors, but to my
>> knowledge, diff-mode uses raw text as its input.
>
> But diff has no color for changed lines, only for added/removed lines:
>
> '--palette=PALETTE'
>      Specify what color palette to use when colored output is enabled.
>      It defaults to 'rs=0:hd=1:ad=32:de=31:ln=36' for red deleted lines,
>      green added lines, cyan line numbers, bold header.
>
>      Supported capabilities are as follows.
>
>      'ad=32'
>           SGR substring for added lines.  The default is green foreground.
>
>      'de=31'
>           SGR substring for deleted lines.  The default is red foreground.
>
>      'hd=1'
>           SGR substring for chunk header.  The default is bold foreground.
>
>      'ln=36'
>           SGR substring for line numbers.  The default is cyan foreground.
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 11 Feb 2023 17:56:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 11 12:56:33 2023
Received: from localhost ([127.0.0.1]:43148 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pQu6z-0006HT-FN
	for submit <at> debbugs.gnu.org; Sat, 11 Feb 2023 12:56:33 -0500
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:44873)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1pQu6w-0006HA-Ll
 for 61396 <at> debbugs.gnu.org; Sat, 11 Feb 2023 12:56:32 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 23E19FF804;
 Sat, 11 Feb 2023 17:56:22 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Samuel Wales <samologist@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
In-Reply-To: <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
 (Samuel Wales's message of "Fri, 10 Feb 2023 22:07:24 -0700")
Organization: LINKOV.NET
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
 <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
Date: Sat, 11 Feb 2023 19:54:07 +0200
Message-ID: <86y1p4m9cg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org, rms@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> i think it is in diff-mode in emacs, at least when it is displaying diff -u.
>
> in particular, the idea is whether it can be solved using emacs
> features such as faces.
>
> it is true that diff and friends can often do colors, but to my
> knowledge, diff-mode uses raw text as its input.

But diff has no color for changed lines, only for added/removed lines:

'--palette=PALETTE'
     Specify what color palette to use when colored output is enabled.
     It defaults to 'rs=0:hd=1:ad=32:de=31:ln=36' for red deleted lines,
     green added lines, cyan line numbers, bold header.

     Supported capabilities are as follows.

     'ad=32'
          SGR substring for added lines.  The default is green foreground.

     'de=31'
          SGR substring for deleted lines.  The default is red foreground.

     'hd=1'
          SGR substring for chunk header.  The default is bold foreground.

     'ln=36'
          SGR substring for line numbers.  The default is cyan foreground.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 11 Feb 2023 05:07:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 11 00:07:34 2023
Received: from localhost ([127.0.0.1]:38526 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pQi6o-0004Co-8E
	for submit <at> debbugs.gnu.org; Sat, 11 Feb 2023 00:07:34 -0500
Received: from mail-lj1-f176.google.com ([209.85.208.176]:46753)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1pQi6m-0004CZ-5s
 for 61396 <at> debbugs.gnu.org; Sat, 11 Feb 2023 00:07:32 -0500
Received: by mail-lj1-f176.google.com with SMTP id a9so8602297ljr.13
 for <61396 <at> debbugs.gnu.org>; Fri, 10 Feb 2023 21:07:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=qsV/IwEZXZd5PoFaFIMRqud6O9UULRrpPyd23YvJ4EY=;
 b=DzJaP11l7c8gYeh+9DQh0gzKBGT+UZfrQau2QBhFtiaKv8nnXf8hcx/pDqN59Rxg0n
 kubtXQXjgHDcIHQN46lJsLI04pS1ZRYbOZSckMXFcGXXknAB5k6CopOi6lBqkL2jJU35
 jevs1OVNTgrdxO1DMoL0HYq8nEEWpaDRAO7BimTUXO6hACrWIhahli52exqE0xphxcul
 8zxuMkreCKo84My7UNJcaFbgnDZZfcwcRbNxN+VULFwWA6Y06DRBp6/YOIs2dl4VdtjS
 VwmrmB072EsmrQNMYZjVnxsgPKBNazodzm466ZCzfv7b6GdoQMpMaTOmjQKek7tHRBXs
 vkrg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=qsV/IwEZXZd5PoFaFIMRqud6O9UULRrpPyd23YvJ4EY=;
 b=2a1j9JfTA14MXdRr7sxZ+r6iR1D/PeI3906lBgG5lEBEswM0ibSo4gyhtL3+ZXzMw+
 eAHVDzZFuGL+E77rS+PT2NTKxyFiTXfzkTYXK1mmZ1UT+uNYBc/VUGA+G2MOoL1ZxfeT
 ZYIAkPoyIUqleyVodkJsuvR9KehJfilvhprYC/OX5Q+6Jcd30T1uS1JUTg8Rd667vEkE
 MTF074FhCKL/LbKaZ2jeQlMIDcUFITv5jD0JlxtV9/cDISNeLtV3CbxfZol5h7Sjp3Dg
 bdVlnmyk3+aiUG1jgDSy/aYdPolCIwFyRAuOUC1gjvmYXOMRoTbBiUrsDO5qbUn/Q9Sm
 Wm3g==
X-Gm-Message-State: AO0yUKWZsiVGMV4vXy0HK2lysTKph8lsPhYbwbk0yuFhmEfSp5eUnVSR
 NaoTmAKjLcwf/8l+s/neSZjZ64oTZv4Xm8DQkCs=
X-Google-Smtp-Source: AK7set8fR9RRHNYHXNUEJyVWZMNFLMzvs2QBfkInEGMsesGxA43Qv5SL4SXdXGrsg2Cd7ZPB3x/yMPNlf2qsssxTaQE=
X-Received: by 2002:a2e:97d3:0:b0:293:1d08:99fd with SMTP id
 m19-20020a2e97d3000000b002931d0899fdmr3619156ljj.111.1676092045602; Fri, 10
 Feb 2023 21:07:25 -0800 (PST)
MIME-Version: 1.0
Received: by 2002:aa6:c266:0:b0:23b:5e81:46ba with HTTP; Fri, 10 Feb 2023
 21:07:24 -0800 (PST)
In-Reply-To: <E1pQhSC-0006rR-HY@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <E1pQhSC-0006rR-HY@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Fri, 10 Feb 2023 22:07:24 -0700
Message-ID: <CAJcAo8vDeJsZS_m6hw+RphuFk-u5Z6t4uEC4-ey4ScCL4LTW=g@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: rms@HIDDEN
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

i think it is in diff-mode in emacs, at least when it is displaying diff -u.

in particular, the idea is whether it can be solved using emacs
features such as faces.

it is true that diff and friends can often do colors, but to my
knowledge, diff-mode uses raw text as its input.


On 2/10/23, Richard Stallman <rms@HIDDEN> wrote:
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> Is this bug in Emacs, or is it in diff?
>
> --
> Dr Richard Stallman (https://stallman.org)
> Chief GNUisance of the GNU Project (https://gnu.org)
> Founder, Free Software Foundation (https://fsf.org)
> Internet Hall-of-Famer (https://internethalloffame.org)
>
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 11 Feb 2023 04:25:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 10 23:25:45 2023
Received: from localhost ([127.0.0.1]:38463 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pQhSL-00034X-4N
	for submit <at> debbugs.gnu.org; Fri, 10 Feb 2023 23:25:45 -0500
Received: from eggs.gnu.org ([209.51.188.92]:33020)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rms@HIDDEN>) id 1pQhSI-00034K-C3
 for 61396 <at> debbugs.gnu.org; Fri, 10 Feb 2023 23:25:43 -0500
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 <rms@HIDDEN>)
 id 1pQhSD-0001PV-2P; Fri, 10 Feb 2023 23:25:37 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From:
 mime-version; bh=Im6JEUSofexBDfnMcgVYUuL/FiuxBm/KhLJDi1xGcXw=; b=VckBRLmV/HO+
 gRX8Nl5ROEkluGHEWYAU77QdcWwNuomtPtvWQ7QlH6MWgKDQ/5rcNXZ2dlWf2RlxdjF9r9xE5Qahw
 hpCuiUl7pSnMzEmLRRKWYijAsgZlIq7/0qls6yjBdDDn5NPw65pPDifj3t45egtZ14UMABqy+hN/N
 m7hv/LcCBUObqVOMGfTJpOSxANWsbMCfwVi+fZTmthypW4grEpWsQY4UZXh2sl7iAez90lO1KjnMW
 CKLlmJalTdDNgEFiUA36PG80CrtfO7IJUN0MzW65kqrCEk4lbpuwO5yicuoJsOJ7ocVDMP7lQYwMc
 5cyq3vJCFTXcRUN0Vvulyg==;
Received: from rms by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <rms@HIDDEN>)
 id 1pQhSC-0006rR-HY; Fri, 10 Feb 2023 23:25:36 -0500
Content-Type: text/plain; charset=Utf-8
From: Richard Stallman <rms@HIDDEN>
To: Samuel Wales <samologist@HIDDEN>
In-Reply-To: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 (message from Samuel Wales on Thu, 9 Feb 2023 20:25:25 -0700)
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
Message-Id: <E1pQhSC-0006rR-HY@HIDDEN>
Date: Fri, 10 Feb 2023 23:25:36 -0500
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: rms@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Is this bug in Emacs, or is it in diff?

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 10 Feb 2023 23:50:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 10 18:50:45 2023
Received: from localhost ([127.0.0.1]:38341 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pQdAC-00044m-S4
	for submit <at> debbugs.gnu.org; Fri, 10 Feb 2023 18:50:45 -0500
Received: from mail-lj1-f182.google.com ([209.85.208.182]:34794)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1pQdAA-00044W-Dn
 for 61396 <at> debbugs.gnu.org; Fri, 10 Feb 2023 18:50:42 -0500
Received: by mail-lj1-f182.google.com with SMTP id o5so8141616ljj.1
 for <61396 <at> debbugs.gnu.org>; Fri, 10 Feb 2023 15:50:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=B2OjnrSQ73TxhG07zQXoHdAYehvPECDmNQnZ60c18js=;
 b=TbKeNUnEmzD7FWWF4oHR+EOyahVCjId4dAo9EdGh+e8rzIvfvZ9Y2gwafLiS2TSn2+
 WrIav6Y0kfROux6pqovW48hb76blza4I82v3lPKUsnacsqnnnSYejdZsB43Lir7NQ8Qq
 31VUnEqnqfw8cxfciqWV7uKMbDPmuttqLUgA2lvarHIajeIZ+4n6sKydCz2XbJfQedsr
 Efc8hNwRLfMF9UUpyefeIWm2+rPkow6h4GcP/D2PONCbBYR3UjE7D7tlZQOfQ8cjc+IE
 ssBYt0BaXIpN6e6HAcOhc809C9CMP9lixwLjl0fHDF7TjioMzlc7LQKabOk+pHTp/rIb
 1k7w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=B2OjnrSQ73TxhG07zQXoHdAYehvPECDmNQnZ60c18js=;
 b=ZIp4TmCvVxAoWlGaYEqVRbgqxCXTMmwllhJ2uusi/DqS46NyNJMFCgePyOKc91JEMg
 AriOniFBtX2lquRczf9SYGHzwBEZSIsCj02Rk2yLSbNHHooGxcQQ6Cx5J1X+cRLkzxyT
 FBiz4iUe+iEdBoARXsM3nbUK4Y1UkaSGFU8AaLJIwHO8RQaYjD3C/8+tcty9d381/icG
 OqKPU8WZKlFN7XPt4ltfsHoycYsTdbicGPTfBLWzdoff5p3fFbLyQGwg/4OjDO059egC
 2SIv13hlzdbOnWf8U+Og/kmgcGTlEgjHsJZIF8CAM6fbEaCdCXpG3uZqTlqxQm2mIGfV
 sC3g==
X-Gm-Message-State: AO0yUKVUEMVSKgpfB7RBTEY9TCN4ACeFoyLOq/mZaAMsT1hbnDhA5stZ
 BfmLVzoVeuHCbJvm9l4QO6CzWRKzd6krhPXv1f7XAcBKoTZP5Q==
X-Google-Smtp-Source: AK7set+t3MniISdXg9oswSmqzx26iJm+HwtT3jQUaKiaVFVl+Xo6sI/BChsxECqAToLfic9n4MGAy4DoZq6pJ0VUvNo=
X-Received: by 2002:a2e:97d3:0:b0:293:1d08:99fd with SMTP id
 m19-20020a2e97d3000000b002931d0899fdmr3503431ljj.111.1676073036628; Fri, 10
 Feb 2023 15:50:36 -0800 (PST)
MIME-Version: 1.0
Received: by 2002:aa6:c266:0:b0:23b:5e81:46ba with HTTP; Fri, 10 Feb 2023
 15:50:35 -0800 (PST)
In-Reply-To: <CAJcAo8vunLHek-xj2rw887Bcsfc9AOegdj831e1uTfchykSYzQ@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <868rh6yop8.fsf@HIDDEN>
 <CAJcAo8vunLHek-xj2rw887Bcsfc9AOegdj831e1uTfchykSYzQ@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Fri, 10 Feb 2023 16:50:35 -0700
Message-ID: <CAJcAo8ufy957xwyUa-RAVFq=ytDD3qdb7MRB3zpSOB2gTx-HuA@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: Juri Linkov <juri@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

highlighting for all good men in + is the current case.

i am proposing that this is insufficient.  - has no indication or
highlighting other than del face and it is not a deleted line.

On 2/10/23, Samuel Wales <samologist@HIDDEN> wrote:
> it is an interesting idea to change the gutter from - to !, but i'm
> not sure this is ok for diff -u, i think it could maybe break things?,
> and it would not distinguish - from +.
>
> On 2/10/23, Juri Linkov <juri@HIDDEN> wrote:
>>> a fix is to have a different face for changed lines.  i
>>> suggest a muted bg face.  another fix is to stick a colored
>>> marker INDICATOR in A where changes in B exist.
>>>
>>>   -now is the time^
>>>   +now is the time FOR ALL GOOD MEN
>>>
>>> where ^ is a colored marker -- actually just a changed bg
>>> for the newline in this case would work, but i don't think
>>> emacs supports that.
>>
>> We have a dedicated face to indicate the changed lines.
>> Its name is 'diff-changed' and it can be used for context diffs
>> that have a special indicator '!' at the beginning of changed lines.
>> Is it possible to output the same indicator for unified diffs?
>>
>
>
> --
> The Kafka Pandemic
>
> A blog about science, health, human rights, and misopathy:
> https://thekafkapandemic.blogspot.com
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 10 Feb 2023 23:49:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 10 18:49:10 2023
Received: from localhost ([127.0.0.1]:38337 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pQd8g-00041z-Eq
	for submit <at> debbugs.gnu.org; Fri, 10 Feb 2023 18:49:10 -0500
Received: from mail-lj1-f170.google.com ([209.85.208.170]:37670)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1pQd8e-00041B-6g
 for 61396 <at> debbugs.gnu.org; Fri, 10 Feb 2023 18:49:08 -0500
Received: by mail-lj1-f170.google.com with SMTP id h17so8122694ljq.4
 for <61396 <at> debbugs.gnu.org>; Fri, 10 Feb 2023 15:49:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=7Gotyj/eTl+SkfbBfXEWuRRIJP0Vb4MtNHh2FmkAmPg=;
 b=k6j2SeNgpFVoCVkpOa07S2G/wGNCCbJvUCecNmy+FYQPmP1lLx7lReZWGnF3d4/5Ij
 JqfCXHo+zKvmsYvCU2bl2LW6xuq1Iw0WvUtQdjd7uiNL9ATInpNzv+P4v3KqiCqZ8Sqh
 1bKd1t5imDBynWxjvftIi/1Y+t57RpbLMNKitiAQwzwL5Y31XWhPZK9xh4XHCGUJnU4B
 xMh4NOfE1CGGcW5RVbBfFsnimGegXPCTuXTgt6EqrRqu2SNF/0IHlcEHFD/L2Hr+Nmw4
 eE9xkWTiq5maqiJgXirIO+lJFwIdeWBQ70BO4bdq9qhaV4RnYIiuLaYzv5lo4Lqpqp9K
 t+LA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:from:references:in-reply-to
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=7Gotyj/eTl+SkfbBfXEWuRRIJP0Vb4MtNHh2FmkAmPg=;
 b=sXUTzUGxX7KXFpuP0V1gP6Y1v035ruCWHHG4v/SaMp+O6BWttHSvYVKQcxxCDX7jE0
 30p6fR2+F2mej3Mteh+DrZnw/RP+mGnvn9adbxqNSWanL3S1laOh8cBNt7ucCBrWXPyg
 XjNEnaecNqpzmibf58j7qq4pkxuK4vGGWbo7bD5MgtkolUrKX036ToluWKfStoZzvb6a
 iF68ZutIGjLhFxgYBGsHjoVu0quX9VYHiW7gc54Fp7z/5xYBT8dlXIy+3kZT8YbPJc39
 TGUdD175qpSUtXuIyD8BxE+uUgIBBuN7WIvpbWdIRCa7Wk2jqp4xgqd7KbCkZziZ6IZ2
 LHsg==
X-Gm-Message-State: AO0yUKUOuSGDiAX6ndN0r+4vSOOMcw99fI55IM3K06F6gCwEUj2NEA0w
 IwLKwkpu8D7eR8AEA52nhaLu1EA0L649G1nVTqTqhY9SnzQwlw==
X-Google-Smtp-Source: AK7set9wa+7QT5yowQyV1DhNuH4QdUpY7XeeKti19Pe2sOq+YKriRXZxQ2QAsFwPeh8LR7qjp1yMoYxa/XYlb4UbBFw=
X-Received: by 2002:a2e:9f08:0:b0:290:67a6:38d2 with SMTP id
 u8-20020a2e9f08000000b0029067a638d2mr2860593ljk.184.1676072942033; Fri, 10
 Feb 2023 15:49:02 -0800 (PST)
MIME-Version: 1.0
Received: by 2002:aa6:c266:0:b0:23b:5e81:46ba with HTTP; Fri, 10 Feb 2023
 15:49:00 -0800 (PST)
In-Reply-To: <868rh6yop8.fsf@HIDDEN>
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 <868rh6yop8.fsf@HIDDEN>
From: Samuel Wales <samologist@HIDDEN>
Date: Fri, 10 Feb 2023 16:49:00 -0700
Message-ID: <CAJcAo8vunLHek-xj2rw887Bcsfc9AOegdj831e1uTfchykSYzQ@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
To: Juri Linkov <juri@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

it is an interesting idea to change the gutter from - to !, but i'm
not sure this is ok for diff -u, i think it could maybe break things?,
and it would not distinguish - from +.

On 2/10/23, Juri Linkov <juri@HIDDEN> wrote:
>> a fix is to have a different face for changed lines.  i
>> suggest a muted bg face.  another fix is to stick a colored
>> marker INDICATOR in A where changes in B exist.
>>
>>   -now is the time^
>>   +now is the time FOR ALL GOOD MEN
>>
>> where ^ is a colored marker -- actually just a changed bg
>> for the newline in this case would work, but i don't think
>> emacs supports that.
>
> We have a dedicated face to indicate the changed lines.
> Its name is 'diff-changed' and it can be used for context diffs
> that have a special indicator '!' at the beginning of changed lines.
> Is it possible to output the same indicator for unified diffs?
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 10 Feb 2023 13:58:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 10 08:58:54 2023
Received: from localhost ([127.0.0.1]:34497 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pQTvS-0004WT-Dj
	for submit <at> debbugs.gnu.org; Fri, 10 Feb 2023 08:58:54 -0500
Received: from mail-ej1-f50.google.com ([209.85.218.50]:35651)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1pQTvN-0004WD-Iy
 for 61396 <at> debbugs.gnu.org; Fri, 10 Feb 2023 08:58:52 -0500
Received: by mail-ej1-f50.google.com with SMTP id qw12so16112777ejc.2
 for <61396 <at> debbugs.gnu.org>; Fri, 10 Feb 2023 05:58:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:in-reply-to:from:references:to
 :content-language:subject:user-agent:mime-version:date:message-id
 :sender:from:to:cc:subject:date:message-id:reply-to;
 bh=vUbPK4WQxKlMHkHprYRwDzOTkpJs0veQOp3Iqm1CIFc=;
 b=EBlZ6GyQ+gLNf/tN+oNEo+YbCxWm8+bmYSelp1P3ai6kzMK/ozotuk97vDgv4/bfmF
 jtuekCOXkTgZp2OMFoKUk3AhODX8YwPQ9GnVomS5lBbkIrhyna3ZVBoCkYkJ/06AUTBq
 oIyKH3o3L7o8ccCXtHKbcWT8NOES5cO3+13vNmU2C+mSODXV0mOBErWLcsU1y1paWF//
 R4cN3UA3WGlu2Zhibmvl1fwFCTfOk1zrqfJPAKf5orgnJ5DZDFJyP/HXbE26hrZOE8JZ
 iI3tlFsrFqK4qLKalqcqIJNKFfuE/SmHOp/7MdmxR4Wr6FouQwdt/9/aY/aIy5ssqfG/
 26Tw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:in-reply-to:from:references:to
 :content-language:subject:user-agent:mime-version:date:message-id
 :sender:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=vUbPK4WQxKlMHkHprYRwDzOTkpJs0veQOp3Iqm1CIFc=;
 b=NgO+rXFBbaTDocD5NUg7oRLhIF2OiGfCkCX0i197zNubocQ+iodJGmluyhLnqC3neM
 x929n3h0WtzLU+ukJrsoYEN+V80CO5BTOUECTS1CTsz3UAI9V718/at4c1IQhsteQeMd
 0tIKEjNf3ZZqlsciz4oF5FUPwA2HirVWFobB7xxxBD9Ej6AeW0EIIq5YYX9cCg4jBx/c
 qcmX7mZXDtdraiEp0PWqpTZpJ6pDGOdWHQ63nvUVeSHuTKfcyK1xFaXbW38lFJUU0B/h
 O1/v52iwCm4xgVhaw5yLJxxur2MYMTa5xPLx7cRoLd1L5zLJ2bDh1J5LiQXEm0O01bwx
 0/7w==
X-Gm-Message-State: AO0yUKVI2PrZqae0TnSb10CE38ZyV3PBu+9GNt5z//xd+2iu4FoUc6cm
 B66z6jTAaGMgwVphUryAzjA=
X-Google-Smtp-Source: AK7set/X7d5FeMyq4ntErepm2QpDd/8HaI1ZLOQwkW+kug7Cis8hbojQuA52sGuRSBkCuMotNt3FvA==
X-Received: by 2002:a17:907:2175:b0:88b:109e:fbd3 with SMTP id
 rl21-20020a170907217500b0088b109efbd3mr15957779ejb.24.1676037523465; 
 Fri, 10 Feb 2023 05:58:43 -0800 (PST)
Received: from [192.168.0.2] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id
 p3-20020a1709060dc300b0088f132432cdsm2403923eji.61.2023.02.10.05.58.42
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 10 Feb 2023 05:58:42 -0800 (PST)
Message-ID: <cdba742f-6ea5-dbed-eaca-da81e06b01d5@HIDDEN>
Date: Fri, 10 Feb 2023 15:58:40 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.4.2
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
Content-Language: en-US
To: Samuel Wales <samologist@HIDDEN>, 61396 <at> debbugs.gnu.org
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.9 (/)
X-Debbugs-Envelope-To: 61396
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.9 (-)

On 10/02/2023 05:25, Samuel Wales wrote:
> a fix is to have a different face for changed lines.  i
> suggest a muted bg face.  another fix is to stick a colored
> marker INDICATOR in A where changes in B exist.
> 
>    -now is the time^
>    +now is the time FOR ALL GOOD MEN
> 
> where ^ is a colored marker -- actually just a changed bg
> for the newline in this case would work, but i don't think
> emacs supports that.

Doesn't the "refinements" feature serve the same purpose?

In my testing, "FOR ALL GOOD MEN" is additionally highlighted with the 
diff-refine-added face. Which adds an emphasized background.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at 61396 <at> debbugs.gnu.org:


Received: (at 61396) by debbugs.gnu.org; 10 Feb 2023 07:19:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 10 02:19:48 2023
Received: from localhost ([127.0.0.1]:34212 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pQNhD-0007y6-WB
	for submit <at> debbugs.gnu.org; Fri, 10 Feb 2023 02:19:48 -0500
Received: from relay10.mail.gandi.net ([217.70.178.230]:49799)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1pQNhB-0007xo-Qh
 for 61396 <at> debbugs.gnu.org; Fri, 10 Feb 2023 02:19:46 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id EA89A240007;
 Fri, 10 Feb 2023 07:19:36 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Samuel Wales <samologist@HIDDEN>
Subject: Re: bug#61396: diff mode could distinguish changed from deleted lines
In-Reply-To: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
 (Samuel Wales's message of "Thu, 9 Feb 2023 20:25:25 -0700")
Organization: LINKOV.NET
References: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
Date: Fri, 10 Feb 2023 09:17:07 +0200
Message-ID: <868rh6yop8.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 61396
Cc: 61396 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> a fix is to have a different face for changed lines.  i
> suggest a muted bg face.  another fix is to stick a colored
> marker INDICATOR in A where changes in B exist.
>
>   -now is the time^
>   +now is the time FOR ALL GOOD MEN
>
> where ^ is a colored marker -- actually just a changed bg
> for the newline in this case would work, but i don't think
> emacs supports that.

We have a dedicated face to indicate the changed lines.
Its name is 'diff-changed' and it can be used for context diffs
that have a special indicator '!' at the beginning of changed lines.
Is it possible to output the same indicator for unified diffs?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Feb 2023 03:25:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 09 22:25:33 2023
Received: from localhost ([127.0.0.1]:34022 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pQK2X-0001GZ-3d
	for submit <at> debbugs.gnu.org; Thu, 09 Feb 2023 22:25:33 -0500
Received: from lists.gnu.org ([209.51.188.17]:42246)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samologist@HIDDEN>) id 1pQK2W-0001GR-CW
 for submit <at> debbugs.gnu.org; Thu, 09 Feb 2023 22:25:32 -0500
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 <samologist@HIDDEN>)
 id 1pQK2W-0000Sb-29
 for bug-gnu-emacs@HIDDEN; Thu, 09 Feb 2023 22:25:32 -0500
Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <samologist@HIDDEN>)
 id 1pQK2U-0007D1-6g
 for bug-gnu-emacs@HIDDEN; Thu, 09 Feb 2023 22:25:31 -0500
Received: by mail-lj1-x22d.google.com with SMTP id d8so4531513ljq.9
 for <bug-gnu-emacs@HIDDEN>; Thu, 09 Feb 2023 19:25:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=fE8CO7q23Sf8YU5x+4rZ3G9cjhV//BJMTscsRtehcz4=;
 b=ZTQrLRNFSq8LT25YbTEQjAG5NO/pHcTo9YbToouEW9xDQVJ0nHLQm7BawQfZW2LLor
 fZ6FpM7yPacpYzRcVEo9EKSuomrxcWDdhATx4xfiymG3nupWHxEnRNpmJl0fjIqqD7Bi
 QRJAiT6rg86eAcgw/bYYk18XgPFFNBnZIz8tkcGDwsl+lwNdZca7K/P9Cec9ma+d25Br
 J9TnB89jaqPwlELnpvSKbxSsC130UxCV0Ux67QjIIDteVNYJxhZ+wGtLsNnA8hNGxqce
 12PTGjVKHuEccGBNNO8t5E17J2zRBMw5SIoVtVpajiJZbEbCQ3EbQEKdCrf1ZEhN7cXZ
 GvfQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=fE8CO7q23Sf8YU5x+4rZ3G9cjhV//BJMTscsRtehcz4=;
 b=7BTaew5enGyHcfgCrXRNcxy2Tlsb10HI2kJDYev+qoPBhs7iTDZkIeyuyf5asuXlMI
 ilz0CTAwrNxK/UFRTGmLXBlaXUrAdD81jePtucdhczT/++SoAyIJTiqFUNGeorwnRAKJ
 HEZkyDUPAfAguCI8e1kjnGbhF7f6H5h7XBG5NZ2XIFXxltRj/KU60D+RMdB9hppeRPJ8
 QlxIUV9CTBTo1neQkrKz8X2EWLlen1uebzmmfg7WZLQNGgqwS5kkO8hMhq3ppROiIauB
 8AzckNQ+0HCD7G94IQu+c5uk9HoIBQa3rMZ8okbVlUZ/G1epHXl3AigOm7Lao/riqa5M
 +bow==
X-Gm-Message-State: AO0yUKVgVWoRM/sqCOxwPg3RM/ZGzf7SzRtvbzrmKgHGv0D1qVBLIGvJ
 nmmvgBuhSXeDDIPM7rFNdwzlgRZMcOs3KqCNKDr+B6t3lru4fA==
X-Google-Smtp-Source: AK7set9vjUCZvFix4u3LRLsEgO5Nm1SkAnltMELVheWrM5G9sv5IIRjT+l2wOX0JM/crq+rMh4kB3vEOsPnEeOJsT0w=
X-Received: by 2002:a2e:aa1c:0:b0:290:7d15:464b with SMTP id
 bf28-20020a2eaa1c000000b002907d15464bmr2111461ljb.146.1675999526855; Thu, 09
 Feb 2023 19:25:26 -0800 (PST)
MIME-Version: 1.0
Received: by 2002:aa6:c266:0:b0:23b:5e81:46ba with HTTP; Thu, 9 Feb 2023
 19:25:25 -0800 (PST)
From: Samuel Wales <samologist@HIDDEN>
Date: Thu, 9 Feb 2023 20:25:25 -0700
Message-ID: <CAJcAo8tT8T4m4cXJcz9cv3h=1EPGarTr8CxzgygTaCyL0W8GAA@HIDDEN>
Subject: diff mode could distinguish changed from deleted lines
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=2a00:1450:4864:20::22d;
 envelope-from=samologist@HIDDEN; helo=mail-lj1-x22d.google.com
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, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

in diff mode, with diff -u, if a line in A was added to
in B, you can't tell by looking at the A version whether it was
=deleted= in B or =changed= from A to B.  you have to
manually find it in B and then compare.  here is an example:

  -now is the time
  +now is the time FOR ALL GOOD MEN

the - line is in del face.  there is no indication on that
line that the line is not deleted.

if the lines are separated sufficiently, it is not obvious
to the user whether it is a line that was deleted, or, as
above, added to.  the del face is therefore ambiguous and can be
potentially misleading to the user.

===

the only thing that tells you non-confusingly that A was
changed, or where, is if you look at B.

this is not practical when there are many lines.

a fix is to have a different face for changed lines.  i
suggest a muted bg face.  another fix is to stick a colored
marker INDICATOR in A where changes in B exist.

  -now is the time^
  +now is the time FOR ALL GOOD MEN

where ^ is a colored marker -- actually just a changed bg
for the newline in this case would work, but i don't think
emacs supports that.

thank you.

-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com




Acknowledgement sent to Samuel Wales <samologist@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#61396; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 13 Sep 2023 15:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.