[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org cd83606cfd 12/44: org-fold: Handle indirect buffer
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org cd83606cfd 12/44: org-fold: Handle indirect buffer visibility |
Date: |
Mon, 25 Apr 2022 07:57:56 -0400 (EDT) |
branch: externals/org
commit cd83606cfd8a52e7222a0deeeddb3af29e9cbfce
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
org-fold: Handle indirect buffer visibility
---
lisp/org-capture.el | 5 ++++-
lisp/org.el | 8 +++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 1324ffab4c..068e3eda2f 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1171,7 +1171,10 @@ may have been stored before."
(goto-char (point-min))
(unless (org-at-heading-p) (outline-next-heading)))
;; Otherwise, insert as a top-level entry at the end of the file.
- (t (goto-char (point-max))))
+ (t (goto-char (point-max))
+ ;; Make sure that last point is not folded.
+ (org-fold-core-cycle-over-indirect-buffers
+ (org-fold-region (max 1 (1- (point-max))) (point-max) nil))))
(let ((origin (point)))
(unless (bolp) (insert "\n"))
(org-capture-empty-lines-before)
diff --git a/lisp/org.el b/lisp/org.el
index 9e9f1b412e..4c87011958 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5984,7 +5984,13 @@ frame is not changed."
(number-to-string n))))))
(setq n (1+ n)))
(condition-case nil
- (make-indirect-buffer buffer bname 'clone)
+ (let ((indirect-buffer (make-indirect-buffer buffer bname 'clone)))
+ ;; Decouple folding state. We need to do it manually since
+ ;; `make-indirect-buffer' does not run
+ ;; `clone-indirect-buffer-hook'.
+ (org-fold-core-decouple-indirect-buffer-folds)
+ ;; Return the buffer.
+ indirect-buffer)
(error (make-indirect-buffer buffer bname)))))
(defun org-set-frame-title (title)
- [elpa] externals/org updated (c5395767af -> 407104459b), ELPA Syncer, 2022/04/25
- [elpa] externals/org 88f86237c5 01/44: Add org-fold-core: new folding engine, ELPA Syncer, 2022/04/25
- [elpa] externals/org 91b4c6e6ea 02/44: Separate folding functions from org.el into new library: org-fold, ELPA Syncer, 2022/04/25
- [elpa] externals/org ffdc508429 03/44: Separate cycling functions from org.el into new library: org-cycle, ELPA Syncer, 2022/04/25
- [elpa] externals/org d72ac89c7c 04/44: Remove functions from org.el that are now moved elsewhere, ELPA Syncer, 2022/04/25
- [elpa] externals/org b7dae51dbb 06/44: org-macs: New function org-find-text-property-region, ELPA Syncer, 2022/04/25
- [elpa] externals/org 67275f4664 10/44: Implement link folding, ELPA Syncer, 2022/04/25
- [elpa] externals/org cd83606cfd 12/44: org-fold: Handle indirect buffer visibility,
ELPA Syncer <=
- [elpa] externals/org b415111aff 05/44: Disable native-comp in agenda, ELPA Syncer, 2022/04/25
- [elpa] externals/org bc0caec6eb 07/44: org-at-heading-p: Accept optional argument, ELPA Syncer, 2022/04/25
- [elpa] externals/org 77aa9be5ac 11/44: Implement overlay- and text-property-based versions of some functions, ELPA Syncer, 2022/04/25
- [elpa] externals/org f63ff07441 13/44: Fix subtle differences between overlays and invisible text properties, ELPA Syncer, 2022/04/25
- [elpa] externals/org bf6bd6d21d 14/44: Support extra org-fold optimisations for huge buffers, ELPA Syncer, 2022/04/25
- [elpa] externals/org 4fbd8bfae0 15/44: Alias new org-fold functions to their old shorter names, ELPA Syncer, 2022/04/25
- [elpa] externals/org 8f6ce702bd 22/44: ORG-NEWS: Add list of changes, ELPA Syncer, 2022/04/25
- [elpa] externals/org 444d1c50ac 32/44: test-org/string-width: Add tests for strings with prefix properties, ELPA Syncer, 2022/04/25
- [elpa] externals/org 87babca898 33/44: org--string-from-props: Fix handling folds in Emacs <28, ELPA Syncer, 2022/04/25
- [elpa] externals/org ce58542c85 38/44: org-agenda.el: Re-enable native compilation, ELPA Syncer, 2022/04/25