How can I find Org Mode emacs lisp functions like org-current-level which is used in the answer for Org subtree from yasnippet?
I looked for the command in the Org Mode Manual but didn't find it there.
How can I find Org Mode emacs lisp functions like org-current-level which is used in the answer for Org subtree from yasnippet?
I looked for the command in the Org Mode Manual but didn't find it there.
Use M-x apropos-function RET org-.
C-h f apropos-function tells you that command apropos-function does this:
apropos-functionis an autoloaded interactive compiled Lisp function inapropos.el.
(apropos-function PATTERN)Show functions that match
PATTERN.
PATTERNcan be a word, a list of words (separated by spaces), or a regexp (using some regexp special characters). If it is a word, search for matches for that word as a substring. If it is a list of words, search for matches for any two (or more) of those words.This is the same as running
apropos-commandwith aC-uprefix, or a non-nilapropos-do-allargument.
But if you want to know only about Org commands, not all Org functions (commands are functions, but not all functions are commands), then use M-x apropos-command RET org-.
C-h f apropos-command tells you:
apropos-commandis an autoloaded interactive compiled Lisp function inapropos.el.It is bound to
C-h a,<f1> a,<help> a,<menu-bar> <help-menu> <search-documentation> <find-commands-by-name>.
(apropos-command PATTERN &optional DO-ALL VAR-PREDICATE)Show commands (interactively callable functions) that match
PATTERN.
PATTERNcan be a word, a list of words (separated by spaces), or a regexp (using some regexp special characters). If it is a word, search for matches for that word as a substring. If it is a list of words, search for matches for any two (or more) of those words.With
C-uprefix, or ifapropos-do-allis non-nil, also show noninteractive functions.If
VAR-PREDICATEis non-nil, show only variables, and only those that satisfy the predicateVAR-PREDICATE.When called from a Lisp program, a string
PATTERNis used as a regexp, while a list of strings is used as a word list.
The best way is to ask Emacs by using "tab completion": C-h f org-<TAB> will give you a completion buffer with all the functions that Emacs knows about that start with org-. You can click on one to see its doc string. SInce there will be a lot of them, you may need to scroll the buffer (just switch to the buffer and use the arrow keys) or refine the search by typing more of the name, e.g. C-h f org-current-<TAB>).
The manual does a good job of describing the functions that a user should know about, but those tend to be the ones that are bound to keys.
It also describes the most common user options, but it leaves out a lot: one problem with Org mode is that it has too many options :-) Options are implemented as (global) variables and you can get similar help from emacs using C-h v org-<TAB> and use the methods above to navigate the completion buffer or refine the search.
Another way to find user options is to say M-x customize RET and type org- in the search box.
Bon voyage!