[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org fd93ad6 3/9: org-element-cache: Do not treat insert
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org fd93ad6 3/9: org-element-cache: Do not treat inserting newline at :begin sensitive |
Date: |
Wed, 15 Dec 2021 23:57:29 -0500 (EST) |
branch: externals/org
commit fd93ad698ad2bc65d81dcecc9fc63c167f13e84d
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
org-element-cache: Do not treat inserting newline at :begin sensitive
* lisp/org-element.el (org-element--cache-before-change): Do not match
`org-element--cache-sensitive-re' against an element starting at END
when END is at bol. Such changes never break an element structure (as
opposed to inserting non-newline right at :begin of an element).
---
lisp/org-element.el | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/lisp/org-element.el b/lisp/org-element.el
index c7418f9..b1edb6c 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -6522,7 +6522,17 @@ The function returns the new value of
`org-element--cache-change-warning'."
(setq org-element--cache-change-tic (buffer-chars-modified-tick))
(goto-char beg)
(beginning-of-line)
- (let ((bottom (save-excursion (goto-char end) (line-end-position))))
+ (let ((bottom (save-excursion
+ (goto-char end)
+ (if (bolp)
+ ;; FIXME: Potential pitfall.
+ ;; We are appending to an element end.
+ ;; Unless the last inserted char is not
+ ;; newline, the next element is not broken
+ ;; and does not need to be purged from the
+ ;; cache.
+ end
+ (line-end-position)))))
(prog1
(let ((org-element--cache-change-warning-before
org-element--cache-change-warning)
(org-element--cache-change-warning-after))
- [elpa] externals/org updated (8908fba -> f0c474e), ELPA Syncer, 2021/12/15
- [elpa] externals/org 5840e4d 6/9: org-element-cache Do not make headline non-robust after changes at :end, ELPA Syncer, 2021/12/15
- [elpa] externals/org f0c474e 9/9: test-org-element: Add new tests for org-element-cache, ELPA Syncer, 2021/12/15
- [elpa] externals/org 4bad221 8/9: test-org-element: Add new tests, ELPA Syncer, 2021/12/15
- [elpa] externals/org cfe4b17 2/9: org-element-cache: Optimise changed property drawer detection, ELPA Syncer, 2021/12/15
- [elpa] externals/org 6339c62 4/9: org-element-cache: Do not consider BEGIN lines of elements sensitive, ELPA Syncer, 2021/12/15
- [elpa] externals/org 6998536 5/9: org-element-cache: Consider non-PROPERTIES drawers robust, ELPA Syncer, 2021/12/15
- [elpa] externals/org fd93ad6 3/9: org-element-cache: Do not treat inserting newline at :begin sensitive,
ELPA Syncer <=
- [elpa] externals/org 23d8d59 1/9: ob-gnuplot: Use org backend when assigning table to variable, ELPA Syncer, 2021/12/15
- [elpa] externals/org 003968f 7/9: test-org-element: Rename cache-bugs test to cache-table, ELPA Syncer, 2021/12/15