all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>, Philip Kaludercic <philipk@posteo.net>
Cc: "69079@debbugs.gnu.org" <69079@debbugs.gnu.org>
Subject: bug#69079: [PATCH] Add 'customize-toggle-option' command
Date: Mon, 12 Feb 2024 18:41:39 +0000	[thread overview]
Message-ID: <SJ0PR10MB54882F9EEDA5DB8EA41EDBCDF3482@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <86plx1r2uq.fsf@gnu.org>

FWIW, (since 2006) Icicles has this, which is bound
to `M-i M-i` during completion.

With a prefix arg you can toggle options and other
variables whose values are generalized Booleans:
`nil' or non-`nil' (not just `t').

This is for toggling an option's current value; it
does only this: (set SYMBOL (not (eval SYMBOL))).
But the completion predicate determines the proper
candidates (depending on prefix arg).

There are (rightfully) many options whose values
are `nil' for false and non-`nil' for true.  If the
command didn't let you toggle such options (with a
prefix arg) then it would be _far_ less useful.
___

Doc string:

Toggle option's value.  This makes sense for binary (toggle) options.
By default, completion candidates are limited to user options that
have `boolean' custom types.  However, there are many "binary" options
that allow other non-nil values than t.

You can use a prefix argument to change the set of completion
candidates, as follows:

 - With a non-negative prefix arg, all user options are candidates.
 - With a negative prefix arg, all variables are candidates.





  reply	other threads:[~2024-02-12 18:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-12 17:32 bug#69079: [PATCH] Add 'customize-toggle-option' command Philip Kaludercic
2024-02-12 17:47 ` Eli Zaretskii
2024-02-12 18:41   ` Drew Adams [this message]
2024-02-12 18:56   ` Philip Kaludercic
2024-02-12 19:32     ` Eli Zaretskii
2024-02-13  0:14       ` Philip Kaludercic
2024-02-13 12:40         ` Eli Zaretskii
2024-02-13 12:46           ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-13 20:09             ` Philip Kaludercic

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=SJ0PR10MB54882F9EEDA5DB8EA41EDBCDF3482@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=69079@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=philipk@posteo.net \
    /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.