[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org bf6bd6d21d 14/44: Support extra org-fold optimisati
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org bf6bd6d21d 14/44: Support extra org-fold optimisations for huge buffers |
Date: |
Mon, 25 Apr 2022 07:57:56 -0400 (EDT) |
branch: externals/org
commit bf6bd6d21d8996c2977f1a11d2201e8490edf620
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
Support extra org-fold optimisations for huge buffers
---
lisp/org.el | 26 ++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 953f2f321a..07e6d640d9 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5788,6 +5788,7 @@ If TAG is a number, get the corresponding match group."
'(mouse-face t keymap t org-linked-text t
invisible t intangible t
org-emphasis t))
+ (org-fold-core-update-optimisation beg end)
(org-remove-font-lock-display-properties beg end)))
(defconst org-script-display '(((raise -0.3) (height 0.7))
@@ -6158,7 +6159,11 @@ Return nil before first heading."
(org-back-to-heading t)
(let ((case-fold-search nil))
(looking-at org-complex-heading-regexp)
- (let ((todo (and (not no-todo) (match-string 2)))
+ ;; When using `org-fold-core--optimise-for-huge-buffers',
+ ;; returned text may be invisible. Clear it up.
+ (save-match-data
+ (org-fold-core-remove-optimisation (match-beginning 0) (match-end
0)))
+ (let ((todo (and (not no-todo) (match-string 2)))
(priority (and (not no-priority) (match-string 3)))
(headline (pcase (match-string 4)
(`nil "")
@@ -6169,6 +6174,8 @@ Return nil before first heading."
"" h))
(h h)))
(tags (and (not no-tags) (match-string 5))))
+ ;; Restore cleared optimisation.
+ (org-fold-core-update-optimisation (match-beginning 0) (match-end 0))
(mapconcat #'identity
(delq nil (list todo priority headline tags))
" "))))))
@@ -6185,18 +6192,21 @@ This is a list with the following elements:
(save-excursion
(org-back-to-heading t)
(when (let (case-fold-search) (looking-at org-complex-heading-regexp))
- (list (length (match-string 1))
- (org-reduced-level (length (match-string 1)))
- (match-string-no-properties 2)
- (and (match-end 3) (aref (match-string 3) 2))
- (match-string-no-properties 4)
- (match-string-no-properties 5)))))
+ (org-fold-core-remove-optimisation (match-beginning 0) (match-end 0))
+ (prog1
+ (list (length (match-string 1))
+ (org-reduced-level (length (match-string 1)))
+ (match-string-no-properties 2)
+ (and (match-end 3) (aref (match-string 3) 2))
+ (match-string-no-properties 4)
+ (match-string-no-properties 5))
+ (org-fold-core-update-optimisation (match-beginning 0) (match-end
0))))))
(defun org-get-entry ()
"Get the entry text, after heading, entire subtree."
(save-excursion
(org-back-to-heading t)
- (buffer-substring (point-at-bol 2) (org-end-of-subtree t))))
+ (filter-buffer-substring (point-at-bol 2) (org-end-of-subtree t))))
(defun org-edit-headline (&optional heading)
"Edit the current headline.
- [elpa] externals/org 91b4c6e6ea 02/44: Separate folding functions from org.el into new library: org-fold, (continued)
- [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, 2022/04/25
- [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 <=
- [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
- [elpa] externals/org 2249f4d7e5 42/44: org-fold-core-fontify-region: Remove unused variable, ELPA Syncer, 2022/04/25
- [elpa] externals/org 407104459b 44/44: org-fold: Honour `org-fold-show-context-detail' for isearch, ELPA Syncer, 2022/04/25
- [elpa] externals/org 219bc6c2d3 37/44: org-fold-core-fontify-region: Fix cases when fontification is not registered, ELPA Syncer, 2022/04/25
- [elpa] externals/org a6eab82fd6 16/44: Obsolete old function names that are now in org-fold, ELPA Syncer, 2022/04/25
- [elpa] externals/org f813f10818 26/44: Rename remaining org-force-cycle-archived → org-cycle-force-archived, ELPA Syncer, 2022/04/25