Subject: 26.2; query-replace error

From: Theodore Ehrenborg <[email-masked]>
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))