summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-04-15 18:32:30 +0200
committerBastien Guerry <bzg@altern.org>2013-04-15 18:32:30 +0200
commit5e3964d5b4fd7cf764a60662226e7880799acdb2 (patch)
treecca9a26027c8acdf330d7d807cff19ba063a02a5
parentf6d7230ca25dba3c455469c811f947110ccb6487 (diff)
downloadorg-mode-5e3964d5b4fd7cf764a60662226e7880799acdb2.tar.gz
org.el (org-shifttab): Show the correct number of empty headlines
* org.el (org-shifttab): Show the correct number of empty headlines when called with a numeric prefix argument. Enhance docstring. Thanks to Michael Crouch for reporting this bug and providing the fix.
-rw-r--r--lisp/org.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 6a13813..06ca8aa 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19539,9 +19539,9 @@ See `org-ctrl-c-ctrl-c-hook' for more information.")
(defun org-shifttab (&optional arg)
"Global visibility cycling or move to previous table field.
-Calls `org-cycle' with argument t, or `org-table-previous-field', depending
-on context.
-See the individual commands for more information."
+Call `org-table-previous-field' within a table.
+When ARG is nil, cycle globally through visibility states.
+When ARG is a numeric prefix, show contents of this level."
(interactive "P")
(cond
((org-at-table-p) (call-interactively 'org-table-previous-field))
@@ -19549,6 +19549,7 @@ See the individual commands for more information."
(let ((arg2 (if org-odd-levels-only (1- (* 2 arg)) arg)))
(message "Content view to level: %d" arg)
(org-content (prefix-numeric-value arg2))
+ (org-cycle-show-empty-lines t)
(setq org-cycle-global-status 'overview)))
(t (call-interactively 'org-global-cycle))))