summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien <bzg@gnu.org>2020-02-11 07:54:36 +0100
committerBastien <bzg@gnu.org>2020-02-11 07:54:36 +0100
commitf7175e487815986cf1ee9b0e08c3bec6bec37217 (patch)
tree64de774165ba8c70022466195f4c497abb2c111f
parenta0f3bbd3c22e749350f1094eb03cf7fcec276ff8 (diff)
downloadorg-mode-f7175e487815986cf1ee9b0e08c3bec6bec37217.tar.gz
org.el: Fix bug about cycling
* lisp/org.el (org-cycle-internal-local): Handle `org-cycle-include-plain-lists'. Thanks to Bruce Tulloch for reporting this. This fixes a bug introduced in commit c2aebcee.
-rw-r--r--lisp/org.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 0cbde90..44c4e27 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6403,11 +6403,15 @@ Use `\\[org-edit-special]' to edit table.el tables"))
(setq eos (save-excursion (org-end-of-subtree t t)
(when (bolp) (backward-char)) (point)))
(setq has-children
- (save-excursion
- (let ((level (funcall outline-level)))
- (outline-next-heading)
- (and (org-at-heading-p t)
- (> (funcall outline-level) level))))))
+ (or
+ (save-excursion
+ (let ((level (funcall outline-level)))
+ (outline-next-heading)
+ (and (org-at-heading-p t)
+ (> (funcall outline-level) level))))
+ (and (eq org-cycle-include-plain-lists 'integrate)
+ (save-excursion
+ (org-list-search-forward (org-item-beginning-re) eos t))))))
;; Determine end invisible part of buffer (EOL)
(beginning-of-line 2)
(while (and (not (eobp)) ;This is like `next-line'.