unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* general "toggle" command?  general "toggle" prefix?
@ 2022-09-13  4:07 Richard Stallman
  2022-09-13 14:32 ` T.V Raman
  2022-09-13 14:52 ` [External] : " Drew Adams
  0 siblings, 2 replies; 4+ messages in thread
From: Richard Stallman @ 2022-09-13  4:07 UTC (permalink / raw)
  To: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

There are many kinds of settings in Emacs, and for quite a few
we have implemented or considered commands to toggle
between recent settings.

Might it be useful to have a prefix for toggling a setting?
Might it be possible to write a general command that can toggle
various kinds of settings?



-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: general "toggle" command?  general "toggle" prefix?
  2022-09-13  4:07 general "toggle" command? general "toggle" prefix? Richard Stallman
@ 2022-09-13 14:32 ` T.V Raman
  2022-09-13 20:13   ` Howard Melman
  2022-09-13 14:52 ` [External] : " Drew Adams
  1 sibling, 1 reply; 4+ messages in thread
From: T.V Raman @ 2022-09-13 14:32 UTC (permalink / raw)
  To: Richard Stallman; +Cc: emacs-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 800 bytes --]

Richard Stallman <rms@gnu.org> writes:


I've used hydra to achieve this for options I toggle often, it's also
one of the examples in the hydra wiki --
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> There are many kinds of settings in Emacs, and for quite a few
> we have implemented or considered commands to toggle
> between recent settings.
>
> Might it be useful to have a prefix for toggling a setting?
> Might it be possible to write a general command that can toggle
> various kinds of settings?

-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
7©4 Id: kg:/m/0285kf1  •0Ü8



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [External] : general "toggle" command?  general "toggle" prefix?
  2022-09-13  4:07 general "toggle" command? general "toggle" prefix? Richard Stallman
  2022-09-13 14:32 ` T.V Raman
@ 2022-09-13 14:52 ` Drew Adams
  1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2022-09-13 14:52 UTC (permalink / raw)
  To: rms@gnu.org, emacs-devel@gnu.org

> There are many kinds of settings in Emacs, and for quite a few
> we have implemented or considered commands to toggle
> between recent settings.
> 
> Might it be useful to have a prefix for toggling a setting?
> Might it be possible to write a general command that can
> toggle various kinds of settings?

I have a command for toggling a variable value,
`icicle-toggle-option', which is bound to
`M-i M-i' during completion in Icicle minor mode.
Description:

 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.

(More generally, during completion prefix key
`M-i' is bound to `icicle-toggle-map', which
has lots of toggle keys.)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: general "toggle" command?  general "toggle" prefix?
  2022-09-13 14:32 ` T.V Raman
@ 2022-09-13 20:13   ` Howard Melman
  0 siblings, 0 replies; 4+ messages in thread
From: Howard Melman @ 2022-09-13 20:13 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 191 bytes --]



"T.V Raman" <raman@google.com> writes:

> I've used hydra to achieve this for options I toggle often, it's also
> one of the examples in the hydra wiki --

I've used a transient for this:


[-- Attachment #2: Screen Shot 2022-09-13 at 4.11.56 PM.png --]
[-- Type: image/png, Size: 327819 bytes --]

[-- Attachment #3: Type: text/plain, Size: 14 bytes --]



-- 

Howard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-13 20:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-13  4:07 general "toggle" command? general "toggle" prefix? Richard Stallman
2022-09-13 14:32 ` T.V Raman
2022-09-13 20:13   ` Howard Melman
2022-09-13 14:52 ` [External] : " Drew Adams

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