From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs 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 Organization: LINKOV.NET Message-ID: <87ef3i7wiz.fsf@mail.linkov.net> References: <20190622132549.84518.qmail@mail.muc.de> <20190622205033.GA9167@ACM> <20190623122207.GA4736@ACM> <20190623193258.GB4736@ACM> <87k1dc2e5h.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="28268"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: Alan Mackenzie , 36328@debbugs.gnu.org To: Jayden Navarro Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 24 21:22:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfUXa-0007AJ-N3 for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Jun 2019 21:22:11 +0200 Original-Received: from localhost ([::1]:54124 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfUXZ-0006YR-Mi for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Jun 2019 15:22:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46255) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfUXT-0006W3-GL for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2019 15:22:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfUXS-0006IO-E3 for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2019 15:22:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44468) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hfUXS-0006Hv-4s for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2019 15:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hfUXR-0003pF-VP for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2019 15:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Jun 2019 19:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36328 X-GNU-PR-Package: emacs Original-Received: via spool by 36328-submit@debbugs.gnu.org id=B36328.156140407114603 (code B ref 36328); Mon, 24 Jun 2019 19:22:01 +0000 Original-Received: (at 36328) by debbugs.gnu.org; 24 Jun 2019 19:21:11 +0000 Original-Received: from localhost ([127.0.0.1]:58009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfUWc-0003nS-MJ for submit@debbugs.gnu.org; Mon, 24 Jun 2019 15:21:10 -0400 Original-Received: from cadetblue.birch.relay.mailchannels.net ([23.83.209.28]:60247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfUWX-0003nF-K0 for 36328@debbugs.gnu.org; Mon, 24 Jun 2019 15:21:08 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 49033503374; Mon, 24 Jun 2019 19:21:04 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a62.g.dreamhost.com (100-96-28-110.trex.outbound.svc.cluster.local [100.96.28.110]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 74FF3503045; Mon, 24 Jun 2019 19:21:03 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a62.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Mon, 24 Jun 2019 19:21:04 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Tank-Shelf: 018b448c7831cd48_1561404064050_1468834572 X-MC-Loop-Signature: 1561404064050:4136405097 X-MC-Ingress-Time: 1561404064050 Original-Received: from pdx1-sub0-mail-a62.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a62.g.dreamhost.com (Postfix) with ESMTP id B0909818FE; Mon, 24 Jun 2019 12:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=mYopdSsuYHDnJTuPVAmwHXnrsOE=; b= YDABjJCp41CAoaC0Cw74Jf+coZHNZ6kN51+BCedv0BN+3tZ6G1zIup4Uq5rwSzIe 18qHsLvuwP4vkQr2TXmoWnOBGOSwe2uJpw7+fZulh1vBtA9iT3u34t8TeF9CtWAC sbrbBqxOOKoz6DBv8UtRUUYEgXtoZP1hqR0tebN4KDg= Original-Received: from mail.jurta.org (m91-129-109-209.cust.tele2.ee [91.129.109.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a62.g.dreamhost.com (Postfix) with ESMTPSA id 4706281902; Mon, 24 Jun 2019 12:20:59 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a62 In-Reply-To: (Jayden Navarro's message of "Sun, 23 Jun 2019 14:42:48 -0700") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddruddvgddugedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdelrddvtdelnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtledrvddtledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehjrgihuggvnheshihughgrsgihthgvrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:161268 Archived-At: 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 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. >>