[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-repl
From: |
Juri Linkov |
Subject: |
bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc. |
Date: |
Thu, 17 Mar 2022 19:05:34 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
>> When I tried your latest patch, it still flashes when it starts
>> the perform-replace loop.
>
> Does it always happen for you? I see this occasionally, and as far as I
> can tell it's random.
It happens every time when starting perform-replace from isearch.
>>>> Highlighting is still incorrect for word replacement ('C-u M-%')
>>>> and for non-nil 'replace-char-fold'. To handle these cases correctly,
>>>> 'replace-highlight' uses:
>>>>
>>>> (isearch-regexp-function (or replace-regexp-function
>>>> delimited-flag
>>>> (and replace-char-fold
>>>> (not regexp-flag)
>>>> #'char-fold-to-regexp)))
>>>
>>> Okay, fixed this. (BTW, where is replace-regexp-function used? It's
>>> not set anywhere in Emacs, and it's not a defcustom either.)
>>
>> 'replace-regexp-function' was added recently in bug#52558
>> to allow implementing more regexp types in bug#54017.
>
> Ah, I see. I must say, in isearch.el I don't like this trichotomy of
> the regexp/literal/with isearch-regexp-function cases. Ideally, the
> regexp and literal search cases would be handled by
> isearch-regexp-function set to identity respectively regexp-quote. But
> it would be a large refactoring, perhaps with only aesthetic benefits.
Yep, too much changes for little benefit.
The biggest hunk in your patch are changes in query-replace-read-args
starting from 'condition-case error'. Would it be possible to simplify
this part? Maybe by some refactoring?
OTOH, your changes that add lazy-count-update-hook and remove
'(null isearch-message-function)' can be already pushed.
Could you please send a separate patch for pushing with these changes only?
Then the patch with minibuffer-lazy-count feature will be shorter.
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., (continued)
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Augusto Stoffel, 2022/03/20
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Juri Linkov, 2022/03/20
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Augusto Stoffel, 2022/03/24
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Juri Linkov, 2022/03/25
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Augusto Stoffel, 2022/03/25
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Juri Linkov, 2022/03/27
bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Juri Linkov, 2022/03/15
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Augusto Stoffel, 2022/03/15
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Juri Linkov, 2022/03/16
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Augusto Stoffel, 2022/03/16
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc.,
Juri Linkov <=
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Augusto Stoffel, 2022/03/17
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Juri Linkov, 2022/03/20
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Augusto Stoffel, 2022/03/20
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Juri Linkov, 2022/03/20
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Augusto Stoffel, 2022/03/20
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Juri Linkov, 2022/03/23
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Augusto Stoffel, 2022/03/23
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Eli Zaretskii, 2022/03/23
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Juri Linkov, 2022/03/23
- bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc., Juri Linkov, 2022/03/23