From 5e3964d5b4fd7cf764a60662226e7880799acdb2 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Mon, 15 Apr 2013 18:32:30 +0200 Subject: [PATCH] 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. --- lisp/org.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 6a1381360..06ca8aa58 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))))