From: Drew Adams <drew.adams@oracle.com>
To: Lars Ingebrigtsen <larsi@gnus.org>, Richard Stallman <rms@gnu.org>
Cc: Po Lu <luangruo@yahoo.com>,
"philipk@posteo.net" <philipk@posteo.net>,
"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [External] : Re: Comments on setopt
Date: Sat, 19 Feb 2022 23:42:58 +0000 [thread overview]
Message-ID: <SJ0PR10MB54889FC60A0D845C3BEBADB2F3389@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87a6enkt2k.fsf@gnus.org>
> The point is that we need a variant of `setq'
> for user options that people can use when
> saying `M-:' and in init files
We do? Since when? And why?
If we "need" that then why wasn't it proposed
and discussed somewhere? (Was it?)
I've perused this thread but haven't seen any
proposal for `setopt' here either, or any
explanation for why it should be (was?) added.
I may have just not noticed it...(?).
I searched for "setopt" at the emacs-devel
archives, and that search found only this post
from 2007:
https://lists.gnu.org/archive/html/emacs-devel/2007-04/msg01534.html
Clearly I don't know how to use the Search box.
___
Is this just about an alias for
`customize-set-variable'? Apparently not, and
the difference is apparently (?) that this
won't change the user theme. That, and this
apparently won't be a command, so you can't
use `M-x' with it (?).
Whoever (Chong perhaps?) added changing the
user theme to `customize-set-variable' thought
that was appropriate.
I don't care about that, personally. But if
you think we "need" a function that does what
`customize-set-variable' does but doesn't
affect the user theme, then...
> so it needs to be short and snappy.
It needs to be short & snappy for `M-:'? Why?
`M-:' is for evaluating all kinds of Lisp
sexps. Why does this, in particular, need a
short name?
If this is about being able to _only_ set an
option value interactively, then what's wrong
with a command? (`M-x customize-set-variable')
> `seto' and `setc' were proposed, but I thought
> those were too confusing.
It seems that `setopt' can also confuse.
And adding that function to `set-variable',
`customize-set-variable', `customize-set-value',
and `custom-set-variables' invites even more
confusion.
In the 2017 thread "custom-set-variables
considered harmful" there was talk of wanting
a shorter name for `custom-set-variables':
https://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00048.html
And there was talk of a new function (with a
short name) that does, for options, what
`custom-set-variables' does, but does for
non-options what `setq' does. For many use
cases users could just use that new function.
Is that what your `setopt' does? Why not?
And why isn't it also a command?
Why wasn't there any proposal & discussion
for this (if I'm right that there was none)?
We have these commands: `customize-set-value',
`customize-set-variable', `set-variable', and
`customize-save-variable'. And we have this
non-interactive function: `custom-set-variables'.
What more is really needed? Just what is
`setopt' for, and exactly what does it do?
(No, I'm not going to download the code for
Emacs 29 to try to figure it out.)
___
There's also bug (enhancement request) #6578,
which asked to have `set-variable' respect a
defcustom :set. You didn't want to do that.
That ER also asked to better document
`customize-set-variable'. It isn't even
documented as such in the manuals (Emacs &
Elisp). No wonder users don't use it as
much as they might.
Instead, the Emacs manual touts `set-variable',
even though it'll get you in trouble because
of :set.
"The most convenient way to set a specific
customizable variable is with 'M-x set-variable'."
ER #6578 also suggested:
"harmonizing behavior/features ... among
`set-variable', `customize-set-variable',
and `customize-set-value'.
Emacs should be enhanced to clear up the
confusing differences and clear up the doc
recommendations."
You closed #6578, with the only reason given
that `set-variable' does what it's doc says it
does. (Uh, yeah, its doc would need to reflect
its enhancement of respecting :set.)
___
There have also been requests (e.g. bug #26910)
to have `customize-set-variable' optionally
type-check the supplied value.
That too went nowhere. And yet, if it's to be
used as a replacement for the Customize UI, it
really needs to _be able_ to type-check, no?
In that bug thread there was also suggestion to
provide a function like `custom-set-variables',
but which would optionally type-check each
variable setting that has a `NOW' element.
That too went nowhere (not even a response).
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26910#8
___
So now we have `setopt'.
Yesterday, we had daily cleaning. And tomorrow
morning, we shall have what to do after firing.
But today, today we have `setopt'.
next prev parent reply other threads:[~2022-02-19 23:42 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
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 ` Drew Adams [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SJ0PR10MB54889FC60A0D845C3BEBADB2F3389@SJ0PR10MB5488.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
--cc=luangruo@yahoo.com \
--cc=philipk@posteo.net \
--cc=rms@gnu.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.