[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: |
Sat, 24 Aug 2019 21:14:51 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
On 16 Aug 2019, Juri Linkov wrote:
>>> Should your new command catch this error?
>>
>> It could. I'm not sure exacly what to do with the error, though.
>> The new version below displays a brief message and then returns to the
>> isearch prompt:
>>
>> This feels klugey, but I'm not sure what a better way is. Do you have
>> any ideas?
>
>Isearch used to catch errors and display the error message
>at the end of the isearch message by setting `isearch-error'.
>Why it doesn't do this now, I don't know, this needs more investigation.
>Maybe just setting `isearch-error' to the error message would help.
Well, I tried setting `isearch-error' in the error case -- instead of using
`message' as the current patch does -- but it didn't seem to have any useful
effect. I just got the "I-search:" prompt back immediately, with no indication
that the character I had typed was not found. Then I tried keeping the current
`message' code and *also* setting `isearch-error', but that seemed to have no
effect either. The result was exactly the same as the current message behavior.
So I've left the code as-is; the current patch is attached here.
Do we have consensus to install it?
I don't have a good sense of whether there's consensus yet. We had some
discussion about what keybinding to use within isearch, but (I think) the
outcome was that M-C-c was an okay choice. We also seemed to agree that the
current way of handling the "char not found" error is a bit klugey, but we
don't know a better way to do it (or at least I don't know a better way).
(Through the discussion, thanks to you Juri, I also learned about the more
general `isearch-yank-on-move'. For those who deliberately choose that
behavior and won't be confused by it, it's pretty neat! But I think it's
orthogonal to this patch, since the point of this patch is to add a transparent
new behavior within traditional isearch -- that is, a behavior that won't get
in the way or cause any surprises for those who don't learn about it.)
Best regards,
-Karl
isearch-yank-until-char-20190824.txt
Description: Text document
- Re: PATCH: isearch-yank-until-char, (continued)
Re: PATCH: isearch-yank-until-char, Noam Postavsky, 2019/08/14
Re: PATCH: isearch-yank-until-char, Juri Linkov, 2019/08/14
- Re: PATCH: isearch-yank-until-char, Karl Fogel, 2019/08/16
- Re: PATCH: isearch-yank-until-char, Karl Fogel, 2019/08/26
- RE: PATCH: isearch-yank-until-char, Drew Adams, 2019/08/26
- Re: PATCH: isearch-yank-until-char, Karl Fogel, 2019/08/26
- RE: PATCH: isearch-yank-until-char, Drew Adams, 2019/08/26
- Re: PATCH: isearch-yank-until-char, Karl Fogel, 2019/08/26
- RE: PATCH: isearch-yank-until-char, Drew Adams, 2019/08/26
- Re: PATCH: isearch-yank-until-char, Karl Fogel, 2019/08/26