From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Porter Newsgroups: gmane.emacs.bugs Subject: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a generalized variable Date: Tue, 4 Jun 2024 20:33:13 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36455"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: 71370@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 05 03:34:16 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sEfXZ-0009Dx-Q7 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Jun 2024 03:34:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sEfXD-000257-3P; Tue, 04 Jun 2024 21:33:51 -0400 Original-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 ) id 1sEfXB-00024p-6i for bug-gnu-emacs@gnu.org; Tue, 04 Jun 2024 21:33:49 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEfXA-0005M1-VJ for bug-gnu-emacs@gnu.org; Tue, 04 Jun 2024 21:33:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sEfXO-0007cu-Cu for bug-gnu-emacs@gnu.org; Tue, 04 Jun 2024 21:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Adam Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Jun 2024 01:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71370 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171755121929265 (code B ref -1); Wed, 05 Jun 2024 01:34:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Jun 2024 01:33:39 +0000 Original-Received: from localhost ([127.0.0.1]:41754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEfX1-0007bx-8t for submit@debbugs.gnu.org; Tue, 04 Jun 2024 21:33:39 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:49126) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEfX0-0007bm-21 for submit@debbugs.gnu.org; Tue, 04 Jun 2024 21:33:38 -0400 Original-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 ) id 1sEfWl-00020b-MY for bug-gnu-emacs@gnu.org; Tue, 04 Jun 2024 21:33:23 -0400 Original-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 ) id 1sEfWh-0005JF-Qy for bug-gnu-emacs@gnu.org; Tue, 04 Jun 2024 21:33:23 -0400 X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C2CFF84257D for ; Wed, 5 Jun 2024 01:33:15 +0000 (UTC) Original-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 ; 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@alphapapa.net X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net X-MC-Relay: Junk X-MailChannels-SenderId: dreamhost|x-authsender|adam@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Tart-Harmony: 7c66a3fd74cc3339_1717551195577_1404431052 X-MC-Loop-Signature: 1717551195577:1186814384 X-MC-Ingress-Time: 1717551195577 Original-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 Original-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@alphapapa.net) by pdx1-sub0-mail-a301.dreamhost.com (Postfix) with ESMTPSA id 4Vv92g05S0zCw for ; 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== Content-Language: en-US Received-SPF: neutral client-ip=23.83.223.9; envelope-from=adam@alphapapa.net; 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286568 Archived-At: 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] [earlier discussion] [mentioning] [pcre2el]