You're viewing the New Reddit. You can always visit Old Reddit or just 
Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts
9
Archived

emacs 26 force typing yes/no for deleting dir?

in emacs 26, when deleting a directory, it now force user to type full “yes”/"no".

this is hardcoded in dired--yes-no-all-quit-help at dired.el

This is super annoying. Why's this change?

it used to be, the code calls yes-or-no-p, and user can alias it to y-or-n-p, so that typing y or n is enough.

8 comments
86% Upvoted
This thread is archived
New comments cannot be posted and votes cannot be cast
4 points · 7 months ago

It's so that you can answer "all" in response to it asking about recursive copies/deletes

Original Poster1 point · 7 months ago · edited 7 months ago

oh great! didn't realize that. That answered my question.

though, i think it still isn't that good. When there's just 1 dir, it creates more typing. And i think half of the time, it's just 1 dir. (for those who set (setq dired-recursive-deletes 'top) which is the default now.)

before, one can just hold y key to delete all. Also, often dired will also ask if user wants to delete the buffer of that dir. So, holding y will do. But now, some questions, you have to type yes or all, while other, you have to type y.

3 points · 7 months ago

Wrt "user can alias it to y-or-n-p, so that typing y or n is enough", but somewhat OT for this specific: yes-no.el.

Original Poster5 points · 7 months ago

work around. just set it to (setq dired-recursive-deletes 'always) so it stop asking all together.

i cannot think of 1 instance after all these years, that when dired asks for confirmation, i say oops, wait, i made a mistake.

using unix taught one to be sure, before hitting enter.

Famous last words.

Original Poster1 point · 7 months ago

:D have to up you a point.

Nice default for recursive deletes. Helps to set it apart from non-recursive deletes.

There are some half-baked solutions to this in Bug#28525.

Community Details

22.4k

Subscribers

156

Online

The extensible, customizable, self-documenting real-time display editor.

Create Post