unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: "Basil L. Contovounesios" <contovob@tcd.ie>,  emacs-devel@gnu.org
Subject: Re: master 48aacbf292 2/2: Make many seldom-used generalized variables obsolete
Date: Sat, 10 Sep 2022 15:02:00 +0800	[thread overview]
Message-ID: <87o7vnyaon.fsf@localhost> (raw)
In-Reply-To: <877d2bohgm.fsf@gnus.org>

Lars Ingebrigtsen <larsi@gnus.org> writes:

> "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

Well. What about `replace-buffer-contents'?

(For context, this is a very minor issue, and I am not pushing hard for
it. Just a minor annoyance.)

>> 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.

Sure, but not all the generalized variables were obsoleted. Do you claim
that all the remaining generalized variables are simple enough to not
require documentation? I am pretty sure that third-party setters may
still do non-obvious things.

Would it be possible to accept docstring in gv-define-setter and then
display it in the help buffer for the relevant variable?

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



  reply	other threads:[~2022-09-10  7:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <166111278304.2846.13033924580993120733@vcs2.savannah.gnu.org>
     [not found] ` <20220821201303.AD1E6C0088A@vcs2.savannah.gnu.org>
2022-08-25 10:39   ` master 48aacbf292 2/2: Make many seldom-used generalized variables obsolete Basil L. Contovounesios
2022-08-25 12:41     ` Lars Ingebrigtsen
2022-09-10  5:17       ` Ihor Radchenko
2022-09-10  6:45         ` Lars Ingebrigtsen
2022-09-10  7:02           ` Ihor Radchenko [this message]
2022-09-10  7:07             ` Lars Ingebrigtsen
2022-09-10 14:25               ` Stefan Monnier
2022-09-11  9:33                 ` Ihor Radchenko
2022-09-10 14:21           ` Stefan Monnier
2022-09-11 17:11   ` Sean Whitton
2022-09-11 17:57     ` Lars Ingebrigtsen
2022-09-18 23:10     ` Jonas Bernoulli
2022-09-19  6:00       ` Lars Ingebrigtsen
2022-09-19 10:01         ` Jonas Bernoulli
2022-09-19 11:38           ` Augusto Stoffel
2022-09-19 12:22             ` Lars Ingebrigtsen
2022-09-19 12:35               ` Augusto Stoffel
2022-09-19 12:37                 ` Lars Ingebrigtsen
2022-09-19 12:51                   ` Augusto Stoffel
2022-09-19 12:21           ` Lars Ingebrigtsen
2022-09-19 12:46         ` Stefan Monnier
2022-09-19 12:54           ` Po Lu
2022-09-19 13:05             ` Lars Ingebrigtsen
2022-09-19 12:46       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7vnyaon.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=contovob@tcd.ie \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).