> Testing shows that the `isearch-buffer-local' change works fine, > with only one deficiency: as (info "(elisp) Searching Keymaps") says > get-char-property takes precedence over emulation-mode-map-alists. > > This means that typing isearch characters when point is e.g. > on a Gnus attachment line, typing a character like 'o' bound > to 'gnus-mime-save-part' will exit isearch and run this command. > > I see no way to workaround this limitation. Here is a patch that allows minor mode keys to take precedence over char-property keys, by adding a special property to mode symbol, e.g. (put 'isearch-mode 'overriding-keymap t) indicated in the decision tree by NEW: (or (if overriding-terminal-local-map (FIND-IN overriding-terminal-local-map)) (if overriding-local-map (FIND-IN overriding-local-map) (or ;; => NEW: modes with overriding-keymap (FIND-IN (get-char-property (point) 'keymap)) (FIND-IN-ANY emulation-mode-map-alists) (FIND-IN-ANY minor-mode-overriding-map-alist) (FIND-IN-ANY minor-mode-map-alist) (if (get-text-property (point) 'local-map) (FIND-IN (get-char-property (point) 'local-map)) (FIND-IN (current-local-map))))) (FIND-IN (current-global-map)))