From: Samuel Wales <samologist@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: 61396@debbugs.gnu.org, rms@gnu.org
Subject: bug#61396: diff mode could distinguish changed from deleted lines
Date: Sat, 22 Jul 2023 23:04:10 -0700 [thread overview]
Message-ID: <CAJcAo8sA96RWEA7WqqbGONM0wz+1WnZHkU+04R-H1OaQUopeJQ@mail.gmail.com> (raw)
In-Reply-To: <CAJcAo8t7OnGRo00xZTnfT5=tG2=qLm-f_YmYkH9wGrxNfS=xnQ@mail.gmail.com>
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@gmail.com> 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@gmail.com> wrote:
>> below.
>>
>> On 2/12/23, Juri Linkov <juri@linkov.net> 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
next prev parent reply other threads:[~2023-07-23 6:04 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 3:25 bug#61396: diff mode could distinguish changed from deleted lines Samuel Wales
2023-02-10 7:17 ` Juri Linkov
2023-02-10 23:49 ` Samuel Wales
2023-02-10 23:50 ` Samuel Wales
2023-02-10 13:58 ` Dmitry Gutov
2023-02-11 4:25 ` Richard Stallman
2023-02-11 5:07 ` Samuel Wales
2023-02-11 17:54 ` Juri Linkov
2023-02-12 0:52 ` Samuel Wales
2023-02-12 1:04 ` Dmitry Gutov
2023-02-12 1:07 ` Samuel Wales
2023-02-12 1:52 ` Dmitry Gutov
2023-02-12 2:12 ` Samuel Wales
2023-02-12 2:17 ` Dmitry Gutov
2023-02-12 2:54 ` Samuel Wales
2023-02-12 8:31 ` Juri Linkov
2023-02-12 9:03 ` Samuel Wales
2023-02-12 17:20 ` Juri Linkov
2023-02-12 22:16 ` Samuel Wales
2023-02-12 22:48 ` Samuel Wales
2023-07-23 6:04 ` Samuel Wales [this message]
2023-07-24 10:21 ` Robert Pluim
2023-07-24 23:38 ` Samuel Wales
2023-07-24 23:39 ` Samuel Wales
2023-07-25 8:11 ` Robert Pluim
2023-07-25 21:29 ` Samuel Wales
2023-08-10 23:56 ` Samuel Wales
2023-08-11 0:41 ` Dmitry Gutov
2023-09-03 17:29 ` Juri Linkov
2023-03-08 21:14 ` Samuel Wales
2023-09-04 21:06 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-04 22:38 ` Samuel Wales
2023-09-07 2:34 ` Samuel Wales
2023-09-12 22:11 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-12 22:31 ` Dmitry Gutov
2023-09-13 14:51 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-14 6:05 ` Samuel Wales
2023-09-14 22:42 ` Dmitry Gutov
2023-09-15 1:34 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-15 1:58 ` Samuel Wales
2023-09-15 10:20 ` Dmitry Gutov
2023-09-30 17:38 ` Juri Linkov
2023-09-30 18:18 ` Eli Zaretskii
2023-10-01 6:32 ` Juri Linkov
2023-10-01 15:54 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-01 18:53 ` Juri Linkov
2023-10-01 22:16 ` Samuel Wales
2023-10-02 6:48 ` Juri Linkov
2023-10-02 16:56 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJcAo8sA96RWEA7WqqbGONM0wz+1WnZHkU+04R-H1OaQUopeJQ@mail.gmail.com \
--to=samologist@gmail.com \
--cc=61396@debbugs.gnu.org \
--cc=juri@linkov.net \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).