From: Michael Heerdegen via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Newbie looking for a toy example of ediff-buffers demonstrating #f and #h
Date: Sun, 21 Jul 2024 14:51:16 +0200 [thread overview]
Message-ID: <87h6cigb7f.fsf@web.de> (raw)
In-Reply-To: M3cIFQCL8AHsl5hmEtZSGUTcVWZCwyBJP8WOYLcxxi26ckddvMqgaHdIFvymaBATeSGXmQKUtWk3m-uHQb3R-NVhhSXtSpX86lZw70_PtBw=@protonmail.com
gnuist <gnuist@protonmail.com> writes:
> Hi - Newbie looking for a toy example SESSION of ediff-buffers
> demonstrating #f and #h.
>
> You can put a small 2-3 lines file A and file B with lets say @ in
> first file and semicolon or hash in its place . Perhaps, also an empty
> brace in the first {} and a brace with some other text like {a b c} in
> the second.
>
> I want to see how #f and #h is supposed to work.
Maybe you should start experimenting with some simpler examples to get
familiar with these commands before trying stuff involving special
characters. In particular, how to move between matches, and please also
get used to what it means that both sides match vs. only one. Then
continue with more complicated use cases.
> You are aware that {, }, [ and ] are all special characters in regexps?
> Did you quote them to let them match themselves?
>
> My Reply:
> Yes, I have tried both ways with and without escape and results do not
> make any sense or difference. Actually escaped did not even give any
> difference, forcing me to go against the convention and try brace
> without escape.
You escape [] with _one_ backslash, e.g. you enter \[.*\]. {} parens
are special _when_ escaped, so, to match them literally, you don't escape
the characters, e.g. {.*}.
> > 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.
>
> My reply:
> Yes, but the documentation does not state so.
>
> Either code has to be made consistent to documentation
> or documentation has to be made consistent with the code.
What exactly do you think is inconsistent, precisely? The manual
doesn't tell the opposite of what I said (or does it? where?), it maybe
somewhat leaves open some of your questions about special details.
For example, it says
| Since ‘diff’ may report fairly large chunks of text as being
| different, even though the difference may be localized to just a few
| words or even to the white space or line breaks, Ediff further
| _refines_ the regions to indicate which exact words differ.
Are whitespace only parts "words"? Probably not. I didn't read all of
the text, maybe being a bit more specific in some places could be
helpful, I don't know.
Michael.
prev parent reply other threads:[~2024-07-21 12:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-20 20:05 Newbie looking for a toy example of ediff-buffers demonstrating #f and #h gnuist
2024-07-21 12:51 ` Michael Heerdegen via Users list for the GNU Emacs text editor [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h6cigb7f.fsf@web.de \
--to=help-gnu-emacs@gnu.org \
--cc=michael_heerdegen@web.de \
/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 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.