GNU bug report logs - #23642
24.5; Dired Line Movement, Region Handling

Previous Next

Package: emacs;

Reported by: Michael Cain <cain.michael1 <at> gmail.com>

Date: Sat, 28 May 2016 22:45:02 UTC

Severity: minor

Found in version 24.5

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23642 in the body.
You can then email your comments to 23642 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#23642; Package emacs. (Sat, 28 May 2016 22:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Cain <cain.michael1 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 28 May 2016 22:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michael Cain <cain.michael1 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; Dired Line Movement, Region Handling
Date: Sat, 28 May 2016 17:25:44 -0400
(I'm not sure if this is actually a bug or not, just because Dired is
used so frequently and I assume someone probably would've mentioned it
by now. Hopefully this feedback will be helpful anyway)

I find myself using the writable feature of Dired rather frequently, but
one default of Dired's up/down movement (specifically the shift
selection in Transient Mark mode) is difficult to work around. That is,
I very often try to hold down shift and proceed down lines to create a
region, but this doesn't work by default.

I've temporarily solved this by making wrapper functions around
`dired-next-line' and `dired-previous-line' that handle the shift
selection, but it also works to add an additional "^" argument to the
existing "p" in those functions.

Thanks! :)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23642; Package emacs. (Sat, 28 May 2016 23:23:02 GMT) Full text and rfc822 format available.

Message #8 received at 23642 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Michael Cain <cain.michael1 <at> gmail.com>, 23642 <at> debbugs.gnu.org
Subject: RE: bug#23642: 24.5; Dired Line Movement, Region Handling
Date: Sat, 28 May 2016 16:22:40 -0700 (PDT)
> I find myself using the writable feature of Dired rather frequently, but
> one default of Dired's up/down movement (specifically the shift
> selection in Transient Mark mode) is difficult to work around. That is,
> I very often try to hold down shift and proceed down lines to create a
> region, but this doesn't work by default.

What do you mean that it does not work by default.  Is this what you
tried?

C-a    ; To move to bol
C-SPC  ; To activate the region
<down> <down>... ; To extend the region downward.

