help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

apropos to show variable values [was: Numbered backup stopped working]


From: Drew Adams
Subject: apropos to show variable values [was: Numbered backup stopped working]
Date: Mon, 20 Nov 2006 10:02:25 -0800

> Question: is there a way to get apropos, for variables,
> to also show the current *value* of that variable?
>
> I set apropos-do-all to 1 and tried it, but got no
> actual *values*.

`apropos' does not list variable values. `apropos-do-all' shows also unbound
symbols (that is, non-variable symbols) and key bindings, but it does not
list variable values.

To see the value of a variable listed in *Apropos* output, click mouse-2 on
the word "Variable" after its name, or move the cursor there and hit `RET'.

As an alternative to this, try Icicles. Like `apropos', it won't show you
the doc and values of all variables at once, but it will list all variable
names, without doc, and you can then see their doc and values one by one,
selectively.

With Icicles, use `C-h v' and type some text (e.g. a regexp) to match
against variable names. Then use `S-TAB' to show all matching variable names
in buffer *Completions*. Then, use `C-mouse-2' on a name in *Completions* to
see the variable's doc and value. Or use `next' and `prior' to cycle among
the matching variables and then hit `C-RET' to see a selected variable's doc
and value; repeat for other matching variables.

You can also use `C-next' and `C-prior' to cycle among the matching
variables, displaying the help (doc + value) for each in turn.

Unlike the standard `apropos' command, you can change the match pattern on
the fly - the list of matching variables is updated immediately. You can
also match variable names against any number of patterns (regexps): just
introduce each one with `M-*'. For example: `C-h v buff S-TAB M-* win' shows
all variables whose names match both `buff' and `win' (in any order).

The same thing works for other names, not just for variables. For example,
`M-x buff S-TAB' shows all commands whose names contain `buff', and
`C-M-mouse-2' on a name shows the doc for that command etc. When you finally
choose a command with `RET', `M-x' executes it.

In addition, there are specific Icicles apropos commands (`icicle-apropos',
`icicle-apropos-variable' etc.) that are like the standard apropos commands
but let you update the list of matching names incrementally (on the fly).
You might also be interested in library `apropos-fn+var.el', which provides
specific apropos commands for different kinds of names (user options,
variables in general, commands, functions in general).

See:

* http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Help_on_Candidates
* http://www.emacswiki.org/cgi-bin/wiki/apropos-fn%2bvar.el

> [ASIDE: how to (interactively) do M-x apropos with
>   the *prefix* "DO-ALL"?

`C-u M-x apropos'. `C-u' provides a "prefix argument" to whatever key
sequence follows it.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]