From e7344cd512af57fc9c85205876d6e3bfed2e53fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= Date: Thu, 27 Dec 2012 16:41:28 +0100 Subject: [PATCH] Find end of section only at beginning of line when cycling When hiding a section in non org-mode using outline-minor-mode, if the next section begin with white space, its header line used to appeared on the same line as the one we hide. --- lisp/org.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index ee4c70e..b1ffb8f 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6399,7 +6399,8 @@ in special contexts. (setq eos (save-excursion (org-end-of-subtree t) (unless (eobp) - (skip-chars-forward " \t\n")) + (skip-chars-forward " \t\n") + (forward-line 0)) (if (eobp) (point) (1- (point))))) (setq has-children (or (save-excursion -- 1.7.10.4