GNU bug report logs - #38729
26.1; dired-flag-file-deletion should just skip over .. and .

Previous Next

Package: emacs;

Reported by: trentbuck <at> gmail.com (Trent W. Buck)

Date: Tue, 24 Dec 2019 07:26:02 UTC

Severity: wishlist

Found in version 26.1

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38729 in the body.
You can then email your comments to 38729 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#38729; Package emacs. (Tue, 24 Dec 2019 07:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to trentbuck <at> gmail.com (Trent W. Buck):
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 24 Dec 2019 07:26:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: trentbuck <at> gmail.com (Trent W. Buck)
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; dired-flag-file-deletion should just skip over .. and .
Date: Tue, 24 Dec 2019 18:24:54 +1100
When you do this:

    emacs -Q -nw .
    C-n     # until you reach the ".." line
    d       # d runs the command dired-flag-file-deletion
    x       # x runs the command dired-do-flagged-delete

Then you get

    Cannot operate on ‘.’ or ‘..’

Which is entirely reasonable and obvious.

What just happened to me was I had sorted a directory by time,
scrolled past the first page of recent files, then did

    C-u 100000 d x

to delete all the remaining files.
And of course I got

    Cannot operate on ‘.’ or ‘..’

So then I had to find . and/or .. in the list and use u (dired-unmark)
before I could do x (dired-do-flagged-delete).
This was a minor annoyance.

Can you just make d (dired-do-flagged-delete) skip over the . and
.. lines, since you can never delete them?

Note that m (dired-mark) should remain as-is, since e.g. "m ! du -s RET"
works fine on . and .. special lines.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38729; Package emacs. (Mon, 23 May 2022 10:20:01 GMT) Full text and rfc822 format available.

Message #8 received at 38729 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: trentbuck <at> gmail.com (Trent W. Buck)
Cc: 38729 <at> debbugs.gnu.org
Subject: Re: bug#38729: 26.1; dired-flag-file-deletion should just skip over
 .. and .
Date: Mon, 23 May 2022 12:18:53 +0200
trentbuck <at> gmail.com (Trent W. Buck) writes:

> Can you just make d (dired-do-flagged-delete) skip over the . and
> .. lines, since you can never delete them?

I've now done this in Emacs 29, and I wondered whether all marking
commands should, but I guess not.  It's somewhat inconsistent --
dired-mark-files-in-region (which happens when you drag an area with the
mouse) skips the dot files for all marks, but I guess nobody complains
about that inconsistency.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 38729 <at> debbugs.gnu.org and trentbuck <at> gmail.com (Trent W. Buck) Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 23 May 2022 10:20:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38729; Package emacs. (Fri, 27 May 2022 15:38:02 GMT) Full text and rfc822 format available.

Message #13 received at 38729 <at> debbugs.gnu.org (full text, mbox):

From: "Trent W. Buck" <trentbuck <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 38729 <at> debbugs.gnu.org
Subject: Re: bug#38729: 26.1; dired-flag-file-deletion should just skip over
 .. and .
Date: Sat, 28 May 2022 01:37:09 +1000
Lars Ingebrigtsen wrote:
> trentbuck <at> gmail.com (Trent W. Buck) writes:
> 
> > Can you just make d (dired-do-flagged-delete) skip over the . and
> > .. lines, since you can never delete them?
> 
> I've now done this in Emacs 29, and I wondered whether all marking
> commands should, but I guess not.  It's somewhat inconsistent --
> dired-mark-files-in-region (which happens when you drag an area with the
> mouse) skips the dot files for all marks, but I guess nobody complains
> about that inconsistency.

I never use a mouse, so I wouldn't have noticed :-)




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 25 Jun 2022 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 298 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.