From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: master 48aacbf292 2/2: Make many seldom-used generalized variables obsolete Date: Sat, 10 Sep 2022 08:45:45 +0200 Message-ID: <877d2bohgm.fsf@gnus.org> References: <166111278304.2846.13033924580993120733@vcs2.savannah.gnu.org> <20220821201303.AD1E6C0088A@vcs2.savannah.gnu.org> <877d2w1ua0.fsf@tcd.ie> <87pmgojy0m.fsf@gnus.org> <87tu5fzu2r.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17712"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: "Basil L. Contovounesios" , emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 10 08:47:10 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oWuGj-0004Ne-T9 for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Sep 2022 08:47:10 +0200 Original-Received: from localhost ([::1]:49676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWuGi-0004XX-D8 for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Sep 2022 02:47:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWuFc-0003rE-7a for emacs-devel@gnu.org; Sat, 10 Sep 2022 02:46:01 -0400 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:45034) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWuFV-0007zq-Gd for emacs-devel@gnu.org; Sat, 10 Sep 2022 02:45:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zbdZ+ocIACOpGziFvjGrbI+C6kMcKe4khymTzlJ8dYo=; b=GnWMpCpTTx0jH/zwUiAGAEjlrL eJrL6A5xfG0i4vjiVps40OoYBt5Th1ETx8sEN+izFmdf0vd34/NmUQAzTyWDqPQSgy2HSLgRxAXr0 RansEtrK67wNRZT6BukT9eQQ5/6mjcIHs/6KWEsmmd8OvxySMX0y2s5KYn7x6fBniyaI=; Original-Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oWuFO-0007L7-F8; Sat, 10 Sep 2022 08:45:49 +0200 In-Reply-To: <87tu5fzu2r.fsf@localhost> (Ihor Radchenko's message of "Sat, 10 Sep 2022 13:17:48 +0800") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEVwj7OtqrTgzMpk bJKNYGZXPUH///9NM4zkAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+YJCgYnLIL0ch4AAAG4SURBVDjL bZNNbuMwDIWfouletJ19rV5ACeN9B1b3A9i8/1VKKfpLMNwY4KfHR4k0QBqTzzFH3hkX790Sc56o gP2xx33yq12kAFpXpbw/OEZyNv4IHJpg1ULM3wQkgA4+mVURjHFRBBya9xdz3CTAuEUV22FQgJ8f LCdgQFsC6EAt2Kba2wk5OBSwbpoPqiB6xAx87YoDA8FMjiPU7eJbV4Fgg/EOGVQL7QrGpO4dFi0V Bu/cOekV/0AklPt5y7enF7kMDtO8i9tKqdQIfO1PzUW+zdPkK9wq8JQ9CpjDvYH1A5ovj8g8NaAN S3qB4vEGUCXU82qfwZgqz4Mzg+kdzDj5v+ATwuj7o4H6Te2SO/rJqQEiO0vdIOAygE2OUmzWHakA cJLePpE1TbwpYBVI3i8bQvc48JEBw/LBbFpXEjbNRw7OKm1zHkAqyW0kCWip80cvylpq6uBMHrre R9rPPsO0PnJsT/txVJCdC0gt91eE/kTyT0rcBnCjq7iSP4eB4U7X81rAX/8CllZpHJeWmqog3l9B dZDz9G/mNeIrmJtiMF/TimwVDOakiibpgvTrKHBNsNbzhF+8Tbbg6oZ1GgAAACV0RVh0ZGF0ZTpj cmVhdGUAMjAyMi0wOS0xMFQwNjozOTo0NCswMDowMM4+QRMAAAAldEVYdGRhdGU6bW9kaWZ5ADIw MjItMDktMTBUMDY6Mzk6NDQrMDA6MDC/Y/mvAAAAAElFTkSuQmCC X-Now-Playing: David Byrne and Brian Eno's _My Life In The Bush Of Ghosts_: "America Is Waiting" Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:295105 Archived-At: Ihor Radchenko writes: > This commit also obsoleted a number of generalized variables used by > Org. In particular, `buffer-substring', and `buffer-string'. > > While it is indeed possible to set buffer contents without the above > variables, it cannot (AFAIK) be done using a single function call. > Would it be possible to provide a function replacement for setting a > buffer text in the whole buffer/buffer region? "Setting a buffer text" is something that is un-Emacsey, in my opinion. That is, (setf (buffer-substring ...) ...) is pretending that we're operating on some object, but instead we're altering global (buffer) state. Just delete and insert instead > Also, obsoleting `buffer-file-name' revealed one potentially concerning > fact about generalized variables. The expansion of `buffer-file-name' > setter, `set-visited-file-name' "... also renames the buffer to > correspond to the new file." I am now wondering if there are any > non-obvious side effects when using other generalized variables - there > is (AFAIK) no documentation about what exactly various setters for > generalized variables do other than occasional paragraph in the manual. All these obsoleted generalised variables had non-obvious side effects, which is why I obsoleted them. I don't think anybody could guess what (setf (point-min) 2) actually does without reading the expanded code.