all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: Re: dired-kill-tree
Date: Sun, 6 Jun 2004 16:42:30 -0500 (CDT)	[thread overview]
Message-ID: <200406062142.i56LgUd01062@raven.dms.auburn.edu> (raw)
In-Reply-To: <20040606212706.GA10671@fencepost> (message from Miles Bader on Sun, 6 Jun 2004 17:27:06 -0400)

Miles Bader wrote:

   On Sun, Jun 06, 2004 at 04:19:03PM -0500, Luc Teirlinck wrote:
   > 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.

   Is there a (reasonable) reason for this rather odd behavior?

Tecnically because:

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

and later:

      (if (and (not (string-equal dir dirname))

(then we do _not_ delete DIR).

DIR is a directory name.  If DIRNAME is not, then DIR and DIRNAME are
not string-equal.

This bug can trivially be fixed by changing:

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

into:

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

That would be an obvious alternative patch.  (Leaving the docstring
unchanged.)  Somehow, the buggy behavior turns out (at least in my
usage) to be useful interactively.

Sincerely,

Luc.

  reply	other threads:[~2004-06-06 21:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-06 21:19 dired-kill-tree Luc Teirlinck
2004-06-06 21:27 ` dired-kill-tree Miles Bader
2004-06-06 21:42   ` Luc Teirlinck [this message]
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=200406062142.i56LgUd01062@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@gnu.org \
    /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.