0

This question arose when I noticed, upon starting an emacs lisp script, that the command C-h f did not recognize the function org-table-get-field. That is to say when I type C-h f org-table-get-field, I get the [No Match] in the EchoArea. However when I run a lisp code block, I CAN get a match and information on org-table-get-field. Does anybody know what the machine is doing that all of a sudden it has access to function information it did not before I evaluate lisp code blocks?

1 Answer 1

1

The code defining a function or variable needs to have been loaded or otherwise evaluated, for the help commands to recognize it.

No doubt the code in question here is autoloaded upon your first use of some command. Once it has been loaded, C-h f works for your function, org-table-get-field. Autoloading is the magic you were wondering about.

See the Elisp manual, node Autoload.

Sign up to request clarification or add additional context in comments.

2 Comments

To clarify, org-table-get-field itself does not have an autoload defined (otherwise C-h f would know about it); but it resides in a library which is being loaded on account of something else.
@phils: Yeah, that's what I meant by "of some command" (though it could be something besides a command). Something, somewhere, causes the relevant code to be autoloaded, and that's how it becomes defined.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.