[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: |
Juri Linkov |
Subject: |
Re: Let's make C-M-w in isearch yank symbol, not delete character |
Date: |
Mon, 12 Mar 2018 23:19:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
>> > Why only set those properties in the :setter rather tan just do it at
>> > top-level? Also, would it be possible to avoid having to list those
>> > commands and instead treat as `isearch-move` any command which uses the
>> > handle-shift-selection?
>
>> Supporting only commands which use the handle-shift-selection
>> makes the most sense. I tested this to confirm it works as expected:
>
>> diff --git a/lisp/isearch.el b/lisp/isearch.el
>> index 84b121a..245bf8a 100644
>> --- a/lisp/isearch.el
>> +++ b/lisp/isearch.el
>> @@ -2433,8 +2448,8 @@ isearch-pre-command-hook
>> (setq this-command 'isearch-edit-string))
>> ;; Don't terminate the search for motion commands.
>> ((or (and (eq search-exit-option 'move)
>> - (symbolp this-command)
>> - (eq (get this-command 'isearch-move) t))
>> + (stringp (nth 1 (interactive-form this-command)))
>> + (string-match-p "^^" (nth 1 (interactive-form
>> this-command))))
>> (and (eq search-exit-option 'shift-move)
>> this-command-keys-shift-translated))
>> (setq this-command-keys-shift-translated nil)
>
> Please don't do this. handle-shift-selection (whatever that might be)
> is a different feature from the isearch extension, and users should be
> able to customize them independently from each other. Correction: MUST
> be able to customize them independently.
This solution avoids the flaws of the isearch-allow-scroll feature
that causes "customization hell" by requiring maintaining a long list of
(put 'command 'isearch-scroll t) minutiae, and requiring adding the same
for every new command. The feature should be smart enough to deduce
a reasonable default set of supported commands, and adjustable enough
to allow adding/deleting commands to/from the default set.
> Although I haven't been following this thread all that closely, I'm a
> little perturbed that in the space of little over a week, a small
> definite proposal which makes a lot of sense has swollen into a
> significant redesign of isearch, and an incompatible one at that.
The main sub-thread was renamed to the subject "Isearch interaction model"
where we are discussing significant changes such as merging regex and
regular histories into a unified history, integrating find-and-replace
into isearch, keeping toggleable parameters between searches, etc.
> Disclosure: I've had an isearch-yank-symbol bound to C-S-w in my
> isearch-mode-map for several years.
Now isearch-yank-symbol is bound to C-M-w, so you can use the default key.
- Re: Let's make C-M-w in isearch yank symbol, not delete character, (continued)
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Juri Linkov, 2018/03/05
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Eli Zaretskii, 2018/03/05
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Juri Linkov, 2018/03/06
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Eli Zaretskii, 2018/03/10
- Re: Let's make C-M-w in isearch yank symbol, not delete character, John Shahid, 2018/03/10
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Juri Linkov, 2018/03/10
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Stefan Monnier, 2018/03/10
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Juri Linkov, 2018/03/11
- Re: Let's make C-M-w in isearch yank symbol, not delete character, John Shahid, 2018/03/12
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Alan Mackenzie, 2018/03/12
- Re: Let's make C-M-w in isearch yank symbol, not delete character,
Juri Linkov <=
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Juri Linkov, 2018/03/12
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Eli Zaretskii, 2018/03/10
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Herring, Davis, 2018/03/11