(Or `C-n' instead of `<down>'.)

What did you try, what did it do, and what did you expect it to do?

> I've temporarily solved this by making wrapper functions around
> `dired-next-line' and `dired-previous-line' that handle the shift
> selection

Were you describing WDired (editable Dired, after `C-x C-q') or
Dired?  In the former, <down> and `C-n' are bound to
`wdired-next-line', not `dired-next-line'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23642; Package emacs. (Sat, 28 May 2016 23:42:01 GMT) Full text and rfc822 format available.

Message #11 received at 23642 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 23642 <at> debbugs.gnu.org, Michael Cain <cain.michael1 <at> gmail.com>
Subject: Re: bug#23642: 24.5; Dired Line Movement, Region Handling
Date: Sun, 29 May 2016 01:41:37 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> What did you try, what did it do, and what did you expect it to do?

AFAIU: Setting a region in wdired-mode with shift + arrow keys does not
work as expected.  No region is selected.


Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23642; Package emacs. (Sun, 29 May 2016 00:17:02 GMT) Full text and rfc822 format available.

Message #14 received at 23642 <at> debbugs.gnu.org (full text, mbox):

From: Michael Cain <cain.michael1 <at> gmail.com>
Cc: 23642 <at> debbugs.gnu.org
Subject: Re: bug#23642: 24.5; Dired Line Movement, Region Handling
Date: Sat, 28 May 2016 20:17:33 -0400
I figure I should probably include my current workaround wrapper 
functions, so you can personally examine what I expect to happen.

;; Dired
(defun my-dired-next-line (arg)
  (interactive "^p")
  (dired-next-line arg))

(defun my-dired-previous-line (arg)
  (interactive "^p")
  (dired-previous-line arg))

;; WDired
(defun my-wdired-next-line (arg)
  (interactive "^p")
  (wdired-next-line arg))

(defun my-wdired-previous-line (arg)
  (interactive "^p")
  (wdired-previous-line arg))

;; Bindings
(define-key dired-mode-map (kbd "<down>") #'my-dired-next-line)
(define-key dired-mode-map (kbd "<up>") #'my-dired-previous-line)

(define-key wdired-mode-map (kbd "<down>") #'my-wdired-next-line)
(define-key wdired-mode-map (kbd "<up>") #'my-wdired-previous-line)

With these bindings, the Shift+Arrow selection with Transient Mark mode 
works as I expect with both Dired and WDired.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23642; Package emacs. (Mon, 30 May 2016 21:22:02 GMT) Full text and rfc822 format available.

Message #17 received at 23642 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Michael Cain <cain.michael1 <at> gmail.com>
Cc: 23642 <at> debbugs.gnu.org
Subject: Re: bug#23642: 24.5; Dired Line Movement, Region Handling
Date: Tue, 31 May 2016 00:18:20 +0300
> (I'm not sure if this is actually a bug or not, just because Dired is
> used so frequently and I assume someone probably would've mentioned it
> by now. Hopefully this feedback will be helpful anyway)
>
> I find myself using the writable feature of Dired rather frequently, but
> one default of Dired's up/down movement (specifically the shift
> selection in Transient Mark mode) is difficult to work around. That is,
> I very often try to hold down shift and proceed down lines to create a
> region, but this doesn't work by default.
>
> I've temporarily solved this by making wrapper functions around
> `dired-next-line' and `dired-previous-line' that handle the shift
> selection, but it also works to add an additional "^" argument to the
> existing "p" in those functions.
>
> Thanks! :)

You are right.  Shift-selection should be supported in WDired by this patch.

BTW, do you think that in WDired it would be more useful to select
rectangular regions because file names are organized in columns.
Then, for example, ‘downcase-region’ and ‘upcase-region’ will work
on the selected regions, not fail are they do now in WDired.

diff --git a/lisp/wdired.el b/lisp/wdired.el
index 2e68bec..600a813 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -590,7 +590,7 @@ (defun wdired-next-line (arg)
   "Move down lines then position at filename or the current column.
 See `wdired-use-dired-vertical-movement'.  Optional prefix ARG
 says how many lines to move; default is one line."
-  (interactive "p")
+  (interactive "^p")
   (with-no-warnings (next-line arg))
   (if (or (eq wdired-use-dired-vertical-movement t)
 	  (and wdired-use-dired-vertical-movement
@@ -603,7 +603,7 @@ (defun wdired-previous-line (arg)
   "Move up lines then position at filename or the current column.
 See `wdired-use-dired-vertical-movement'.  Optional prefix ARG
 says how many lines to move; default is one line."
-  (interactive "p")
+  (interactive "^p")
   (with-no-warnings (previous-line arg))
   (if (or (eq wdired-use-dired-vertical-movement t)
 	  (and wdired-use-dired-vertical-movement




Reply sent to Juri Linkov <juri <at> linkov.net>:
You have taken responsibility. (Sun, 05 Jun 2016 21:18:03 GMT) Full text and rfc822 format available.

Notification sent to Michael Cain <cain.michael1 <at> gmail.com>:
bug acknowledged by developer. (Sun, 05 Jun 2016 21:18:03 GMT) Full text and rfc822 format available.

Message #22 received at 23642-done <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Michael Cain <cain.michael1 <at> gmail.com>
Cc: 23642-done <at> debbugs.gnu.org
Subject: Re: bug#23642: 24.5; Dired Line Movement, Region Handling
Date: Mon, 06 Jun 2016 00:16:35 +0300
>> (I'm not sure if this is actually a bug or not, just because Dired is
>> used so frequently and I assume someone probably would've mentioned it
>> by now. Hopefully this feedback will be helpful anyway)
>>
>> I find myself using the writable feature of Dired rather frequently, but
>> one default of Dired's up/down movement (specifically the shift
>> selection in Transient Mark mode) is difficult to work around. That is,
>> I very often try to hold down shift and proceed down lines to create a
>> region, but this doesn't work by default.
>>
>> I've temporarily solved this by making wrapper functions around
>> `dired-next-line' and `dired-previous-line' that handle the shift
>> selection, but it also works to add an additional "^" argument to the
>> existing "p" in those functions.
>>
>> Thanks! :)
>
> You are right.  Shift-selection should be supported in WDired by this patch.

Thanks for the suggestion.  Pushed to master.

> BTW, do you think that in WDired it would be more useful to select
> rectangular regions because file names are organized in columns.
> Then, for example, ‘downcase-region’ and ‘upcase-region’ will work
> on the selected regions, not fail are they do now in WDired.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 04 Jul 2016 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 352 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.