emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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/)]
@ 2013-04-14 23:05 Michael Crouch
  2013-04-15 17:14 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Crouch @ 2013-04-14 23:05 UTC (permalink / raw)
  To: emacs-orgmode

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)
 )

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: 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/)]
  2013-04-14 23:05 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/)] Michael Crouch
@ 2013-04-15 17:14 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2013-04-15 17:14 UTC (permalink / raw)
  To: Michael Crouch; +Cc: emacs-orgmode

Hi Michael,

Michael Crouch <creidieki@gmail.com> writes:

> 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.

thanks for the detailed report and the fix, was the good one.

I just committed it.

Best,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-15 17:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-14 23:05 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/)] Michael Crouch
2013-04-15 17:14 ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).