[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36328: 26.2; Args out of range on search-and-replace of *.cc file
From: |
Juri Linkov |
Subject: |
bug#36328: 26.2; Args out of range on search-and-replace of *.cc file |
Date: |
Mon, 24 Jun 2019 22:05:48 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
Hi Jayden,
Thank you very much for the detailed test case.
Previously I tried in the MATE terminal emulator,
but xterm-256color was an essential detail indeed.
Now I was able to reproduce with TERM="xterm-256color"
and to track down the source of this problem.
It happens while the color "ForestGreen" is loaded for
the face font-lock-type-face that has this definition:
(((class color) (min-colors 16) (background light))
:foreground "ForestGreen")
by tty-color-canonicalize.
Could you please try this patch to see if it fixes the problem:
diff --git a/lisp/term/tty-colors.el b/lisp/term/tty-colors.el
index 307586f221..5af8170203 100644
--- a/lisp/term/tty-colors.el
+++ b/lisp/term/tty-colors.el
@@ -820,7 +820,7 @@ tty-color-canonicalize
"Return COLOR in canonical form.
A canonicalized color name is all-lower case, with any blanks removed."
(let ((case-fold-search nil))
- (if (string-match "[A-Z ]" color)
+ (if (string-match-p "[A-Z ]" color)
(replace-regexp-in-string " +" "" (downcase color))
color)))
> Hi Juri,
>
> Did you open it with TERM="xterm-256color"?
>
> Best,
> Jayden
>
> On Sun, Jun 23, 2019 at 2:41 PM Juri Linkov <juri@linkov.net> wrote:
>
>> I think first we should try to narrow down the source of this match data
>> leak.
>> Then we could decide what is the best solution. Currently I see no such
>> place
>> in isearch-lazy-highlight-new-loop that calls external code. OTOH, while
>> looking at CC-Mode I noticed that it does some matches on before-change
>> hooks.
>> I could debug it but can't reproduce neither in 26.1 nor in 27, even with
>> -Q -nw.
>>
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file, (continued)
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file, Jayden Navarro, 2019/06/22
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file, Alan Mackenzie, 2019/06/22
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file, Jayden Navarro, 2019/06/22
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file, Jayden Navarro, 2019/06/22
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file, Jayden Navarro, 2019/06/22
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file, Alan Mackenzie, 2019/06/23
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file, Jayden Navarro, 2019/06/23
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file, Alan Mackenzie, 2019/06/23
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file, Juri Linkov, 2019/06/23
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file, Jayden Navarro, 2019/06/23
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file,
Juri Linkov <=
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file, Jayden Navarro, 2019/06/24
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file, Alan Mackenzie, 2019/06/24
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file, Juri Linkov, 2019/06/24
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file, Alan Mackenzie, 2019/06/25
- bug#36328: 26.2; Args out of range on search-and-replace of *.cc file, Juri Linkov, 2019/06/25
bug#36328: [address@hidden: Re: bug#36328: 26.2; Args out of range on search-and-replace of *.cc file], Alan Mackenzie, 2019/06/23