unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: trentbuck@gmail.com (Trent W. Buck)
To: 38729@debbugs.gnu.org
Subject: bug#38729: 26.1; dired-flag-file-deletion should just skip over .. and .
Date: Tue, 24 Dec 2019 18:24:54 +1100	[thread overview]
Message-ID: <87imm66v95.fsf@gmail.com> (raw)

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.





             reply	other threads:[~2019-12-24  7:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-24  7:24 Trent W. Buck [this message]
2022-05-23 10:18 ` bug#38729: 26.1; dired-flag-file-deletion should just skip over .. and Lars Ingebrigtsen
2022-05-27 15:37   ` Trent W. Buck

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87imm66v95.fsf@gmail.com \
    --to=trentbuck@gmail.com \
    --cc=38729@debbugs.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).