GNU bug report logs - #36696
26.2; query-replace error

Previous Next

Package: emacs;

Reported by: Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com>

Date: Tue, 16 Jul 2019 20:30:02 UTC

Severity: normal

Tags: fixed

Found in version 26.2

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36696 in the body.
You can then email your comments to 36696 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36696; Package emacs. (Tue, 16 Jul 2019 20:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 16 Jul 2019 20:30:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.2; query-replace error
Date: Tue, 16 Jul 2019 16:22:44 -0400
How to make this bug:
Type emacs -Q
Use C-x C-f to open a new file called test.tex
Type the following three lines in test.tex:
\foo
foo
foo
(The first line is '\foo', not 'foo')
Then go to the beginning of the file with M-<
and use M-% to begin query-replace
Try to replace 'foo' with 'foo'.
When prompted for the first line,
type 'y' to replace.
Then emacs returns an error:
Args out of range: #<buffer test.tex>, 0, 1

I'm using the most recent installation of MacTex and emacs.
Both were installed with Homebrew.

Thank you,
Theodore Ehrenborg









In GNU Emacs 26.2 (build 1, x86_64-apple-darwin17.7.0)
of 2019-04-13 built on HighSierra-2.local
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set
perform-replace: Args out of range: #<buffer test.tex>, 0, 1
Auto-saving...
Saving file /Users/jtae/New/test.tex...
Wrote /Users/jtae/New/test.tex

Configured using:
'configure --disable-dependency-tracking --disable-silent-rules
--enable-locallisppath=/usr/local/share/emacs/site-lisp
--infodir=/usr/local/Cellar/emacs/26.2/share/info/emacs
--prefix=/usr/local/Cellar/emacs/26.2 --with-gnutls --without-x
--with-xml2 --without-dbus --with-modules --without-ns
--without-imagemagick'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB MODULES THREADS

Important settings:
  value of $LC_CTYPE: UTF-8
  locale-coding-system: utf-8-unix

Major mode: TeX

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils tex-mode compile
tool-bar shell pcomplete comint regexp-opt ansi-color ring latexenc
term/xterm xterm time-date elec-pair mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow isearch timer select mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads kqueue
multi-tty make-network-process emacs)

Memory information:
((conses 16 105754 5971)
(symbols 48 20285 1)
(miscs 40 80 107)
(strings 32 31215 1366)
(string-bytes 1 851553)
(vectors 16 13412)
(vector-slots 8 463776 8234)
(floats 8 52 517)
(intervals 56 215 0)
(buffers 992 13))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36696; Package emacs. (Sat, 20 Jul 2019 10:00:01 GMT) Full text and rfc822 format available.

Message #8 received at 36696 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com>
Cc: 36696 <at> debbugs.gnu.org
Subject: Re: bug#36696: 26.2; query-replace error
Date: Sat, 20 Jul 2019 12:58:57 +0300
tags 36696 unreproducible
thanks

> From: Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com>
> Date: Tue, 16 Jul 2019 16:22:44 -0400
> 
> Type emacs -Q
> Use C-x C-f to open a new file called test.tex
> Type the following three lines in test.tex:
> \foo
> foo
> foo
> (The first line is '\foo', not 'foo')
> Then go to the beginning of the file with M-<
> and use M-% to begin query-replace
> Try to replace 'foo' with 'foo'.
> When prompted for the first line,
> type 'y' to replace.
> Then emacs returns an error:
> Args out of range: #<buffer test.tex>, 0, 1
> 
> I'm using the most recent installation of MacTex and emacs.
> Both were installed with Homebrew.

I cannot reproduce this in Emacs 26.2, 26.2.90, and 27 built from
sources.

Maybe it's specific to MacTex and Emacs installed with Homebrew.




Added tag(s) unreproducible. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 20 Jul 2019 10:17:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36696; Package emacs. (Sat, 20 Jul 2019 15:58:01 GMT) Full text and rfc822 format available.

