Subject: bug#33697: 26.1; file-truename messes with match data

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 06 May 2022 19:29:54 +0200

Philipp <[email-masked]> writes:

> emacs -Q -eval "(setq frame-title-format '(\"\" (:eval (string-match \".\" \"a\"))))"
>
> Then go to the first character in the scratch buffer (M-<), and run
>
> M-% a RET b RET
>
> The first time you attempt to replace something, Emacs will signal an
> error:
>
> perform-replace: Args out of range: #<buffer *scratch*>, 0, 1
>
> Backtrace:
>
> Debugger entered--Lisp error: (args-out-of-range #<buffer *scratch*> 0 1)
>   buffer-substring-no-properties(0 1)

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I can reproduce this in Emacs 26.1, but not in Emacs 28.1, so I guess
this has been fixed in the years since it was reported, and I'm closing
this bug report.  If you're still seeing the problem in recent Emacs
versions, please respond to the debbugs address and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no