reopen 60815 thanks >> Then I guess this report can be closed, done. > > I think so. Your patch would allow me to just change the value of > dired-isearch-filenames-toggle-key, instead of monkey-patching the > whole function in my .emacs. > > But it seems that some key-bindings are much harder to change than > another. "M-s", is such an example, because many modes decide to > override it in their keymaps. Just an idea: Wouldn't it be nice, if > there were an configuration that defines what is the key sequence for > "the M-s search" (M-s by default), and if major modes want to override > the "M-s search commands", they would respect what the configuration > says. Indeed, there is already such variable: `search-map'. So you can do: (define-key global-map [f6] search-map) > For example, If I rebind "M-s" to say "M-6", then the > dired-isearch-filenames-setup function would define the "M-6ff" > binding, instead of "M-sff". I am not sure if this is a good idea, but > this seems like a good approach to me. > > So basically, I propose, instead of the > "dired-isearch-filenames-toggle-key" configuration ("M-sfff by > default), to have, say "global-search-key-sequence" ("M-s" by > default), which all major modes can use when building their local > keymaps. This way, I would not need to fix this binding in every major > mode which overrides it, wrongly believing that M-s is my "search > prefix". The problem is that isearch doesn't use the global "M-s" keymap, but hard-codes "M-s" used in isearch-map. The patch below adds a new variable for the isearch's keymap "M-s" that you can customize with e.g.: (define-key isearch-mode-map [f6] isearch-mode-search-map) Needless to say this patch is for master.