unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#67124: 26.3; query-replace Arg out of range with comma option (at end-buffer)
@ 2023-11-11 19:40 Gabriele Nicolardi
  2023-11-12  9:48 ` Eli Zaretskii
  0 siblings, 1 reply; 24+ messages in thread
From: Gabriele Nicolardi @ 2023-11-11 19:40 UTC (permalink / raw)
  To: 67124

Hi, I'm resending the bug report trying to do better than the previous one.

When I run `query-replace-regexp` command if I type `?` I get this 
explanation of the function's options:

Type Space or ‘y’ to replace one match, Delete or ‘n’ to skip to next,
RET or ‘q’ to exit, Period to replace one match and exit,
Comma to replace but not move point immediately,
C-r to enter recursive edit (C-M-c to get out again),
C-w to delete match and recursive edit,
C-l to clear the screen, redisplay, and offer same replacement again,
! to replace all remaining matches in this buffer with no more questions,
^ to move point back to previous match,
u to undo previous replacement,
U to undo all replacements,
E to edit the replacement string.
In multi-buffer replacements type ‘Y’ to replace all remaining
matches in all remaining buffers with no more questions,
‘N’ to skip to the next buffer without replacing remaining matches
in the current buffer.

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?

My emacs version is GNU Emacs 26.3.


In GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.14)
of 2020-03-26, modified by Debian built on lcy01-amd64-020
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: Ubuntu 20.04.6 LTS

Recent messages:
Mark set
next-line: End of buffer
Mark set
funcall-interactively: End of buffer
Quit
Mark set
Entering debugger...
Mark set
previous-line: Beginning of buffer
Mark set
previous-line: Beginning of buffer
Configured using:
'configure --build x86_64-linux-gnu --prefix=/usr
--sharedstatedir=/var/lib --libexecdir=/usr/lib
--localstatedir=/var/lib --infodir=/usr/share/info
--mandir=/usr/share/man --enable-libsystemd --with-pop=yes
--enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.3/site-lisp:/usr/share/emacs/site-lisp 

--with-sound=alsa --without-gconf --with-mailutils --build
x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
--libexecdir=/usr/lib --localstatedir=/var/lib
--infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd
--with-pop=yes
--enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.3/site-lisp:/usr/share/emacs/site-lisp 

--with-sound=alsa --without-gconf --with-mailutils --with-x=yes
--with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
-fdebug-prefix-map=/build/emacs-mEZBk7/emacs-26.3+1=. 
-fstack-protector-strong
-Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
-D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LIBSYSTEMD LCMS2

Important settings:
value of $LANG: it_IT.UTF-8
locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-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 dired
dired-loaddefs format-spec rfc822 ...)

Memory information:
((conses 16 97042 8905)
(symbols 48 20561 1)
(miscs 40 86 120)
(strings 32 28945 1187)
(string-bytes 1 762727)
(vectors 16 14159)
(vector-slots 8 504582 10748)
(floats 8 56 120)
(intervals 56 316 55)
(buffers 992 12))






^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2023-11-18 21:35 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-11 19:40 bug#67124: 26.3; query-replace Arg out of range with comma option (at end-buffer) Gabriele Nicolardi
2023-11-12  9:48 ` Eli Zaretskii
2023-11-13  3:56   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-13 14:17     ` Eli Zaretskii
2023-11-16 14:29       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-16 14:55         ` Eli Zaretskii
2023-11-16 16:15           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-16 16:56             ` Eli Zaretskii
2023-11-16 18:01               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-16 18:34                 ` Eli Zaretskii
2023-11-16 15:35     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-16 16:51       ` Eli Zaretskii
2023-11-16 18:23         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-18 10:18           ` Eli Zaretskii
2023-11-18 16:44             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-18 21:35               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]   ` <ed11baa2-cf89-4a72-91d0-8f26c0af4126@medialab.sissa.it>
2023-11-13 14:06     ` Eli Zaretskii
2023-11-13 14:21       ` Dmitry Gutov
2023-11-13 14:38         ` Eli Zaretskii
2023-11-13 14:45           ` Dmitry Gutov
2023-11-13 15:39             ` Gabriele Nicolardi
2023-11-16 14:45               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-16 16:27                 ` Gabriele Nicolardi
2023-11-15 13:18   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).