From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs 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 Message-ID: <87eebvsrt5.fsf_-_@gnus.org> References: <871vadl3mx.fsf@leeloo.anubex.internal> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30179"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Tim Van Holder , 6803@debbugs.gnu.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 18 14:59:48 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m56OZ-0007ed-Tl for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Jul 2021 14:59:47 +0200 Original-Received: from localhost ([::1]:56184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m56OY-0007Ko-S2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Jul 2021 08:59:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m56Ms-0005nh-6c for bug-gnu-emacs@gnu.org; Sun, 18 Jul 2021 08:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43851) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m56Mr-0007Ju-Uq for bug-gnu-emacs@gnu.org; Sun, 18 Jul 2021 08:58:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m56Mr-00083e-SS for bug-gnu-emacs@gnu.org; Sun, 18 Jul 2021 08:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Jul 2021 12:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6803 X-GNU-PR-Package: emacs Original-Received: via spool by 6803-submit@debbugs.gnu.org id=B6803.162661305830930 (code B ref 6803); Sun, 18 Jul 2021 12:58:01 +0000 Original-Received: (at 6803) by debbugs.gnu.org; 18 Jul 2021 12:57:38 +0000 Original-Received: from localhost ([127.0.0.1]:55394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m56MT-00082o-Nc for submit@debbugs.gnu.org; Sun, 18 Jul 2021 08:57:38 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:33826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m56MS-00082Y-0Y for 6803@debbugs.gnu.org; Sun, 18 Jul 2021 08:57:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=2ShoZK5G/QcWYq4R9Y6onwnk2G4aNuj3H7Z62rkwDWA=; b=ire6nWQ+HCdxRtaQQmPgFhydqq 2ncDlM59E2nXYC7LEkeYDqWTAHAiWdiRywSSqnngNpc+E1nzXlPObcSlOOXmrQfjG5Ar6Y5sCo9Va YQSQ6IQTBjhXh7gPoSNeSMdf/vOgqsQcNLhuj78tE4Kk2oUluKR0KN/IJU+YJCTKEoDg=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m56MJ-0000ii-3x; Sun, 18 Jul 2021 14:57:29 +0200 X-Now-Playing: The Meters's _Gettin' Funkier All The Time (1): Here Comes The Meter Man & Looka-Ya Py Py_: "Thinking" In-Reply-To: (Juanma Barranquero's message of "Thu, 5 Aug 2010 22:41:29 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:210177 Archived-At: Juanma Barranquero writes: > On Thu, Aug 5, 2010 at 13:07, Tim Van Holder 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 and , the current dired seems to rely >> on remapping and 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