unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: rpluim@gmail.com, emacs-devel@gnu.org, larsi@gnus.org, rms@gnu.org
Subject: Re: Always-true predicate?
Date: Fri, 19 Feb 2021 15:34:13 +0200	[thread overview]
Message-ID: <83k0r42nca.fsf@gnu.org> (raw)
In-Reply-To: <CADwFkm=SG1OYSuxUw=m4eXz-4r39FvbjgjF0aCyK0zVE6hv42w@mail.gmail.com> (message from Stefan Kangas on Fri, 19 Feb 2021 06:52:57 -0600)

> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Fri, 19 Feb 2021 06:52:57 -0600
> Cc: larsi@gnus.org, rms@gnu.org, emacs-devel@gnu.org
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > I must diverge somewhat here, and express my uneasiness, to say the
> > least, with the recent-ish fashion of making too many user options
> > have function values.  It makes "M-x set-variable" much less
> > convenient than it should be, and it makes customizing such options
> > harder for users who aren't proficient in Lisp.
> 
> Could you elaborate on how it makes it harder to customize?

Isn't it clear that typing a function at set-variable's prompt is much
less convenient than typing an atom, like a symbol, a string, or a
number?  For starters, it is much more typing.  And then it's easy to
make a mistake, which will require you to start over again.

> Doesn't `customize-option' hide that away?

I was talking about set-variable, not about customize-option.

But even with customize-option things are much less convenient when
using function values.  You say "hide", and mean the values that are
already in the :choice list.  But what about values that aren't?
Customization is about _changing_ the defaults, not about leaving them
unchanged.  Typing a function's name, let alone a lambda-expression,
in the Custom form is no fun.  So having a user option whose value
_must_ be a function is a PITA.

And then we have this annoyance from "C-h v" as well:

  read-extended-command-predicate is a variable defined in ‘simple.el’.
  Its value is
  #f(compiled-function
  (s b)
  #<bytecode 0x5a5068802147c83>)

That's not very useful display for a user option.

> BTW, should perhaps `set-variable' support completing on the forms in
> :type somehow?

It already does, sort-of.  Try typing a value that doesn't fit :type,
and you'll see that in action.



  parent reply	other threads:[~2021-02-19 13:34 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17 12:01 Always-true predicate? Lars Ingebrigtsen
2021-02-17 12:31 ` Andrea Corallo via Emacs development discussions.
2021-02-17 12:40   ` Lars Ingebrigtsen
2021-02-17 16:59     ` Barry Fishman
2021-02-19 15:24   ` Stefan Kangas
2021-02-17 13:16 ` Basil L. Contovounesios
2021-02-17 18:56   ` Pip Cet
2021-02-17 19:19     ` Lars Ingebrigtsen
2021-02-17 19:31       ` Pip Cet
2021-02-17 19:37         ` Lars Ingebrigtsen
2021-02-17 20:18           ` Teemu Likonen
2021-02-17 22:25             ` [External] : " Drew Adams
2021-02-17 23:04               ` Basil L. Contovounesios
2021-02-17 23:13                 ` Drew Adams
2021-02-17 23:01             ` Stefan Monnier
2021-02-19 11:27               ` Pip Cet
2021-02-19 15:07                 ` Stefan Monnier
2021-02-19 19:04                   ` Pip Cet
2021-02-19 20:11                     ` Stefan Monnier
2021-02-20  9:40                       ` Pip Cet
2021-02-20 13:58                         ` Stefan Monnier
2021-02-19  5:39 ` Richard Stallman
2021-02-19  8:52   ` Robert Pluim
2021-02-19  9:10     ` Eli Zaretskii
2021-02-19 12:12       ` Eli Zaretskii
2021-02-19 12:52       ` Stefan Kangas
2021-02-19 13:00         ` Lars Ingebrigtsen
2021-02-19 13:34         ` Eli Zaretskii [this message]
2021-02-19 13:40           ` Lars Ingebrigtsen
2021-02-19 13:53             ` Eli Zaretskii
2021-02-19 14:05               ` Lars Ingebrigtsen
2021-02-19 18:04                 ` [External] : " Drew Adams
2021-02-19 14:42             ` Stefan Monnier
2021-02-20 12:47               ` Lars Ingebrigtsen
2021-02-20 12:49                 ` Lars Ingebrigtsen
2021-02-20 14:03                   ` Stefan Monnier
2021-02-20 14:20                     ` Lars Ingebrigtsen
2021-02-20 14:55                       ` Stefan Monnier
2021-02-20 15:05                         ` Lars Ingebrigtsen
2021-02-20 15:21                           ` Stefan Monnier
2021-02-21 12:50                             ` Robert Pluim
2021-02-21 13:04                             ` Lars Ingebrigtsen
2021-02-19 15:09           ` Stefan Kangas
2021-02-19 15:22             ` Eli Zaretskii
2021-02-19 18:17               ` [External] : " Drew Adams
2021-02-19 18:41                 ` Eli Zaretskii
2021-02-22  5:02       ` chad
2021-02-22 15:20         ` Eli Zaretskii
2021-02-22 23:07           ` chad
2021-02-21  6:12     ` Richard Stallman
2021-02-21 15:12       ` Eli Zaretskii

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=83k0r42nca.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=rms@gnu.org \
    --cc=rpluim@gmail.com \
    --cc=stefankangas@gmail.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).