emacs-devel
[Top][All Lists]
Advanced

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

Re: PATCH: isearch-yank-until-char


From: Karl Fogel
Subject: Re: PATCH: isearch-yank-until-char
Date: Fri, 16 Aug 2019 00:11:50 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

On 14 Aug 2019, Stefan Monnier wrote:
>> This patch implements 'isearch-yank-until-char', a new yank command in 
>> isearch.
>
>I like the idea, but would welcome even more warmly an isearch which
>yanks "whatever text is skipped by the next command" so it can be used
>to yank the next word, sexp, char, ...

I think Juri's point that for the generalized case one should just set   
`isearch-yank-on-move' to `t' may be the right answer.

After all, the command most commonly used to skip over some text is isearch 
itself :-).  Aside from that and the sexp motion commands, the things one would 
normally use to skip over a predictable amount of text are already represented 
in isearch-mode.  For example, the equivalent of M-f in normal mode is C-w in 
isearch-mode (`isearch-yank-word-or-char'). and the equivalent of C-e in normal 
mode is M-s C-e (`isearch-yank-line') in isearch-mode.  It's hard for me to 
think of further generalizations that aren't already adequately handled by 
setting `isearch-yank-on-move' to t.

In practice, I find that when I use `isearch-yank-until-char', it's in a macro 
in a programming mode or markup language mode, and the relevant syntax 
delimiter is some single character.  This is such a common case that IMHO it's 
worth supporting directly in isearch.  But Juri's idea of defining a new 
function `skip-to-char' and relying on `isearch-yank-on-move' is also 
interesting (and not mutually exclusive, of course).

Best regards,
-Karl



reply via email to

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