[Top][All Lists]

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

Re: Let's make C-M-w in isearch yank symbol, not delete character

From: H. Dieter Wilhelm
Subject: Re: Let's make C-M-w in isearch yank symbol, not delete character
Date: Sun, 25 Feb 2018 22:12:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Juri Linkov <address@hidden> writes:

>> Right now, C-w in search-mode yanks a word from the buffer and globs it
>> onto the end of the search result. I usually want to search for symbols,
>> not words, so I end up pressing C-w multiple times. C-M-w would be the
>> natural keybinding for yanking a symbol instead of a word, but it's already
>> taken by isearch-del-char. How about moving isearch-del-char somewhere
>> else, like C-d, and making C-M-w yank a whole symbol?
> But isn't the prefix 'C-M-' usually reserved for keys that operate on
> whole expressions, not just symbols?
> Fortunately, it's easy to add support for yanking an expression:
> in addition to the existing option 'edit' of 'search-exit-option'
> we can also provide a new option 'move' that will sync the current
> search string with the new position in the buffer after moving point
> using all standard motion commands, e.g. `C-f' will add the next char
> to the end of the search string, `C-M-f' will add the next expression,
> `M-f' will add the next word, `C-b' will delete text from the end of
> the search string, etc.  Here is the implementation:


Best wishes
H. Dieter Wilhelm
Kelkheim, Germany

reply via email to

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