GNU bug report logs - #71370
30.0.50; Please un-obsolete buffer-substring as a generalized variable

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Adam Porter <adam@HIDDEN>; dated Wed, 5 Jun 2024 01:34:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 4 Mar 2025 23:43:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 04 18:43:12 2025
Received: from localhost ([127.0.0.1]:33569 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tpbuq-0005bJ-Gq
	for submit <at> debbugs.gnu.org; Tue, 04 Mar 2025 18:43:12 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:51941)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1tpbuo-0005ax-2F
 for 71370 <at> debbugs.gnu.org; Tue, 04 Mar 2025 18:43:10 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 70FAE441FCB;
 Tue,  4 Mar 2025 18:43:03 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1741131782;
 bh=KDBMDuHjHPMNpmYKZeO06M5OMIpUJyL4KHQ214tqc0w=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=k+HiLHaxqaZr1TcNpAqcMiA9h0hPMFrBZPMhbfGStklYAFObC8hkHNEcf+v+UaMNY
 bV8/f8IR62Pt0eVimFKU4lZXfe3FxZF/Muggitbl8NL5jU8BelcIFzePqJ++uExaBW
 fxLU0LF5pt0o+ew6NKVW7AXdvv6KYYK2mo6f1a6kxbCu82TTockbv1JZK+Hy/uMEp8
 b19OllrgIyDk9oDR6ug0CwNkccqpUXetDOOOA6x3nn6P+F+mSsWskLaEuz2MsBE5qA
 lpuBiWhTvSmZ45xB0NCIrhM7H4iC3hkNdKtnAVXj24GXK5DtidZ2NLwlVcSLl8a2r9
 Yq0yuteq2bURw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 692E9441F85;
 Tue,  4 Mar 2025 18:43:02 -0500 (EST)
Received: from alfajor (unknown [104.247.242.5])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1AC0512060B;
 Tue,  4 Mar 2025 18:43:02 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
In-Reply-To: <87r03e7buu.fsf@HIDDEN>
Message-ID: <jwvfrjs1ip0.fsf-monnier+emacs@HIDDEN>
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
 <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
 <yp1r0cqekut.fsf@HIDDEN>
 <CADwFkmmsqUBVgs2auDkB2mWNakuLNK465m8EKOceWd_B5JKyLw@HIDDEN>
 <87y0y2dzlg.fsf@HIDDEN>
 <jwvo6yyugpt.fsf-monnier+emacs@HIDDEN>
 <CADwFkmnPt4qHQxo85Qk1wFiQwOZxLWRQegGHDQ9C1-yV1T3QPA@HIDDEN>
 <875xkssslx.fsf@HIDDEN>
 <CADwFkmkdREk78JCFF4MoD83kr3a9PJYf-zT1vndANRPFJ=iXtQ@HIDDEN>
 <87r03e7buu.fsf@HIDDEN>
Date: Tue, 04 Mar 2025 18:43:00 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.369 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org, Ihor Radchenko <yantar92@HIDDEN>,
 Stefan Kangas <stefankangas@HIDDEN>, Adam Porter <adam@HIDDEN>,
 Andrea Corallo <acorallo@HIDDEN>, Sean Whitton <spwhitton@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Let's better please wait for Stefan.  I'm sure that what he has is
> already much much better than the simplistic setter we have.  I hope he
> continues.  And if he doesn't, we still would have to go on with his
> approach.

