unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: "Rudolf Adamkovič" <salutis@me.com>, "Po Lu" <luangruo@yahoo.com>,
	larsi@gnus.org, philipk@posteo.net, rms@gnu.org,
	emacs-devel@gnu.org
Subject: Re: Comments on setopt
Date: Wed, 16 Feb 2022 08:23:25 -0500	[thread overview]
Message-ID: <jwvh78z6jam.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <ff8d1f6e45b43bec6ea7f767bb412700@webmail.orcon.net.nz> (Phil Sainty's message of "Wed, 16 Feb 2022 22:52:53 +1300")

> over using `customize-set-variable' directly (indeed, I believe the
> verbosity of the name `customize-set-variable' is a significant reason
> why many people prefer to use `setq' for everything, even when they
> know that user options can have setters).

Hmm... I'm not sure I understand the motivation behind the introduction
of `setopt`, to be honest.  As pointed out, `setopt` should probably not
be used at top-level in a `.emacs` because Custom will think this was
set via `customize-set-variables` and will save that setting back into
`custom-file` next time we ask to save the customized variables.

As a general rule, it should also be avoided by packages because
packages shouldn't change user options behind the user's back.

So the remaining places where it makes sense to use it are fairly
rare, AFAICT.

Am I missing something?


        Stefan




  reply	other threads:[~2022-02-16 13:23 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14 23:01 Comments on setopt Philip Kaludercic
2022-02-15  3:40 ` Po Lu
2022-02-16  4:12   ` Richard Stallman
2022-02-16  7:04     ` Rudolf Adamkovič
2022-02-16  9:52       ` Phil Sainty
2022-02-16 13:23         ` Stefan Monnier [this message]
2022-02-16 22:34           ` Phil Sainty
2022-02-16 22:42             ` Stefan Monnier
2022-02-16 22:57           ` Philip Kaludercic
2022-02-16  7:13     ` Po Lu
2022-02-19  4:54       ` Richard Stallman
2022-02-19  5:07         ` Po Lu
2022-02-19  8:47           ` Eli Zaretskii
2022-02-19 11:13         ` Lars Ingebrigtsen
2022-02-19 11:52           ` Mathias Dahl
2022-02-19 12:35             ` Dmitry Gutov
2022-02-19 14:41           ` Name for `setopt` (was: Comments on setopt) Stefan Monnier
2022-02-19 18:31           ` Comments on setopt Philip Kaludercic
2022-02-19 23:42           ` [External] : " Drew Adams
2022-02-15  9:32 ` Lars Ingebrigtsen
2022-02-15 13:15   ` Stefan Monnier
2022-02-15 17:20     ` Philip Kaludercic
2022-02-17 11:27     ` Lars Ingebrigtsen
2022-02-15 17:17   ` Philip Kaludercic
2022-02-15 19:22   ` Juri Linkov
2022-02-17 11:28     ` Lars Ingebrigtsen

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=jwvh78z6jam.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=luangruo@yahoo.com \
    --cc=philipk@posteo.net \
    --cc=psainty@orcon.net.nz \
    --cc=rms@gnu.org \
    --cc=salutis@me.com \
    /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).