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#65555: 29.1; Please un-obsolete buffer-local-value as a generalized variable Date: Sat, 26 Aug 2023 16:09:33 -0500 Message-ID: <793bf8b7-251c-fe73-a2a4-e076a216cfe3@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32625"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 To: 65555@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 26 23:11:20 2023 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 1qa0Yy-0008Kt-6m for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Aug 2023 23:11:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qa0Yd-00049Z-0j; Sat, 26 Aug 2023 17:10:59 -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 1qa0Yb-00049N-JV for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2023 17:10:57 -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 1qa0Yb-0000Ht-Au for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2023 17:10:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qa0Yg-0002hN-BN for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2023 17:11: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: Sat, 26 Aug 2023 21:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65555 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.169308421310313 (code B ref -1); Sat, 26 Aug 2023 21:11:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Aug 2023 21:10:13 +0000 Original-Received: from localhost ([127.0.0.1]:43536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qa0Xs-0002gH-Sr for submit@debbugs.gnu.org; Sat, 26 Aug 2023 17:10:13 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:50922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qa0Xo-0002fx-Oo for submit@debbugs.gnu.org; Sat, 26 Aug 2023 17:10:12 -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 1qa0Xd-00045t-GP for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2023 17:09:57 -0400 Original-Received: from dog.birch.relay.mailchannels.net ([23.83.209.48]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qa0XZ-0008K7-Nk for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2023 17:09:57 -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 E0786813A7 for ; Sat, 26 Aug 2023 21:09:51 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a311.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 7FFE1815C8 for ; Sat, 26 Aug 2023 21:09:51 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1693084191; a=rsa-sha256; cv=none; b=nkyoZoxXi3aeLHHgDQRzueJ4cpw+4j27KRyoBSWES4ztXzFz/9jxhLaBb38trAivc1YqHF Abw6XhR84MNMnlDaj2Kfvw0WWg1wzU2ZTKICtgzI4SnnPD+hrteFbU+DcEYUiBpaH+7E7Z HU/h9i1KNWKivYfHhVSZpoKLy1/YF5V3fgourXMf82MC8Da/hqhImX7A8wDN4iMwvQwQgV dJ+o7x1yaCkfzFWrtshBcbqCSVsyjsJcLlxndUzcB8LjBpJo85aHXD9k/XThmTIe3wj1WR M1H/qle9l5fskkacMEFIbPhGHbK0UEJnLwiXdLwDPXa/Ghk+43st98IFa26TDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1693084191; 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=VYC85/VTo0ZGTy3mm7brOg4k7wP9Qntnc463JKcg75g=; b=nbVxuwU0EFVKI47bE+5EERxKBqbiAWpzY5YTw11Vt3Ht8DQkH7GZQvOe14m0TrnoOxooIM nthDdQnsMMnN1ME62gcHMxD8P9t6R8Z2hyT5QMZYhdSanksidCbpme+epomtAOvtvYZtUT 8tXpxHxwZL4FHWrZNYMl91KaaVmiHVUy+Mnqt7vQA5VqAlV3V7BxUSSKjp/WeVwT96WHdo 6lgr+oycNCp0TGFarT9gn5tHeZwqSrgR6JUr9VZ9mnfjIbhEmUZ2UuJy+ULCkzpWHG3FE1 2ETRtJgiB8e8WDhrpKGC2CJ62jT4R4TNaI29cR4yjKD1R6p381NzxtJh5AIcfA== ARC-Authentication-Results: i=1; rspamd-6fd95854bb-2tch6; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|adam@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Callous-Vacuous: 4251ac37503b5c00_1693084191734_4062399803 X-MC-Loop-Signature: 1693084191734:1399965210 X-MC-Ingress-Time: 1693084191734 Original-Received: from pdx1-sub0-mail-a311.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.120.143.185 (trex/6.9.1); Sat, 26 Aug 2023 21:09:51 +0000 Original-Received: from [10.66.1.158] (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@alphapapa.net) by pdx1-sub0-mail-a311.dreamhost.com (Postfix) with ESMTPSA id 4RY8bM0zSDzbB for ; Sat, 26 Aug 2023 14:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1693084191; bh=nQkOMVty0m51HNNWw1ao1SOJqo9OA2cORbsAdBbM73E=; h=Date:To:From:Subject:Content-Type:Content-Transfer-Encoding; b=dGhLHUPcL6MnolT/e5/+FU5mpwhB3RY9C0NCwnMWASUQxbPSWVAy3OA+Xh7zTCBTT etr0t6FzflG+Dy2mun0lJpE/oVSGXLr6ANwcGThGx0Pd/vX4j8Y6IQWPCeECQdA/SQ wkvG6NBVILRsbif/fOk0J7ZiuAKOlxppjdgfAI8sziA4scRysgMe3hVqrLm0X8ffOY Sbjp7/A0+ziT1mjAw/z5BXzPE3hwK889Bzrhk7DlyC1e0qxyKsvBEWeLeFZFsCwuqy UGtDg6EYuVVhdi05T10GbQa/wYGqCaQdh5P4n8zKwUabsMMYRvC6csEmADAZrtuIW+ Qie39U29zidKw== Content-Language: en-US Received-SPF: neutral client-ip=23.83.209.48; envelope-from=adam@alphapapa.net; helo=dog.birch.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 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:268519 Archived-At: Hi, In 915efbff9833ea36aeb364e032a639391516912d the BUFFER-LOCAL-VALUE function's generalized variable forms were marked as obsolete. The discussion happened over a few years in bug #26624. After a delay of 4-5 years, the obsolescence was finally marked in the aforementioned commit. I understand that there were some non-obvious side effects in edge cases. However, in common cases, the generalized variable form is very helpful for writing more concise code. For example: (setf (buffer-local-value 'ement-notifications-retro-loading buffer) nil) ...is more concise than: (with-current-buffer buffer (setq-local ement-notifications-retro-loading nil)) It also expresses its intent more directly, as it's clear that the only purpose of the form is to set a variable in the buffer rather than anything else that could happen when the current buffer is changed (i.e. in context of more code, the benefit is more obvious than in this minimal example). As far as I can tell, the objections to the generalized variable (i.e. the edge cases with non-obvious behavior) were theoretical in nature, without any concrete problems being noted in real code (that is, the report was not of a bug encountered in actual use). In contrast, in several places in Emacs's own code, forms were rewritten to be more awkward as a result of this change, without solving any problems in the changed code. And as I've noted, there is Elisp outside of emacs.git that uses (and would like to continue using) this idiom. As was mentioned in the discussion on #26624, rather than obsoleting the code and removing a useful feature from Elisp, the rare, non-obvious behavior related to using CL-LETF could be documented as an idiosyncrasy, like other rarely encountered rough edges in Elisp. As well, late last year I asked on emacs-devel that the mass-obsolescence of several generalized variables be reverted, and I was asked to individually request specific ones to be un-obsoleted. I can't say that I will be able to find the time to make such a comprehensive defense of all the ones I would like to keep using, but please consider this to be at least one of my responses to that request. Thanks for your consideration, and your work on Emacs. Adam