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.bugs Subject: bug#52290: 28.0.90; Undocumented generalized variables Date: Sun, 05 Dec 2021 21:43:56 +0100 Message-ID: <87o85uok8j.fsf@gnus.org> References: <5d87e4ab47875790076e932351fe8f25@webmail.orcon.net.nz> <87ilw3vnp7.fsf@gnus.org> <87bl1v4xxu.fsf@web.de> <87r1aru7xo.fsf@gnus.org> <87ee6rbxfb.fsf@web.de> <87ilw3u5j8.fsf@gnus.org> <878rwzauwn.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24766"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Phil Sainty , 52290@debbugs.gnu.org, Stefan Monnier To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 05 21:45:26 2021 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 1mtyNw-0006CU-L5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Dec 2021 21:45:24 +0100 Original-Received: from localhost ([::1]:48224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtyNv-0004Fb-IG for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Dec 2021 15:45:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtyNb-0004FP-PM for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 15:45:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48176) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtyNa-000136-5N for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 15:45:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mtyNa-0002yK-4F for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 15:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Dec 2021 20:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52290 X-GNU-PR-Package: emacs Original-Received: via spool by 52290-submit@debbugs.gnu.org id=B52290.163873705011349 (code B ref 52290); Sun, 05 Dec 2021 20:45:02 +0000 Original-Received: (at 52290) by debbugs.gnu.org; 5 Dec 2021 20:44:10 +0000 Original-Received: from localhost ([127.0.0.1]:59722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtyMj-0002wz-T9 for submit@debbugs.gnu.org; Sun, 05 Dec 2021 15:44:10 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:56014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtyMi-0002wl-8G for 52290@debbugs.gnu.org; Sun, 05 Dec 2021 15:44:08 -0500 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:In-Reply-To:Date: References: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=lETItZXRkimKT5U5Myv2HzrUY5AtmBMFMoikJIV8QKs=; b=l8r7OK2t4oFJkf1VRClqEUwUDg Wp6Byl4YkBOBGKqlIO7d9XGQCKXjeTI7/Yu2hA5vh4wi/wfj69sJjXjEPePl4yaBqWi795TYHT25B KaAHUW3l60jDkJB71nSIzOf0yV8lbQrrdMxXMeJRq6lqGjVyfDo6hz5ELU6yHNpVJZpI=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtyMX-0002nG-1L; Sun, 05 Dec 2021 21:43:59 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEU/Fhi/qJ22FiP/ ///QDgF2AAAAAWJLR0QDEQxM8gAAAAd0SU1FB+UMBRQXL80Oj8EAAAFTSURBVCjPTdGxasMwEAbg 3yKGoCmBurOXFqOnSKFZMjVQG+o9S55CCArBW4dkyKQYWsT/lL2TY4gNkj6fTnfIgDzFAm4YeNX1 erOCSyQV7QeMC+SfbhI01k2RYruBBzkKiv0nLPS7A0rZVVsylTvgfbsxtWSgPGKxXsHWGjA7VBUQ DRmr9oiqlYBTHI7YS7oG8CM5sks78Ti/EU+Q4lKirY6EQbRJqrYvA2HNibHsi0NhpZ3aC7qv7qJo LMfX53VHQUiOt9/u1kl7iHJuPHRjhhZJL/31ovACfvdnKoyC/ZCR1xc+gLK0TBMGeQNH3L/r5TyA c86MoEVnxDBjkNMCbUaSe5CsGR7j0tnkMuQC/R3SAFKwRjEqWLuMKPngMkIRJB8coolOm5CfSDY2 5gMU42lCUiQ/IWbIAVJx9FOOjJEWGcs8uQk+T82EmKdpzAVMjv8Dvofiv+ZbvdIAAAAldEVYdGRh dGU6Y3JlYXRlADIwMjEtMTItMDVUMjA6MjM6NDcrMDA6MDBj5hSIAAAAJXRFWHRkYXRlOm1vZGlm eQAyMDIxLTEyLTA1VDIwOjIzOjQ3KzAwOjAwErusNAAAAABJRU5ErkJggg== X-Now-Playing: Kraftwerk's _The Man Machine_: "Metropolis" In-Reply-To: <878rwzauwn.fsf@web.de> (Michael Heerdegen's message of "Sun, 05 Dec 2021 17:17:12 +0100") 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" Xref: news.gmane.io gmane.emacs.bugs:221657 Archived-At: Michael Heerdegen writes: > I would want to limit this to the kind of side effect: is it undoubtedly > clear what it is, is there a "canonical" side effect? Nope, I don't think so. Some time back, somebody wrote a library to make Emacs more functional-ish, and the main bugaboo was Emacs' buffer concept. I get the feeling that many (some) people that haven't encountered it before are just horrified by it. "You mean... you put... text!!!... into a ... buffer!!!!... and then you operate on it!? WHERE"S MY SMELLING SALTS" So the library was like (remove-empty-lines BUF) which returned a new buffer with the empty lines removed. (I think. My brain may be making that bit up.) > This is the case e.g. for `buffer-modified-p' to a high degree, but > not for e.g. `point-max': there are several ways to achieve that > `point-max' will return a certain value - killing a certain amount of > text, for example. Or narrowing. Narrowing was not the thing that > came to my mind first. A setter for it might cause confusion because > the semantics are not clear, in contrast to `buffer-modified-p', I > think, where it is quite clear. Yeah, I think so to. "Setting" `point-max' could mean so many different things, but setting `buffer-modified-p' can only mean one thing, I think. (And note that `buffer-modified-p' has an (optional) buffer parameter), so if we go by "a setter should always mention the object it's setting", we're kinda covered.) > I mean, Emacs is an editor, so we have more aspects of state than > variable bindings. Setting variables can also have other side effects > than simply changing the variable's binding. Per se I don't see a > problem in considering more kinds of state (more than variables) as > places. OTOH, `point-max' for example is not really a self-contained > part of state, it's a value of a computation, a derived value. > > The classification result can be a bit subjective and depend on the > viewing point, of course. Indeed. I think `point' is perhaps the debatable tipping, er, point. `(decf (point))' is pretty hard to misunderstand (as a synonym for `(backward-char 1)'), but I think even that's too ... obscure. Probably. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no