If you use use Icicles then you can use multi-command icicle-apropos-value
.
With a prefix arg you can limit the effect to only variables, functions, faces, plists, etc.
You can match not only the value but also the function/variable etc. name, if you wish (multi-completion). So you can easily exclude certain variables (by name) from consideration.
More importantly, you can refine matches incrementally using progressive completion. And that includes being able to exclude matches (chip away the non-elephant).
icicle-apropos-value
is an interactive compiled Lisp function in
icicles-cmd1.el
.
It is bound to menu-bar help-menu apropos icicles
icicle-apropos-value
, menu-bar help-menu apropos apropos-var-value
,
menu-bar help-menu search-documentation find-option-by-value
.
(icicle-apropos-value)
Choose a variable, function, or other symbol description.
This is similar to vanilla command apropos-value
, but you can match
against the variable name and its printed value at the same time.
By default, each completion candidate is a multi-completion composed of
a variable name plus its value. They are separated by
icicle-list-join-string
("^G^J"
, by default).
With a prefix arg, candidates are different kinds of symbols:
< 0: functions and their defs (but byte-compiled defs are skipped)
> 0: symbols and their plists
= 0: variables and their values, functions and their definitions, and
other symbols and their plists
plain (C-u
): use the last-computed (cached) set of candidates
You can use C-$
during completion to toggle filtering the domain of
initial candidates according to the prefix argument, as follows:
- none: only user options (+ values)
- < 0: only commands (+ definitions)
- > 0: only faces (+ plists)
- = 0: only options (+ values), commands (+ defs), faces (+ plists)
See also:
icicle-apropos-vars-w-val-satisfying
,
icicle-describe-vars-w-val-satisfying
- values satisfy a predicate
icicle-plist
- similar to this command with positive prefix arg
icicle-vardoc
, icicle-fundoc
, icicle-doc
- match name & doc
icicle-apropos-options-of-type
, icicle-describe-option-of-type
-
match name & defcustom type
Because you will often use this command in contexts that result in
many, many completion candidates, the following are turned off by
default for this command:
- Icomplete mode. You can toggle this using
M-i M-#
.
- Icicles incremental completion. You can cycle this using
M-i #
.
Read input, then call icicle-doc-action
to act on it.
Input-candidate completion and cycling are available. While cycling,
these keys with prefix C-
are active:
C-mouse-2
, C-return
- Act on current completion candidate only
C-down
, C-wheel-down
- Move to next completion candidate and act
C-up
, C-wheel-up
- Move to previous completion candidate and act
C-next
- Move to next apropos-completion candidate and act
C-prior
- Move to previous apropos-completion candidate and act
C-end
- Move to next prefix-completion candidate and act
C-home
- Move to previous prefix-completion candidate and act
C-!
- Act on all candidates, successively (careful!)
When candidate action and cycling are combined (e.g. C-next
), user
option icicle-act-before-cycle-flag
determines which occurs first.
With prefix C-M-
instead of C-
, the same keys (C-M-mouse-2
,
C-M-RET
, C-M-down
, and so on) provide help about candidates.
Use mouse-2
, RET
, or S-RET
to finally choose a candidate, or
C-g
to quit.
This is an Icicles command - see command icicle-mode
.