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: Stephen Berman
Subject: bug#39902: 28.0.50; Marking in dired with active region
Date: Wed, 04 Mar 2020 17:04:10 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On Wed, 4 Mar 2020 07:41:40 -0800 (PST) Drew Adams <drew.adams@oracle.com> 
wrote:

>> (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.
>
> The problem seems to be that movement doesn't
> put the cursor where you (and `dired-mark')
> expect - the full lines are not selected.

This is due to the following code in dired-mark:

        (dired-mark-files-in-region
         (progn (goto-char beg) (line-beginning-position))
         (progn (goto-char end) (line-beginning-position))))))

It may be that the second use of line-beginning-position is simply a
mistake, and should be line-end-position (CCing Juri Linkov, who wrote
that code).  That's what diredp-mark-region-files in the library
dired+.el (https://www.emacswiki.org/emacs/dired%2b.el) uses, which is
the inspiration for the dired-mark code (see bug#10624).

Steve Berman





reply via email to

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