From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65555: 29.1; Please un-obsolete buffer-local-value as a generalized variable Date: Thu, 31 Aug 2023 10:22:06 +0300 Message-ID: <83sf7zekwx.fsf@gnu.org> References: <793bf8b7-251c-fe73-a2a4-e076a216cfe3@alphapapa.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27019"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65555@debbugs.gnu.org To: Adam Porter , Stefan Kangas , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 31 09:23:08 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 1qbc1C-0006iF-4K for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 31 Aug 2023 09:23:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbc12-0007iV-6k; Thu, 31 Aug 2023 03:22:56 -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 1qbc10-0007iM-5n for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 03:22:54 -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 1qbc0z-0003yz-Tr for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 03:22:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qbc17-0007uE-Sl for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 03:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 31 Aug 2023 07:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65555 X-GNU-PR-Package: emacs Original-Received: via spool by 65555-submit@debbugs.gnu.org id=B65555.169346656230360 (code B ref 65555); Thu, 31 Aug 2023 07:23:01 +0000 Original-Received: (at 65555) by debbugs.gnu.org; 31 Aug 2023 07:22:42 +0000 Original-Received: from localhost ([127.0.0.1]:54761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbc0n-0007tc-Ru for submit@debbugs.gnu.org; Thu, 31 Aug 2023 03:22:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbc0k-0007tO-IT for 65555@debbugs.gnu.org; Thu, 31 Aug 2023 03:22:39 -0400 Original-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 ) id 1qbc0W-0003lv-IX; Thu, 31 Aug 2023 03:22:24 -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=WVAfEcGv+tXWOpdec9vxmq0gMqvQOS8kjTyAdhgUM94=; b=n54UbPuyk0Oc MaWyqTpQ78Y5UONZ/n0SRNRxz4oN7prhfGUDXht2csUie9YBUIFIv6d3DJ8+Tmr81TGZoGlF3esnz mEJ2VBAcwwoKR6D8iDWNMxLWac9Vw4X64Ze9jcOsHOLkh1HPVc+5fBegCa61uUYOMdzjo6dyPlid6 +Lqw+SLE6BXjXTN0e/kBl52gr1UBJl1Z5ZU+OnXuET0h+DGmxV2DF5TnFeAM9iz1/r03yvvT4sXIm PihjqdcacB9rqfS6ajBrThGA6y/L4xcxhM3a++jxaM0HM2yLShBkVownUhktXoHLmCSFzz6OrFV9K afbMBljM3IJL9Q/ZNYdnDg==; In-Reply-To: <793bf8b7-251c-fe73-a2a4-e076a216cfe3@alphapapa.net> (message from Adam Porter on Sat, 26 Aug 2023 16:09:33 -0500) 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:268791 Archived-At: Stefan and Stefan, any comments to the below? > Date: Sat, 26 Aug 2023 16:09:33 -0500 > From: Adam Porter > > 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 > > > >