>>>> "MK" == Michael Kifer
<kifer(a)cs.sunysb.edu> writes:
MK> Adrian Aichner wrote:
> Hi Michael, hi All, Happy new year to you!
MK> Happy New Year to all!
> Another thing:
>
> I wish I could use
> = e runs the command dired-ediff
> on two directories to run `ediff-directories' automatically.
>
> I realize this particular thing is a dired/ediff integration issue.
>
> Pushing my point farther, wouldn't it be useful for ediff to simplify
> its interface to invoke `ediff-files' or `ediff-directories' depending
> on the arguments provided?
>
> Is this perhaps even possible already and I just missed this?
MK> I think this is something dired-ediff should do: check the
MK> file at point and if it is a directory then run
MK> ediff-directories; otherwise ediff-files.
Ah, I was thinking about running
= e runs the command dired-ediff
on a region, selecting two directories, or files, or one of each.
> How about:
>
> ediff-??? DIR1 FILE2
> runs (ediff-files DIR1/FILE2 FILE2)
>
> ediff-??? DIR1 DIR2
> runs (ediff-directories DIR1 DIR2)
>
> ediff-??? FILE1 DIR2
> runs (ediff-files FILE1 DIR2/FILE1)
MK> I think the basic commands, such as ediff-files,
MK> ediff-directories, etc., should not second-guess the user.
My point is that the UI is lacking because it does not support the
user to do the right thing.
ediff-files only makes sense on two files,
ediff-directories only makes sense on two directories,
but the interface does nothing to help the user in this regard.
e.g. using ediff-files from within the *scratch* buffer (with CWD ~):
1.
ediff-files prompts for file A with ~\.
If I accept this default and complete file B to ~\.emacs, I get:
File `c:\Users\AichnerAd\' is a directory
I have
(getenv "HOME")
"C:\\Users\\AichnerAd"
2.
If I complete file A to ~\.emacs and accept the default of ~\ for file
B, ediff-files compares ~\.emacs with itself.
If suggest ediff should refuse service in both cases and report
inappropriate usage.
e.g. ediff-directories from within the *scratch* buffer (with CWD ~):
3.
ediff-directories prompts for file A with ~\. If I accept this
default for file A and file B, ediff correctly reports:
Directories A and B are the same: c:\Users\AichnerAd\
I'm cool with that.
4.
If I complete file A to ~\.emacs and accept the default of ~\ for file
B, ediff-directories reports
Directories A and B are the same: c:\Users\AichnerAd\
I feel outsmarted :-(
MK> What you want should be done by a higher-level command, such
MK> as dired-ediff. One can also write something like
MK> ediff-outsmart-the-user which will always do
MK> second-guessing. But I think the user always knows what he
MK> wants and it is faster and easier to type M-x ediff or M-x
MK> edirs.
I'm not too sure about that.
MK> dired-ediff is a different matter. Here we have certain
MK> context (the location of the point in the dired buffer), and
MK> it makes sense to apply your heuristic.
I'm working on a patch.
MK> --michael
Adrian
--
Adrian Aichner
mailto:adrianï¼ xemacs.org
http://www.xemacs.org/