all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Emanuel Berg <embe8573@student.uu.se>, help-gnu-emacs@gnu.org
Subject: RE: interactive interface to supply variables
Date: Sat, 14 Dec 2013 15:39:05 -0800 (PST)	[thread overview]
Message-ID: <9958c3f2-5e80-4308-9a93-1c7db7d147a4@default> (raw)
In-Reply-To: <87vbyr45bj.fsf@nl106-137-194.student.uu.se>

> (interactive "v Variable: ")

"vVariable: " is more conventional, FWIW.

> How does `describe-variable' do that?

What does `describe-variable' say about how it does it?  Ask it.
Take a look.  Why ask someone here to say how `describe-variable'
does it?  What fun is that?

`interactive' with a string arg is very simple.  It serves only
as an abbreviation for common use cases - nothing more.

But `interactive' with a non-string arg does whatever you want.
It is easy to make it prompt for and provide completion for all
symbols that are `boundp', i.e., all variables (in the current
obarray).  I'm guessing that's a challenge you might enjoy, once
undertaken.  `C-h f interactive' and `C-h f completing-read'.

Emacs itself is the first helper to ask about such things - for
one's own greatest benefit.  Google is a reasonable second.

This list or StackOverflow is really best fit for questions you
still have after you have already tried something on your own.

Nothing wrong with asking here first, of course.  But for most
people there are better ways to learn to fish, and it is more
interesting to discover most of Emacs by interacting with Emacs
itself.

This example is a good opportunity to ask Emacs - a relatively
easy challenge that rewards quickly.



      parent reply	other threads:[~2013-12-14 23:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-14 19:09 interactive interface to supply variables Emanuel Berg
2013-12-14 19:52 ` Juanma Barranquero
2013-12-15  4:58   ` Michael Heerdegen
     [not found]   ` <mailman.9280.1387083570.10748.help-gnu-emacs@gnu.org>
2013-12-15  5:23     ` Emanuel Berg
     [not found] ` <mailman.9242.1387050824.10748.help-gnu-emacs@gnu.org>
2013-12-14 20:46   ` Emanuel Berg
2013-12-14 21:01 ` Barry Margolin
2013-12-14 21:42   ` Emanuel Berg
2013-12-14 21:09 ` Jambunathan K
     [not found] ` <mailman.9258.1387055530.10748.help-gnu-emacs@gnu.org>
2013-12-14 21:46   ` Emanuel Berg
2013-12-14 21:51   ` Emanuel Berg
2013-12-15  5:41     ` Jambunathan K
     [not found]     ` <mailman.9281.1387086321.10748.help-gnu-emacs@gnu.org>
2013-12-15 18:14       ` Emanuel Berg
2013-12-15  0:09   ` Emanuel Berg
2013-12-15  0:46     ` Emanuel Berg
2013-12-14 23:39 ` Drew Adams [this message]

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=9958c3f2-5e80-4308-9a93-1c7db7d147a4@default \
    --to=drew.adams@oracle.com \
    --cc=embe8573@student.uu.se \
    --cc=help-gnu-emacs@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.