Adrian Aichner <adrian(a)xemacs.org> writes:
     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. 
Do you mean that point would designate one file and mark the other?
what about comparing 3 files or 3 directories?
     >> 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. 
OK. I agree that 
    ediff-files DIR1 FILE2
    runs (ediff-files DIR1/FILE2 FILE2)
makes good sense. In fact, this is an omission. But I don't think that
ediff-files DIR1 DIR2
should run ediff-directories.
 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. 
Yes, it shouldn't compare a file with itself.
 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 :-( 
This is a heuristic: if you do ediff-directories and give a file name
instead, it assumes that you meant the file's directory. I found it useful
in many cases, although I don't know if this works for everyone.
     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. 
I agree that ediff-files/buffers/directories/etc should use heuristics to
offer good defaults and such. Ediff implements a number of such
heuristics and, of course, there is always room for improvement.
What I don't think is appropriate is when ediff-files suddenly
changes its hat and becomes ediff-directories.
However, I am cool with the idea that somebody implements
ediff-I-feel-lucky, which will figure out for you what you want and will
apply the right function on exactly the arguments that you wanted.
	--michael