I'm not sure how to continue because it mostly depends on what Stefan
and Eli (and Andrea) can agree to do.  At this point I don't really
understand what Eli wants.  Nobody replied to may last message from
a week and a half ago, in that bug#76313.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 3 Mar 2025 08:32:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 03 03:32:01 2025
Received: from localhost ([127.0.0.1]:44303 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tp1DV-0002yX-2L
	for submit <at> debbugs.gnu.org; Mon, 03 Mar 2025 03:32:01 -0500
Received: from mout.web.de ([212.227.17.11]:33587)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <michael_heerdegen@HIDDEN>)
 id 1tp1DR-0002xi-Np
 for 71370 <at> debbugs.gnu.org; Mon, 03 Mar 2025 03:31:58 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1740990694; x=1741595494;
 i=michael_heerdegen@HIDDEN;
 bh=YW6Pc0EdkQGSeB4kEYds4+z8ucgxdJzCMFBQk9muHIY=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=vCAL70okcsKbcqoqx9DssMwgKqU2604mQJRBR25jqr9+lqMAGa68V1vGKflgmPJS
 ljKivLFmzXlF9guD3eZghKLcq2325vYYCngJ9Yn7rjNIdKr5BdIEyoZZqRxggNMzd
 vMZraKZJvl4ea+QG75HJ9wIrKbnPGNN0ZxU3dj39fshjOrkwqrukc4fA5IW3Itqh7
 SSnx39zkQCWg0ayNT67PPweadTbGpAGXt/DTj3uIpXfGCahBEzalvpsDlAgW9DqeS
 ZD74CKWFlD9L6FKeHd1CYIOduBNFqYXCIFuC3RjZbegQPZ5v9i/embJI4PIpw5b2M
 5GI38IJ3MXd/+MgSIQ==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([88.66.201.232]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Md6y1-1tGEgn0D5P-00b9h8; Mon, 03
 Mar 2025 09:31:34 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Kangas <stefankangas@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
In-Reply-To: <CADwFkmkdREk78JCFF4MoD83kr3a9PJYf-zT1vndANRPFJ=iXtQ@HIDDEN>
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
 <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
 <yp1r0cqekut.fsf@HIDDEN>
 <CADwFkmmsqUBVgs2auDkB2mWNakuLNK465m8EKOceWd_B5JKyLw@HIDDEN>
 <87y0y2dzlg.fsf@HIDDEN>
 <jwvo6yyugpt.fsf-monnier+emacs@HIDDEN>
 <CADwFkmnPt4qHQxo85Qk1wFiQwOZxLWRQegGHDQ9C1-yV1T3QPA@HIDDEN>
 <875xkssslx.fsf@HIDDEN>
 <CADwFkmkdREk78JCFF4MoD83kr3a9PJYf-zT1vndANRPFJ=iXtQ@HIDDEN>
Date: Mon, 03 Mar 2025 09:32:57 +0100
Message-ID: <87r03e7buu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:WAEVG4TsBi4kMzhAdWlzqQmb4QMlkxVhBD63xVJ17afTf2Y+bym
 vkbV48hzpntnidvvD+kPUu4qFXy6MaNKkhnKrAwOj57rEJ/0lHGPIUHQ6Y4Ot4L8F7OxY1x
 Ni+AGmri7WWZaxu2L0QlwgDjYQISqURV3bBFBWr/cV9qFKAb5rt1w8F7DH8DkwLJ90B5qCl
 be5i6sR4JzbeEahiCrl2A==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:41JPve/IHaU=;DsFuSC15DxyqQd/ieQrkFsRuOS2
 SvNC2pWflBkyBUudnDgfb47tJPCDZQi/8OapOO52jLZZxDCGyIlLVJPjp7ZZilis08Ii6fQXh
 biy/vbtG1uHfONOfNOASSTdtPO6PJvBgA8LW1KnaQDpvkJXlrZiEXRZhCI4XcSqNYDNpwP/02
 ux+SmejjfvXegIx7mnN4KX+xxUq/ak2FK31LC6dZIh1oAyktc67t18fSTfg/+q0mx5KhFEnV0
 Se4wne2hLsihHK85J6znhaARzVdx8436AgBTXAWW8VqjT7bPd9CojQX/68jB3AaADd+kCVvcC
 S3qm2jE0bPPdoTG0D+2QqAMqEY51TxHbMSOQ6MCo58R2a619pHV/LzYEVgQFvmpB/yuEfpQWd
 4P7zfRdvGRKWgTwaG3055WrZHCb4HzdDVoxceV+jVzepVW+1xeG9t7SHXTQ5J0yjJlnGnpwyv
 RH1CkvoOv2ejKlJtMpw1M3atxUfsllBfGXaW9uMWfJ7Ox85sQP48GOp862NbshRBvxcw01D3U
 myHypmwfLTKufxoo2Mplsgt5Ro+xOBYnb+w7nsCCFindnkua+hux9rffBHUudRXbRgeJOg3pJ
 BLqpfEN568t759owwPQQQ2w1YACKsuf3HV/BUUO8BAUNyZpHw9E9z1Czf8+7cP3/nw8aHurMe
 hR+08zvMfX89JMgvPe6oU83OarjMYsWFSeEXuS5/FaVePTew+FjYw7gIxE9FGb2jr3ilv2+/L
 trUsFhlAzM/VS0wjx2BvrUsLnTgzlbDNpVAWjYvh6afc9SPFOTezkJlhL+mq4MYCHtNDU/fMf
 6LyTYf+5avxclVWyc2gMnOIdzLVIGG6+0mfdNYw16NUyuw1PL73rusC0Z9iZTnaqbyUHexv3R
 DcO03rvvYAwpt8QB5xm8ueJLcCV1Hj551z8PJJwsM74cxZ1I7cUSZA8QnH/H3z4f5azwh0hdX
 h8feH7YtOUh+5zHY0+ylnf/vh73wo0Vv5QEV2QIJ5EruaKME9EYqY2O5iABGURXlAkqB3lML7
 k4sc1d6cun6KwHCom4Bire715e3K2Mc4GZr5dQE5b0D7OY3uRx0UQKlpKfgZ2j+SvqZY0lydd
 y+jTNaZnuGlviP2KBxSF+tWmIDHq/SHzw1saBulPmUBT5luU4HtVigvJFzDmfZ+B76H8xTIQZ
 gbQRm27PtjbHpfKCsu1Kq//jhLDtpy/mZ54p8vXrpts700MQ3JgZbbRprRE1gzdBBD+Hq5RD7
 x/JpuJtKrkHpA27oLwDlF3wHXg1dWGIubhvp4AxAxKRQRkI8aszUABL7brtpy1EPMMGdsJa8k
 g4jdJnE4s+f/ChBI+Z4vRUvf3KYLoelRHPbmNBlmUZJHJvvgbjTto726cq1/71uAhnkoW/qEV
 3mg7jsEn6r/xKWSZuQ2HkfFsDnPvgDXIXeQM51u24NWPXmd3cJbTDqBDMr
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org, Ihor Radchenko <yantar92@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>, Adam Porter <adam@HIDDEN>,
 Andrea Corallo <acorallo@HIDDEN>, Sean Whitton <spwhitton@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Stefan Kangas <stefankangas@HIDDEN> writes:

> As for `buffer-substring`, if we can't have a function that provides
> that functionality (the proposed `replace-region`), then (setf
> (buffer-substring ...) ...) is clearly _not_ obsolete and shouldn't be
> marked as such.

This is a problem, yes (note we at least have `replace-region-contents'
in subr-x.el, though it's not exactly the same).

> FWIW, I don't see a huge need for a replacement function, and I think
> a generalized variable is perfectly serviceable in that case.

I don't, it's absolutely not, in my opinion.  This point had been
discussed somewhere above in this thread.  Short summary of my position:
the semantics of a generalized variable here is undefined, too unclear,
because there are already several, fundamentally different ways to
fulfill the contract "the place expression evals to the assigned value
after setting it": replacing text, inserting text and move what was
there after the inserted text, etc.  It is unclear what happens to
markers, overlays etc etc.  And all the difficulties that were hindering
Stefan to finish his version come on top - we just didn't discuss them
_here_.  `buffer-substring' was one of the worst generalized variables
that had been obsoleted.  The documentation doesn't tell anything about
how the setter behaves.  It's simply not existent.  Really bad,
actually, please don't get blinded by the lack of documentation and
discussion.

Let's better please wait for Stefan.  I'm sure that what he has is
already much much better than the simplistic setter we have.  I hope he
continues.  And if he doesn't, we still would have to go on with his
approach.


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 2 Mar 2025 05:09:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 02 00:09:45 2025
Received: from localhost ([127.0.0.1]:50445 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tobaD-0002rF-5A
	for submit <at> debbugs.gnu.org; Sun, 02 Mar 2025 00:09:45 -0500
Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:49217)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>)
 id 1tobaA-0002qc-8G
 for 71370 <at> debbugs.gnu.org; Sun, 02 Mar 2025 00:09:44 -0500
Received: by mail-ed1-x52e.google.com with SMTP id
 4fb4d7f45d1cf-5e53b3fa7daso308415a12.2
 for <71370 <at> debbugs.gnu.org>; Sat, 01 Mar 2025 21:09:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1740892176; x=1741496976; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=MDjcFd+kEvxDZOHtyjAqfL2HqPPNjINgSSCt0mUjtD8=;
 b=Ca7cp0LXCKaO1mlXU+XZX6m9DMhhnZSmvkDgpYY/6d7D1HAuuoU+xszlEl/6k8tTua
 hJkYS/+ybQxJMkZr+y9BPmhtn622zeFp118+b+btjVBp/eN2WZfXpYHpr/XuRJSRUv5i
 ycDUyulGTfnYwrQ5qfLpSAZoYI10lfwGzOn07TiU3xvfrQ/AxWT+ugwx14hps/iNsK5p
 R74xwhB8ySZearDSgzLHukXxMfkWdhejFf06kUt1jU+k+Oyg9s1v0zxxaRqrOX5g8vsA
 KBokkDdBPRyVWCkRm7UUQT8482i6KHE7kRGHRJ43Gu6Jv63yK4j/0t8Hl3JSjBI4TPHB
 jlsQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1740892176; x=1741496976;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=MDjcFd+kEvxDZOHtyjAqfL2HqPPNjINgSSCt0mUjtD8=;
 b=utwTtkZMQ2TDKZK23m5BJbW6gj58zMYM/nBitI5i5Wuq/VCgpEZVj/uzOnMpW45YzT
 YFJ90U0KvR2ggWIER5qbkJHViMN+nFJRHfs1UtD+Qqrccg9UalTkcHVWWhGValmn5uIS
 a8R7A0LzftjpvdpM5JiDPzOPdqJ5V3uvB2AFY4qqDqU11l2gb0FJBo+nQ1iGDHLlkOc3
 z2LHSqcF+zoDBwNw+jcAThWbiX/MlOymuz7sAvHSGalxQpwy9ChY8iRB8ApDnPkDtRT2
 JMEFjfvmOvTx/ZBindC36IpCcMAZBcyO+44qkcaHRLTyX99aXeNCMssSqVWEd6c+OmVd
 2jhg==
X-Forwarded-Encrypted: i=1;
 AJvYcCUvjCWvfHlxIHR60QXYm7LA8HOiV94q+fsyWWTnt0/7AJPRXHqoUSTkiRjsLHqZv+bNUye9sA==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yx0+XQpf/Ji8gwd3yRJU1Xmqj2X16qE8d54+sG5MIL8YqgwPVF6
 T0WVqLJD2qJfcJeiSB5zj1rmxLM2Miej19fO29kdPopgCcxlL8bjMPL2WXnpLFuQVtOfveZYqVf
 Sf3szcJpO/tx81f6cCUg6ahILuqmz4ROwx7w=
X-Gm-Gg: ASbGncvvpdjUjRn79ijMmC2aB2kjZAdh1LYIH/oL3Q7YZTbn8I/j5KOo0bfLv3N7rnR
 w+ciB3N6z5aTmio5oBdEhGfPTPg4/xpfUFCC96HrGwUffa0NPMLC4PaN++kBkWq65pe3rhoFj3W
 sydepM3bDv3kobwYlqzUK3bTkGBw==
X-Google-Smtp-Source: AGHT+IH6h0+tTJz4M7PEqCQ4aBeuW5SgH0XmTSFIHiPVKMfSVb4iZSjmS6r2dTbvkQNLPTgBEb+5gGSOCmcqPHiRfyI=
X-Received: by 2002:a05:6402:34c2:b0:5e0:8937:6ef2 with SMTP id
 4fb4d7f45d1cf-5e4d6af1104mr8479736a12.8.1740892175912; Sat, 01 Mar 2025
 21:09:35 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sat, 1 Mar 2025 21:09:35 -0800
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <875xkssslx.fsf@HIDDEN>
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN> <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
 <yp1r0cqekut.fsf@HIDDEN>
 <CADwFkmmsqUBVgs2auDkB2mWNakuLNK465m8EKOceWd_B5JKyLw@HIDDEN>
 <87y0y2dzlg.fsf@HIDDEN>
 <jwvo6yyugpt.fsf-monnier+emacs@HIDDEN>
 <CADwFkmnPt4qHQxo85Qk1wFiQwOZxLWRQegGHDQ9C1-yV1T3QPA@HIDDEN>
 <875xkssslx.fsf@HIDDEN>
MIME-Version: 1.0
Date: Sat, 1 Mar 2025 21:09:35 -0800
X-Gm-Features: AQ5f1Jr0Tq7M5QVSCwPV41ywnAnzD0TWn9eDyOaR6IUdr8RviqUzP7hZgCk7sAk
Message-ID: <CADwFkmkdREk78JCFF4MoD83kr3a9PJYf-zT1vndANRPFJ=iXtQ@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org, Ihor Radchenko <yantar92@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>, Adam Porter <adam@HIDDEN>,
 Andrea Corallo <acorallo@HIDDEN>, Sean Whitton <spwhitton@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Stefan Kangas <stefankangas@HIDDEN> writes:
>
>> If not, I think what Sean writes above is the way to go.
>
> What about what I said and Sean agreed to?  Did you read my replies?

Yes, if you mean this part:

        Please let's keep those two separate questions separate: (1) is a
        certain functionality useful, and (2) if it is, should it be provided,
        maybe even only, as a gv setter function.

As for `buffer-substring`, if we can't have a function that provides
that functionality (the proposed `replace-region`), then (setf
(buffer-substring ...) ...) is clearly _not_ obsolete and shouldn't be
marked as such.

As for `buffer-string`, I don't know any proposed replacement function,
so I think it's not obsolete on these grounds too.  FWIW, I don't see a
huge need for a replacement function, and I think a generalized variable
is perfectly serviceable in that case.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 1 Mar 2025 15:00:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 01 10:00:02 2025
Received: from localhost ([127.0.0.1]:41146 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1toOJt-00014X-88
	for submit <at> debbugs.gnu.org; Sat, 01 Mar 2025 10:00:01 -0500
Received: from mout.web.de ([212.227.17.12]:44419)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <michael_heerdegen@HIDDEN>)
 id 1toOJq-00013o-25
 for 71370 <at> debbugs.gnu.org; Sat, 01 Mar 2025 09:59:59 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1740841176; x=1741445976;
 i=michael_heerdegen@HIDDEN;
 bh=qSanJiV776MNR9EPyjmzD8h0y5BtFzTS457rZiPM3lY=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=Br3jjEhp1lkyKUPIrAqDMUPs7cjabwtVQDC10UFmVBbAUiaDq7JMPIiGSt5aBclT
 dEbqaKfDT1fGw4QZ2MCLbwLVQAc3JHUjd48dMApcanNSaL9xz55Ou0y4cgqdzHSD1
 edcFoBVkuVmsgL9o9Qn5ERiJhSZiOlIPkM7RTUjE+3LAKWsfYL6c9NcIUgQqORp2C
 yl5LhJvDgE3f+kgvoxInRnBEH3I7xFnr1EQyQM1t2x32lxFYHiyRz6yxf3sH3Tzq4
 wuEARga5S1sjPfj/PziUJr0SAakuW4m91pwdKVMX5oszbTabEPKUyhPzuJmzeS4PE
 wvMsk2IszKWENKYt1w==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([88.66.201.232]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MsrhK-1t00aN3rnk-00zqeB; Sat, 01
 Mar 2025 15:59:36 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Kangas <stefankangas@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
In-Reply-To: <CADwFkmnPt4qHQxo85Qk1wFiQwOZxLWRQegGHDQ9C1-yV1T3QPA@HIDDEN>
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
 <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
 <yp1r0cqekut.fsf@HIDDEN>
 <CADwFkmmsqUBVgs2auDkB2mWNakuLNK465m8EKOceWd_B5JKyLw@HIDDEN>
 <87y0y2dzlg.fsf@HIDDEN>
 <jwvo6yyugpt.fsf-monnier+emacs@HIDDEN>
 <CADwFkmnPt4qHQxo85Qk1wFiQwOZxLWRQegGHDQ9C1-yV1T3QPA@HIDDEN>
Date: Sat, 01 Mar 2025 16:00:58 +0100
Message-ID: <875xkssslx.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:eu5cjTySC7rhlqaJ+IV/UGNWVHntDmr2uONY8poGenuOvjGkMIY
 qrWA90JWDEnDaPWBz6LZ9rVUTz1rrfL+dx90ZTUZRr52uhxx9DHKqERRnaKuK7fnhiBaTKM
 Q+DUP51LZU9oyGdCeM7K38bA1CDv0eDGsqU7OHJpiGmZEtQu/hziaoM1RSevmNSz++Yf8/y
 07e5DJURVxcgjuLq1pe7g==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:tWMWIkwy+M0=;fQHlkHEvJwkc4Ho4xgjPrFaYJ04
 Hjt/4A0juB3W7OCeHL1FKOgwBMH8JoyTctP5nxgdZ6MnX904z/n+uY8eLmnIpRUZlYcKYeqYw
 MLkQWfLsEeguT34GNidf1LgbRlDvK2leutKldQscO4Jh9acjIwbljnwY4tYagRDWzS4OYILBd
 3RXqcJkNYJviwgQdtcmEcwQ0UpmrNkTmLUQbNAANYzcQYfbMEoJJ0dtgEbrai2E29PYbJo62/
 4GNcTS64imkFmoxwGVPRQ07P7jT9A/Wql5MOc6+3iHxjB018Y0IF/vUgJhndnNnFJzI1BeQWt
 spptv473UcgSxEwGjDtbTJdsHLNCEJAGNy2HrrY7+7q/6L2pKruZrMZwYHa4gF3FicRtgsx42
 l+6vuuAsyEvBe/SzImUP6/ZguaRO/hASuHfy93CMZOXYsC4fVaRyJulFrYE7qgpjwXJ6d8tU7
 cbIVNJ1WAHSOaeVlkCXpINfWUZdQFWQAV33BWUsiXehdc7A7p4ZNU1q2kqRn1TUZ4eq1JZsFy
 QcCgd42n85V0WBl/vGTZAq2FiowzZOZ8vQmLe0GZxfCmM4lNm7/ESw6rmRvF4M90+1qLIX2hO
 NOVZldAoWTm5Q2bSBtlNnHBq9U96KtnP3TuOeATXS4QeddUah4ZaxPw7aSuJpbVkPOgq42g2W
 g2XBSlk7pgI6vttQZfpiYZnz3W3l9ddCBmOR7ir3UQGemJurKk//eiEFoBkcN5rHvYh8JSTDz
 SiBZDbKS2YfvT4iYpP1bsruylORi2VCnKPpbMqaYRncqOQYH8VlwhkzR4/t2URhxPRlrTnoqa
 KrtzFVgRVZLVapIZu6RyBPk0TLsEF8V+CJeIRXZkzfam6nzdjIzRps2LuEKgGQvVPW6giAIUq
 lS7RCHozWMpWEU1QAp5Ceq4d8JgGHZrd5ewwypa9eKsd0s/Xcf6YbFqNM4USK5XH16Y4AHFMm
 9qwGR2RFtCODwcutsUcSnUR6byq6e9nJDdFREVjE7uHt53ZHfNcbdqgaEEI8RfF3WY/ufooxf
 qnvD1WLRcv4L9PUntsFyS7ocXhFvRsAaoJjEE74ntGu9rC365CljQOTZ5G85EcnZ5+ANDtlYt
 kBpbXdVxXvY/ldnoOLVWIgTLQzmDCpfpTXuY2YTZ7D0sNlgxX8YGdcKcvP+T1yMhVQOQ2Puya
 5kjGto9y0ml/wtHTnALAJpeFvjT4ix6hnRwCoU7YipSvqA+uq4s9XgmMPDqYyc8B1rWyxUWNq
 RlkngcU+ba0bf+BaR9pY5gq3TCZpWjlgJowXklOMDQaM9DGD2gsZaUOYRA1bTKnYpup+gx7hc
 KEQnlxAk+rQYi5jV2s5GvMDEXagDHy5J0UvXT2ithS4rviyf7HSjq76Zbb9r2uHQ6LWpuT5uF
 9yvh61wx4NsinYAmJgNYY2EekP3JhUD1UlmtJKXCR/2770NEYtG+enjypb
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org, Ihor Radchenko <yantar92@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>, Adam Porter <adam@HIDDEN>,
 Andrea Corallo <acorallo@HIDDEN>, Sean Whitton <spwhitton@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Stefan Kangas <stefankangas@HIDDEN> writes:

> If not, I think what Sean writes above is the way to go.

What about what I said and Sean agreed to?  Did you read my replies?


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 1 Mar 2025 02:12:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 28 21:12:53 2025
Received: from localhost ([127.0.0.1]:56036 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1toCLV-0002nw-1O
	for submit <at> debbugs.gnu.org; Fri, 28 Feb 2025 21:12:53 -0500
Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:56767)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>)
 id 1toCLS-0002n8-AA
 for 71370 <at> debbugs.gnu.org; Fri, 28 Feb 2025 21:12:50 -0500
Received: by mail-ed1-x530.google.com with SMTP id
 4fb4d7f45d1cf-5e50d491f69so529482a12.1
 for <71370 <at> debbugs.gnu.org>; Fri, 28 Feb 2025 18:12:50 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1740795164; x=1741399964; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=uuAzdZncbPOfhkxFHtLgFcGWAQjvA4x6F86JT67CCUQ=;
 b=ORqWW8ioLSF71C8qn/F9dTNRKW/yJ34/XhRnsNoZAT32MFbZX1UQAdrJMekp0nUoIg
 nj1XIaoZUMddhP+pEV4+E1L9ywrr/r9MID5eVDQwsbcT63sCYJD+eiIN9+54CrhF6Eso
 B9tvmCJfpa9L3DtSAnpPrFmxr7Q05z/p5GnDGmOHProMaWi16eK8VngZVyFJZoMjSCci
 gVq5X9pCm0wT+dqUykiLa1ZM7BFu46mcjzEXn3uARsQmDVYE36Qak853SshD/bBFV7m+
 Z5tbz1+tmblTL0Pmd1g2NmrZFeLlvHjRtzbkoojVuOAGu03W4VUPbnFhdmlpjzuBc77x
 lGig==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1740795164; x=1741399964;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=uuAzdZncbPOfhkxFHtLgFcGWAQjvA4x6F86JT67CCUQ=;
 b=g6IswLu+WPDF1RLzQnHujs6j3Jc+7tu/5bvpV8l/vG0Q8YyNWuR75iyXVmiza7gt6g
 bpEwtnhmthIoWcP3RAXciLNY3cilWJpJDh27ri24uIT4hvP9ZYvQsh87zJoUeThuNd1u
 UCdsj9GD09kw5CD6R+INdVTDY51p//kPGuFY88JkrdGGox2rj4bSeQ7xyyW0TRY9X9c2
 GnSPTOYn7NcIfK6YD4hgjOMR1IUnHMKgvFydaa6XNsUplZHKdZUWIsVVeq+NFpEbnbcf
 a72hx3Q90yVmSNJZmSlYMwIvBr9UZ/FysWp6mWhNeqBMve5GDW2WeafPnA5JcOghTwCz
 lx/w==
X-Forwarded-Encrypted: i=1;
 AJvYcCVUlkzNWn8svBNgDxsiQK3yu5b5tHHfZCiuym7p1cNsUS7qvm8/kDGmmlhg84DcPwawFfjQAw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YzUQXom6hPyicKasCEWfji2mK+D78XEjEYxC710JuUessT8rvRl
 vDyWDJ8kCAVsBJkj387VzCSc92gzx/oR0EvwRX9gYjeew4NvKVMDWb7/cMRyZf3aRxvVth3jKY2
 2jK5bDRxRFEdO812UxKbjG8NUxBI=
X-Gm-Gg: ASbGncuGzLyGxqNc2hL1UhT4OyXmNqEyq2STUe4I3ON3QeYV+J8Bz+vb5GgvbWphRe6
 Vzv2ZT4/YbsN4Rjrkkrm6+MBvcLJaV6oAZGAmFOAgM1YbwU8Et0K1LK1MVcMfcxyrSzYf6xUBmC
 XGrK05tM7x01p0jKfZ1on5T1jYalQ=
X-Google-Smtp-Source: AGHT+IGFAGADd9ZWTJe1zaTuyrDN6q1Q3jR/MLnNFZ7lR/kq6Bv6Cy9nCxq4hCdH6KpXPDSJLxh/ZUuJ4Lclr5qVVWQ=
X-Received: by 2002:a05:6402:234e:b0:5dc:c9ce:b029 with SMTP id
 4fb4d7f45d1cf-5e4d6acd607mr5615040a12.5.1740795164204; Fri, 28 Feb 2025
 18:12:44 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Fri, 28 Feb 2025 18:12:43 -0800
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <jwvo6yyugpt.fsf-monnier+emacs@HIDDEN>
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN> <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
 <yp1r0cqekut.fsf@HIDDEN>
 <CADwFkmmsqUBVgs2auDkB2mWNakuLNK465m8EKOceWd_B5JKyLw@HIDDEN>
 <87y0y2dzlg.fsf@HIDDEN>
 <jwvo6yyugpt.fsf-monnier+emacs@HIDDEN>
MIME-Version: 1.0
Date: Fri, 28 Feb 2025 18:12:43 -0800
X-Gm-Features: AQ5f1JqhuBn79Z-TMWqhF_vXnJi5uqJnZmDGg8GWGEnRHqUBZTonFdsn5oLNTMU
Message-ID: <CADwFkmnPt4qHQxo85Qk1wFiQwOZxLWRQegGHDQ9C1-yV1T3QPA@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org, Ihor Radchenko <yantar92@HIDDEN>,
 Michael Heerdegen <michael_heerdegen@HIDDEN>, Adam Porter <adam@HIDDEN>,
 Andrea Corallo <acorallo@HIDDEN>, Sean Whitton <spwhitton@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Monnier <monnier@HIDDEN> writes:

>> I would propose that we should keep anything where there isn't a simple
>> set-* function to take its place.
>> So at least buffer-string and buffer-substring, and possibly more.
>
> For `buffer-substring`, there was a proposal to introduce a setter
> function (`replace-region`, see bug#76313), but it got bogged down in
> the bikeshed.

Is there any hope of resurrecting it?

If not, I think what Sean writes above is the way to go.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 20 Feb 2025 03:14:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 19 22:14:43 2025
Received: from localhost ([127.0.0.1]:56968 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tkx1P-00050R-64
	for submit <at> debbugs.gnu.org; Wed, 19 Feb 2025 22:14:43 -0500
Received: from sendmail.purelymail.com ([34.202.193.197]:54590)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1tkx1H-0004zW-66
 for 71370 <at> debbugs.gnu.org; Wed, 19 Feb 2025 22:14:40 -0500
DKIM-Signature: a=rsa-sha256;
 b=NZcOjMr4i2RhyRf2YZa9PYzGmOcgbA0wkAYUCRlEYpymnjNUXo1WBAprm/PvbGX5wTP6g9zbmFmIC9OTzG7RwnFZQ/F0P1G3vfJC2bxX60NSg81x/GRXzURJpX30VMic0pdVN4Qh965XpPQ7cQeot/DyISCRXsFYrkGtKzh0wRJJCDd8nM+GrSPq31MtQoi7XecAcrukUArNOxlvv5fl5Y8XzQ3eqNQoatjbp8Fla1RG5F1f8TSOGIRkGyvgJkrNXxS326DR9ps9iTyDcMZk63LSb1Hh2nZQC3E5QXIkuF9jGdJtNWtVXR1qcHwYU/2JffXdkdIr0O3IGVlYVVjzfg==;
 s=purelymail1; d=spwhitton.name; v=1;
 bh=PLBfD2eQ+5pG5TVOEpZHTYXFouOKBzmCp7QQzfuxZeU=;
 h=Received:Received:From:To:Subject:Date; 
DKIM-Signature: a=rsa-sha256;
 b=nsgCegXvfDMflHRJ8rQ/rDgTxGHkVDyLBPA4h4yXIadnSqe5nn19YiDxhNRHa74WDf/QAQ76A+Mhzxk70R9+LExB34TxakJ3q+sbfQ1Hfwe0KGy8BjA8wHAkizW99+0+tDROBLHx9rR6nIiypulr/yLZhy6YX1CDGCSYvPugLO9GLHRaa9p+Q9Ih5oHP1yt8kTazKg6kBPTVRj52LkfS9fEYlz0DthgLxyySeZP28UVVSOdzXNu6Mbv7vGxHqwtxFVNPI5NK6Muzj5Vljqdr+zOBB+T8g5D4PeqzXiobvlFrUcqL7EFAH1i8Fl6cBD32dTI7//YcBQEV3EXv/jb8Sg==;
 s=purelymail1; d=purelymail.com; v=1;
 bh=PLBfD2eQ+5pG5TVOEpZHTYXFouOKBzmCp7QQzfuxZeU=;
 h=Feedback-ID:Received:Received:From:To:Subject:Date; 
Feedback-ID: 20115:3760:null:purelymail
X-Pm-Original-To: 71370 <at> debbugs.gnu.org
Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -222941528; 
 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384);
 Thu, 20 Feb 2025 03:14:27 +0000 (UTC)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 3CCE67EA68E; Thu, 20 Feb 2025 11:14:23 +0800 (CST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
In-Reply-To: <87seo9l5yu.fsf@HIDDEN> (Michael Heerdegen via's message of "Thu, 
 20 Feb 2025 03:12:25 +0100")
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
 <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
 <yp1r0cqekut.fsf@HIDDEN>
 <CADwFkmmsqUBVgs2auDkB2mWNakuLNK465m8EKOceWd_B5JKyLw@HIDDEN>
 <87y0y2dzlg.fsf@HIDDEN> <87seo9l5yu.fsf@HIDDEN>
Date: Thu, 20 Feb 2025 11:14:23 +0800
Message-ID: <87o6yxz4s0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org, Ihor Radchenko <yantar92@HIDDEN>,
 Stefan Kangas <stefankangas@HIDDEN>, Adam Porter <adam@HIDDEN>,
 Andrea Corallo <acorallo@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

You're quite right, thank you for your message.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 20 Feb 2025 02:11:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 19 21:11:26 2025
Received: from localhost ([127.0.0.1]:56269 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tkw29-00067t-MY
	for submit <at> debbugs.gnu.org; Wed, 19 Feb 2025 21:11:26 -0500
Received: from mout.web.de ([212.227.17.12]:42065)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <michael_heerdegen@HIDDEN>)
 id 1tkw25-00066q-9K
 for 71370 <at> debbugs.gnu.org; Wed, 19 Feb 2025 21:11:23 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1740017465; x=1740622265;
 i=michael_heerdegen@HIDDEN;
 bh=Sq0nAcGCSjgbQyk0YvaybJbB+u/2NMCJM1cAYxDQFog=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=tQVlfRhFZwqxI9vwUtI9WhICr3tiHGvggI0D34lFLOYAL+jMLaT3SkbVMZmhFnKL
 wsSZhAHViQdzAomRlFNE/9s3dkvCd5D4MslexL5hq84XbvTMi9dUFHJ+5BT52oAiw
 ESsBHpkeiurP7kwa3bOWpKoaKwjlU/CLYpVWVl9D1xRzKz0zvw8ogek0OeEfph66f
 UGEr/dJc2GCnrH0CQ0DRuE6N1UfaaiQK6AruiesREp+VWGNt1SqvdXKa90Ak1y+pU
 UHoWaCgOsu43tBUrP60wRMjVNx+Fm8Aigqa3ec5bm53mOfXBKKiknDZgpRqD5bZZE
 JFqoaq8tR3cDwziZvw==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([88.66.201.232]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MBB3s-1tchkc4650-00ASBv; Thu, 20
 Feb 2025 03:11:05 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
In-Reply-To: <87y0y2dzlg.fsf@HIDDEN>
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
 <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
 <yp1r0cqekut.fsf@HIDDEN>
 <CADwFkmmsqUBVgs2auDkB2mWNakuLNK465m8EKOceWd_B5JKyLw@HIDDEN>
 <87y0y2dzlg.fsf@HIDDEN>
Date: Thu, 20 Feb 2025 03:12:25 +0100
Message-ID: <87seo9l5yu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:Uz0ZGYCCU1qNXyfsA2W+0YG3HvS+q/DXSpkHJhYMKbAreJVumuC
 Ac1grDEaYH3RKOUFn+513HjOPdOYMG1mOk21PjRoyChJHXVvCu7EHPJMF3EEfpe6V3q96BB
 SNfxk/78NFvLlNCEDSHKTuL73pDG+oL5idlYK+LdWQj9d0exr20OAYNvICBVaW6fnHBN4cY
 mlDQgsghuxnTUF/61PZMA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:dteNSe4B968=;Fqj8liasCdOCe4dOrGGiTKbVI7L
 r2IpSPmLWXTnylEA4vpRSFqPLnzrtir0nt3ADNyv2nMQ/QMt6Zmqje6HK6qGGBASlGLIda5FB
 hx5xUxu3LYlSFP7pP+n6Q3JpCVx3dWrLxHm5RK1V+CEFd7wegFnkx88kJe9pFFS87yWvsefWP
 n4xl7k9kUeu+wVRLdp1+7VyD+RrnnGAq2va3qMy60cDhITtYD88q+twjZ/OtE5WbHUdelWEI5
 AOqKhVcqENxWRJn6xuqthYtAVdpRfOqMwnVjTA+zkX/8nZWNv8pSg14R1IELkpdFXUA/IOKwY
 PkiHekNg6VKlQD+tGQXHdTgsweRi2LUhOw3RU8w2aJ/twteOTIrYfP8I3i/EQKDqCBDp03ugu
 fh2pYziqck8nE2zIojQdYkeB517MOdik5986Ut8giCogLLC/iRVz1mTpp3lIYvoLG4TV1OeaC
 2xHF5/b34SVSBjY7zTLOht+eRcitSpP7kW63dIYg9HaxLPBWCERWzCxCFp0jQUK1rBRsHR5cj
 KHiENUOS4O2Ln0raZSHSb4RIMNpMrrHP6H2UpmrBfSdpDfcAQKJ2KMHluRP6d/ke8RFfx3+aB
 TJ4B7FOzQocQQVCz4fWJfdx4OyqZZdaWZLZ8wyiUgRcJi4zaKgrBODJt5jBK/g318zItQfgFF
 Yq06XKtnQlZ9Qilcb+ZvsukRyxAr/jMgnd6EVeyU38/PHEVO9q16sJ7YSHO3XJR+4ktc4YazJ
 DiNZ5KAehyQHtpRGIpB0KRdQB1vbaAjg8VCbsnaD4S3JYSCIFsik+1//NbCkFgKsVvZbkNd4C
 MLnxlhRtu4XGEbl25+aGc/8h3Ulq664Nxv2NiL0E4TG1+7qYQ8g6vGYVhwU/xAXOTwYL01HQK
 BIxled07RSklh2/PYMx/2z8BaTZTJ55hVyVcfv5PDkrlJaMDaCqlV56GOPV5FSgXpKMv1R8F9
 6bI/vtNpz3Upu+w1cijETxjNVX4XmxbhgtavUtzM6GCQrA9MWfzJSUPeqDIkx1dXiZhRqCDY1
 +V6AuXEkfMJzOVL8cJ56gKJxuAZxpDucSnnUFRmElwd7YbzeIlckgQK4f2BAgH/rEGXtJ1SbR
 8JhiQiKBNgJLxVhwjYQsSSoR+f24MIWHvZsO9JGFWMsvawVtpte2sa4I3uUuDnfitYA96itPw
 +Y02whCOGymo2D+cXT2CE5cAzqndX1wNt45rp5fl4MXzl0f2vBEMsTUak0iIKf3KhkVPh3eU2
 I2nnMUPgFIhM5gHo8NtZRaNTYBTTZVXTVJmVd5TUy88f4fo8mbw2YLymdlBryzB7WlSWYtG5x
 bIfM6yySpC7yYQaGBIEyaGOM4gutLGdNAcAP1x/8ytliv1AabiFRkQCIR/ylEvoXDuEZYqv0b
 FJCLleZf6uKW+Ggp0C2pTONpsMuh8eazVuKpiRohDzBX6IVqUB2dYxUfdi
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org, Ihor Radchenko <yantar92@HIDDEN>,
 Stefan Kangas <stefankangas@HIDDEN>, Adam Porter <adam@HIDDEN>,
 Andrea Corallo <acorallo@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Sean Whitton <spwhitton@HIDDEN> writes:

> I would propose that we should keep anything where there isn't a simple
> set-* function to take its place.
> So at least buffer-string and buffer-substring, and possibly more.

Please let's keep those two separate questions separate: (1) is a
certain functionality useful, and (2) if it is, should it be provided,
maybe even only, as a gv setter function.

And of course the current `setf'ability of `buffer-substring' is not
falling from the sky.  It is implemented in a quite primitive internal
function named `cl--set-buffer-substring', four lines long.

That those implementations are internal functions doesn't mean we can't
keep those setter obsoleted.  We can provide replacements.

Sorry for speaking out something trivially obvious, but I had the
impression that this aspect has been overlooked by some.


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 19 Feb 2025 14:58:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 19 09:58:28 2025
Received: from localhost ([127.0.0.1]:48741 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tklWu-0005m0-Gz
	for submit <at> debbugs.gnu.org; Wed, 19 Feb 2025 09:58:28 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:11896)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1tklWp-0005lH-KH
 for 71370 <at> debbugs.gnu.org; Wed, 19 Feb 2025 09:58:25 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3116E4427FF;
 Wed, 19 Feb 2025 09:58:17 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1739977096;
 bh=BbwlacNyAPwpCILc+igFhPymfBD2hDUaUmzrtVboLoM=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=o00YpL15JLFD6GOZD3QGJtHGwuV7EI8UF2NVm+YiTBIdvVAkPdUk3n4/Iiz0NGKsZ
 g+D8eTpn9zE0CNa35l4/BubflVF4zgSe5rzQHPfwmyg9HkEJErAGuuU5lvrCVUJu6j
 M8DUwCDWr0X6qSJSNe139zgPrsqLpbQrfRz/er1tR2yEFjs8kuxjIbeJ3xlZWU+eEq
 E6+jK/l8f3jBNLXgjTvul2E3EbMbzGM22vHYqon37OVic2yiUJyA7lq4Tr0EBifY4y
 mg32EZ+r7ICw6leT3ZtsMzw1fs313RbNm1WasUYEYeTs9AyIXPri0hB9ng7iTrfk3u
 Wwz83Cpvi+7mw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4FE5B4427FB;
 Wed, 19 Feb 2025 09:58:16 -0500 (EST)
Received: from alfajor (unknown [104.247.242.5])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 08B6812033F;
 Wed, 19 Feb 2025 09:58:16 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
In-Reply-To: <87y0y2dzlg.fsf@HIDDEN> (Sean Whitton's message
 of "Wed, 19 Feb 2025 17:59:39 +0800")
Message-ID: <jwvo6yyugpt.fsf-monnier+emacs@HIDDEN>
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
 <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
 <yp1r0cqekut.fsf@HIDDEN>
 <CADwFkmmsqUBVgs2auDkB2mWNakuLNK465m8EKOceWd_B5JKyLw@HIDDEN>
 <87y0y2dzlg.fsf@HIDDEN>
Date: Wed, 19 Feb 2025 09:58:14 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.563 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org, Ihor Radchenko <yantar92@HIDDEN>,
 Michael Heerdegen <michael_heerdegen@HIDDEN>,
 Stefan Kangas <stefankangas@HIDDEN>, Adam Porter <adam@HIDDEN>,
 Andrea Corallo <acorallo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> I would propose that we should keep anything where there isn't a simple
> set-* function to take its place.
> So at least buffer-string and buffer-substring, and possibly more.

For `buffer-substring`, there was a proposal to introduce a setter
function (`replace-region`, see bug#76313), but it got bogged down in
the bikeshed.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 19 Feb 2025 09:59:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 19 04:59:54 2025
Received: from localhost ([127.0.0.1]:42766 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tkgry-0001Kw-14
	for submit <at> debbugs.gnu.org; Wed, 19 Feb 2025 04:59:54 -0500
Received: from sendmail.purelymail.com ([34.202.193.197]:35418)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1tkgru-0001Jk-T0
 for 71370 <at> debbugs.gnu.org; Wed, 19 Feb 2025 04:59:52 -0500
DKIM-Signature: a=rsa-sha256;
 b=bZy28LZPmEwYcLT3ja8xLO9Ol9Ea4bRh9Zjv9U7FDr+YOlhQcbfsNcyHV0PoyKdus0vi/0JdFcz+UrQJJfpEYpkaTw5WtVaIKIIdcyh4wIPwVO5smBiwCL8Pwvso9FSGAyvQP30J7a5ugNf1n/NARMRXm4++7BEcX33ASkBurZYGss05gWcKo0yVMkq58qpWp9fP9etg+d8iHt8BwIEUm5jzVwADoctujREoDWEft/BVysApOXP/tEkd0SPFXRsSIjHJS6ZPbcZCCnTk2zM/TvO15di92Z3nL1IyhuEgNe9LdPv50X5wkt1yasja88wm/1VgWrLkLLUtb30BzSpByA==;
 s=purelymail1; d=spwhitton.name; v=1;
 bh=7PHlESNlJpW5UdtTFv+6HRGV8BVWrzesLDQkT4o/oIk=;
 h=Received:Received:From:To:Subject:Date; 
DKIM-Signature: a=rsa-sha256;
 b=YzZM9Vpv++S6La8A+gfh2lXuCGPeC2cJQXxWIbp8V7MDzU22ienvKjn/SbWhRernfHQyNwVwuGdDtKkRrBsC0+yRufasTdWeS1By4ERZ0KOuni29n2XrKLk7ghe9TSybnJAEGk+UEybA3Tvo7RlqaB0+B1OxpH9m/S5T6jlgMyKKN8LfD9FbzuHdGZgkP5PuqLXK5zPu5LxaJtUkAxOp4z21BZWvYx72gCIfWZsvnb4s8KRZx9NS9Qo0FgdETv8yZz2XJs9Bve9nEMHXdBjAe+sWqqelPWlECOIjpeD9BXKLNzoyo9N1uj854V+belc2Up6uBUTq9qVcSxPRJoR4Pg==;
 s=purelymail1; d=purelymail.com; v=1;
 bh=7PHlESNlJpW5UdtTFv+6HRGV8BVWrzesLDQkT4o/oIk=;
 h=Feedback-ID:Received:Received:From:To:Subject:Date; 
Feedback-ID: 20115:3760:null:purelymail
X-Pm-Original-To: 71370 <at> debbugs.gnu.org
Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1418926277; 
 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384);
 Wed, 19 Feb 2025 09:59:41 +0000 (UTC)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 0D5217EAE8A; Wed, 19 Feb 2025 17:59:39 +0800 (CST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Stefan Kangas <stefankangas@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
In-Reply-To: <CADwFkmmsqUBVgs2auDkB2mWNakuLNK465m8EKOceWd_B5JKyLw@HIDDEN>
 (Stefan Kangas's message of "Mon, 17 Feb 2025 18:54:30 +0000")
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
 <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
 <yp1r0cqekut.fsf@HIDDEN>
 <CADwFkmmsqUBVgs2auDkB2mWNakuLNK465m8EKOceWd_B5JKyLw@HIDDEN>
Date: Wed, 19 Feb 2025 17:59:39 +0800
Message-ID: <87y0y2dzlg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org, Ihor Radchenko <yantar92@HIDDEN>,
 Michael Heerdegen <michael_heerdegen@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>, Adam Porter <adam@HIDDEN>,
 Andrea Corallo <acorallo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello,

On Mon 17 Feb 2025 at 06:54pm GMT, Stefan Kangas wrote:

> Testing like this:
>
> (setf (buffer-name) "test")
> (setf (buffer-string) "foo")
> (setf (buffer-substring 0 3) "hello")
> (setf (current-buffer) "somebuffer")
> (setf (frame-height) 20)
>
> I get these warnings:
>
>  Warning: =E2=80=98buffer-name=E2=80=99 is an obsolete generalized variab=
le; use
>     =E2=80=98rename-buffer=E2=80=99 instead.
>  Warning: =E2=80=98buffer-string=E2=80=99 is an obsolete generalized vari=
able.
>  Warning: =E2=80=98current-buffer=E2=80=99 is an obsolete generalized var=
iable; use
>     =E2=80=98set-buffer=E2=80=99 instead.
>  Warning: =E2=80=98frame-height=E2=80=99 is an obsolete generalized varia=
ble; use
>     =E2=80=98set-frame-height=E2=80=99 instead.
>  Warning: =E2=80=98buffer-substring=E2=80=99 is an obsolete generalized v=
ariable.
>
> So only `buffer-string' and `buffer-substring' seem to lack alternative
> functions that could be used instead.

I would propose that we should keep anything where there isn't a simple
set-* function to take its place.
So at least buffer-string and buffer-substring, and possibly more.

(I'm a bit biased here as I never understood deprecating any of these.)

--=20
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 17 Feb 2025 18:54:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 17 13:54:43 2025
Received: from localhost ([127.0.0.1]:49141 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tk6GQ-00061D-Ty
	for submit <at> debbugs.gnu.org; Mon, 17 Feb 2025 13:54:43 -0500
Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:52560)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>)
 id 1tk6GM-00060P-JE
 for 71370 <at> debbugs.gnu.org; Mon, 17 Feb 2025 13:54:40 -0500
Received: by mail-ed1-x529.google.com with SMTP id
 4fb4d7f45d1cf-5ded6c31344so5386776a12.1
 for <71370 <at> debbugs.gnu.org>; Mon, 17 Feb 2025 10:54:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1739818472; x=1740423272; darn=debbugs.gnu.org;
 h=content-transfer-encoding:cc:to:subject:message-id:date
 :mime-version:references:in-reply-to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=i4VeLUZqKUK6wqpAbTS/o0cdIXgAosBP4IeqxB2jg1M=;
 b=PKCNmu5Dw/UaM/WER5CrA/bBwxkjI58MB6ygDNGEPqndF/TXFY2x3NvOhhKLoGZwWG
 OKYUSLdnLYwNtQTv0o2f2zpOXbCGmFZxfs4BSHi2FWBVgh4kun6gjLaoSU3CSvxbfBRr
 /sUqn9vAZcq+YFYyavJvENX1bye/dksmW9JMDZePLkNorCbhv60GC8gdlCK4+SdbRSag
 X6FWIaxUVUwD05ksT7hubqJncXOb1FyVM23e1Y3XQoifdp2bd+NEYKIEMzpzRREPt1Xq
 osJnVtVP3yrIjaY8G5MDVwWKMM6OskydpXnDtXrDG4AwZ3VpzboHH0l0nXszZsgm0m9w
 Mjag==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1739818472; x=1740423272;
 h=content-transfer-encoding:cc:to:subject:message-id:date
 :mime-version:references:in-reply-to:from:x-gm-message-state:from:to
 :cc:subject:date:message-id:reply-to;
 bh=i4VeLUZqKUK6wqpAbTS/o0cdIXgAosBP4IeqxB2jg1M=;
 b=dCpnQg1IXQB9EQKLHqr5AEaV8UFhEk/Rm4Zg2ajprIOmRnvnc9zSYCWxVrbf5Qt9L4
 zfI3xchU2AAUHCFnAHCXUHj4Sn1tLbrsYpN0Qb74jAn3kPdRQi31pNIHPYci0sO6bUXQ
 BOOpdz0YdYARI8qHhaRdQGOrHIU9yWvD/cqpP1kBZmVx3c7USOSsSjHHy3KhRiu9zJSe
 h5eQTNd85Fj/N2dZfcwR/QKQmar4pnmdUrqnMLqS41vzEHETJ0PsQxaU3o11eVx1Cfdw
 8inzQUzuQ00yWReghDpj7+kC3nQwmoPGN957IMT7QSIWriraqnqK9HIhyCj8JseDsbI9
 6IfA==
X-Forwarded-Encrypted: i=1;
 AJvYcCUgT4FfzL3y2lpR6OzG3wEGl5xxu5NFgjszWq8uWiINiK80modpYfLMBU7nLGx5YCuRjF/xKw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YwTMUww1DVjV4DvxqwZZ05uFxiLg3yKRTmMKqgtlujLoxBtERvt
 0uj0kuSOy4k+VtUPWqPRH4krecWbM5cFrMqpFwO7+JwtrBGloOQsPE4xycIOxXy2VX1metiZttN
 GrZy5MzIj0WIxMHK9uXsBy6BDxr4=
X-Gm-Gg: ASbGncuLoAuE0cZqZE337gKn1cukDHPGM0/jwUNSNx+ApM9vJPiPzkXJWM05A2Qn00Q
 1ju8o+lQFvpmhIS2DUyiimcnpSj/b72L/XUJiqRxt7eZ6g6o5XCU36RP8pKUEJyxGCo3spzc=
X-Google-Smtp-Source: AGHT+IFZs3QW0tIA5QxbpvOl6l7dtUT6DWf02wWsiu9wGa0ABhRRkHac4sLv8gLnzlspcoR18h1vlDnU9NRahamuhEM=
X-Received: by 2002:a05:6402:3547:b0:5dc:cf9b:b04a with SMTP id
 4fb4d7f45d1cf-5e035ff9d49mr23364394a12.1.1739818472202; Mon, 17 Feb 2025
 10:54:32 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Mon, 17 Feb 2025 18:54:30 +0000
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <yp1r0cqekut.fsf@HIDDEN>
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN> <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
 <yp1r0cqekut.fsf@HIDDEN>
MIME-Version: 1.0
Date: Mon, 17 Feb 2025 18:54:30 +0000
X-Gm-Features: AWEUYZnjHkcl7W0MBhs2Q4chB4M-myZuqX8zzkfAUh2fSGc5K0hkhxGVRVWBOJI
Message-ID: <CADwFkmmsqUBVgs2auDkB2mWNakuLNK465m8EKOceWd_B5JKyLw@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
To: Andrea Corallo <acorallo@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71370
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>,
 Adam Porter <adam@HIDDEN>, Ihor Radchenko <yantar92@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>, 71370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Andrea Corallo <acorallo@HIDDEN> writes:

> Ihor Radchenko <yantar92@HIDDEN> writes:
>
>> Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
>> of text editors" <bug-gnu-emacs@HIDDEN> writes:
>>
>>> Any arguments why this gv is different from the others that had been
>>> deprecated?
>>
>> It is one of the commonly used gvs.
>> https://github.com/search?q=3D%22%28setf+%28buffer-substring%22&type=3Dc=
ode
>> gives 500+ hits (and it is not all forks of one or two popular packages)
>
> Interesting, I took the time to apply your methodology to all GV
> obsoleted by the same commit and this is the result:
>
> | GV                           | file occurrences |
> |                              |        in github |
> |------------------------------+------------------|
> | buffer-file-name             |                5 |
> | buffer-modified-p            |                7 |
> | buffer-name                  |               48 |
> | buffer-string                |              142 |
> | buffer-substring             |              512 |
> | current-buffer               |              234 |
> | current-column               |                3 |
> | current-global-map           |                0 |
> | current-input-mode           |                0 |
> | current-local-map            |                0 |
> | current-window-configuration |                0 |
> | default-file-modes           |                0 |
> | current-window-configuration |                0 |
> | default-file-modes           |                0 |
> | documentation-property       |                8 |
> | frame-height                 |               38 |
> | frame-visible-p              |                0 |
> | global-key-binding           |                3 |
> | local-key-binding            |                0 |
> | mark                         |                4 |
> | mark-marker                  |                0 |
> | marker-position              |               16 |
> | mouse-position               |                7 |
> | point                        |               32 |
> | point-marker                 |                0 |
> | point-max                    |                0 |
> | point-min                    |               40 |
> | read-mouse-position          |                0 |
> | screen-height                |                4 |
> | screen-width                 |               15 |
> | selected-window              |                4 |
> | selected-screen              |                0 |
> | selected-frame               |                0 |
> | standard-case-table          |                0 |
> | syntax-table                 |                0 |
> | visited-file-modtime         |                0 |
> | window-height                |               13 |
> | window-width                 |                9 |
> | x-get-secondary-selection    |                0 |
>
> While some of them are rarely/not used some others looks quite popular.
> This is an indication that the popular ones are probably a good
> abstraction or they are just convenient.
>
> I don't know what would be the risk of un-obsoleting the popular ones
> now, but if is not possible I think we should consider doing it for the
> next release cycle.

Can we make a decision about this now?

The most popular ones seem to be these:

> | buffer-name                  |               48 |
> | buffer-string                |              142 |
> | buffer-substring             |              512 |
> | current-buffer               |              234 |
> | frame-height                 |               38 |

Testing like this:

(setf (buffer-name) "test")
(setf (buffer-string) "foo")
(setf (buffer-substring 0 3) "hello")
(setf (current-buffer) "somebuffer")
(setf (frame-height) 20)

I get these warnings:

 Warning: =E2=80=98buffer-name=E2=80=99 is an obsolete generalized variable=
; use
    =E2=80=98rename-buffer=E2=80=99 instead.
 Warning: =E2=80=98buffer-string=E2=80=99 is an obsolete generalized variab=
le.
 Warning: =E2=80=98current-buffer=E2=80=99 is an obsolete generalized varia=
ble; use
    =E2=80=98set-buffer=E2=80=99 instead.
 Warning: =E2=80=98frame-height=E2=80=99 is an obsolete generalized variabl=
e; use
    =E2=80=98set-frame-height=E2=80=99 instead.
 Warning: =E2=80=98buffer-substring=E2=80=99 is an obsolete generalized var=
iable.

So only `buffer-string' and `buffer-substring' seem to lack alternative
functions that could be used instead.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 27 Jun 2024 15:09:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 27 11:09:53 2024
Received: from localhost ([127.0.0.1]:43138 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sMqkz-0001Pw-GQ
	for submit <at> debbugs.gnu.org; Thu, 27 Jun 2024 11:09:53 -0400
Received: from toucan.tulip.relay.mailchannels.net ([23.83.218.254]:43867)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <adam@HIDDEN>) id 1sMqks-0001Pi-Qb
 for 71370 <at> debbugs.gnu.org; Thu, 27 Jun 2024 11:09:51 -0400
X-Sender-Id: dreamhost|x-authsender|adam@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id AA08254336B;
 Thu, 27 Jun 2024 15:09:41 +0000 (UTC)
Received: from pdx1-sub0-mail-a271.dreamhost.com (unknown [127.0.0.6])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 0CCBA542514;
 Thu, 27 Jun 2024 15:09:41 +0000 (UTC)
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1719500981; a=rsa-sha256;
 cv=none;
 b=cm9tYFRHtrcOEm6fKUM8KrnM3kI7w7naA680AgFf68t9obWVeu4oZU4BM4fpituvS5fEBm
 2rKI5g7JFTTVNkLIBTGPEukWsH5gM07wzX4KYb0K4iyulTa0MSdVQbca5y8SEqZ1YSzVTg
 fQAqBA4p4vP0Zx6XRDWrhsEPgEZpTUG5uLuBH6A2wuOkIXD5J5j9rA46dj4eTfDaWP+zin
 /ZzAmJCo/nPOt8Pn/wKN+zGDwmIIHUDh1n7gyvT11FHPV55zjCJlaWatK9pqqcie1mtx12
 I0eOpKwdoaiH2b+BSZ9SzltprcgktEA86EHvTeYLJgFm3HohYDbwiUVShwUU7w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
 d=mailchannels.net; s=arc-2022; t=1719500981;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references:dkim-signature;
 bh=LVjAIRRGCJL7Nm5YxnMmsGxnGHyjssUNLy8nouQsYs4=;
 b=NGYd3AmLaf+IAaHHJQECQ3Lq1HDhJueOzLlp3HfKjsjz6qY7dhQaUR48sE+BBWEwYtdO55
 IcDATa6gHqK7p+ZeJZK2LGPp9eGlvtZVBHIIAxbzyO2NXPrAqyFyEP0quOQS6MVu0FzBXW
 oL0fX6+upRmyuYv2ieGTVPZT/Z0N4eHTtQ1qKskAa4isaAjCkWBN6zjDV6XewtmMyNpr2/
 y0MVdE6SHTo8YWhtUDOZ5u8BRG79HK+/KO5v2arQRb2wxbRIyYyPZBFCTsp8JrP+hYTWer
 8d85tqpBLixNa8mbFpptsb9AeVWUV+PJkpoGSb+CRczEJ06hHEqvloo4BaKyLg==
ARC-Authentication-Results: i=1; rspamd-7f76976655-5njl7;
 auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@HIDDEN
X-Sender-Id: dreamhost|x-authsender|adam@HIDDEN
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|adam@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Tangy-Scare: 7eee486a2dd12d02_1719500981559_4173330759
X-MC-Loop-Signature: 1719500981559:2725552216
X-MC-Ingress-Time: 1719500981558
Received: from pdx1-sub0-mail-a271.dreamhost.com (pop.dreamhost.com
 [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384)
 by 100.107.55.209 (trex/6.9.2); Thu, 27 Jun 2024 15:09:41 +0000
Received: from [10.66.43.177] (unknown [91.193.232.98])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 (Authenticated sender: adam@HIDDEN)
 by pdx1-sub0-mail-a271.dreamhost.com (Postfix) with ESMTPSA id 4W926X4CGgz2T; 
 Thu, 27 Jun 2024 08:09:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net;
 s=dreamhost; t=1719500980;
 bh=LVjAIRRGCJL7Nm5YxnMmsGxnGHyjssUNLy8nouQsYs4=;
 h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding;
 b=g9S642eXBmtli/m+ERvtzJ+kx3iC8YBdNrMf/Y35+i5o94O2tw8nKC9w487SlC3UX
 kTqTqmiopbgjouWEkCFgYeGi32nWB0ZOgf3NfU563JtL3BJprh0RMyJLlmguS4Dib4
 5+ZsbWER1B4fOvB9OBBmrzW85CTBSJXY/5o5UKTR8vhR0Mn9DsRWuVIRmTV4XkmdH2
 L0L9fR0aooBHshLi0a5Thddaj5HRGZ/qM1vIeUPbLwWgFIfx4xJ56/PugUCD6R2dFN
 KvXFs+3il0J4U1h6yfCbWvSbcHJ/yQAZFW/wizr5odzpVOHqGQiQEGpi35gWGEPy4H
 sukjPRCrVyqiA==
Message-ID: <1ea7303f-5e8f-4ff6-ab1a-5a97412c291b@HIDDEN>
Date: Thu, 27 Jun 2024 10:09:39 -0500
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
Content-Language: en-US
From: Adam Porter <adam@HIDDEN>
In-Reply-To: <87iky4zedz.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

Hi Michael,

On 6/19/24 18:44, Michael Heerdegen wrote:
> Adam Porter <adam@HIDDEN> writes:
> 
>> ┌────
>> │ (let ((inhibit-read-only t))
>> │   (setf (buffer-substring (oref (magit-current-section) start)
>> │                           (oref (magit-current-section) end))
>> │         "foobar\n"))
>> └────
>>
>> Otherwise, one would have to use `delete-region' and then `insert',
>> which is more cumbersome and error-prone.
> 
> I guess alternatively you could define a helper function and make that
> `setf'able, like
> 
> #+begin_src emacs-lisp
> (defalias 'magit-buffer-substring #'buffer-substring)
> (gv-define-simple-setter magit-buffer-substring
>                           cl--set-buffer-substring)
> #+end_src

One could, but it would seem tedious and wasteful to have do that across 
tens or hundreds of Elisp packages that use this setter and have for years.

The minor ambiguities you point out in one of your later messages are 
fair to note; however, they aren't new, and they don't appear to have 
discouraged use of this form in practice.  On the contrary, the form 
appears to be widely useful and understood easily enough.

Given that Emacs is full of idiosyncrasies which are much more impactful 
and challenging to understand, I'd think that it would be sufficient to 
document this one in the Elisp manual, like others are.  I'd certainly 
rather do that than deprive users of this useful, simple idiom which is 
already widely used.

--Adam




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 22 Jun 2024 09:45:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 22 05:45:21 2024
Received: from localhost ([127.0.0.1]:44474 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sKxJB-0001no-19
	for submit <at> debbugs.gnu.org; Sat, 22 Jun 2024 05:45:21 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40314)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sKxJ8-0001nY-Ht
 for 71370 <at> debbugs.gnu.org; Sat, 22 Jun 2024 05:45:20 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sKxJ2-0001ED-D0; Sat, 22 Jun 2024 05:45:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=BZblaYfMhcHi1DcmxQkolcn7IWSsrv6rrbeJ1ZomSpg=; b=Bsd55+/QkYEl
 7mPZm/FXsC38G3tK1ws1IULmHEest5C/SZ3IH23B8aGBy6G/TyvfwkxWSNbZnryNELlRE/thjnnLd
 G56ttebdemPqJx+a0SzqehWK9Ko+NYFSuusrHTG9hxS0tY8SM09TesfwjHSoPqVs/6kaqgPhKtXFC
 xQwR9cAPWmSF62vtLj+Py/Uoqa/LTz0bNlq0ypG9Jj2u7zLzAH0D8zNHhWIUHbtXZhFe5Y0OlwG9D
 xOtD4453i3Zg17ii7j8B57j3ptTIclvEj66W0PP/gx4yKiACKoWzfwhkah4xp1+PHqDw+Y2vGMGTu
 iRjK8hDCgSu6lSKz4ZQxWw==;
Date: Sat, 22 Jun 2024 12:45:03 +0300
Message-Id: <86a5jdia5c.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
In-Reply-To: <87cyo9id71.fsf@localhost> (message from Ihor Radchenko on Sat,
 22 Jun 2024 08:39:14 +0000)
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
 <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
 <yp1r0cqekut.fsf@HIDDEN> <87ed8pnc1w.fsf@HIDDEN>
 <874j9lo6ll.fsf@localhost> <86zfrdie9a.fsf@HIDDEN> <87cyo9id71.fsf@localhost>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71370
Cc: michael_heerdegen@HIDDEN, adam@HIDDEN, acorallo@HIDDEN,
 71370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ihor Radchenko <yantar92@HIDDEN>
> Cc: michael_heerdegen@HIDDEN, adam@HIDDEN, 71370 <at> debbugs.gnu.org,
>  acorallo@HIDDEN
> Date: Sat, 22 Jun 2024 08:39:14 +0000
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> >> Do note that the original reason of obsoletion was different:
> > ...
> > Commit log messages are not a legal document, so treating them as if
> > they were the truth, the whole truth, and nothing but the truth is not
> > TRT.
> 
> I am not saying that commit message is the full truth.
> But I did not find any other relevant discussion about
> `buffer-substring' on the mailing list. (And commit message did not
> contain any reference to such discussion)
> 
> So, I simply used information that was available to me to check
> Michaels' claim.
> 
> If you have a link to the discussion leading to obsolete of
> `buffer-substring', feel free to share it.

I respectfully suggest to consider this discussion as relevant
evidence.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 22 Jun 2024 08:37:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 22 04:37:42 2024
Received: from localhost ([127.0.0.1]:44321 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sKwFi-0008PW-3z
	for submit <at> debbugs.gnu.org; Sat, 22 Jun 2024 04:37:42 -0400
Received: from mout02.posteo.de ([185.67.36.66]:34157)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yantar92@HIDDEN>) id 1sKwFf-0008PI-JW
 for 71370 <at> debbugs.gnu.org; Sat, 22 Jun 2024 04:37:40 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id A9D0D240103
 for <71370 <at> debbugs.gnu.org>; Sat, 22 Jun 2024 10:37:33 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1719045453; bh=sRfvTXaqC3E4iYw0/MQtSE5/+Pkvz9vpZ0Dwbs7Mbis=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=dJxaIsYJdRmT9nIAJUC53+XYC5nIbg0lLjUxK7Gjt7NXrHMP1DH2Al5ZB3o/RQRgr
 TLacsi2n9/BmZw5+ZfFc+MEVhZK41saFnA2bvokeIGd0DFEf0tGwhNDmQy9FNWs/0U
 BYcKHMuYN4wCtkl+Pt1eE65Ekvyyw0Mypnus4703CyOadngK213Jb/oTGyr/7mT8BT
 5NFWQ+NfxTxbLAo42nA3FH1/Doc6e1P3qBm7/9TF5baJbZiTkIb9kk9h6HrzWu+69G
 pRuj7T+Ccd05fjSDdj+dxKM1VHN2XmJS5JlJ6GVeGvgNTKlfKDFaMJCEJ55eS7z1Fl
 wmJHN2SmO/K3Q==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4W5nfM1fBwz9rxN;
 Sat, 22 Jun 2024 10:37:31 +0200 (CEST)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
In-Reply-To: <86zfrdie9a.fsf@HIDDEN>
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
 <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
 <yp1r0cqekut.fsf@HIDDEN> <87ed8pnc1w.fsf@HIDDEN>
 <874j9lo6ll.fsf@localhost> <86zfrdie9a.fsf@HIDDEN>
Date: Sat, 22 Jun 2024 08:39:14 +0000
Message-ID: <87cyo9id71.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71370
Cc: michael_heerdegen@HIDDEN, adam@HIDDEN, acorallo@HIDDEN,
 71370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> Do note that the original reason of obsoletion was different:
> ...
> Commit log messages are not a legal document, so treating them as if
> they were the truth, the whole truth, and nothing but the truth is not
> TRT.

I am not saying that commit message is the full truth.
But I did not find any other relevant discussion about
`buffer-substring' on the mailing list. (And commit message did not
contain any reference to such discussion)

So, I simply used information that was available to me to check
Michaels' claim.

If you have a link to the discussion leading to obsolete of
`buffer-substring', feel free to share it.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 22 Jun 2024 08:16:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 22 04:16:34 2024
Received: from localhost ([127.0.0.1]:44225 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sKvvG-0007n5-0g
	for submit <at> debbugs.gnu.org; Sat, 22 Jun 2024 04:16:34 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53100)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sKvvC-0007mi-46
 for 71370 <at> debbugs.gnu.org; Sat, 22 Jun 2024 04:16:31 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sKvv4-0000XH-2Y; Sat, 22 Jun 2024 04:16:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=jPbKG9uw8grRUhLSXkWRk5WichMCmq69jNtDCzED8Rs=; b=PzlTNwpbjxk4
 MB5V8kF86KAhI8XofTxMws1tEkRUI9EVrH28OnvIYAeHGwGbvYQHa5kh+818t7oyvj5OPRA/sj67W
 L3uGqHCuWbLTiQH6hTC4hr9QdvioU/Dg2GctYrVSdyL/dNCv6XgsICHBFgHxIAXwzjY8f4iIy7zK1
 +YCtCr23daKzqAkKuWAj2LIuQ//EQ09uePOPdYG2OValDlkBWWzRQFg6SU7TDhFIEqKNSLsrTd6vz
 iVTeryowsYv9HESD30LXZ7iQG+9qox6d2IYgYmnbjN2OGeeXKuwWYZHI05a3skr07ByLPwuuHveN2
 HGRAej/zKDkpSmq2s8+AyA==;
Date: Sat, 22 Jun 2024 11:16:17 +0300
Message-Id: <86zfrdie9a.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
In-Reply-To: <874j9lo6ll.fsf@localhost> (message from Ihor Radchenko on Sat,
 22 Jun 2024 06:05:10 +0000)
Subject: Re: bug#71370: 30.0.50;
 Please un-obsolete buffer-substring as a generalized variable
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
 <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
 <yp1r0cqekut.fsf@HIDDEN> <87ed8pnc1w.fsf@HIDDEN>
 <874j9lo6ll.fsf@localhost>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71370
Cc: michael_heerdegen@HIDDEN, adam@HIDDEN, acorallo@HIDDEN,
 71370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: Adam Porter <adam@HIDDEN>, 71370 <at> debbugs.gnu.org,
>  Andrea Corallo <acorallo@HIDDEN>
> From: Ihor Radchenko <yantar92@HIDDEN>
> Date: Sat, 22 Jun 2024 06:05:10 +0000
> 
> Michael Heerdegen <michael_heerdegen@HIDDEN> writes:
> 
> > These were exactly the kind of problems why those place expressions had
> > been obsoleted.
> 
> Do note that the original reason of obsoletion was different:

Commit log messages are not a legal document, so treating them as if
they were the truth, the whole truth, and nothing but the truth is not
TRT.  (I'm guessing that Org commit log messages don't necessarily
tell the whole story behind the changes, either, at least not in all
cases.)

While having some reason in the commit log message can be used as
evidence that its author had that in mind, the absence of a reason can
NOT and should not be used as evidence that it was NOT in the author's
mind.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 22 Jun 2024 07:14:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 22 03:14:08 2024
Received: from localhost ([127.0.0.1]:44203 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sKuwq-0005vC-Hp
	for submit <at> debbugs.gnu.org; Sat, 22 Jun 2024 03:14:08 -0400
Received: from eggs.gnu.org ([209.51.188.92]:36942)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sKuwl-0005uX-2s
 for 71370 <at> debbugs.gnu.org; Sat, 22 Jun 2024 03:14:06 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sKuwf-0007WF-5R; Sat, 22 Jun 2024 03:13:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=2fiquuc+pRAxn6RMopiPZ29C2tg/vuuCObIaZ3Yylwg=; b=C5hVahThPomx
 Ayq/sAgM/0W4aaB38vTaM/JocINvASLR0sKJXAvmq2NjgNdAybayOH2CUTkFB/vMcIQ8Bec39xwM5
 5gG8m/p/ekTm3Kkmq0PYVeRi52tKd7o/wt3fB7MuM1opc0JSXwdNhV6hxSoDOLz8+bNl4reFjkodb
 PROSaUfni3rXA1Ltczm3QuGa6Fcz+KKUi6i808izZxtkQN5UXy9PbPpMv0vF5XOqwPmtoB/1FjDlr
 xunpeyQYK8BX0iZ8SfASz62xfj3FQswDpREbRy5TPpO71YEAC0QDGg9Gr1SJLAc2hJSH8V+dztNXQ
 E5s7QH8qwrhQ3UKI4OYeKA==;
Date: Sat, 22 Jun 2024 10:13:52 +0300
Message-Id: <867cehjvpr.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
In-Reply-To: <87ed8pnc1w.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#71370: 30.0.50;
 Please un-obsolete buffer-substring as a generalized variable
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
 <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
 <yp1r0cqekut.fsf@HIDDEN> <87ed8pnc1w.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71370
Cc: adam@HIDDEN, 71370 <at> debbugs.gnu.org, yantar92@HIDDEN,
 acorallo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: Adam Porter <adam@HIDDEN>, 71370 <at> debbugs.gnu.org,
>  Ihor Radchenko <yantar92@HIDDEN>
> Date: Sat, 22 Jun 2024 00:52:43 +0200
> From:  Michael Heerdegen via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> These were exactly the kind of problems why those place expressions had
> been obsoleted.  Adding a little helper function with clear semantics
> really looks more appropriate in this case in my opinion, even if you
> have to remember one more name.

Agreed.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 22 Jun 2024 06:03:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 22 02:03:43 2024
Received: from localhost ([127.0.0.1]:44144 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sKtqg-0004HA-I7
	for submit <at> debbugs.gnu.org; Sat, 22 Jun 2024 02:03:42 -0400
Received: from mout01.posteo.de ([185.67.36.65]:56945)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yantar92@HIDDEN>) id 1sKtqc-0004Gu-Lc
 for 71370 <at> debbugs.gnu.org; Sat, 22 Jun 2024 02:03:40 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id D78F1240027
 for <71370 <at> debbugs.gnu.org>; Sat, 22 Jun 2024 08:03:32 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1719036212; bh=KWbPVO93nCe59KKFbTWzGab/VpLURc0DYvLHSv3jyu0=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=Or2D2ILJMcptvOG2T1eyBDThA9vnj3DHHifBnecAHmQ8RIiHz8oZicJThqGFoOJXC
 yVN9t9uekhmTOrcnufwDBwtwHOQQyz81PWQBKQOo/FH1nLo/h/PpJzGn8zZoHg1Z93
 naYrUWjzBd+hae15OTg7J7UcZV8aJw1jvCxE0KtJC7uCDRggf4mc0XUvrpuLt3vaMH
 mwlPFo1RcsXb2ENPQSUg1VUerblcMZWoDhc8RE4E6ulytsDm42yX2x0NtqC+riqvYW
 nBUARS5wPSRfIYAipySsOMzBq03pnzoM3/TunHFhOfxg1EBlb6G09qijCRTIcrtS+P
 QXqEG2njW0BJQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4W5kDg31zHz9rxF;
 Sat, 22 Jun 2024 08:03:31 +0200 (CEST)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
In-Reply-To: <87ed8pnc1w.fsf@HIDDEN>
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
 <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
 <yp1r0cqekut.fsf@HIDDEN> <87ed8pnc1w.fsf@HIDDEN>
Date: Sat, 22 Jun 2024 06:05:10 +0000
Message-ID: <874j9lo6ll.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71370
Cc: Adam Porter <adam@HIDDEN>, 71370 <at> debbugs.gnu.org,
 Andrea Corallo <acorallo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

>> While some of them are rarely/not used some others looks quite popular.
>> This is an indication that the popular ones are probably a good
>> abstraction or they are just convenient.
>
> More of the latter I would say.  Nonetheless that's one aspect that
> counts.
>
> But especially `buffer-substring' doesn't convince me as a gv because
> semantics are very doubtful:
> ...

> These were exactly the kind of problems why those place expressions had
> been obsoleted.

Do note that the original reason of obsoletion was different:

   48aacbf292fbe8d4be7761f83bf87de93497df27
    Make many seldom-used generalized variables obsolete
    
    The vast majority of these are unused in-tree, and many of them
    perform actions that aren't obvious when reading the code.

No arguments have been listed about "actions that aren't obvious" wrt
`buffer-substring' generalized variable. And, as we see, "unused" is
only true for Emacs sources, but not for third-party libs.

> - You say (setf (buffer-substring START END) STRING).  The first thing
>   that is not crystal clear is the question whether STRING will be
>   added, or will replace, existing text.
>
> - The END argument is either redundant, or, if text is replaced (which
>   is what the current implementation does), it is unclear what happens
>   if STRING has a length different from (- END START).  The current
>   implementation doesn't even fulfill the most _basic_ assumption about
>   places: if STRING has a different length, after
>   (setf (buffer-substring START END) STRING),
>   (buffer-substring START END) will _not_ be equal to STRING.  This is
>   very bad, conceptually.
>
> - For this reason resetting the place to the old "value" will not
>   always restore the old situation.
>
> - With `cl-letf' the generalized variable gets even more doubtful: if
>   you edit the buffer contents inside the scope of the binding,
>   reverting a `buffer-substring' gv binding will give surprising
>   results, especially if START and END were specified as integers then
>   pointing to unrelated positions.

FYI, I never had this kind of confusion. It is perfectly expected for
_buffers_ that any kind of modification may render point positions
inaccurate. If one needs to track specific region even when
modifications are performed, this is what markers are for. And markers
do work when used as arguments for buffer-substring.

> ...  Adding a little helper function with clear semantics
> really looks more appropriate in this case in my opinion, even if you
> have to remember one more name.

Maybe. But I would argue that `buffer-substring' is already _the most
popular_ among obsoleted generized variables. Clearly, people do find it
useful; and, clearly, obsoleting it forces many library authors to do
extra work that is not justified.

I would be ok with adding a helper _in addition_ to generalized
variable, but I do not see it justified to make it replace it (at least,
not until we see that the added new helper is vastly more popular)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 21 Jun 2024 22:52:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 21 18:52:08 2024
Received: from localhost ([127.0.0.1]:43992 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sKn72-0007xJ-2J
	for submit <at> debbugs.gnu.org; Fri, 21 Jun 2024 18:52:08 -0400
Received: from mout.web.de ([217.72.192.78]:42025)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1sKn6z-0007wg-NA
 for 71370 <at> debbugs.gnu.org; Fri, 21 Jun 2024 18:52:07 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1719010313; x=1719615113;
 i=michael_heerdegen@HIDDEN;
 bh=91Z6g7kDcMGJ46CjBQuwhUdK14dVpa5sKPUMfk7XLMw=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=qm/y7TdQ6K2WOd+zDCWbMpfNBjD27Pcim/nxal+b4lhntBpAfYy/sJjxyW8cmPu3
 fM6mNRaPVJb8ehEnVPTeLH9UtWpSkvwRnelMO54igldufHIYDD26FYhmWsGWD0SFl
 tf0uLLG3ZlDUbtvmkN3QO9s7Abup7QZKWIFOFP71v+CWNcEFGVxYzLMxHWiKyz4/q
 GnTj/NhjJ8nQwVbi616hL1DXYb91Aa1nfv5/Y5fOh+TJgf/hxhGxh8MCn9vvWBWm8
 qG8UKOJGZj15mWB6Z5STaJcviKPd0atqYgDws8Wkg1My0jjZq3QZUypktFJFih84B
 /XxbINYELBSNnkuVrQ==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.59.210.113]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MhFhg-1spCFW3YwM-00kkyJ; Sat, 22
 Jun 2024 00:51:52 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Andrea Corallo <acorallo@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
In-Reply-To: <yp1r0cqekut.fsf@HIDDEN> (Andrea Corallo's message of
 "Fri, 21 Jun 2024 04:55:06 -0400")
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
 <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
 <yp1r0cqekut.fsf@HIDDEN>
Date: Sat, 22 Jun 2024 00:52:43 +0200
Message-ID: <87ed8pnc1w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:k23SwkFLpL1dnAukO+umejk/PN6NfbvgbuwqJBc4+I2eWY9du5M
 Kir0ct+zn5k4HuJDrytjjGqphaHvZTf9K9AWZJhjbynJypYnbWB7lTkiX2vwpjsB87H+biQ
 AaRVtBzVen9T4rAkFiYX7ueqc0jx1PAcGArhf7fUoDT4drmV0vmCgsbaeorWDu9WZw4t4CZ
 PAu/6KblaNMdZKhkz9U2w==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:lIYAjzAHE5E=;dei91eqLXxvO7OGabx/69Ftac3z
 WZ+eZvzckTxVZ21lUs5QUSu0lDPOI5+gxELHS83efgDbGftIGCTMZKXcbJh+/V466oP8Je5Eg
 DKNlEA2FMSu6ulFrdghLX5EuOOYLEYUaXvkKcmS9RzxtOfYuF+6S94zr70toHRO3tfeQFtOxt
 9JtaHsAn8v7I6Czj5oWKVxH3VHzNgdoWeGv0Q2m5HwuIoEdmAlE5whPiB0QwiIhpgEN5qO+3a
 EnWk0wvgf4WrzzYQqNjk/zDk+0FWu6msLRcy6YY5H4LcJ2SUzsm+gE1J+gNBISx4Uhp/BmRBo
 hJJwyzZz9yL+bmTKpNND40vlHl6Kpz7fdSH5CTTUhheCwvR2iIrqjg8e6HFXijARNO4xPx1Tc
 ZvgDWzX9hMkyhUfqN2cLar+N8yl0Zwd+vPr/9lScbmVnVaHdIVWp4bSGj1alA/Xdhbj+NCEWj
 25dOS06us/TQkw4ASLDqalYxPN0DT3VH2H5zgMdY2oCBpDkKkDTC6IRP9zBrQwc7nJ8meWTf0
 uUTIkNtPwORqTP9IzpOVk1I8t9Pw/HxJUKm3gpg+UIRJwNVHW9euV/69CApyAnc4PkKJj1WSM
 uW10zA7K4vgidMNUOJnzFYkSoXgB8pBulVnhN8YlCZKdbVF0v0rPnDkI4z/jCNx8MFWbRhlk5
 jKSJ26HL4yYZbSIhCXN/nFsHQ33KNk7A7IZYHexr8hBrTVvFQM8XRTa4e9e3PxcDlHiTV7eK3
 12cEUC/BvO2QKBQES3KIklHEHQMkAWXYaMsOfrEZxGqUdVTyKH5VWd/OqUdErdBQxisoKIdSe
 EvCWm3fI7vFmdPlIqy0w9nAJ+VBEWbWcoEgthdvxLcmkQ=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71370
Cc: Adam Porter <adam@HIDDEN>, 71370 <at> debbugs.gnu.org,
 Ihor Radchenko <yantar92@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Andrea Corallo <acorallo@HIDDEN> writes:

> [...]
> Interesting, I took the time to apply your methodology to all GV
> obsoleted by the same commit and this is the result:
>
> | GV                           | file occurrences |
> |                              |        in github |
> |------------------------------+------------------|
>   [... I picked the lines with 100+ matches ...]
> | buffer-string                |              142 |
> | buffer-substring             |              512 |
> | current-buffer               |              234 |
> [...]

> While some of them are rarely/not used some others looks quite popular.
> This is an indication that the popular ones are probably a good
> abstraction or they are just convenient.

More of the latter I would say.  Nonetheless that's one aspect that
counts.

But especially `buffer-substring' doesn't convince me as a gv because
semantics are very doubtful:

- You say (setf (buffer-substring START END) STRING).  The first thing
  that is not crystal clear is the question whether STRING will be
  added, or will replace, existing text.

- The END argument is either redundant, or, if text is replaced (which
  is what the current implementation does), it is unclear what happens
  if STRING has a length different from (- END START).  The current
  implementation doesn't even fulfill the most _basic_ assumption about
  places: if STRING has a different length, after
  (setf (buffer-substring START END) STRING),
  (buffer-substring START END) will _not_ be equal to STRING.  This is
  very bad, conceptually.

- For this reason resetting the place to the old "value" will not
  always restore the old situation.

- With `cl-letf' the generalized variable gets even more doubtful: if
  you edit the buffer contents inside the scope of the binding,
  reverting a `buffer-substring' gv binding will give surprising
  results, especially if START and END were specified as integers then
  pointing to unrelated positions.

These were exactly the kind of problems why those place expressions had
been obsoleted.  Adding a little helper function with clear semantics
really looks more appropriate in this case in my opinion, even if you
have to remember one more name.


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 21 Jun 2024 08:55:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 21 04:55:21 2024
Received: from localhost ([127.0.0.1]:56848 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sKa3F-0006UF-FR
	for submit <at> debbugs.gnu.org; Fri, 21 Jun 2024 04:55:21 -0400
Received: from eggs.gnu.org ([209.51.188.92]:36538)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acorallo@HIDDEN>) id 1sKa3C-0006U1-1Y
 for 71370 <at> debbugs.gnu.org; Fri, 21 Jun 2024 04:55:19 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <acorallo@HIDDEN>)
 id 1sKa31-0000go-6K; Fri, 21 Jun 2024 04:55:07 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=fjCfTHgqUclTzBGS0c2m9B3+CGGwbStmdK9Isbf/0/c=; b=r5vPk17Di0zj4smmQKzE
 J3+lROP9mlROpdt3jlm/7wKorbESB1r9g3OY/ap9eZbleUmYo4VeKZ3zUlsJQTYuuN7L84Ajkxu7p
 6cIRnhZI97UUnvY3UqQz0ShnhfRCKG1apK99cYMHnyVDsZGTdOihABL4SBMIWmChJS4Gv/6BOEShN
 JkKGKZ0SeMQPAc/+fObsOi01eMF0b2nQwPdvVtd63IOAqnMHpDRMIsNsIicMH6FeYnnsUrygIzkKH
 addu1w2cTxLrlfStyefOXgw7v0RN7/OAuEuTL7wgKNFovderbSgRHVbX8c96ZUIUuO+8hALfO+rEe
 In1E0xex3XcPhQ==;
Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <acorallo@HIDDEN>)
 id 1sKa30-0001ei-Fy; Fri, 21 Jun 2024 04:55:06 -0400
From: Andrea Corallo <acorallo@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
In-Reply-To: <87le2z7h37.fsf@localhost> (Ihor Radchenko's message of "Thu, 20
 Jun 2024 15:46:04 +0000")
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
 <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN> <87le2z7h37.fsf@localhost>
Date: Fri, 21 Jun 2024 04:55:06 -0400
Message-ID: <yp1r0cqekut.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71370
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>,
 Adam Porter <adam@HIDDEN>, 71370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ihor Radchenko <yantar92@HIDDEN> writes:

> Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
> of text editors" <bug-gnu-emacs@HIDDEN> writes:
>
>> Any arguments why this gv is different from the others that had been
>> deprecated?
>
> It is one of the commonly used gvs.
> https://github.com/search?q=%22%28setf+%28buffer-substring%22&type=code
> gives 500+ hits (and it is not all forks of one or two popular packages)

Interesting, I took the time to apply your methodology to all GV
obsoleted by the same commit and this is the result:

| GV                           | file occurrences |
|                              |        in github |
|------------------------------+------------------|
| buffer-file-name             |                5 |
| buffer-modified-p            |                7 |
| buffer-name                  |               48 |
| buffer-string                |              142 |
| buffer-substring             |              512 |
| current-buffer               |              234 |
| current-column               |                3 |
| current-global-map           |                0 |
| current-input-mode           |                0 |
| current-local-map            |                0 |
| current-window-configuration |                0 |
| default-file-modes           |                0 |
| current-window-configuration |                0 |
| default-file-modes           |                0 |
| documentation-property       |                8 |
| frame-height                 |               38 |
| frame-visible-p              |                0 |
| global-key-binding           |                3 |
| local-key-binding            |                0 |
| mark                         |                4 |
| mark-marker                  |                0 |
| marker-position              |               16 |
| mouse-position               |                7 |
| point                        |               32 |
| point-marker                 |                0 |
| point-max                    |                0 |
| point-min                    |               40 |
| read-mouse-position          |                0 |
| screen-height                |                4 |
| screen-width                 |               15 |
| selected-window              |                4 |
| selected-screen              |                0 |
| selected-frame               |                0 |
| standard-case-table          |                0 |
| syntax-table                 |                0 |
| visited-file-modtime         |                0 |
| window-height                |               13 |
| window-width                 |                9 |
| x-get-secondary-selection    |                0 |

While some of them are rarely/not used some others looks quite popular.
This is an indication that the popular ones are probably a good
abstraction or they are just convenient.

I don't know what would be the risk of un-obsoleting the popular ones
now, but if is not possible I think we should consider doing it for the
next release cycle.

  Andrea




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 20 Jun 2024 15:44:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 20 11:44:37 2024
Received: from localhost ([127.0.0.1]:33928 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sKJxl-0005I2-6G
	for submit <at> debbugs.gnu.org; Thu, 20 Jun 2024 11:44:37 -0400
Received: from mout02.posteo.de ([185.67.36.66]:60961)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yantar92@HIDDEN>) id 1sKJxh-0005Hi-Sc
 for 71370 <at> debbugs.gnu.org; Thu, 20 Jun 2024 11:44:35 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 30838240101
 for <71370 <at> debbugs.gnu.org>; Thu, 20 Jun 2024 17:44:22 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1718898263; bh=buB+qxxVneUlhxiQrYh+9asfhlsfAZOFBWVtUDvE5dc=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=UHDyZnQCccaOzK3LdUTC9N7N+iIs4sI6+YYuc4U3ioLHJwoQs+KVwAYbzInoDF7Z/
 2PV3QVDaiKpp0v2ZAX/jJ0tMzp3NJZzMj3TI5mxv9Y3bXglmnILlKJBoTQCKSRic5G
 33fyeoUSBGRldKD2lUUrFIddE4QV5r7/xLLwvmfTnliCRUH26J6f+sp6D4Sp7r3VP8
 r3vyiXafNl2rVTrdkYI21ImZP+mMQkFi16UVIqHII1aRR6rDAjgy0+G1YFv6PjXnB2
 8DE8CA7+Qfq8n82tdoeB6dTNuRfSLC6I9BD87geaj1giXLZNFT7+d2gxRtadIYBZC0
 UXNQGOTu5mrLQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4W4lCl4qrvz9rxQ;
 Thu, 20 Jun 2024 17:44:19 +0200 (CEST)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
In-Reply-To: <871q4reij4.fsf@HIDDEN>
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
 <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
 <871q4reij4.fsf@HIDDEN>
Date: Thu, 20 Jun 2024 15:46:04 +0000
Message-ID: <87le2z7h37.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71370
Cc: Adam Porter <adam@HIDDEN>, 71370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
of text editors" <bug-gnu-emacs@HIDDEN> writes:

> Any arguments why this gv is different from the others that had been
> deprecated?

It is one of the commonly used gvs.
https://github.com/search?q=%22%28setf+%28buffer-substring%22&type=code
gives 500+ hits (and it is not all forks of one or two popular packages)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 20 Jun 2024 15:32:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 20 11:32:31 2024
Received: from localhost ([127.0.0.1]:33561 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sKJm3-0004uV-LQ
	for submit <at> debbugs.gnu.org; Thu, 20 Jun 2024 11:32:31 -0400
Received: from mout.web.de ([217.72.192.78]:34427)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1sKJm1-0004uC-9H
 for 71370 <at> debbugs.gnu.org; Thu, 20 Jun 2024 11:32:30 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1718897533; x=1719502333;
 i=michael_heerdegen@HIDDEN;
 bh=0pU4IIim1vLM66m7aOA7QNWF7yKCDpS3CE0yUjh+ib0=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=o5QrLeESHv6kgLc03OuqAspsjDtwHkfWUSpb8EgpesJYRuay0UrVOW7tnOZDJBVn
 PDdHUuJt0NUz8ynUYHuZHIpu2pRI3Ab3yw0u/ATDljgVlQYLrCYF/VxNWigEsCwXJ
 tGvUnBHuslt2muCW31WT8GSilgLpQemF/69i84pVjn/kzi/bv7lr6xNqxVo8NWa0b
 AjD0jTzF+r9H3qLNdSyiYwfBPW01R4dlb1K+WN6rom3oZFW0rj7h6kPGOGnGfKj0a
 rWFGmdcgoXoV+Law53it7nJjcmEVZ5CIl5MYZglBR32I5cw5SOw10mQ3hDkY8KrS4
 gCgO3FdHZueUt3EWmA==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.59.210.113]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MTfkd-1rvFpJ3vAr-00IuPX; Thu, 20
 Jun 2024 17:32:13 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Adam Porter <adam@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
In-Reply-To: <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN> (Adam
 Porter's message of "Wed, 19 Jun 2024 23:05:50 -0500")
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
 <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
Date: Thu, 20 Jun 2024 17:33:03 +0200
Message-ID: <871q4reij4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:Gr6KnaqrhHlZltw6baKPMEkb2KT4IctYyLLX3T94r3k/U83Fkf4
 9L8ZHX69rlvk1G7rzTJDCQX1s2lhxe7m54ffI2Q2UA9Ng/+nMVa5OoUFH94hHxRaMdugbdL
 NzqIGFaRMv8Kw23DJglZDua19yu2zAwW4hlLq6pWW4cZGbSo9yfPZ5a4c744Dp+wVwrW1FE
 TcRaRfgbF4fXjMMh1NJkg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:SNKcTGmtljQ=;27/JxTKjyk+P4L8C30QfE20Uwmy
 TSl73GaxIRkxah1sH+k6BVnbyRHpR/7q85SJ1KfKIPn3FZmsB2kO6g9NcbcfoV99t40/sLS9y
 5AubiVz5Ph//F6AjG74KHIcv97+jtTsqBfpgf/KJWS22e/cuNNw1irLFZvgD5J38Ze/tzH0c6
 CXI5AMyloEn5shwvl+13UjjGGaYXcjmdcSwXySer4ET3VsdOB8kdKQsHuyVe5lFJQ59qUzbpC
 7841FdkBusoEEL/+fv1siV4WXgzZrEHvyEYQxeYbgXLxyuqH7NcUNjmK4XjHAzrkWjhcz4zgZ
 /MiwpeveQnCf2nvaSQHtGM72JUCYGr6/C02K8ux4cqN1aNjjKH807kiSRkfiUpM8WRfiaIfWh
 HRnIocKkvhiV4XK0+YKV/JVH78NPdo0jz27j6zNm8e8kGL0wyb6B25iDuNmXc3hlyJI/NosGy
 n+q5UcbxSoXnKlUpDyVgPovmjvJQe2xiGDOni89Z6/Ddw7AnHsv+2M6EE+xyR0nkQdJrsIf76
 ijZZC540+UHAA3nyGOc4uEi4HWZ8o1X6WJF8FHIECwyowteOkB6/WSANOAZYuVJE+QxVg1V0n
 nMSm16wwl5xeMSKWF5elr5WcjgzDhkj+eAQbPId4QM48YR+AvYxmSq2WQl/UX8duj3zCd9J2T
 /SPdFszfRT47RGhWgYzr3Q+1w4qJXSbPyjJJsf/A6BbYNajjhLQtzTJ/+qZ76usUn7xWX703l
 T79A0ZIUChCPilYAyn6m/21YCLVpaSTmWcHNx8v2eEWamTsDWCZb+HaOZwH0Kf19Z4/bgoVso
 NvTZi5CXGG6EHDEZX4Qo7v5Z0mMrP4GTtSQcEXl9lTjtc=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Adam Porter <adam@HIDDEN> writes:

> (which one could work around by importing all of the old code, but

Come on, those are four lines:

#+begin_src emacs-lisp
(defun cl--set-buffer-substring (start end val)
  "Delete region from START to END and insert VAL."
  (save-excursion (delete-region start end)
		  (goto-char start)
		  (insert val)
		  val))
#+end_src

> it would be simpler to not obsolete it in the first place).

For you.  But there were reasons why this had been deprecated.  Let's
stop shadow boxing.

Any arguments why this gv is different from the others that had been
deprecated?


TIA,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 20 Jun 2024 04:06:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 20 00:06:01 2024
Received: from localhost ([127.0.0.1]:42147 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sK93h-0007FH-9c
	for submit <at> debbugs.gnu.org; Thu, 20 Jun 2024 00:06:01 -0400
Received: from bird.elm.relay.mailchannels.net ([23.83.212.17]:27865)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <adam@HIDDEN>) id 1sK93e-0007F4-IF
 for 71370 <at> debbugs.gnu.org; Thu, 20 Jun 2024 00:06:00 -0400
X-Sender-Id: dreamhost|x-authsender|adam@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id D401C4C43D6;
 Thu, 20 Jun 2024 04:05:52 +0000 (UTC)
Received: from pdx1-sub0-mail-a234.dreamhost.com (unknown [127.0.0.6])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id E33184C43D9;
 Thu, 20 Jun 2024 04:05:51 +0000 (UTC)
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1718856351; a=rsa-sha256;
 cv=none;
 b=bh9dfZZk6fayVvGpS8TmOU7J/SXjVZ5wHntseE3NnBhzeLkd6EQDz+foUMkXXfPzgCI1kK
 5UojLE2oCbu7q6dgMxlWspXVjNTc2yrZ09NxjRgHbmeDrkjz5l9TrDwrMfkZwlAyGuRP3P
 7aloqkiMmqRaCbvCL84C4cvu3EFez+QC8DEB5fSbKUyeu2lUZXRa6Q+xpjN5zHhqRxr7ye
 1chAtIA/Lu7siHyoOFaPtx7fbTKBT+xdGdZOpoG4BYlqWuVuD0qoleBneRKAq7LwqHe1OK
 GHowNnNWPaJgmPAvAks/FjkKF/ZQlzPurs198ncp4FrwWWRYceOddPtSEZzQ2w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
 d=mailchannels.net; s=arc-2022; t=1718856351;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references:dkim-signature;
 bh=Wu9j7d9DwINXxKiqCCD/waiqI+crHB9cDZI1zVNMocg=;
 b=GSzDJoX3KC7ayrxh/ZELha1L4KIagaZd+KTbhPkI8BC/qjHsp08dTBUM0OZR51d3/uQhFT
 nkAk2XoAG8++a4s9dj+aFEljEZKH36tiywEZzDvctnAz9am4D0SXdZNvGPnG+vbkRe8KKU
 DDomVR26NEy5ACch6nM8pQLAJ7XS+A0CKjfloWnGKWLTLkm+p5UqP3rTZVjPidChEqZKbD
 dcGIeAbmjDoOcYxL4bX/+sMsEudTuEvBBVWpdUvj4nTsC1OsyEORfU/9+cBnurg3LXz8A5
 dtNoHl7kNkli6Ukt3IhLyugiG2c7bovMVWBOCwSEmItj0PbVPP/bHvGvJoWDdw==
ARC-Authentication-Results: i=1; rspamd-7f76976655-9hqsp;
 auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@HIDDEN
X-Sender-Id: dreamhost|x-authsender|adam@HIDDEN
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|adam@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Army-Abortive: 0bc943a14165bfdf_1718856352741_860903619
X-MC-Loop-Signature: 1718856352741:626584412
X-MC-Ingress-Time: 1718856352741
Received: from pdx1-sub0-mail-a234.dreamhost.com (pop.dreamhost.com
 [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384)
 by 100.114.240.136 (trex/6.9.2); Thu, 20 Jun 2024 04:05:52 +0000
Received: from [10.130.113.13] (unknown [45.92.229.138])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 (Authenticated sender: adam@HIDDEN)
 by pdx1-sub0-mail-a234.dreamhost.com (Postfix) with ESMTPSA id 4W4Rjq2q4hzd0; 
 Wed, 19 Jun 2024 21:05:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net;
 s=dreamhost; t=1718856351;
 bh=Wu9j7d9DwINXxKiqCCD/waiqI+crHB9cDZI1zVNMocg=;
 h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding;
 b=WHZPG0iFEpxHIuVFOdjOx6fLKUrcny+nih1h+Ls+rQVedkuY7vozpwG7GfZQTy0S/
 tm/XHgbMnGPQXoFNJTr3MkVGLCC7+m8k4vm7bf3leUCYfHWsSCghJISPDvVlvPZTrl
 HFI0HnQdWVW+hIIG91VMQcb6BDzzlaL2yGCHCv4Lwzx2LzdTxP0dL0vv5z80tmaxR6
 /rMWFJKp9NPwEGaIEHTJr6hvVrOcwLQp78HWmE5hWXwpw0Jl309qkbsbu5RbJnT5kX
 QqFOz19btlZM6LCN3+kOW2UVFRfHYwYvFsy56CDRB9lETV9PxbVhG0dF9X0eHUKoPC
 mxN0XNvuVVkSQ==
Message-ID: <545868c6-1a14-4a3f-9939-da2477c0a902@HIDDEN>
Date: Wed, 19 Jun 2024 23:05:50 -0500
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <87iky4zedz.fsf@HIDDEN>
Content-Language: en-US
From: Adam Porter <adam@HIDDEN>
In-Reply-To: <87iky4zedz.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

Hi Michael,

On 6/19/24 18:44, Michael Heerdegen wrote:
> Adam Porter <adam@HIDDEN> writes:
> 
>> ┌────
>> │ (let ((inhibit-read-only t))
>> │   (setf (buffer-substring (oref (magit-current-section) start)
>> │                           (oref (magit-current-section) end))
>> │         "foobar\n"))
>> └────
>>
>> Otherwise, one would have to use `delete-region' and then `insert',
>> which is more cumbersome and error-prone.
> 
> I guess alternatively you could define a helper function and make that
> `setf'able, like
> 
> #+begin_src emacs-lisp
> (defalias 'magit-buffer-substring #'buffer-substring)
> (gv-define-simple-setter magit-buffer-substring
>                           cl--set-buffer-substring)
> #+end_src

I guess one could, but that would seem like making use of the 
marked-obsolete functionality in a roundabout way, and I'd guess that if 
it were eventually deprecated and removed, that would stop working, too 
(which one could work around by importing all of the old code, but it 
would be simpler to not obsolete it in the first place).

--Adam,
   who will one day be marked obsolete,
   but whose time has not yet come,
   either.  ;)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 19 Jun 2024 23:44:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 19 19:44:08 2024
Received: from localhost ([127.0.0.1]:35338 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sK4yG-0007Np-MX
	for submit <at> debbugs.gnu.org; Wed, 19 Jun 2024 19:44:08 -0400
Received: from mout.web.de ([212.227.17.11]:50603)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1sK4yC-0007N3-3N
 for 71370 <at> debbugs.gnu.org; Wed, 19 Jun 2024 19:44:06 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de;
 s=s29768273; t=1718840630; x=1719445430;
 i=michael_heerdegen@HIDDEN;
 bh=oa6mUSR3090exmaAUg1t9UHGRTX7+KNOM1Lhw8wnCdQ=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc:
 content-transfer-encoding:content-type:date:from:message-id:
 mime-version:reply-to:subject:to;
 b=hXx8dvCXjdYkXiZPhJIlvq4m8GY+Vn2eG6Gav/H6i1WzKCiYCXg61oew5AOhNvUT
 csImFQB2TZZNrZ62+1czanZqmJsceiSuRxQiEG4/1P5ihIfgjO2Cy4ljfhAeJZ8qt
 3qWKbYAjSZ/IhqkwsQSeB2s5JTfb+1SgoLqy3w4+i+WE+uHlUHfRvXmmUigg4/JRE
 9jWKX0YE7aDom+M6E6hx3ySjgq+bCktXPCKGWJTdkJQfZvNc3FexYpw/wH2C2SMhb
 2LcAVW+hSfBi16bzQkaXuvEgknPXSG9II/kWSOCXZw8mTUH6Nc5Fm4aObgcgEfmjw
 sR62gmjawePGucqonQ==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.59.210.113]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MqqPT-1sfvF63Itl-00fpHG; Thu, 20
 Jun 2024 01:43:49 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Adam Porter <adam@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
In-Reply-To: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN> (Adam
 Porter's message of "Tue, 4 Jun 2024 20:33:13 -0500")
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
Date: Thu, 20 Jun 2024 01:44:40 +0200
Message-ID: <87iky4zedz.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:f9fuMcJxiVN0dG5a0p193Ufu/Mtj/0VlCgk3MbUd9x3mGOqX+3+
 nwuotR3FsDBkQ3HSmItzqMKsd76g3tT19Ku1OzYkUYT8CpuqX4hsDzvLNrdWwCyZirqg4Ee
 Qh0sJRU9nx1X5n7+n5gDbcfAnTQvP5pfkS6ICQf7D5MbTYII5TjNjefd12KMdX7moT4f/1L
 93b/8Bol4p2+4Ixezw1QQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:hj4EtFhiDo0=;OWq+DdpCCPUXFjtZnaCLyafwWwE
 rnKL7rv8Bd8g0eKcKEDI9Dkb0YBnyKkVSQchTpMF2oEo1HnbtrvqHdaskvTkT41D/tRYJ89ll
 uuQ2ygUc/7ySLuTydvvm//Cgpi1yyA3n7LUVd8t/HEb35Ja0NvVBZA9YWdg+ooThwSWF5Jk94
 ci3OeYmUTKhmBSJD9qzCx9/x677u6hmA1KqI9TqNRaW55aM2yOpGovPt7obAAq022O8XdQXHW
 Ski1L7w/3USKu1zxGipv7y+6SY5rI++addCVBcBtrbKmiPlyorz5pYjxlg5eo+KMJpHyQ7zv1
 7Nd8ivazcE7d10gu0+LQTRhtRaNWM1JsBsQDuFwFaG8EABGls4ntyXMzImpaRmsIwtpgxg86O
 SMXluYSIWwPE5DbF7fNrRIsq2wK0iGUezpUBUUMQQP9UzoGmldqlApn830aNKZ6L894hdyUt/
 b1z3SVjUhPjL4dnKGtOOLgT050JmAdlmCeserd+G1T8AHPJMN2/cHJrj9s11/7G6E/0JNF+7F
 8XSQW6a0zZ0ZEPcrMy4/TYWqXgaLiyXM4+BieY0voGxnzN4lSe9UnpZtiifx2IdOxWkHCbXv+
 pUB//dmFP8MR3eQSRHhMcWuz7lG8D/KwcpedPCi2WR1S4xezqt+6dAEIRFCtwZMZYfOfUZJAx
 II2QfzdqplGbWnZNPRRfsQW/TATmTJ+gAuRQWo3zCTHYc7gp5m6+M6CjNUtQoBLmk2xzjCr03
 XHdJf9axg/eYeCQebpz7ermrqq1WEDCu90rRe81+byr7VrRzuN+omJgIKy3AEBjmW6t84/bF9
 De//kaDql9D7CL7IUaLqDYvEJCWPFMJNuFR93Agd3tru8=
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Adam Porter <adam@HIDDEN> writes:

> =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80
> =E2=94=82 (let ((inhibit-read-only t))
> =E2=94=82   (setf (buffer-substring (oref (magit-current-section) start)
> =E2=94=82                           (oref (magit-current-section) end))
> =E2=94=82         "foobar\n"))
> =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80
>
> Otherwise, one would have to use `delete-region' and then `insert',
> which is more cumbersome and error-prone.

I guess alternatively you could define a helper function and make that
`setf'able, like

#+begin_src emacs-lisp
(defalias 'magit-buffer-substring #'buffer-substring)
(gv-define-simple-setter magit-buffer-substring
                         cl--set-buffer-substring)
#+end_src


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 5 Jun 2024 17:36:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 05 13:36:02 2024
Received: from localhost ([127.0.0.1]:51674 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sEuYM-0006qe-KL
	for submit <at> debbugs.gnu.org; Wed, 05 Jun 2024 13:36:02 -0400
Received: from aye.pine.relay.mailchannels.net ([23.83.219.6]:11475)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <adam@HIDDEN>) id 1sEuYI-0006q6-Uv
 for 71370 <at> debbugs.gnu.org; Wed, 05 Jun 2024 13:36:01 -0400
X-Sender-Id: dreamhost|x-authsender|adam@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id E501B4C44B9;
 Wed,  5 Jun 2024 17:35:42 +0000 (UTC)
Received: from pdx1-sub0-mail-a284.dreamhost.com (unknown [127.0.0.6])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id EA9704C297D;
 Wed,  5 Jun 2024 17:35:41 +0000 (UTC)
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1717608941; a=rsa-sha256;
 cv=none;
 b=K2szMVg0DQlGh2S6DJyYJAzG8F4daYliP+Q7iVv+7V9BLcmUbXyhFPQpxhO3fHEx/VejLs
 IMEQ04OIcIvS2wvfpYWXsaje1M0ksDB50n2Rw5NNCHLmrOCsmDtdRxNXJIGbAz1p5/O6SC
 luaCUsOYQuSQjNJUQqsivIZSId6sAj83+Ot1ur1mIlzDa5ON/7jZx8Kcy7c/yvfxZKXJuV
 i1ULtJePQ1T6i0qC/1Yn3KH9OeMSuqbhKvzoGPBwFIW8QccBDSFIyPhYPEKwA5kDSWmx5/
 oAPL8IEy6ds6F1A8B756UrI2/tmCdvuEbQR/AEwH64PS+EAa6lY6MzstoiaZog==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
 d=mailchannels.net; s=arc-2022; t=1717608941;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references:dkim-signature;
 bh=bLu/u1BTIn6eZg0QRcAF+1tdkGS/RqVWAKfne+s9YUQ=;
 b=nM2GmplAQConPGSzcGhWUrlG4xfBFS22qUU/v7y+/jAmnLVU5tPc9hAPqeQ9aKDRQNY1MC
 edCNzApsj7DH9TTS5Q0EPhlhaOXpikeLCyagwZ3YCdXmriLym2USykyinQ7wpHcZoUuaVs
 eXCrt8aodoZpn2VEf4qR3o7Te4aFWhopjPE4kPYutwCLRpe6uMd/3WAM+RgDiJzq/KFfG2
 HQW7SrQ2FAqHO0sfeVnYeaBu68AZPeQhi8MALFAT6Cr2LX7QHGvM6TULoMEgMJRVIEXYK1
 uwrFaSakjNMXtUClUxhajUToxH7NLHS9C/fi68munpxd+YyB822E6d2vbpyL1Q==
ARC-Authentication-Results: i=1; rspamd-7f76976655-7tjn4;
 auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@HIDDEN
X-Sender-Id: dreamhost|x-authsender|adam@HIDDEN
X-MC-Relay: Junk
X-MailChannels-SenderId: dreamhost|x-authsender|adam@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Suffer-Continue: 701a6aea5e2e833a_1717608942798_238719460
X-MC-Loop-Signature: 1717608942798:6707384
X-MC-Ingress-Time: 1717608942798
Received: from pdx1-sub0-mail-a284.dreamhost.com (pop.dreamhost.com
 [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384)
 by 100.118.214.225 (trex/6.9.2); Wed, 05 Jun 2024 17:35:42 +0000
Received: from [10.144.16.65] (unknown [172.98.33.227])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 (Authenticated sender: adam@HIDDEN)
 by pdx1-sub0-mail-a284.dreamhost.com (Postfix) with ESMTPSA id 4VvZP93jM5z6p; 
 Wed,  5 Jun 2024 10:35:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net;
 s=dreamhost; t=1717608941;
 bh=bLu/u1BTIn6eZg0QRcAF+1tdkGS/RqVWAKfne+s9YUQ=;
 h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding;
 b=SNF6qRwsI/ikvjAmwBHpKAIi0OozPMV7a2H0pvQ1D6+jPo1SW0lGfro5L1reQDxbJ
 w+Bk578JpfhaQJx+XUJYxY+l0xN+xp2eBqrMthoOa7bJn9SmykTfRHafxgvMu6uNCL
 gwb2RkLEqzqz5gAmM9tAjCLKwowWhu0S8Mge3jMY1u5DibzBevN09UOEFXHpkpWBM9
 p1q/8tTiXoqDlXumVw01Q4h89l3cplzsGz4+8F9fKi8i85VagCXy3bPs0tQkJJmrf6
 pbmjaF04LcFgrteKnI6AY7JCe6L40SEzkcmnKeGRyd8QegHviiacTFxq46G+P4iXoy
 JNeSK3BfJc7Lw==
Message-ID: <068780bf-2a19-41de-92b2-222686e0fd9b@HIDDEN>
Date: Wed, 5 Jun 2024 12:35:39 -0500
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
To: Eli Zaretskii <eliz@HIDDEN>
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <86jzj3k3nd.fsf@HIDDEN> <2dd5d406-3185-4484-8aa8-856e5d717d48@HIDDEN>
 <868qzjjv1v.fsf@HIDDEN>
Content-Language: en-US
From: Adam Porter <adam@HIDDEN>
In-Reply-To: <868qzjjv1v.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 4.2 (++++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hi Eli, On 6/5/24 09:58, Eli Zaretskii wrote: >> Date: Wed, 
 5 Jun 2024 09:16:53 -0500 >> Cc: 71370 <at> debbugs.gnu.org >> From: Adam Porter
 <adam@HIDDEN> >> >>> I think it's too late to do this now, not wi
 [...] Content analysis details:   (4.2 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [172.98.33.227 listed in zen.spamhaus.org]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [23.83.219.6 listed in list.dnswl.org]
 0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
 [23.83.219.6 listed in wl.mailspike.net]
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 3.2 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Hi Eli, On 6/5/24 09:58, Eli Zaretskii wrote: >> Date: Wed,
    5 Jun 2024 09:16:53 -0500 >> Cc: 71370 <at> debbugs.gnu.org >> From: Adam Porter
    <adam@HIDDEN> >> >>> I think it's too late to do this now, not wi
   [...] 
 
 Content analysis details:   (3.2 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
                             [23.83.219.6 listed in wl.mailspike.net]
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [172.98.33.227 listed in zen.spamhaus.org]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [23.83.219.6 listed in list.dnswl.org]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

Hi Eli,

On 6/5/24 09:58, Eli Zaretskii wrote:
>> Date: Wed, 5 Jun 2024 09:16:53 -0500
>> Cc: 71370 <at> debbugs.gnu.org
>> From: Adam Porter <adam@HIDDEN>
>>
>>> I think it's too late to do this now, not without a very good
>>> reason. Unless such a good reason emerges VSN, this will need to wait
>>> till Emacs 31 at least.
>>
>> That would mean years more of unnecessary compilation warnings' annoying
>> users when they install packages that use this form.
> 
> Please also look at this from where I stand: if we keep adding
> last-minute changes that no one tried for long enough time, we will
> never start the Emacs 30 release cycle, because doing that with an
> unstable master branch is a very bad idea, and delaying the branch is
> the only way of knowing whether the master branch is okay after each
> change.
> 
> So I must draw the line in the sand at some point (pun intended), and
> I just did, a few weeks ago.

Of course, I would not argue with that.  I thought that un-marking these 
forms as obsolete, and thereby removing the warnings, would merely be a 
reversion that would not constitute a change in functionality, i.e. it 
would not risk any breakage, so it would be a safe change to make at 
this point.  If that is not the case, or not in your judgment, I won't 
argue with you; and I would ask that the change be made in the following 
version.

Thanks,
Adam




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 5 Jun 2024 14:58:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 05 10:58:47 2024
Received: from localhost ([127.0.0.1]:40792 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sEs6B-0002OC-FR
	for submit <at> debbugs.gnu.org; Wed, 05 Jun 2024 10:58:47 -0400
Received: from eggs.gnu.org ([209.51.188.92]:41102)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sEs69-0002No-DV
 for 71370 <at> debbugs.gnu.org; Wed, 05 Jun 2024 10:58:46 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sEs5p-0008CP-9y; Wed, 05 Jun 2024 10:58:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=NJNhlichLrsrxq4ZR0lwpUIEdx1tdlLj5K64ahVTBYQ=; b=WL+7wl7u+g/X
 YKHLQC8ktkGwfYWiAYZ4JI8eEJ+/7vucJdkPOH6yz2ZiWu1z/bWtGOqbUUjo2FgYVFl/vI+Htzj1e
 u7zHuwe+gS9zmtULMr7rmJnZzAF3W38+F+XJnZVgyStf9yXBVa0VUcu1lDNV9VUEfZ+qK2slGd8pD
 qGQqQxKT08D/yE93hDqv4cSUI5mBYSaB6ObLd17f7cSKS/UviE4h8HIdbXunc0AJ+lb3moWwVQZMs
 CY6U1CIBFI0izk0O0GB9zWnX5e1Zn3emqA+l9yz1P4m8Hwt5X4w6+g0WzC3+soFoVPqa1lAiyiM1n
 2hhNS03MPJ0ukovwn2mpdw==;
Date: Wed, 05 Jun 2024 17:58:20 +0300
Message-Id: <868qzjjv1v.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Adam Porter <adam@HIDDEN>
In-Reply-To: <2dd5d406-3185-4484-8aa8-856e5d717d48@HIDDEN> (message
 from Adam Porter on Wed, 5 Jun 2024 09:16:53 -0500)
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <86jzj3k3nd.fsf@HIDDEN> <2dd5d406-3185-4484-8aa8-856e5d717d48@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Wed, 5 Jun 2024 09:16:53 -0500
> Cc: 71370 <at> debbugs.gnu.org
> From: Adam Porter <adam@HIDDEN>
> 
> > I think it's too late to do this now, not without a very good
> > reason. Unless such a good reason emerges VSN, this will need to wait
> > till Emacs 31 at least.
> 
> That would mean years more of unnecessary compilation warnings' annoying
> users when they install packages that use this form.

Please also look at this from where I stand: if we keep adding
last-minute changes that no one tried for long enough time, we will
never start the Emacs 30 release cycle, because doing that with an
unstable master branch is a very bad idea, and delaying the branch is
the only way of knowing whether the master branch is okay after each
change.

So I must draw the line in the sand at some point (pun intended), and
I just did, a few weeks ago.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 5 Jun 2024 14:17:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 05 10:17:21 2024
Received: from localhost ([127.0.0.1]:38075 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sErS4-0000Vz-Qx
	for submit <at> debbugs.gnu.org; Wed, 05 Jun 2024 10:17:21 -0400
Received: from basenji.birch.relay.mailchannels.net ([23.83.209.12]:24985)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <adam@HIDDEN>) id 1sErRz-0000VZ-PC
 for 71370 <at> debbugs.gnu.org; Wed, 05 Jun 2024 10:17:19 -0400
X-Sender-Id: dreamhost|x-authsender|adam@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id D125214382B;
 Wed,  5 Jun 2024 14:16:55 +0000 (UTC)
Received: from pdx1-sub0-mail-a254.dreamhost.com (unknown [127.0.0.6])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 738971427E1;
 Wed,  5 Jun 2024 14:16:55 +0000 (UTC)
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1717597015; a=rsa-sha256;
 cv=none;
 b=xtsvVbIp2XKPnyBaX1mfVapVvpIopNLLkbaA4Lo7+67QiAKknk+X5QwrTUlbCpS6j93N+G
 shVrb27/feQbzP6OyWiNojqgmT8kkK6/PHwWsxqvXBsZvV5nYfjqn70IfWlNs3XQDhmSKu
 H+tyY/XTpePRJIVuYD7VaM+pozkPNs+insH8ZLix7ceq+/xM7f91Q9wZWafNwcgDqsFhMq
 A5/kpNm0fAFhLy0PnytmqaDeF43pgBzfsxdLaB6iy3mk4ugnW1tMKib53qr+pQ4isjILoe
 qWJL3dQlUhaBCgNH/Xx2dWie+RjnjHCK9RoqzjmMtib537DP000XlZhiOJQVvw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
 d=mailchannels.net; s=arc-2022; t=1717597015;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references:dkim-signature;
 bh=yDbmVzyOnQpql1vuXgjfsRNQjN4dxm++eVNACeK8SRo=;
 b=iubd7xTf2+LLxAY0nZDlPv8C0o8uNyrjM8hehOqHbK+qjQmc7kqOwZT+4L0O5dWfQYgMZt
 H25KK/jarg0+/Q7bWYw1AwZJqrgMb/dL1fJSq0c57ya5Hyu+YPy4JDAeKlN9VJkkHJaCnT
 NGyDTZ60oq/XHHATDWGSPTapfxTmfeVaMhgBb8UpOH3+2HpQaNrNUTXDUFd9AqfTqXiPdd
 M3ceABtpiGKrbiU7pPUVD6q12j4or5gztWsNy+gni88hLXf7Eqz9P7OTMLoxl/BJe1qZnI
 GpGauuNckWNjpjOA7JtJaC1MN/n0JQJ+w9GHggUsUeYjv+f2PrzFpcQgMHYIxA==
ARC-Authentication-Results: i=1; rspamd-7f76976655-vnhxx;
 auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@HIDDEN
X-Sender-Id: dreamhost|x-authsender|adam@HIDDEN
X-MC-Relay: Junk
X-MailChannels-SenderId: dreamhost|x-authsender|adam@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Lonely-Sponge: 7dd855de6a83f6fc_1717597015727_4215723785
X-MC-Loop-Signature: 1717597015727:4264184998
X-MC-Ingress-Time: 1717597015727
Received: from pdx1-sub0-mail-a254.dreamhost.com (pop.dreamhost.com
 [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384)
 by 100.114.21.184 (trex/6.9.2); Wed, 05 Jun 2024 14:16:55 +0000
Received: from [10.43.43.133] (unknown [193.56.116.15])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 (Authenticated sender: adam@HIDDEN)
 by pdx1-sub0-mail-a254.dreamhost.com (Postfix) with ESMTPSA id 4VvTzq05G4zCT; 
 Wed,  5 Jun 2024 07:16:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net;
 s=dreamhost; t=1717597015;
 bh=yDbmVzyOnQpql1vuXgjfsRNQjN4dxm++eVNACeK8SRo=;
 h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding;
 b=LUkCsb+kw96c9O/SBg8WU9nuT0mFo24+Mr9BJjIgNir2znxbcveokuyWth6LV1/8y
 8wBIiEYpbVJCcIxKw3a645dLipnSmV2kJ4LdDxcZLti71bx/r5JXdFWqwnuxsJX8iW
 20KXyxtuc1JYPd4ysyA93DvVzv/YI7jUvI82coUFESfNhbmWTWQ0tFIx5MlQ0f7vLo
 fPWPOVcfsOvOGIQ0rD/8qhvB1wpzY0QKSii4q7DyT4ruhiixeuXz8E7I9uUV0Cpj2w
 Tp4twcCX0UWhuL4Z1wZf9CbertPUXlezzHVQp3A58ivrT82LJtlOS5HWpXJ4dvgc+t
 8uecTEI7//zDg==
Message-ID: <2dd5d406-3185-4484-8aa8-856e5d717d48@HIDDEN>
Date: Wed, 5 Jun 2024 09:16:53 -0500
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
To: Eli Zaretskii <eliz@HIDDEN>
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <86jzj3k3nd.fsf@HIDDEN>
Content-Language: en-US
From: Adam Porter <adam@HIDDEN>
In-Reply-To: <86jzj3k3nd.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

Hi Eli,

On 6/5/24 06:52, Eli Zaretskii wrote:
>> Date: Tue, 4 Jun 2024 20:33:13 -0500 From: Adam Porter 
>> <adam@HIDDEN>
>> 
>> Continuing with the theme of requesting the unobsoleting of some 
>> generalized variable forms (see [#65555] and [earlier discussion]),
>> and given Eli's recently [mentioning] the upcoming cut of the Emacs
>> 30 release branch, I'd like to request now that `buffer-substring'
>> be unmarked as obsolete.
> 
> I think it's too late to do this now, not without a very good
> reason. Unless such a good reason emerges VSN, this will need to wait
> till Emacs 31 at least.

That would mean years more of unnecessary compilation warnings' annoying
users when they install packages that use this form.  Some of these
users misunderstand them as bugs and report them to package developers,
which wastes everyone's time.  It also clutters lint/build logs on CI,
sometimes making it impossible to have a clean linting pass (which
requires the developer to manually inspect every "failed" run to see if
it's just another of these warnings).

>> This form makes some operations much more concise than they would 
>> otherwise be.  For example, if one wants to update the text in a 
>> `magit-section' section, the code could be as simple as this:
>> 
>> ┌──── │ (let ((inhibit-read-only t)) │   (setf (buffer-substring 
>> (oref (magit-current-section) start) │ (oref 
>> (magit-current-section) end)) │         "foobar\n")) └────
>> 
>> Otherwise, one would have to use `delete-region' and then
>> `insert', which is more cumbersome and error-prone.
> 
> I don't understand why it would be cumbersome, let alone
> error-prone. Less convenient than using setf, yes, but "cumbersome"?
> We've been doing that for decades.

The alternative means having to bind positions in variables, use
`goto-char' and `delete-region' and `insert' in a larger, more complex
form.  To me that seems much more cumbersome than this elegant GV form
which is a simple way of saying, "Replace that region with these contents."

> IOW, this is just a matter of convenience, nothing more.

*shrug*  Convenient code abstractions are easier to understand and
maintain; that's why I like to use this form, and why I like to use Lisp.

>> As I've mentioned in earlier discussions, the mass-marking of 
>> several GV forms as obsolete in commit 
>> 48aacbf292fbe8d4be7761f83bf87de93497df27 happened apparently 
>> without public discussion, as well as without checking the extent 
>> to which they are used outside of emacs.git.
> 
> We don't discuss obsoletion, because it is never final.  The 
> rationale for obsoleting those forms is explained in the log message,
> so I think the implied accusation here is misplaced.

It was not meant as an accusation--just a statement of fact, an
observation; if I was incorrect, I'll be happy to be corrected.  My
point, of course, is that the marking--and creation of these new 
compilation warnings--happened without asking if anyone would be 
affected by it.

>> By the way, I'd also like to request that the `point' and 
>> `window-point' GV forms be unobsoleted, for the same reasons.  If 
>> it's permissible, I'd like to do so here rather than file separate
>>  bug reports for each of those, but if the maintainers prefer, I 
>> will do so.
> 
> Let's see how many people want that now.

In fairness to them, most probably don't monitor emacs-bugs and are
unlikely to see this report, so I don't know if looking for replies here
would be an accurate indicator of interest.

> Use of those specific forms as GV was obsoleted in 48aacbf29 because 
> they are rarely if ever used as GV.  Unless this and the other two 
> requests suddenly get crowds of people demanding to un-obsolete them 
> (probably unlikely, since where were those people for the last 2 
> years?), I think Lars's decision to obsolete them is still solid.

I don't understand how an apparent lack of internal use is a good reason
to obsolete something useful.  There are parts of Emacs that seem to get 
  less use than these forms which are not marked obsolete.  As an Elisp
developer and tutor, I would like to see these forms used more
frequently, both inside and outside of emacs.git.  Emacs and Elisp are
so large that it takes years for knowledge about new or little-known
features to become widespread, and GVs in general are already a more 
advanced sub-topic.  I feel like obsoleting these forms is hardly giving 
them a chance, and doing so because they aren't yet widely used is like 
a catch-22.

--Adam




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 5 Jun 2024 12:10:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 05 08:10:27 2024
Received: from localhost ([127.0.0.1]:56618 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sEpTF-0002rK-TV
	for submit <at> debbugs.gnu.org; Wed, 05 Jun 2024 08:10:27 -0400
Received: from mout01.posteo.de ([185.67.36.65]:56261)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yantar92@HIDDEN>) id 1sEpRC-0002jd-LZ
 for 71370 <at> debbugs.gnu.org; Wed, 05 Jun 2024 08:08:19 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 55135240027
 for <71370 <at> debbugs.gnu.org>; Wed,  5 Jun 2024 14:07:58 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1717589278; bh=uFtnyNmtK3CT2JvuhqDSQyT/l6w2CXKY9TIVtr7q9JU=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 Content-Transfer-Encoding:From;
 b=oETDDLZgLD9w0+MUfn/FWa0BOXYBO4WSBGzQJ0trALNFeT3mk2fSe/MY7rImucU+m
 Qh2f6QkyC2x60bqEcFLxZ+0RUkE0eNmDcnfMcFaXxXEKLur2aIqP8iePd94Bysr0uA
 PgHiyrhddnMsenR8IVEOJJXjIAykSqtaQRxOE1BghEzDWp4iUSopwT8XuyvWIBiSjC
 HuYLD92cQ332WZd4zRHexdBMFzJI9XjIIxw8ggn+wkMZFw9FgRCQ3LmJ4CRdaXO3f4
 w+ixCqlQjQY/byA4MtSCqkJKlQ8eVzL4Bm5oE2FvQtcAxvndooIey32stID/9mFRb+
 4kD79xkgr/eIg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4VvR7118g0z6v04;
 Wed,  5 Jun 2024 14:07:56 +0200 (CEST)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a
 generalized variable
In-Reply-To: <86jzj3k3nd.fsf@HIDDEN>
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
 <86jzj3k3nd.fsf@HIDDEN>
Date: Wed, 05 Jun 2024 12:09:40 +0000
Message-ID: <87frtr7fqz.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71370
Cc: Adam Porter <adam@HIDDEN>, 71370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80
>> =E2=94=82 (let ((inhibit-read-only t))
>> =E2=94=82   (setf (buffer-substring (oref (magit-current-section) start)
>> =E2=94=82                           (oref (magit-current-section) end))
>> =E2=94=82         "foobar\n"))
>> =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80
>>=20
>> Otherwise, one would have to use `delete-region' and then `insert',
>> which is more cumbersome and error-prone.
>
> I don't understand why it would be cumbersome, let alone error-prone.
> Less convenient than using setf, yes, but "cumbersome"?  We've been
> doing that for decades.

setf is still a lot more convenient. It is also fairly commonly used -
Org mode did use it; github search reveals pretty frequent use in
packages and configs; I stumbled upon this warning a number of times
when compiling the packages I load in my config.

So, if the only reason to obsolete `buffer-substring' is that it is
unused, I'd prefer it not to be obsoleted.

--=20
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at 71370 <at> debbugs.gnu.org:


Received: (at 71370) by debbugs.gnu.org; 5 Jun 2024 11:53:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 05 07:53:05 2024
Received: from localhost ([127.0.0.1]:55434 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sEpCS-0001to-KL
	for submit <at> debbugs.gnu.org; Wed, 05 Jun 2024 07:53:05 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58286)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sEpCQ-0001sG-M2
 for 71370 <at> debbugs.gnu.org; Wed, 05 Jun 2024 07:53:03 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sEpC6-000210-8j; Wed, 05 Jun 2024 07:52:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=GfoC/YqiUZQa5YjZZoUM8AF98IrEfI2NEpyvZQm+a+U=; b=VfWO4oo6Ju71yFsdMatV
 VrYzfeBEATGCcXGSGjJV66JNHnoutzlqOHONPpOo1S1GBqPRkU6lXBWC9XD29Lz58SCUPOJ5rZ2wT
 MYb2VJWBubz2A24h88wtk+wfEgFlTlyvdp/8n6KDWFZsWIPuoMybIoPX61MgkpKKIUeTkConIdx21
 b4m/bJpXJuDBJ5HjDJx3wtG2d1Z+k3qGiG8L2JF2HVNY7qhHXUyl61YH5Lo9tbsFfK53sJRrtKKXX
 /LnYS2JJIToYwg7gmdCI8UtnxqE+AI1W+z6zBHJyyEQ4ECUWuSWvLGSLeq1rc7ZWg5Aplgwhz1zXa
 3gvCLiM2maLfgQ==;
Date: Wed, 05 Jun 2024 14:52:38 +0300
Message-Id: <86jzj3k3nd.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Adam Porter <adam@HIDDEN>
In-Reply-To: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN> (message
 from Adam Porter on Tue, 4 Jun 2024 20:33:13 -0500)
Subject: Re: bug#71370: 30.0.50;
 Please un-obsolete buffer-substring as a generalized variable
References: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71370
Cc: 71370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Tue, 4 Jun 2024 20:33:13 -0500
> From: Adam Porter <adam@HIDDEN>
> 
> Continuing with the theme of requesting the unobsoleting of some
> generalized variable forms (see [#65555] and [earlier discussion]), and
> given Eli's recently [mentioning] the upcoming cut of the Emacs 30
> release branch, I'd like to request now that `buffer-substring' be
> unmarked as obsolete.

I think it's too late to do this now, not without a very good reason.
Unless such a good reason emerges VSN, this will need to wait till
Emacs 31 at least.

> This form makes some operations much more concise than they would
> otherwise be.  For example, if one wants to update the text in a
> `magit-section' section, the code could be as simple as this:
> 
> ┌────
> │ (let ((inhibit-read-only t))
> │   (setf (buffer-substring (oref (magit-current-section) start)
> │                           (oref (magit-current-section) end))
> │         "foobar\n"))
> └────
> 
> Otherwise, one would have to use `delete-region' and then `insert',
> which is more cumbersome and error-prone.

I don't understand why it would be cumbersome, let alone error-prone.
Less convenient than using setf, yes, but "cumbersome"?  We've been
doing that for decades.

Use of those specific forms as GV was obsoleted in 48aacbf29 because
they are rarely if ever used as GV.  Unless this and the other two
requests suddenly get crowds of people demanding to un-obsolete them
(probably unlikely, since where were those people for the last 2
years?), I think Lars's decision to obsolete them is still solid.

IOW, this is just a matter of convenience, nothing more.

> As I've mentioned in earlier discussions, the mass-marking of several GV
> forms as obsolete in commit 48aacbf292fbe8d4be7761f83bf87de93497df27
> happened apparently without public discussion, as well as without
> checking the extent to which they are used outside of emacs.git.

We don't discuss obsoletion, because it is never final.  The rationale
for obsoleting those forms is explained in the log message, so I think
the implied accusation here is misplaced.

> By the way, I'd also like to request that the `point' and `window-point'
> GV forms be unobsoleted, for the same reasons.  If it's permissible, I'd
> like to do so here rather than file separate bug reports for each of
> those, but if the maintainers prefer, I will do so.

Let's see how many people want that now.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Jun 2024 01:33:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 04 21:33:39 2024
Received: from localhost ([127.0.0.1]:41754 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sEfX1-0007bx-8t
	for submit <at> debbugs.gnu.org; Tue, 04 Jun 2024 21:33:39 -0400
Received: from lists.gnu.org ([209.51.188.17]:49126)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <adam@HIDDEN>) id 1sEfX0-0007bm-21
 for submit <at> debbugs.gnu.org; Tue, 04 Jun 2024 21:33:38 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <adam@HIDDEN>)
 id 1sEfWl-00020b-MY
 for bug-gnu-emacs@HIDDEN; Tue, 04 Jun 2024 21:33:23 -0400
Received: from bactrian.cherry.relay.mailchannels.net ([23.83.223.9])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <adam@HIDDEN>)
 id 1sEfWh-0005JF-Qy
 for bug-gnu-emacs@HIDDEN; Tue, 04 Jun 2024 21:33:23 -0400
X-Sender-Id: dreamhost|x-authsender|adam@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id C2CFF84257D
 for <bug-gnu-emacs@HIDDEN>; Wed,  5 Jun 2024 01:33:15 +0000 (UTC)
Received: from pdx1-sub0-mail-a301.dreamhost.com (unknown [127.0.0.6])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 5905F842486
 for <bug-gnu-emacs@HIDDEN>; Wed,  5 Jun 2024 01:33:15 +0000 (UTC)
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1717551195; a=rsa-sha256;
 cv=none;
 b=fTtnbHy89Z1vqwa3R7xMvBTCn0iE9L7gNF0s2YIoXcey60Bpdspy79MHFdrJZiTkNwh/NO
 o5YOjgRnqp55kCN90qSSuIhrsumErB47TnOUTk6NKDuefgs7hcYTgTEfsjYrKNan8MDy3a
 ofReX+up8MAhyq/6D3Toeeqy2X2AYStzGWTrJA4WvRanHJ7pFcMXQtVh7oTFPg5UYdKeEq
 YDnuQDRS9KGi81AFIVRth0lfi2CWgELV1gPeoBXtO+1PwEnTGfK8mtoXzhDUVVUl81nlcF
 Fc5V50X2YyRlyGZsrkMmGS/e5Lyyw1oQ/rzhEDF8pTTrHyQm7TgqPhatjZAcfw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
 d=mailchannels.net; s=arc-2022; t=1717551195;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:dkim-signature;
 bh=StK57Oxv39G+Dz59ajU36PlKfgeK/+BAm4COVXH3/Q8=;
 b=lgwNO86oKj5zzdMPQSZGsELZDyQocl1mvf1ImWRHhm6OkzVGPxW4PXkiCz9nXvLA4adD7T
 ASYH00lJ+Z+EEW5RYNGycndh0GTCu7NuPxhxqCRzCkGwoC0yDDtgnP6EymylePWM65nvLP
 ielM2Pl++vk+3KF/VWbUM5RV0GNDoUvHCzZfnZ916a0Wo5VwJsl56jYaRmdAymGv3r3xIk
 RoB/osRhUl8cI+7JWB+S9N4msRiKZq5wMDe8NuC7RgQvFQ3ywcMWeA9UobfCM0pUa9E6VS
 5MMfoEZIwhWBxASun8aEWgWh/qD940rPSsJQDcDnY7QNjF1/xXs0L+TmhMsepA==
ARC-Authentication-Results: i=1; rspamd-79677bdb95-ffs7t;
 auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@HIDDEN
X-Sender-Id: dreamhost|x-authsender|adam@HIDDEN
X-MC-Relay: Junk
X-MailChannels-SenderId: dreamhost|x-authsender|adam@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Tart-Harmony: 7c66a3fd74cc3339_1717551195577_1404431052
X-MC-Loop-Signature: 1717551195577:1186814384
X-MC-Ingress-Time: 1717551195577
Received: from pdx1-sub0-mail-a301.dreamhost.com (pop.dreamhost.com
 [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384)
 by 100.101.9.21 (trex/6.9.2); Wed, 05 Jun 2024 01:33:15 +0000
Received: from [10.43.1.13] (unknown [193.56.116.15])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 (Authenticated sender: adam@HIDDEN)
 by pdx1-sub0-mail-a301.dreamhost.com (Postfix) with ESMTPSA id 4Vv92g05S0zCw
 for <bug-gnu-emacs@HIDDEN>; Tue,  4 Jun 2024 18:33:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net;
 s=dreamhost; t=1717551195;
 bh=StK57Oxv39G+Dz59ajU36PlKfgeK/+BAm4COVXH3/Q8=;
 h=Date:To:From:Subject:Content-Type:Content-Transfer-Encoding;
 b=pwZJqqIHy8dupn3yTyrrjxMvX1opncQOn7/a8RlwHYm0K4DwcLo3CNo8+YF+I3kAS
 Fw8AHH6jzCZYzFCxXDCk8/zH/wQiVreQB9eT5pZUu0oP5x1MnnPJxASzRCQbJ/S5hV
 w4WTB1j2iI5G1bYmE3g3SqU0KKEYAlX1e+S0eaMqaAV9Yt6uvGmrHGJXpnulA08rQJ
 w5hpcKpfJtboyZj33Pfoak10EMazgWc2fd+2iBMrPnAM1E7ZfItXxqZsolvhhwIB7j
 /4uiCOq0zAZ6UGPhalYpdyg7sKdPJpsa36CEfWbzu1fpZW5WV0yrkrQf8Tjp9GIbgs
 wk//SR7II//Cw==
Message-ID: <b1bd201f-8e24-479a-ba59-b5004e5f3ee9@HIDDEN>
Date: Tue, 4 Jun 2024 20:33:13 -0500
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
To: bug-gnu-emacs@HIDDEN
From: Adam Porter <adam@HIDDEN>
Subject: 30.0.50; Please un-obsolete buffer-substring as a generalized variable
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Received-SPF: neutral client-ip=23.83.223.9; envelope-from=adam@HIDDEN;
 helo=bactrian.cherry.relay.mailchannels.net
X-Spam_score_int: -12
X-Spam_score: -1.3
X-Spam_bar: -
X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_NEUTRAL=0.779, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

Hi,

Continuing with the theme of requesting the unobsoleting of some
generalized variable forms (see [#65555] and [earlier discussion]), and
given Eli's recently [mentioning] the upcoming cut of the Emacs 30
release branch, I'd like to request now that `buffer-substring' be
unmarked as obsolete.

This form makes some operations much more concise than they would
otherwise be.  For example, if one wants to update the text in a
`magit-section' section, the code could be as simple as this:

┌────
│ (let ((inhibit-read-only t))
│   (setf (buffer-substring (oref (magit-current-section) start)
│                           (oref (magit-current-section) end))
│         "foobar\n"))
└────

Otherwise, one would have to use `delete-region' and then `insert',
which is more cumbersome and error-prone.

As well, code exists in the wild which uses this form: for example,
[pcre2el], a very useful library which I use in `magit-todos' to convert
regexp between Elisp and Perl-styles.

Overall, it's a useful paradigm that makes code more readable and
concise, and I'm not aware of any drawbacks to using it; if there are
any, I think they should be discussed publicly before marking the form
as obsolete.

As I've mentioned in earlier discussions, the mass-marking of several GV
forms as obsolete in commit 48aacbf292fbe8d4be7761f83bf87de93497df27
happened apparently without public discussion, as well as without
checking the extent to which they are used outside of emacs.git.

By the way, I'd also like to request that the `point' and `window-point'
GV forms be unobsoleted, for the same reasons.  If it's permissible, I'd
like to do so here rather than file separate bug reports for each of
those, but if the maintainers prefer, I will do so.

Thanks for your consideration, and your work on Emacs.

–Adam


[#65555] <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65555>

[earlier discussion]
<https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg01408.html>

[mentioning]
<https://lists.gnu.org/archive/html/emacs-devel/2024-06/msg00042.html>

[pcre2el]
<https://github.com/joddie/pcre2el/blob/380723b2701cceb75c266440fb8db918f3340d50/pcre2el.el#L663>




Acknowledgement sent to Adam Porter <adam@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#71370; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 4 Mar 2025 23:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.