unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Michael Cain <cain.michael1@gmail.com>
Cc: 23642@debbugs.gnu.org
Subject: bug#23642: 24.5; Dired Line Movement, Region Handling
Date: Tue, 31 May 2016 00:18:20 +0300	[thread overview]
Message-ID: <878tyr1bz7.fsf@mail.linkov.net> (raw)
In-Reply-To: <79ec4788-6eea-e9a1-afeb-2bbb278cba8e@gmail.com> (Michael Cain's message of "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! :)

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





  parent reply	other threads:[~2016-05-30 21:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-28 21:25 bug#23642: 24.5; Dired Line Movement, Region Handling Michael Cain
2016-05-28 23:22 ` Drew Adams
2016-05-28 23:41   ` Michael Heerdegen
2016-05-29  0:17     ` Michael Cain
2016-05-30 21:18 ` Juri Linkov [this message]
2016-06-05 21:16   ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878tyr1bz7.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=23642@debbugs.gnu.org \
    --cc=cain.michael1@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).