From: Luc Teirlinck <teirllm@dms.auburn.edu>
Subject: dired-kill-tree
Date: Sun, 6 Jun 2004 16:19:03 -0500 (CDT) [thread overview]
Message-ID: <200406062119.i56LJ3E01005@raven.dms.auburn.edu> (raw)
The docstring of `dired-kill-tree' says:
"Kill all proper subdirs of DIRNAME, excluding DIRNAME itself.
But you have to understand that this assumes that DIRNAME is a
directory name and not a directory file name. Otherwise, DIRNAME _is_
killed. Anybody having taken any look at the Dired Elisp code will
probably have no trouble guessing this implicit assumption.
But `dired-kill-tree' can be used interactively and the implicit
assumption may not be obvious to most interactive users. Actually, I
myself find it more often useful _in interactive usage_ to
_deliberately_ pass a directory file name to kill the entire tree
including DIRNAME. This saves me a step, because I nearly invariably
_want_ to kill DIRNAME itself.
So what about turning this bug officially into a feature, with the
following change in the docstring:
===File ~/dired-aux-diff====================================
*** dired-aux.el 05 Jun 2004 21:07:07 -0500 1.119
--- dired-aux.el 06 Jun 2004 15:52:23 -0500
***************
*** 1834,1839 ****
--- 1834,1844 ----
(defun dired-kill-tree (dirname &optional remember-marks)
"Kill all proper subdirs of DIRNAME, excluding DIRNAME itself.
+ Note that DIRNAME itself is _only_ excluded if it is a directory name,
+ which on most systems means that it ends with a slash. If DIRNAME is
+ a directory file name, which on most systems means that it does not end
+ with a slash, then DIRNAME is killed too. The latter is sometimes useful
+ in interactive usage, when DIRNAME is itself a subdirectory.
With optional arg REMEMBER-MARKS, return an alist of marked files."
(interactive "DKill tree below directory: ")
(setq dirname (expand-file-name dirname))
============================================================
next reply other threads:[~2004-06-06 21:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-06 21:19 Luc Teirlinck [this message]
2004-06-06 21:27 ` dired-kill-tree Miles Bader
2004-06-06 21:42 ` dired-kill-tree Luc Teirlinck
2004-06-07 1:08 ` dired-kill-tree Luc Teirlinck
2004-06-07 7:11 ` dired-kill-tree Richard Stallman
2004-06-08 2:39 ` dired-kill-tree Luc Teirlinck
2004-06-08 23:31 ` dired-kill-tree Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200406062119.i56LJ3E01005@raven.dms.auburn.edu \
--to=teirllm@dms.auburn.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.