[Top][All Lists]

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

Re: dired-kill-tree

From: Luc Teirlinck
Subject: Re: dired-kill-tree
Date: Sun, 6 Jun 2004 20:08:46 -0500 (CDT)

Actually, there is a third (much more general) way to view the anomaly.

The first way to deal with the problem was to quite simply make the
behavior into a feature by documenting it into the docstring.

The second is to change:

  (setq dirname (expand-file-name dirname))


  (setq dirname (file-name-as-directory (expand-file-name dirname)))

thereby getting rid of the feature.

The third way is that maybe the behavior of the "D" interactive code,
usd by `dired-kill-tree' is anomalous:

>From (elisp)Interactive Codes:

     A directory name.  The default is the current default directory
     the current buffer, `default-directory' (*note File Name
     Expansion::).  Existing, Completion, Default, Prompt.

If I have a directory ~/subdir, and no other subdirectory of ~/
starting with ~/subd, then if I enter ~/subd RET, then depending on my
customizations, Emacs will, in various ways, tell me that the only
possible completion is ~/subdir/.  But if I type ~/subdir, it will
accept that as is.  That is, contrary to its documentation, the `D'
interactive code does not only accept existing directory names, but
also existing directory file names.  The two are _only_ equivalent if
the function using `D' makes them equivalent.  The completions listed
after say, ~/subd RET, do not interact very well with the first way to
deal with the problem, because they only include ~/subdir/, not




reply via email to

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