From: Yuri Khan <yurivkhan@gmail.com>
To: smntov@gmail.com
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Ediff: compare two (long) buffers Word-by-word
Date: Sun, 25 Nov 2018 16:17:08 +0700 [thread overview]
Message-ID: <CAP_d_8Vj+kRXJYQhYuffQJcq3+C_vECjAG0_0vmbzLL6X9FaRQ@mail.gmail.com> (raw)
In-Reply-To: <1543088011.1851.5.camel@gmail.com>
On Sun, Nov 25, 2018 at 4:02 AM ST <smntov@gmail.com> wrote:
> I use Emacs 26.1 and try to compare two (long) buffers (opened side by
> side) by clicking Tools -> Compare (Ediff) -> Windows Word-by-word...
> Then I choose both Windows (A and B) by clicking on each opened buffer.
> However it looks like Emacs compares only the visible parts of the two
> buffers, not the whole buffers. Why?
>
> I saw there is a command `ediff-windows-wordwise`... How is "Window"
> defined? - as "currently visible part of a buffer"? If yes, is there
> something like `ediff-buffers-wordwise`?
‘ediff-windows-wordwise’ calls ‘ediff-windows’ which calls
‘ediff-regions-internal’, passing to it the two chosen windows and
their respective visible parts. ‘ediff-windows-linewise’ behaves the
same way.
This is not documented in their docstrings nor in Info. Moreover,
(info "(ediff) Major Entry Points") contains the following wording:
> The commands ‘ediff-windows-wordwise’
> and ‘ediff-regions-wordwise’ are intended for relatively small segments
> of buffers (e.g., up to 100 lines, depending on the speed of your
> machine)
which suggests that ‘ediff-windows-*’ should work for 100-line
fragments, and that will only fit in a visible part of a window with a
very small font.
There is no command ‘ediff-buffers-wordwise’; maybe this is because of
performance concerns. You can compare buffers using
‘ediff-regions-wordwise’; after you specify two buffers, it will ask
you to select a region and press C-M-c to proceed, in each buffer.
> I have `git` in `exec-path`, so maybe I can make ediff to display the
> output of `git diff --word-diff file1 file2` in ediff style?
There are customizable variables ‘ediff-diff-program’ and
‘ediff-diff-options’, but I do not know what happens if you plug ‘git’
and ‘diff --no-index --word-diff’ there.
You should also try refinement. After starting Ediff linewise,
navigate to a diff region (‘n’ in the Ediff control window) and press
‘*’. Ediff will highlight word differences in place.
next prev parent reply other threads:[~2018-11-25 9:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-24 19:33 Ediff: compare two (long) buffers Word-by-word ST
2018-11-24 23:35 ` Oleg Cherkasov
2018-11-25 9:17 ` Yuri Khan [this message]
2018-11-25 13:48 ` ST
2018-11-27 8:16 ` Eli Zaretskii
2018-11-27 8:12 ` Eli Zaretskii
[not found] <mailman.4546.1543093349.1284.help-gnu-emacs@gnu.org>
2018-11-24 22:26 ` B. T. Raven
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=CAP_d_8Vj+kRXJYQhYuffQJcq3+C_vECjAG0_0vmbzLL6X9FaRQ@mail.gmail.com \
--to=yurivkhan@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=smntov@gmail.com \
/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.
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).