Message #13 received at 36696 <at> debbugs.gnu.org (full text, mbox):

From: Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 36696 <at> debbugs.gnu.org
Subject: Re: bug#36696: 26.2; query-replace error
Date: Sat, 20 Jul 2019 11:38:14 -0400
[Message part 1 (text/plain, inline)]
Thank you for your help.

I cannot reproduce the error in my computer's original version of Emacs,
22.1.1. I don't know why.

What OS and Tex version did you use when trying to replicate the error?

If the error cannot be replicated on a computer using the latest versions
of Emacs and MacTex, neither installed with Homebrew, then I agree that
Homebrew is somehow causing the issue.

Best regards,
Theodore Ehrenborg

Den lör 20 juli 2019 kl 05:59 skrev Eli Zaretskii <eliz <at> gnu.org>:

> tags 36696 unreproducible
> thanks
>
> > From: Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com>
> > Date: Tue, 16 Jul 2019 16:22:44 -0400
> >
> > Type emacs -Q
> > Use C-x C-f to open a new file called test.tex
> > Type the following three lines in test.tex:
> > \foo
> > foo
> > foo
> > (The first line is '\foo', not 'foo')
> > Then go to the beginning of the file with M-<
> > and use M-% to begin query-replace
> > Try to replace 'foo' with 'foo'.
> > When prompted for the first line,
> > type 'y' to replace.
> > Then emacs returns an error:
> > Args out of range: #<buffer test.tex>, 0, 1
> >
> > I'm using the most recent installation of MacTex and emacs.
> > Both were installed with Homebrew.
>
> I cannot reproduce this in Emacs 26.2, 26.2.90, and 27 built from
> sources.
>
> Maybe it's specific to MacTex and Emacs installed with Homebrew.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36696; Package emacs. (Sat, 20 Jul 2019 15:58:02 GMT) Full text and rfc822 format available.

Message #16 received at 36696 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com>
Cc: 36696 <at> debbugs.gnu.org
Subject: Re: bug#36696: 26.2; query-replace error
Date: Sat, 20 Jul 2019 18:57:37 +0300
> From: Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com>
> Date: Sat, 20 Jul 2019 11:38:14 -0400
> Cc: 36696 <at> debbugs.gnu.org
> 
> What OS and Tex version did you use when trying to replicate the error?

TeX is not relevant here, I think.  I tried this on MS-Windows.

> If the error cannot be replicated on a computer using the latest versions of Emacs and MacTex, neither
> installed with Homebrew, then I agree that Homebrew is somehow causing the issue.

Let's wait for others to try to reproduce this.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36696; Package emacs. (Sat, 20 Jul 2019 16:08:01 GMT) Full text and rfc822 format available.

Message #19 received at 36696 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 36696 <at> debbugs.gnu.org, Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com>
Subject: Re: bug#36696: 26.2; query-replace error
Date: Sat, 20 Jul 2019 12:06:57 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com>
>> Date: Sat, 20 Jul 2019 11:38:14 -0400
>> Cc: 36696 <at> debbugs.gnu.org
>> 
>> What OS and Tex version did you use when trying to replicate the error?
>
> TeX is not relevant here, I think.  I tried this on MS-Windows.
>
>> If the error cannot be replicated on a computer using the latest versions of Emacs and MacTex, neither
>> installed with Homebrew, then I agree that Homebrew is somehow causing the issue.
>
> Let's wait for others to try to reproduce this.

I can't reproduce it here, but it sounds similar to Bug#36328, which
depends on which faces are loaded.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36696; Package emacs. (Sat, 20 Jul 2019 16:40:02 GMT) Full text and rfc822 format available.

