[Top][All Lists]

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

Re: [External] : Re: Simple isearch concerns

From: Juri Linkov
Subject: Re: [External] : Re: Simple isearch concerns
Date: Tue, 06 Apr 2021 22:11:13 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> Is it possible to make this in a way that some commands could be bound
> in a way that the prefix M-s won't be needed sometimes when isearch is
> active? (I mean a custom option of course)
> That could be more handy for some users. Because `M-s C-RET` is not
> faster than `C-r RET`.
> The same applies to `M-s M-<` and `M-s M->`. And maybe for some future
> commands like the ones Gregory mentioned some days ago like go to
> candidate outside visible the page and so on in M-v and C-v.
> Maybe we can add a map with some extra commands and then bind the map
> in the isearch-mode-map with and without prefix conditionally? Does it
> makes sense?.

I already bound them to shorter keys because `M-s M-<`
is harder to type:

  (define-key isearch-mode-map "\M-<" 'isearch-beginning-of-buffer)
  (define-key isearch-mode-map "\M->" 'isearch-end-of-buffer)

The problem is that by default most keys including `M-<`
should exit isearch.

But maybe when search-exit-option is customized to nil,
or when isearch-allow-scroll is customized to 'unlimited',
or when the third option added by Gregory isearch-allow-match-scroll
is customized to t, then remap motion commands to navigate
isearch matches.

Should then forward-char be remapped to isearch-repeat to go to the next
match?  Then also remap next-line to go to the next line with matches, etc.

The logic should be quite simple: isearch-allow-scroll could have
a new option similar to 'unlimited'.  Let's name it 'sync'.
It should allow typing a motion key, then afterwards it will call
isearch-repeat to find the next match after moving to new location.

reply via email to

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