GNU bug report logs -
#52290
28.0.90; Undocumented generalized variables
Previous Next
Reported by: Phil Sainty <psainty <at> orcon.net.nz>
Date: Sun, 5 Dec 2021 01:27:01 UTC
Severity: normal
Tags: moreinfo
Found in version 28.0.90
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Michael Heerdegen <michael_heerdegen <at> web.de> 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
This bug report was last modified 2 years and 289 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.