1

I have some code that activates hydras based on modes.

I can do the following for org-mode:

(when (eq major-mode 'org-mode)
  (hydra-org-nav/body))

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

1 Answer 1

2

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.

2
  • Interesting, org-table-p just calls org-at-table-p. That could be why there is not doc on it. Commented Aug 18, 2017 at 17:53
  • Is the name-p something that should be in every package? Commented Aug 18, 2017 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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