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

From: Dmitry Gutov <[email-masked]>
Date: Mon, 13 Nov 2023 16:45:36 +0200

On 13/11/2023 16:38, Eli Zaretskii wrote:
>> Date: Mon, 13 Nov 2023 16:21:43 +0200
>> Cc:[email-masked]
>> From: Dmitry Gutov<[email-masked]>
>>
>> On 13/11/2023 16:06, Eli Zaretskii wrote:
>>> [Please use Reply All to reply, so that the bug tracker is CC'ed.]
>>>> Date: Sun, 12 Nov 2023 23:44:43 +0100
>>>> From: Gabriele Nicolardi<[email-masked]>
>>>>
>>>> I tested the patch on the MWE I sent to you. Thanks!
>>>>
>>>> Now I'm not sure what I should do. I write elisp code used by a production team. We use Emacs to
>>>> format LaTeX documents of scientific papers. I don't control which version of Emacs my
>>>> collaborators use. Do you have any suggestions?
>>> I guess either wait for the next Emacs release or build your own
>>> Emacs?
>> I haven't examined the exact problem, but in such cases some people also
>> either have workarounds in their own code, or supply "advices" for the
>> core functions that work around the problem there.
> Then maybe a simple replacement for the offending function, defined in
> an init file, would also be a possible solution?

Sure. Though it might be more reliable with advice, since they don't 
depend on the loading order.

The problems I had in mind would be more subtle and independent of the 
choice between these two methods. Stefan's latest patch includes changes 
in search.c, so it might be difficult to work around in just Lisp. 
Again, I haven't examined the problem itself.