If you use use Icicles then you can use multi-command
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
It is bound to
menu-bar help-menu apropos icicles
menu-bar help-menu apropos apropos-var-value,
menu-bar help-menu search-documentation find-option-by-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
"^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
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)
icicle-describe-vars-w-val-satisfying - values satisfy a predicate
icicle-plist - similar to this command with positive prefix arg
icicle-doc - match name & doc
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
- Icicles incremental completion. You can cycle this using
Read input, then call
to act on it.
Input-candidate completion and cycling are available. While cycling,
these keys with prefix
C- are active:
C-return - Act on current completion candidate only
C-wheel-down - Move to next completion candidate and act
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.
icicle-act-before-cycle-flag determines which occurs first.
C-M- instead of
C-, the same keys (
C-M-down, and so on) provide help about candidates.
S-RET to finally choose a candidate, or
C-g to quit.
This is an Icicles command - see command