From: Eli Zaretskii <eliz@gnu.org>
To: Tino Calancha <tino.calancha@gmail.com>
Cc: 27940@debbugs.gnu.org, jidanni@jidanni.org
Subject: bug#27940: Recursively delete dir34? (yes, no, all, quit)
Date: Fri, 04 Aug 2017 15:46:28 +0300 [thread overview]
Message-ID: <834ltnxzyz.fsf@gnu.org> (raw)
In-Reply-To: <87vam365q2.fsf@calancha-pc> (message from Tino Calancha on Fri, 04 Aug 2017 18:29:41 +0900)
> From: Tino Calancha <tino.calancha@gmail.com>
> Cc: 27940@debbugs.gnu.org, jidanni@jidanni.org
> Date: Fri, 04 Aug 2017 18:29:41 +0900
>
> index 24759c6c9b..278acc2cf5 100644
> --- a/lisp/dired.el
> +++ b/lisp/dired.el
> @@ -2990,23 +2990,33 @@ dired-delete-file
>
> TRASH non-nil means to trash the file instead of deleting, provided
> `delete-by-moving-to-trash' (which see) is non-nil."
> - ;; This test is equivalent to
> - ;; (and (file-directory-p fn) (not (file-symlink-p fn)))
> - ;; but more efficient
> - (if (not (eq t (car (file-attributes file))))
> - (delete-file file trash)
> - (if (and recursive
> - (directory-files file t dired-re-no-dot) ; Not empty.
> - (or (eq recursive 'always)
> - (yes-or-no-p (format "Recursively %s %s? "
> - (if (and trash
> - delete-by-moving-to-trash)
> - "trash"
> - "delete")
> - (dired-make-relative file)))))
> - (if (eq recursive 'top) (setq recursive 'always)) ; Don't ask again.
> - (setq recursive nil))
> - (delete-directory file recursive trash)))
> + ;; This test is equivalent to
> + ;; (and (file-directory-p fn) (not (file-symlink-p fn)))
> + ;; but more efficient
> + (if (not (eq t (car (file-attributes file))))
> + (delete-file file trash)
> + (let* ((valid-answers (list "y" "n" "!" "q"))
Shouldn't the valid-answers be "yes" and "no", not "y" and "n", for
backward compatibility?
> + (completing-read (format "Recursively %s %s? [y, n, !, q] "
Maybe the "!" and "q" parts should be explained? Or maybe just use
"yes", "no", "all", and "quite", which are self-explanatory?
This warrants a NEWS entry, I think. I also wonder whether we should
describe this in the user manual, under "Dired Deletion".
Than ks.
next prev parent reply other threads:[~2017-08-04 12:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-03 23:26 bug#27940: Recursively delete dir34? (yes, no, all, quit) 積丹尼 Dan Jacobson
2017-08-04 8:25 ` Tino Calancha
2017-08-04 8:31 ` Eli Zaretskii
2017-08-04 9:29 ` Tino Calancha
2017-08-04 9:37 ` Tino Calancha
2017-08-04 12:46 ` Eli Zaretskii [this message]
2017-08-04 14:33 ` Tino Calancha
2017-08-04 14:54 ` Eli Zaretskii
2017-08-06 4:52 ` Tino Calancha
[not found] ` <87k22e9obk.fsf@ctlt579.codethink.co.uk>
2017-08-09 5:54 ` Tino Calancha
2017-10-15 14:17 ` Noam Postavsky
2017-10-16 5:20 ` Tino Calancha
2017-10-16 10:36 ` Noam Postavsky
2017-10-16 10:43 ` Tino Calancha
2017-10-17 12:40 ` Noam Postavsky
[not found] ` <<871sorz9kg.fsf@calancha-pc>
[not found] ` <<83tw1nwfhp.fsf@gnu.org>
2017-08-04 15:51 ` Drew Adams
2017-08-04 16:18 ` Tino Calancha
2017-08-04 16:22 ` Drew Adams
2017-08-04 16:34 ` Tino Calancha
[not found] <<87o9rwxmfz.fsf@jidanni.org>
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=834ltnxzyz.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=27940@debbugs.gnu.org \
--cc=jidanni@jidanni.org \
--cc=tino.calancha@gmail.com \
/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.