From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Crouch Subject: Bug: org-cycle-separator-lines ignored after S-TAB with numeric arg [8.0-pre (release_8.0-pre-443-g06294c @ /home/creidieki/elisp/org-mode/lisp/)] Date: Sun, 14 Apr 2013 19:05:22 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URVzY-0001Jv-2r for emacs-orgmode@gnu.org; Sun, 14 Apr 2013 19:05:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URVzV-00089T-5V for emacs-orgmode@gnu.org; Sun, 14 Apr 2013 19:05:47 -0400 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:38168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URVzU-00089P-Mo for emacs-orgmode@gnu.org; Sun, 14 Apr 2013 19:05:45 -0400 Received: by mail-wi0-f180.google.com with SMTP id c10so1009649wiw.7 for ; Sun, 14 Apr 2013 16:05:43 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org When using a numeric prefix argument to S-TAB, empty lines aren't displayed between folded parts of the subtree, regardless of the setting of org-cycle-separator-lines. Reproduction instructions: 1) Create a file with: ----begin test file---- * Stuff ** Things * Other stuff ----end test file---- 2) C-2 S-TAB Expected outcome: Blank lines between items (as happens with S-TAB) Actual outcome: Blank lines not present between items The descriptions of org-shifttab, org-cycle, and org-cycle-separator-lines seem to imply that the blank lines should appear, as do the descriptions in the manual of org-cycle-separator-lines (sect 2.2) and of S-TAB (sect 2.3). Plus my document is harder to read without the lines it's supposed to have :-) This seems to happen because org-cycle-separator-lines is only used in org-cycle-show-empty-lines, which is called from org-cycle-hook; but when S-TAB is called with a numeric argument, it doesn't use org-cycle, it uses org-content directly. The following change seems to fix the problem, but I haven't done detailed testing, and I don't know enough about the code to know whether this was the best way: -----------------begin patch-------------- diff --git a/lisp/org.el b/lisp/org.el index 5412028..4e57a2b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19550,6 +19550,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)))) -----------------end patch--------------- Thanks, and please let me know if there's anything I can clarify or help out with. -- Michael Crouch Emacs : GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2) of 2013-04-13 on trouble, modified by Debian Package: Org-mode version 8.0-pre (release_8.0-pre-443-g06294c @ /home/creidieki/elisp/org-mode/lisp/) current state: ============== (setq org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-agenda-start-on-weekday 0 org-log-done 'time org-format-latex-options '(:foreground default :background default :scale 1.6 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")) org-confirm-shell-link-function 'yes-or-no-p org-export-date-timestamp-format "%Y-%m-%d" org-pretty-entities t org-agenda-todo-ignore-scheduled 'all org-agenda-prefix-format '((agenda . " %-12:T%?-12t% s") (timeline . " % s") (todo . " %-12:c") (tags . " %-12:c") (search . " %-12:c")) org-agenda-skip-scheduled-if-done t org-agenda-custom-commands '(("H" "TODO items" tags-todo "HOME|COMPUTER" nil) ("h" "TODO items" tags-todo "HOME" nil) ("D" "Daily Action List" ((agenda "" ((org-agenda-ndays 1) (org-agenda-sorting-strategy (quote ((agenda time-up habit-up priority-down tag-down)))) (org-deadline-warning-days 0)) ) ) nil) ("c" "TODO items" tags-todo "COMPUTER" nil) ("T" "TODO items" tags-todo "TOWN" nil)) org-latex-format-headline-function 'org-latex-format-headline-default-function org-default-notes-file "~/Dropbox/writeup/org//notes.org" org-agenda-time-leading-zero t org-todo-keyword-faces '(("LATER" . "#cccc00")) org-agenda-remove-tags 'prefix org-after-todo-state-change-hook '(org-clock-out-if-current) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-export-copy-to-kill-ring t org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-agenda-cmp-user-defined 'org-custom-cmp-tag org-refile-targets '((org-agenda-files :level . 1)) org-export-with-tags 'not-in-toc org-agenda-sorting-strategy '((agenda habit-down time-up user-defined-down priority-down category-keep) (todo priority-down category-keep) (tags priority-down category-keep) (search category-keep)) org-agenda-time-grid '((daily weekly today require-timed remove-match) #("----------------" 0 16 (org-heading t)) (800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000)) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-directory "~/Dropbox/writeup/org/" org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-attach-directory "~/org/data/" org-export-with-drawers nil org-modules '(org-bbdb org-bibtex org-docview org-gnus org-info org-jsinfo org-habit org-irc org-mew org-mhe org-rmail org-vm org-wl org-w3m) org-deadline-warning-days 7 org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-list-demote-modify-bullet '(("1)" . "1.") ("*" . "+") ("+" . "-") ("-" . "*")) org-cycle-separator-lines 1 org-habit-graph-column 60 org-agenda-files '("~/docs/projects/streaming.org" "~/org/data/3f/d84f17-284d-433e-b397-a8199d1b663b/periodicity paper summary" "~/Dropbox/writeup/gtd.org") org-clock-out-hook '(org-clock-remove-empty-clock-drawer) )