Message #22 received at 36696 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 36696 <at> debbugs.gnu.org, theodore.ehrenborg <at> gmail.com
Subject: Re: bug#36696: 26.2; query-replace error
Date: Sat, 20 Jul 2019 19:39:10 +0300
> From: Noam Postavsky <npostavs <at> gmail.com>
> Cc: Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com>,  36696 <at> debbugs.gnu.org
> Date: Sat, 20 Jul 2019 12:06:57 -0400
> 
> I can't reproduce it here, but it sounds similar to Bug#36328, which
> depends on which faces are loaded.

You mean colors, not faces, right?

And that bug was on TTY frames, whereas this one isn't, so I'm not
sure it's the same problem.  I suspect MacTeX installs something that
affects even "emacs -Q", though.  Or maybe it's macOS port that does.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36696; Package emacs. (Sun, 21 Jul 2019 00:05:01 GMT) Full text and rfc822 format available.

Message #25 received at 36696 <at> debbugs.gnu.org (full text, mbox):

From: Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 36696 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>
Subject: Re: bug#36696: 26.2; query-replace error
Date: Sat, 20 Jul 2019 20:04:16 -0400
[Message part 1 (text/plain, inline)]
I looked over Bug#36328, and that problem seems a lot like mine. That bug
was addressed with a patch in Emacs 27, so I installed the most recent
version (in two ways, directly from https://github.com/emacs-mirror/emacs
and also through brew). Both versions of Emacs 27 (technically, they are
the same version, commit 45fc6f2) do not produce the error, which is great.

Thanks for pointing out the similar bug.


Den lör 20 juli 2019 kl 12:39 skrev Eli Zaretskii <eliz <at> gnu.org>:

> > From: Noam Postavsky <npostavs <at> gmail.com>
> > Cc: Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com>,
> 36696 <at> debbugs.gnu.org
> > Date: Sat, 20 Jul 2019 12:06:57 -0400
> >
> > I can't reproduce it here, but it sounds similar to Bug#36328, which
> > depends on which faces are loaded.
>
> You mean colors, not faces, right?
>
> And that bug was on TTY frames, whereas this one isn't, so I'm not
> sure it's the same problem.  I suspect MacTeX installs something that
> affects even "emacs -Q", though.  Or maybe it's macOS port that does.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36696; Package emacs. (Tue, 23 Jul 2019 15:24:02 GMT) Full text and rfc822 format available.

Message #28 received at 36696 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com>
Cc: 36696 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#36696: 26.2; query-replace error
Date: Tue, 23 Jul 2019 11:23:46 -0400
tags 36696 = fixed
close 36696 27.1
quit

Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com> writes:

> I looked over Bug#36328, and that problem seems a lot like mine. That bug
> was addressed with a patch in Emacs 27, so I installed the most recent
> version (in two ways, directly from https://github.com/emacs-mirror/emacs
> and also through brew). Both versions of Emacs 27 (technically, they are
> the same version, commit 45fc6f2) do not produce the error, which is great.

Okay, closing this report then.

> Den lör 20 juli 2019 kl 12:39 skrev Eli Zaretskii <eliz <at> gnu.org>:
>
>> > From: Noam Postavsky <npostavs <at> gmail.com>
>> >
>> > I can't reproduce it here, but it sounds similar to Bug#36328, which
>> > depends on which faces are loaded.
>>
>> You mean colors, not faces, right?

I guess so, I didn't actually pay that much attention to the details.

>> And that bug was on TTY frames, whereas this one isn't, so I'm not
>> sure it's the same problem.  I suspect MacTeX installs something that
>> affects even "emacs -Q", though.  Or maybe it's macOS port that does.

I think in both cases something modifies the match-data during
query-replace, so the same fix is applicable to both bugs.  The
particular thing which is responsible for modifying match-data may be
different in each case, but I don't think it's very important to find
out exactly what it was.




Added tag(s) fixed; removed tag(s) unreproducible. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 23 Jul 2019 15:24:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 36696 <at> debbugs.gnu.org and Theodore Ehrenborg <theodore.ehrenborg <at> gmail.com> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 23 Jul 2019 15:24:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 21 Aug 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 221 days ago.

Previous Next


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