emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60815: closed (28.2; Hard-coded M-sff key binding in dired-aux.el)


From: GNU bug Tracking System
Subject: bug#60815: closed (28.2; Hard-coded M-sff key binding in dired-aux.el)
Date: Wed, 18 Jan 2023 01:48:03 +0000

Your message dated Tue, 17 Jan 2023 20:30:23 +0200
with message-id 
<CA+MLsgOA=c4aA_HXRKATWtHjMDFTQGA7Kv5X36ZEHxvd6HEh8w@mail.gmail.com>
and subject line Re: bug#60815: 28.2; Hard-coded M-sff key binding in 
dired-aux.el
has caused the debbugs.gnu.org bug report #60815,
regarding 28.2; Hard-coded M-sff key binding in dired-aux.el
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
60815: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60815
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 28.2; Hard-coded M-sff key binding in dired-aux.el Date: Sat, 14 Jan 2023 18:44:06 +0200
I have set "(dired-isearch-filenames t)", and have rebound "M-s" to
something that is not a keymap (other-window). The problem appears
when I try to "isearch" in a Dired buffer. Then the following code:

(defun dired-isearch-filenames-end ()
  "Clean up the Dired file name search after terminating isearch."
  (define-key isearch-mode-map "\M-sff" nil)
  (dired-isearch-filenames-mode -1)
  (remove-hook 'isearch-mode-end-hook #'dired-isearch-filenames-end t)
  (unless isearch-suspended
    (kill-local-variable 'dired-isearch-filenames)))

runs and fails, because it can not bind to "M-sff". It works when I
change "M-sff" to something that starts with a keymap-binding. This is
also a problem in Emacs 27.



--- End Message ---
--- Begin Message --- Subject: Re: bug#60815: 28.2; Hard-coded M-sff key binding in dired-aux.el Date: Tue, 17 Jan 2023 20:30:23 +0200
Now I see that i have messed up this mail-thread, by not CC-ing to all
participants (easy to do from Gmail's web interface).

The point is that I found a way to re-bind M-s, which works well
enough for me (by monkey-patching some functions from dired-aux.el.
And I believe that, currently, re-binding M-s is unnecessarily hard,
which I consider as either a bug or a serious architectural problem in
Emacs.

On Tue, Jan 17, 2023 at 7:34 PM Juri Linkov <juri@linkov.net> wrote:
>
> >> Oh, my bad! Actually, it is: (define-key isearch-mode-map (kbd "M-s")
> >> 'other-window)
> >
> > And that is the problem: you should bind it in the global map, not in
> > isearch-mode-map.  The Isearch mode map has several key sequences
> > hard-coded that begin with the M-s key, so binding M-s in the Isearch
> > keymap is not recommended.
>
> Then I guess this report can be closed, done.


--- End Message ---

reply via email to

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