[Top][All Lists]

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

Re: Simple isearch concerns

From: Augusto Stoffel
Subject: Re: Simple isearch concerns
Date: Thu, 29 Apr 2021 19:50:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

On Thu, 29 Apr 2021 at 19:29, Juri Linkov <juri@linkov.net> wrote:

>>> Is this overriding map there just so that `isearch-mode-map' takes
>>> precedence over other minor mode maps?  If so, couldn't this be achieved
>>> by manipulating minor-mode-map-alist to put Isearch's map at the top?
>>> Maybe that can be done buffer-locally.
>> According to (info "(elisp) Searching Keymaps") the next keymap to try is
>> `overriding-local-map`.  It can be set buffer-locally.
> Actually, overriding-local-map can't be used, because it prioritizes
> global-map over local maps, so e.g. in Dired typing C-o exits isearch
> and calls open-line instead of dired-display-file.
> According to (info "(elisp) Searching Keymaps"), the next available keymap is
> emulation-mode-map-alists.  The following patch added a single line:
>   (add-to-list 'emulation-mode-map-alists `((isearch-mode . 
> ,isearch-mode-map)))
> then removed all mentions of overriding-terminal-local-map,
> removed all 156 lines of the monstrous macro with-isearch-suspended,
> added a single line to the end of isearch-edit-string:
>   (isearch-search-and-update)
> and then M-e edits the search string without exiting isearch.  And it's
> trivial to use isearch commands without exiting the minibuffer with e.g.
>   (with-minibuffer-selected-window (isearch-repeat-forward))
> And everything works fine.  It's too good to be true,
> but I don't see where's the catch.

This seems promising, and actually not too different from the experiment
I mentioned a few messages back: https://github.com/astoff/isearch-mb/

I've been using it for some time without problems.

reply via email to

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