Emacs: Show Variable Value, List Variables
Show Variable Doc, Show Variable Value
- Alt+x
describe-variable
- Show a variable's documentation and its current value.
For example, here's some emacs builtin variables. Try to find their value:
- user-init-file
- tab-width
- load-path
- find-file-hook
Warning:
some variable are
Buffer Local Variable.
When looking up a buffer local variable,
be sure you are in the right buffer when calling
describe-variable
.
Tip: Another way to show the value of a variable is: type the variable in a buffer, then Alt+x eval-last-sexp
. Result is shown in Messages Buffer
List Variables
- Alt+x
apropos-variable
-
List variables whose name match Regular Expression pattern.
Warning: this does not show arbitrary elisp variables such as(setq xx 3)
. Only those declareddefvar
,defconst
,defcustom
.