Revise docstrings for org hooks

This commit is contained in:
Henrik Lissner 2020-07-26 16:03:32 -04:00
parent 629c7bed8e
commit b2e11f9a72
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -398,15 +398,15 @@ Made for `org-tab-first-hook' in evil-mode."
;;;###autoload ;;;###autoload
(defun +org-update-cookies-h () (defun +org-update-cookies-h ()
"Update counts in headlines (aka \"cookies\")." "Update statistics cookies/todo statistics in headlines."
(when (and buffer-file-name (file-exists-p buffer-file-name)) (when (and buffer-file-name (file-exists-p buffer-file-name))
(let (org-hierarchical-todo-statistics) (let (org-hierarchical-todo-statistics)
(org-update-parent-todo-statistics)))) (org-update-parent-todo-statistics))))
;;;###autoload ;;;###autoload
(defun +org-yas-expand-maybe-h () (defun +org-yas-expand-maybe-h ()
"Tries to expand a yasnippet snippet, if one is available. Made for "Expand a yasnippet snippet, if trigger exists at point or region is active.
`org-tab-first-hook'." Made for `org-tab-first-hook'."
(when (bound-and-true-p yas-minor-mode) (when (bound-and-true-p yas-minor-mode)
(and (let ((major-mode (if (org-in-src-block-p t) (and (let ((major-mode (if (org-in-src-block-p t)
(org-src-get-lang-mode (org-eldoc-get-src-lang)) (org-src-get-lang-mode (org-eldoc-get-src-lang))
@ -430,8 +430,14 @@ Made for `org-tab-first-hook' in evil-mode."
;;;###autoload ;;;###autoload
(defun +org-cycle-only-current-subtree-h (&optional arg) (defun +org-cycle-only-current-subtree-h (&optional arg)
"Toggle the local fold at the point (as opposed to cycling through all levels "Toggle the local fold at the point, and no deeper.
with `org-cycle')." `org-cycle's standard behavior is to cycle between three levels: collapsed,
subtree and whole document. This is slow, especially in larger org buffer. Most
of the time I just want to peek into the current subtree -- at most, expand
*only* the current subtree.
All my (performant) foldings needs are met between this and `org-show-subtree'
(on zO for evil users), and `org-cycle' on shift-TAB if I need it."
(interactive "P") (interactive "P")
(unless (eq this-command 'org-shifttab) (unless (eq this-command 'org-shifttab)
(save-excursion (save-excursion
@ -457,7 +463,7 @@ with `org-cycle')."
;;;###autoload ;;;###autoload
(defun +org-make-last-point-visible-h () (defun +org-make-last-point-visible-h ()
"Unfold subtree around point if saveplace places it to a folded region." "Unfold subtree around point if saveplace places us in a folded region."
(and (not org-agenda-inhibit-startup) (and (not org-agenda-inhibit-startup)
(outline-invisible-p) (outline-invisible-p)
(ignore-errors (ignore-errors