bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39902: 28.0.50; Marking in dired with active region


From: Juri Linkov
Subject: bug#39902: 28.0.50; Marking in dired with active region
Date: Thu, 05 Mar 2020 01:46:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> (1) Docstring of `dired-mark' says
>
>   "If the region is active, mark all files in the region."
>
> However, the file in the last line of the region is never marked, even
> if the region spans the whole line of this file.  I find that behavior
> wrong and contradicting the docstring.  But it seems it has been like
> that for a long time (forever?).  Nevertheless, I'm always confused by
> that behavior.

The peculiarity of dired mode is that it puts point in front of file name.
So when the region doesn't cover the file name visually, it should not take
the file name outside the region into consideration for marking.

Exactly like kill-region should not kill text outside of the active region,
dired-mark should not mark files outside of the active region.

Especially more dangerous command dired-flag-file-deletion
should not delete files outside of the active region.

> (2) Most of the time I rather want `dired-mark-files-regexp' to respect
> an active region - but that isn't implemented (though it would not be
> hard to do).  I think that would be useful.

The problem is that this feature should be implemented in the macro
dired-mark-if, but then it will affect many other commands:

dired-mark-files-containing-regexp
dired-mark-symlinks
dired-mark-directories
dired-mark-executables
dired-flag-auto-save-files
dired-flag-backup-files
dired-compare-directories
dired-mark-unmarked-files
dired-mark-sexp
...





reply via email to

[Prev in Thread] Current Thread [Next in Thread]