emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Crouch <creidieki@gmail.com>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <CANMOoGnMM2_f6PPUi_R-3HWDUUvXDkEYognvnzSVDnpeoeYg=w@mail.gmail.com> (raw)

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 @

current state:
 org-tab-first-hook '(org-hide-block-toggle-maybe
 org-speed-command-hook '(org-speed-command-default-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)
                                   (quote ((agenda time-up habit-up
priority-down tag-down))))
                                  (org-deadline-warning-days 0))
                              ("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-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-directory "~/Dropbox/writeup/org/"
 org-cycle-hook '(org-cycle-hide-archived-subtrees
org-cycle-hide-drawers org-cycle-hide-inline-tasks
 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
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)

             reply	other threads:[~2013-04-14 23:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-14 23:05 Michael Crouch [this message]
2013-04-15 17:14 ` 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/)] Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANMOoGnMM2_f6PPUi_R-3HWDUUvXDkEYognvnzSVDnpeoeYg=w@mail.gmail.com' \
    --to=creidieki@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).