lisp/org.el: Mention how to widen in docstrings of commands that do narrowing

lisp/org.el: (org-narrow-to-subtree, org-toggle-narrow-to-subtree,
org-narrow-to-block, org-narrow-to-element): Mention how to widen in
docstrings of commands that do narrowing.

TINYCHANGE
This commit is contained in:
Yuval Langer 2022-11-25 16:40:50 +02:00 committed by Ihor Radchenko
parent 60de19f910
commit c4de06ce10
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 8 additions and 4 deletions

View File

@ -7220,7 +7220,8 @@ If yes, remember the marker and the distance to BEG."
(setq org-markers-to-move nil)) (setq org-markers-to-move nil))
(defun org-narrow-to-subtree (&optional element) (defun org-narrow-to-subtree (&optional element)
"Narrow buffer to the current subtree." "Narrow buffer to the current subtree.
Use the command `\\[widen]' to see the whole buffer again."
(interactive) (interactive)
(if (org-element--cache-active-p) (if (org-element--cache-active-p)
(let* ((heading (org-element-lineage (let* ((heading (org-element-lineage
@ -7242,7 +7243,8 @@ If yes, remember the marker and the distance to BEG."
(point)))))))) (point))))))))
(defun org-toggle-narrow-to-subtree () (defun org-toggle-narrow-to-subtree ()
"Narrow to the subtree at point or widen a narrowed buffer." "Narrow to the subtree at point or widen a narrowed buffer.
Use the command `\\[widen]' to see the whole buffer again."
(interactive) (interactive)
(if (buffer-narrowed-p) (if (buffer-narrowed-p)
(progn (widen) (message "Buffer widen")) (progn (widen) (message "Buffer widen"))
@ -7250,7 +7252,8 @@ If yes, remember the marker and the distance to BEG."
(message "Buffer narrowed to current subtree"))) (message "Buffer narrowed to current subtree")))
(defun org-narrow-to-block () (defun org-narrow-to-block ()
"Narrow buffer to the current block." "Narrow buffer to the current block.
Use the command `\\[widen]' to see the whole buffer again."
(interactive) (interactive)
(let* ((case-fold-search t) (let* ((case-fold-search t)
(blockp (org-between-regexps-p "^[ \t]*#\\+begin_.*" (blockp (org-between-regexps-p "^[ \t]*#\\+begin_.*"
@ -21162,7 +21165,8 @@ ones already marked."
(goto-char (org-element-property :begin element)))))) (goto-char (org-element-property :begin element))))))
(defun org-narrow-to-element () (defun org-narrow-to-element ()
"Narrow buffer to current element." "Narrow buffer to current element.
Use the command `\\[widen]' to see the whole buffer again."
(interactive) (interactive)
(let ((elem (org-element-at-point))) (let ((elem (org-element-at-point)))
(cond (cond