[Top][All Lists]

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

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

From: Michael Heerdegen
Subject: bug#39902: 28.0.50; Marking in dired with active region
Date: Thu, 05 Mar 2020 14:58:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Juri Linkov <address@hidden> writes:

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

But this does not describe what we currently have: you can mark N
complete lines, from the beginning to the end of the lines.  The file in
line N is always not marked.

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

This is a bit philosophical.  You can find an argument like this for any
behavior.  Personally, in my mind I identify the whole line as
associated to a certain file.  Whatever choice we take we should
document how an an active region is interpreted since different kinds of
behavior might be natural for different users.

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

Yes.  I think I would vote pro such a change.  It could also be made
optional by introducing a new user option.


reply via email to

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