From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Samuel Wales Newsgroups: gmane.emacs.bugs Subject: bug#61396: diff mode could distinguish changed from deleted lines Date: Sun, 1 Oct 2023 15:16:20 -0700 Message-ID: References: <85f73356-3a11-c76c-dd9a-f2dc1f6ef504@gutov.dev> <86r0mf1rzl.fsf@mail.linkov.net> <864jja5evx.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35955"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dmitry Gutov , 61396@debbugs.gnu.org, Stefan Monnier To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 02 00:17:03 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qn4kI-0008uQ-CN for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Oct 2023 00:17:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qn4k3-00039p-Q0; Sun, 01 Oct 2023 18:16:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qn4k2-000382-MY for bug-gnu-emacs@gnu.org; Sun, 01 Oct 2023 18:16:46 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qn4k2-0002kC-Db for bug-gnu-emacs@gnu.org; Sun, 01 Oct 2023 18:16:46 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qn4kI-0004Sl-8n for bug-gnu-emacs@gnu.org; Sun, 01 Oct 2023 18:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Samuel Wales Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Oct 2023 22:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61396 X-GNU-PR-Package: emacs Original-Received: via spool by 61396-submit@debbugs.gnu.org id=B61396.169619861017131 (code B ref 61396); Sun, 01 Oct 2023 22:17:02 +0000 Original-Received: (at 61396) by debbugs.gnu.org; 1 Oct 2023 22:16:50 +0000 Original-Received: from localhost ([127.0.0.1]:35527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qn4k5-0004SF-NV for submit@debbugs.gnu.org; Sun, 01 Oct 2023 18:16:50 -0400 Original-Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:38062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qn4k0-0004Rt-8v for 61396@debbugs.gnu.org; Sun, 01 Oct 2023 18:16:48 -0400 Original-Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3232e96deaaso2161627f8f.0 for <61396@debbugs.gnu.org>; Sun, 01 Oct 2023 15:16:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696198582; x=1696803382; 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=t9363eAHuOYzHvI2muuVJNn83PXKNlNbjvQgIITc0tg=; b=RDG8vtGcrz11CUI+4RUs8ArVr52OVgcpvyXHYyzdBIwgqDf2/c1z9QWi+UVaAGP/7S y6wR0Z2Em3jOLIb0CBFg4E4+7MWscSzl3sVpLvu1cJQTPH52zZUCro85lXswfdJ+VOFS RLeLzwJJHfYSXj5ZooCh4p/EOmxSarLcT8OvpzD9hMtYcDtMiwdxuOl2yhcKwCivAx9d SpFAcN5eEQgpg4Lzsaf+NG27C7ZbQv15+btDjCVdsqnSyJ0rpH/fI8Qcd1lAsUOHntn4 0ovxdNxP3UVnxSFt1I3lbGhNRzAxch9feOFMw2OZDPMupMST8SxIEnTqiMHVQgVBh5ml mleQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696198582; x=1696803382; 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=t9363eAHuOYzHvI2muuVJNn83PXKNlNbjvQgIITc0tg=; b=GHyuIPp/U4dz4OhnElckqaG1AVol/af157vX4oBfIGUCYZ8rTXdkmTePtuVIsIecSr OG1fPh2EubNkn12k24Bi8E5IhTK1t58hVUzkWVVpnpiJcH6ZCzDWnVsAyOzceTaWGo/a fgwXOStGj8y3zwwuSbttrU8nih4XZpZSubdSwtH0ndvY7saI1FC0OdXkQg2nKAIyhTVD /06vxkL1T6FgkuuNDXrYGNHsHkq2ECYH6MIxbTiDdh8w3Rls0CucxG9HNP/urdstC3RU Q+DMzLRLfUWsJuIP/FafWLGtickRqtCIprbb+wvuKriPmRKimTmbKdM8JYxhIFXSYOqJ H4YA== X-Gm-Message-State: AOJu0Yyj0jCDgf1J9aJb/RT4uxQqjWSl04kcP4jOOUqI03w4I+rG7y/S kyeNeZxHf1jAGyQUJlnrZU1FN9LPb2UKg6Px9gA= X-Google-Smtp-Source: AGHT+IHAgrvBUYzMCPg/hmKphFfcqECIZumGZBscrjNk5uzFQQjR/15hh+oftnqjjphXoSssNTsNSvcsXKYY+ri4KFs= X-Received: by 2002:a05:600c:3b1b:b0:404:75cc:62e6 with SMTP id m27-20020a05600c3b1b00b0040475cc62e6mr8913525wms.3.1696198581655; Sun, 01 Oct 2023 15:16:21 -0700 (PDT) Original-Received: by 2002:a05:6520:703:b0:272:37a9:8c91 with HTTP; Sun, 1 Oct 2023 15:16:20 -0700 (PDT) In-Reply-To: <864jja5evx.fsf@mail.linkov.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271640 Archived-At: some lines are truly added or deleted. the problem is they look exactly like lines that are changed in the other polarity. so you can't tell which they are. i don't think it's too heavy to indicate such lines by e.g. inverse video on the polarity character -+ or so. others might. On 10/1/23, Juri Linkov wrote: >>>> 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. >>> >>> I realized now the same problem exists even without color highlighting >>> at all. >> >> No, the problem I describe is specific to the "refined" diff >> highlighting: I rely on this highlighting to tell me what has "really" >> been changed, yet it's not applied to lines that are "just added" or >> "just removed" so I end up skipping over them unwittingly because they >> are highlighted identically to the *unchanged* parts of those lines >> which are otherwise changed. > > AFAICS, GitHub tries to address this problem by using less refining: > only changes inside a single line are refined. I don't like this, > but maybe such an option could help at least by not promising that > all added/removed text is using the refined diff highlighting. > > On the other extreme, your option `diff-refine-nonmodified` > could consistently highlight all added/removed text, > but such highlighting is too "heavy". > > So a new option could be like font-lock levels, > and we need to find a balance for the default value. > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com