From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <83tvcdlm8x.fsf@gnu.org> <8336jwl7sa.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="168065"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Lars Ingebrigtsen , 36372@debbugs.gnu.org To: Eli Zaretskii , =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 26 17:21:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hg9jV-000hUm-GX for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Jun 2019 17:21:13 +0200 Original-Received: from localhost ([::1]:41052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hg9jU-0004U6-Hy for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Jun 2019 11:21:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41602) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hg9jL-0004SE-Gy for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2019 11:21:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hg9jK-0000gj-Dz for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2019 11:21:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51512) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hg9jK-0000gV-8l for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2019 11:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hg9jK-0006Vq-27 for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2019 11:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jun 2019 15:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36372 X-GNU-PR-Package: emacs Original-Received: via spool by 36372-submit@debbugs.gnu.org id=B36372.156156241024955 (code B ref 36372); Wed, 26 Jun 2019 15:21:02 +0000 Original-Received: (at 36372) by debbugs.gnu.org; 26 Jun 2019 15:20:10 +0000 Original-Received: from localhost ([127.0.0.1]:36823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hg9iU-0006UR-EF for submit@debbugs.gnu.org; Wed, 26 Jun 2019 11:20:10 -0400 Original-Received: from mail214c50.megamailservers.eu ([91.136.10.224]:42496 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hg9iR-0006UE-VE for 36372@debbugs.gnu.org; Wed, 26 Jun 2019 11:20:09 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1561562405; bh=pqUpNQk/pMdLNNh48GxbT4QWqvfRWWgiFKjXJTiFLvE=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=Lq/Ch4t0D3FjisxNkq5e6fax3r18FksUzIDbV6Fh3dAzlv4/2+pxFurtfcU7tizhc CMNX3InzpJwAbuxcTL9+yOOX2WbnUClBiauXvGWxaTFWdm6mdsPFQO8XX7pTJum7nt SCo8nPe+XosJm5zg8g9/Fsr94wWR1fHb2eV8Rxug= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.1.65] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x5QFK3BD030497; Wed, 26 Jun 2019 15:20:04 +0000 In-Reply-To: <8336jwl7sa.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020E.5D138D25.002C, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=KsZjJ1eN c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=mDV3o1hIAAAA:8 a=_SgBhRY-wxL7eVxdMXcA:9 a=QEXdDO2ut3YA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:161517 Archived-At: 26 juni 2019 kl. 16.51 skrev Eli Zaretskii : >>=20 >> 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. >=20 > 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=C3=A9ment, 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.