unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#38729: 26.1; dired-flag-file-deletion should just skip over .. and .
@ 2019-12-24  7:24 Trent W. Buck
  2022-05-23 10:18 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Trent W. Buck @ 2019-12-24  7:24 UTC (permalink / raw)
  To: 38729

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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#38729: 26.1; dired-flag-file-deletion should just skip over .. and .
  2019-12-24  7:24 bug#38729: 26.1; dired-flag-file-deletion should just skip over .. and Trent W. Buck
@ 2022-05-23 10:18 ` Lars Ingebrigtsen
  2022-05-27 15:37   ` Trent W. Buck
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-23 10:18 UTC (permalink / raw)
  To: Trent W. Buck; +Cc: 38729

trentbuck@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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#38729: 26.1; dired-flag-file-deletion should just skip over .. and .
  2022-05-23 10:18 ` Lars Ingebrigtsen
@ 2022-05-27 15:37   ` Trent W. Buck
  0 siblings, 0 replies; 3+ messages in thread
From: Trent W. Buck @ 2022-05-27 15:37 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 38729

Lars Ingebrigtsen wrote:
> trentbuck@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 :-)





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-27 15:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-24  7:24 bug#38729: 26.1; dired-flag-file-deletion should just skip over .. and Trent W. Buck
2022-05-23 10:18 ` Lars Ingebrigtsen
2022-05-27 15:37   ` Trent W. Buck

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).