GNU bug report logs - #67124
26.3; query-replace Arg out of range with comma option (at end-buffer)

Previous Next

Package: emacs;

Reported by: Gabriele Nicolardi <gabriele <at> medialab.sissa.it>

Date: Sun, 12 Nov 2023 07:52:03 UTC

Severity: normal

Merged with 67050

Found in version 26.3

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #36 received at 67124-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: gabriele <at> medialab.sissa.it
Cc: monnier <at> iro.umontreal.ca, 67124-done <at> debbugs.gnu.org
Subject: Re: bug#67124: 26.3;
 query-replace Arg out of range with comma option (at end-buffer)
Date: Wed, 15 Nov 2023 15:18:25 +0200
> Cc: 67124 <at> debbugs.gnu.org
> Date: Sun, 12 Nov 2023 11:48:17 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > I often type `,` (`comma`) to check the replacement. It happens that, 
> > some times, I get the error (e.g.):
> > 
> > match-substitute-replacement: Args out of range: #<buffer *scratch*>, 
> > 1667, 1679
> > 
> > The error doesn't happen if I type `y` (or `n`)
> > 
> > Try this:
> > 
> > (query-replace ",.\\footnote{" ".\\footnote{" nil)
> > 
> > With the string ",.\footnote{" at the end of the buffer. To see the 
> > error "{" must be the last char in the buffer.
> > 
> > (I see often this bug because I use "narrowing" a lot)
> > 
> > Is it a known bug?
> 
> The kludgey solution in the patch below should fix this.  Please see
> if it indeed fixes your real-life use cases.

I've now installed this on master, and I'm closing this bug.




This bug report was last modified 1 year and 241 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.