I have some code that activates hydras based on modes.

I can do the following for org-mode:

(when (eq major-mode 'org-mode)

I would like to see if I'm in an org-table and call my org-table hydra.


org-table-p is the function you want, although it does not appear to have a docstring.

I figured this out by using apropos, coupled with common elisp naming conventions:

  • prefix functions with the package name (here, org-table...)
  • end predicate functions (that return t or nil) with -p

So: M-x apropos org-table -p, and browse the options.

| improve this answer | |
  • Interesting, org-table-p just calls org-at-table-p. That could be why there is not doc on it. – eflanigan00 Aug 18 '17 at 17:53
  • Is the name-p something that should be in every package? – eflanigan00 Aug 18 '17 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.