From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a generalized variable Date: Wed, 05 Jun 2024 12:09:40 +0000 Message-ID: <87frtr7fqz.fsf@localhost> References: <86jzj3k3nd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="611"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Adam Porter , 71370@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 05 14:11:07 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 1sEpTu-000AVr-T7 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Jun 2024 14:11:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sEpTf-0006XP-EU; Wed, 05 Jun 2024 08:10:52 -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 1sEpTc-0006OT-QW for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2024 08:10:48 -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 1sEpTc-0006a2-HT for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2024 08:10:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sEpTq-0002tR-4n for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2024 08:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Jun 2024 12:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71370 X-GNU-PR-Package: emacs Original-Received: via spool by 71370-submit@debbugs.gnu.org id=B71370.171758942711004 (code B ref 71370); Wed, 05 Jun 2024 12:11:02 +0000 Original-Received: (at 71370) by debbugs.gnu.org; 5 Jun 2024 12:10:27 +0000 Original-Received: from localhost ([127.0.0.1]:56618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEpTF-0002rK-TV for submit@debbugs.gnu.org; Wed, 05 Jun 2024 08:10:27 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:56261) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEpRC-0002jd-LZ for 71370@debbugs.gnu.org; Wed, 05 Jun 2024 08:08:19 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 55135240027 for <71370@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== Original-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) In-Reply-To: <86jzj3k3nd.fsf@gnu.org> 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:286596 Archived-At: Eli Zaretskii 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 . Support Org development at , or support my work at