Four questions about ediff

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Four questions about ediff

jonetsu
Hello,

1) Deeper comparison ?

emacs ediff compare directories will list directories that are the
same.  Doing a '=h' followed by 'x' will tag and remove those
directories.  Nevertheless, going through the remaining directories
will also uncover directories that have no differences, on which '=h'
and 'x' will remove all files.  

Is there a way to actually remove all possible same directories in one
sweep without having to go through the remaining ones thinking that
they must contain something different when they are not ?  This can get
tedious over tens of directories.

For instance a main directory has 1277 files in 113 sub directories.
Amongst all that are 15 files that have differences.  Would it be
possible to get a listing of those 15 files or more likely, a listing
of only those folders in which those files were found to be different ?
And when subsequently going into one of these fodlers, to only see
what's different, without having to do '=h' and 'x' again ?

2) Use defaults for (some) prompts ?

Is it possible to handle automatically (set defaults) the following
prompts. Assuming a default of no regex for the last prompt and 'y' to
the others:

  Quit this Ediff session & show containing session group ?
  Quit this session group ?
  Compare subdirectories recursively ?
  Filter filename through regular expression ?


3) Accumulated diffed files in the buffer-selection

Is it possible to close diffed files when a session group is closed ? A
large amount of files are listed/opened after 30 minutes of using
ediff, closing them in the buffer-selection is a bit tedious.  As well
as related ediff buffers that are still lingering around after a diff
was made and closed.

4) Use a regex to focus on files to diff ?

Is it possible to to a diff of two directories with a focus based on a
text regex ?  For instance, diffing 34 sub directories but taking into
account only the files that have the string "MODS" for doing the diff ?

It would be great to be able to do those points above as it would speed
up greatly doing lengthy diffs.



Reply | Threaded
Open this post in threaded view
|

Re: Four questions about ediff

jonetsu
On Wed, 30 Oct 2019 18:59:42 -0400
jonetsu <[hidden email]> wrote:

> 2) Use defaults for (some) prompts ?
>
> Is it possible to handle automatically (set defaults) the following
> prompts. Assuming a default of no regex for the last prompt and 'y' to
> the others:
>
>   Quit this Ediff session & show containing session group ?
>   Quit this session group ?
>   Compare subdirectories recursively ?
>   Filter filename through regular expression ?

Would it be at least possible to get rid of having to always answer,
again and again, to these prompts ?


Reply | Threaded
Open this post in threaded view
|

Re: Four questions about ediff

Óscar Fuentes
jonetsu <[hidden email]> writes:

>> 2) Use defaults for (some) prompts ?
>>
>> Is it possible to handle automatically (set defaults) the following
>> prompts. Assuming a default of no regex for the last prompt and 'y' to
>> the others:
>>
>>   Quit this Ediff session & show containing session group ?
>>   Quit this session group ?
>>   Compare subdirectories recursively ?
>>   Filter filename through regular expression ?
>
> Would it be at least possible to get rid of having to always answer,
> again and again, to these prompts ?

File a feature request with M-x report-emacs-bug.


Reply | Threaded
Open this post in threaded view
|

Re: Four questions about ediff

jonetsu
On Sun, 03 Nov 2019 16:26:49 +0100
Óscar Fuentes <[hidden email]> wrote:

> jonetsu <[hidden email]> writes:
>
>  [...]  
>  [...]  
>
> File a feature request with M-x report-emacs-bug.

I would have thought that emacs, being of such flexibility, would have
had someone through the years fed up with those ediff prompts and
created some lisp code (a language I do not know) to circumvent them.

And so I bought a dedicated tool to do those long diffs that have to be
done.

I might file a FR also about this and the 3 other points mentioned at
the beginning of this thread.  These are, I find, basic aspects in
doing any long diffs between folders and files.  How old is ediff ?  I
guess a FR can get filed, and maybe in emacs 32 ...  :)

Cheers.


Reply | Threaded
Open this post in threaded view
|

Re: Four questions about ediff

jonetsu
In reply to this post by jonetsu
I found ztree which is a much better way to go about making directory
diffs that the default ediff.

The points I mentioned were:

 1) Deeper comparison ?
 2) Use defaults for (some) prompts ?
 3) Accumulated diffed files in the buffer-selection
 4) Use a regex to focus on files to diff ?

1) ztree will compare files in different directories fully, so that the
very first results are showing a broad picture.  No need for the user
to manually go into each directory and ask ediff to work, often for
finding out that directories has no differences whatsoever.

2 and 3) ztree still uses the traditional diff to make file compares.
It will ask if the user wants to close unmodified files when exiting a
diff.  It will not ask about modified files, leaving it to the user to
save them, which is OK.

4) So far - short time - not sure if that's supported.  Eg. being able
to compare only, say, .mk files.

A very welcomed find, a much more useful and productive way to compare
directories.

https://github.com/fourier/ztree


Reply | Threaded
Open this post in threaded view
|

Re: Four questions about ediff

Michael Heerdegen
jonetsu <[hidden email]> writes:

> I found ztree which is a much better way to go about making directory
> diffs that the default ediff.

There is also dircmp.  It uses rsync for directory comparison.  I guess
that makes it quite fast, but that means comparison is not under control
of Emacs.

I think it still offers most of what you want.  Filters are not
supported, but I guess that could be added.

I also think that it would be nice to improve Ediff in this regard.
Personally I don't like to hack Ediff, though, it was always not nice
when I tried that.

Michael.