all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: Tim Van Holder <tim.vanholder@gmail.com>, 6803@debbugs.gnu.org
Subject: bug#6803: 24.0.50; pc-selection-mode no longer plays nice with dired (or vice versa)
Date: Sun, 18 Jul 2021 14:57:26 +0200	[thread overview]
Message-ID: <87eebvsrt5.fsf_-_@gnus.org> (raw)
In-Reply-To: <AANLkTinLEL5y=m-MkbSZYvnzTkxTE1HmsSOnTjoyNnsd@mail.gmail.com> (Juanma Barranquero's message of "Thu, 5 Aug 2010 22:41:29 +0200")

Juanma Barranquero <lekktu@gmail.com> writes:

> On Thu, Aug 5, 2010 at 13:07, Tim Van Holder <tim.vanholder@gmail.com> wrote:
>> Dired normally has the up and down arrows bound to dired-previous-line
>> (also bound to [p]) and dired-next-line (also bound to [n]), respectively.
>> However, when pc-selection-mode is enabled, these bindings are
>> apparently overridden now, to previous-line-nomark and next-line-nomark,
>> respectively, breaking the normal dired navigation (point is not
>> automatically put on the file name).
>> Looking at 'C-h m' for dired in an older emacs version (a 23.0.60.1
>> build) and today's bzr head, the cause seems to be that while the older
>> dired explicitly bound <up> and <down>, the current dired seems to rely
>> on remapping <next-line> and <previous-line> instead.
>
> Right, this is a consequence of bug#6632 and revno:100864.
>
> Perhaps it should be reverted, but then, the use case mentioned in the
> bug will still be there.
>
> Opinions?

This was ten years ago, and nobody had any opinions.  The patch in
question removed the direct bindings...

We allow modes all over the place to bind `C-n' (there's apparently
around 100 of these in the Emacs tree), so I don't think Dired was doing
anything wrong here.

I haven't looked at pc-selection-mode, though -- is this problem still
present in recent Emacs versions?

diff --git a/lisp/dired.el b/lisp/dired.el
index c3d1435..0e5cc22 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1380,10 +1380,8 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
     (define-key map ">" 'dired-next-dirline)
     (define-key map "^" 'dired-up-directory)
     (define-key map " "  'dired-next-line)
-    (define-key map "\C-n" 'dired-next-line)
-    (define-key map "\C-p" 'dired-previous-line)
-    (define-key map [down] 'dired-next-line)
-    (define-key map [up] 'dired-previous-line)
+    (define-key map [remap next-line] 'dired-next-line)
+    (define-key map [remap previous-line] 'dired-previous-line)
     ;; hiding
     (define-key map "$" 'dired-hide-subdir)
     (define-key map "\M-$" 'dired-hide-all)
@@ -1393,7 +1391,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
     (define-key map (kbd "M-s f C-s")   'dired-isearch-filenames)
     (define-key map (kbd "M-s f M-C-s") 'dired-isearch-filenames-regexp)
     ;; misc
-    (define-key map "\C-x\C-q" 'dired-toggle-read-only)
+    (define-key map [remap toggle-read-only] 'dired-toggle-read-only)
     (define-key map "?" 'dired-summary)
     (define-key map "\177" 'dired-unmark-backward)
     (define-key map [remap undo] 'dired-undo)



-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  parent reply	other threads:[~2021-07-18 12:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-05 11:07 bug#6803: 24.0.50; pc-selection-mode no longer plays nice with dired (or vice versa) Tim Van Holder
2010-08-05 20:41 ` Juanma Barranquero
2010-08-06  6:49   ` Tim Van Holder
2021-07-18 12:57   ` Lars Ingebrigtsen [this message]
2021-08-16 12:12     ` Lars Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=87eebvsrt5.fsf_-_@gnus.org \
    --to=larsi@gnus.org \
    --cc=6803@debbugs.gnu.org \
    --cc=lekktu@gmail.com \
    --cc=tim.vanholder@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.