unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* set-variable could use some of defcustom's typing to provide completion
@ 2006-02-20  9:36 Drew Adams
  2006-02-20 19:34 ` Juri Linkov
  2006-02-20 22:05 ` Richard M. Stallman
  0 siblings, 2 replies; 3+ messages in thread
From: Drew Adams @ 2006-02-20  9:36 UTC (permalink / raw)


I don't propose we try to take this too far, but in the case of some simple
defcustom :type specs, `set-variable' could use the type info to provide
completion.

For instance, if a `choice' of `const' values is used, the string
representations of those values could be made available as completions for
input to `set-variable'.

E.g. (choice (const :tag "Yes" 'some-long-option-meaning-yes)
             (const :tag "No"  'some-long-option-meaning-ask)
             (const :tag "Ask" 'some-long-option-meaning-ask))

You would be able to complete your input to the only valid inputs.

Completion could be lax or strict, depending on the type. In the case of a
choice of (only) `const's, it could be strict. For some other types, it
would be completely lax, letting you input anything you like.

Yes, I realize that the primary recommended UI for setting options is
Customize, but `set-variable' exists and is quite handy. With completion, it
would be even handier.

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

* Re: set-variable could use some of defcustom's typing to provide completion
  2006-02-20  9:36 set-variable could use some of defcustom's typing to provide completion Drew Adams
@ 2006-02-20 19:34 ` Juri Linkov
  2006-02-20 22:05 ` Richard M. Stallman
  1 sibling, 0 replies; 3+ messages in thread
From: Juri Linkov @ 2006-02-20 19:34 UTC (permalink / raw)
  Cc: emacs-devel

> I don't propose we try to take this too far, but in the case of some simple
> defcustom :type specs, `set-variable' could use the type info to provide
> completion.

This is already possible with the command `customize-set-variable'.

Given the existence of this command, I don't understand why the command
`set-variable' whose purpose is to provide an interactive way to do
`setq' and to set any variable to any value the user wants, tries to do the
same as `customize-set-variable' with all its restrictions to the variable
name and value?

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: set-variable could use some of defcustom's typing to provide completion
  2006-02-20  9:36 set-variable could use some of defcustom's typing to provide completion Drew Adams
  2006-02-20 19:34 ` Juri Linkov
@ 2006-02-20 22:05 ` Richard M. Stallman
  1 sibling, 0 replies; 3+ messages in thread
From: Richard M. Stallman @ 2006-02-20 22:05 UTC (permalink / raw)
  Cc: emacs-devel

    I don't propose we try to take this too far, but in the case of some simple
    defcustom :type specs, `set-variable' could use the type info to provide
    completion.

Let's please not consider this now.
We have some bugs to fix, and then we can start pretesting.

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

end of thread, other threads:[~2006-02-20 22:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-20  9:36 set-variable could use some of defcustom's typing to provide completion Drew Adams
2006-02-20 19:34 ` Juri Linkov
2006-02-20 22:05 ` Richard M. Stallman

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