help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ediff: compare two (long) buffers Word-by-word


From: ST
Subject: Re: Ediff: compare two (long) buffers Word-by-word
Date: Sun, 25 Nov 2018 15:48:32 +0200



On Sun, 2018-11-25 at 16:17 +0700, Yuri Khan wrote:
> 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.

Somebody has provided a solution which seems to work very good without
any performance issues. There is a small error message, though...

https://emacs.stackexchange.com/questions/46161/ediff-compare-two-long-buffers-word-by-word

I assume the performance concerns where relevant 15-20 years ago
(presumably the time when those lines of the docs were written).

If it is easier, then comparing two files word-by-word, would also be a
nice feature:

https://emacs.stackexchange.com/questions/46206/ediff-compare-two-files-word-by-word

If this mailing list is the proper place to ask for enhancements: could
those two functions(/menu options) be added to Emacs, please?

Thank you!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]