From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jayden Navarro Newsgroups: gmane.emacs.bugs Subject: bug#36328: 26.2; Args out of range on search-and-replace of *.cc file Date: Sun, 23 Jun 2019 09:14:19 -0700 Message-ID: References: <20190622132549.84518.qmail@mail.muc.de> <20190622205033.GA9167@ACM> <20190623122207.GA4736@ACM> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000097e646058bfffdb0" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="12407"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36328@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 23 18:15:13 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 1hf596-00031H-1U for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Jun 2019 18:15:12 +0200 Original-Received: from localhost ([::1]:45610 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hf594-0006rm-If for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Jun 2019 12:15:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53072) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hf58y-0006rc-FM for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 12:15:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hf58x-0004kI-9u for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 12:15:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40607) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hf58x-0004jx-1h for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 12:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hf58w-00021R-QL for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 12:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jayden Navarro Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Jun 2019 16:15:02 +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.15613064807721 (code B ref 36328); Sun, 23 Jun 2019 16:15:02 +0000 Original-Received: (at 36328) by debbugs.gnu.org; 23 Jun 2019 16:14:40 +0000 Original-Received: from localhost ([127.0.0.1]:54151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hf58Z-00020R-Jk for submit@debbugs.gnu.org; Sun, 23 Jun 2019 12:14:39 -0400 Original-Received: from mail-lj1-f182.google.com ([209.85.208.182]:39556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hf58X-000208-3l for 36328@debbugs.gnu.org; Sun, 23 Jun 2019 12:14:37 -0400 Original-Received: by mail-lj1-f182.google.com with SMTP id v18so10237839ljh.6 for <36328@debbugs.gnu.org>; Sun, 23 Jun 2019 09:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yugabyte-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eZM1FmYPfQWqIxfpYI+vG/ojcQEm248LbjE6PiQr8CE=; b=2ELl2xbqAuUFiUbRfNinSQfbRbxhWgpTsLbHINR3oKe37wJPYbt4LoKqFc2wo7uEjo 79POKqduJ+PerwW+epBOAGP8zeqwAUNnKG7F/TMvPYixI8qh+oz6qQ7MuJfhtfc7ZVuw h1jiPQYSnJXkTMtZJZk3n+2RrKo4rRKbQQ4wrT+fq1ihZB8F3xVdbz3pGmLLmD0wwOzm Qr+tYUtR9ix6yDSKq+Jr5JS/Rmh3kH8HDq67OpFwWYHSClPjGxzGTJQWEn5JqEoR6bL6 agHOiamb4rXFNvDdxyd70EaOQ5cNNHfRlpODk1suZdZpoCfX8FpYcdcepmixs/qx/PAF Fbhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eZM1FmYPfQWqIxfpYI+vG/ojcQEm248LbjE6PiQr8CE=; b=p2+Pl5vVuYursxD41lCfp11nQ5ZTEscjwaaNIZcmBoqxz49w8iwkZdyHJggHoXxwaG B0fZ55oOuJBihTEALbytcGrSq5XErrSOnNrSQ+PKxZpKWZ9pHWrhWW6EY+drrCR5V5qU aHczszv563kXDO8KxwO2/bB/E64BflXtEEnDKrfHHftvZzu3VrcmCtYf+SsIxoi4m1mh NbG12PTi96pv6uKZPciIA6UMm/CxZVIuU95TjYfMTZFn2F6G0wpFCYpWr4sOwXiiADz0 2lZZY4tTevDi0cB0/keqxtzo/9XtPpLFfiRIuhx7jsy7kLG4SOCsW7vpZU2fiqwwE2Rv IrVg== X-Gm-Message-State: APjAAAW4bdve+1pmQuQx7XkNeLvp1oaG5D0aFmT3tPheQqK6+eZZ/QIT nEhDyMQXpzQLv4XspG37lrbDE1urnbxKLL0rC8mBnQ== X-Google-Smtp-Source: APXvYqxMxLxnGbgDBDwO7TQTe8IgNSSsQVMZ9S4j4kjCIGq7xdMYxG9J7kbLnxz35VR1RawX6tIm+0sJqHRqhftmU/c= X-Received: by 2002:a2e:3913:: with SMTP id g19mr15782122lja.212.1561306471058; Sun, 23 Jun 2019 09:14:31 -0700 (PDT) In-Reply-To: <20190623122207.GA4736@ACM> 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:161121 Archived-At: --00000000000097e646058bfffdb0 Content-Type: text/plain; charset="UTF-8" Hi Alan, Thank you for looking into this! Until this is officially fixed I've come up with the following workaround, going off of the details you provided: I created a "replace_fixed.el" file in "~/.emacs.d/lisp/" that is replace.el taken from https://raw.githubusercontent.com/emacs-mirror/emacs/emacs-26/lisp/replace.el with the following diff: diff --git a/replace.el b/replace_fixed.el index 08feb8e..8280fdd 100644 --- a/replace.el +++ b/replace_fixed.el @@ -2227,7 +2227,7 @@ It is called with three arguments, as if it were (isearch-forward (not backward)) (isearch-other-end match-beg) (isearch-error nil)) - (isearch-lazy-highlight-new-loop range-beg range-end)))) + (save-match-data (isearch-lazy-highlight-new-loop range-beg range-end))))) (defun replace-dehighlight () (when replace-overlay Then I added the following to my "~/.emacs", restarted my emacs server, and the issue was gone!: (load-library "~/.emacs.d/lisp/replace_fixed.el") This probably isn't the proper fix, but just thought I'd share in case anyone else is experiencing this and wanted a temporary workaround. Best, Jayden --00000000000097e646058bfffdb0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Alan,

=
Thank you for looking into this!=C2=A0

Until this is officially fixed I've come = up with the following workaround, going off of the details you provided:

I created a "replace_fi= xed.el" file in "~/.emacs.d/lisp/" that is replace.el taken = from=C2=A0https://raw.githubusercontent.com/emacs-mirror/ema= cs/emacs-26/lisp/replace.el=C2=A0with the following diff:

d= iff --git a/replace.el b/replace_fixed.el
index 08feb8e..8280fdd 100644<= br>--- a/replace.el
+++ b/replace_fixed.el
@@ -2227,7 +2227,7 @@ It i= s called with three arguments, as if it were
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 (isearch-forward (not backward))
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 (isearch-other-end match-beg)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 (isearch-error nil))
- =C2=A0 =C2=A0 =C2=A0 (isearch-l= azy-highlight-new-loop range-beg range-end))))
+ =C2=A0 =C2=A0 =C2=A0 (s= ave-match-data (isearch-lazy-highlight-new-loop range-beg range-end)))))
=C2=A0(defun replace-dehighlight ()
=C2=A0 =C2=A0(when replace-over= lay

=
Then I added= the following to my "~/.emacs", restarted my emacs server, and t= he issue was gone!:

(load-library "~/.emacs.d/lisp/replace_fixed.el")

This probably isn't the proper fix, = but just thought I'd share in case anyone else is experiencing this and= wanted a temporary workaround.

Best,
Jayden
--00000000000097e646058bfffdb0--