all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* BUG: ediff-buffers does not consistently show "differences" or "difference regions" within the "active region"
@ 2024-07-19 19:53 gnuist
  2024-07-20  7:04 ` Michael Heerdegen via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 2+ messages in thread
From: gnuist @ 2024-07-19 19:53 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Hi.

BUG: ediff-buffers does not consistently show "difference regions"

You can try it yourself, 
make two small files A and B, where A has these two lines

a	b
c#d

and B as these two lines

a;b
c;d

and you can put an extra newline after each line and bunch of other lines so that when you run ediff-buffers, it hightlights only one line at a time as an active region.

You will immediately see that TAB is not highlighed in file A in its first line. This is *inconsistent* because in the second case c#d the hash is highlighted as the difference region within active region.

Just to be clear to any other newbie to this command, there are three type of highlighting in question.
1st is the highlighting of the entire active region or "selected difference region" which is the whole line.
2nd is the highlighting of the "differences" of "difference region" which is either TAB, semicolon or HASH, but not a b c d.
3rd is the highlighting of "unselected difference regions" which is usually SAME whitish color in both buffers.

Anyone at FSF/gnu to explain what appears to be such a basic bug staying there for so long?

Interestingly, when the hash in 2nd line is replaced by a TAB after making it active, it remains as a highlighted difference even if you cycle thru all the four highlighting modes.

Here is the punch line. Whatever the definition of highlighting, when I press "i" right after this to get the "status info", it says in the *ediff-message* buffer

Current difference number = 1
Showing regions that differ in white space & line breaks only
Selective browsing by regexp is off

What it means is that TAB and white space is being considered but is not being highlighted properly as HASH is being highlighted as the difference within the active region.

gnuist

P.S. Feel free to reply by email to this particular query if you are hesitant to post a reply.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: BUG: ediff-buffers does not consistently show "differences" or "difference regions" within the "active region"
  2024-07-19 19:53 BUG: ediff-buffers does not consistently show "differences" or "difference regions" within the "active region" gnuist
@ 2024-07-20  7:04 ` Michael Heerdegen via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Heerdegen via Users list for the GNU Emacs text editor @ 2024-07-20  7:04 UTC (permalink / raw)
  To: help-gnu-emacs

gnuist <gnuist@protonmail.com> writes:

> You will immediately see that TAB is not highlighed in file A in its
> first line. This is *inconsistent* because in the second case c#d the
> hash is highlighted as the difference region within active region.

Just to be clear: You are talking about fine diff highlighting?
I think whitespace is ommitted when highlighting fine diffs to make the
result appear less distracting in the majority of cases.

When the corresponding change counterpart in the other buffer is not
(only) whitespace it may be wishful to highlight the whitespace in the
other diff buffer, depending on the case.


> Anyone at FSF/gnu to explain what appears to be such a basic bug
> staying there for so long?

Not speaking officially for them: We are just all too dumb I guess.


Michael.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-20  7:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-19 19:53 BUG: ediff-buffers does not consistently show "differences" or "difference regions" within the "active region" gnuist
2024-07-20  7:04 ` Michael Heerdegen via Users list for the GNU Emacs text editor

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.