bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36372: 27.0.50; replace-regexp-in-string skips START first chars in


From: Mattias Engdegård
Subject: bug#36372: 27.0.50; replace-regexp-in-string skips START first chars in return value [PATCH]
Date: Wed, 26 Jun 2019 17:20:02 +0200

26 juni 2019 kl. 16.51 skrev Eli Zaretskii <eliz@gnu.org>:
>> 
>> So it isn't used in-tree at all.  Since it's an (in my opinion) pretty
>> useless parameter as it's currently implemented, I think we should
>> deprecate the parameter and remove the documentation.
> 
> I disagree.  This has been in Emacs since 2000, it's too late to
> remove it.  We must assume that whoever wrote the code (which operated
> like that from the get-go) actually meant for it to operate like that.

It may be too late to change, but that doesn't mean that we have to agree with 
your last statement: it looks like a mistake from the very beginning to me. 
Given the seventh argument's infrequency of use (and the lack of tests), this 
is perfectly plausible.

By the way, I found no use of the START argument in GNU ELPA either so I 
started searching all elisp code on my disk, and found exactly one, in 
company-coq.

Clément, apologies for dragging you into the discussion, but when you woke up 
this morning, you probably didn't know that you were possibly the only man in 
history to use the last argument to replace-regexp-in-string.
Now I would be curious to know:

(1) Does this code, in company-coq--loc-fully-qualified-name, actually work the 
way you intended? (Looks like it.)
(2) Did you learn how the START parameter affects the return value by reading 
the doc string, the manual, the source code, or by testing?
(3) Are you aware of other code using the START parameter to 
replace-regexp-in-string?

Clearly this is anecdotal evidence but we have little else.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]