summaryrefslogtreecommitdiff
path: root/lisp/org/org-element.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2023-08-27 22:38:34 -0400
committerKyle Meyer <kyle@kyleam.com>2023-08-27 22:38:34 -0400
commit648a5e33e80417855b908693e36cba56cd2c796c (patch)
treee888078dd549bccca911f50ae91e55da663e6f15 /lisp/org/org-element.el
parent458442fe78c4223cc87d44d862f1912a1bd66e37 (diff)
downloademacs-648a5e33e80417855b908693e36cba56cd2c796c.tar.gz
emacs-648a5e33e80417855b908693e36cba56cd2c796c.tar.bz2
emacs-648a5e33e80417855b908693e36cba56cd2c796c.zip
Update to Org 9.6.8-3-g21171d
Diffstat (limited to 'lisp/org/org-element.el')
-rw-r--r--lisp/org/org-element.el18
1 files changed, 3 insertions, 15 deletions
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el
index 296468eed1a..0debd1a6818 100644
--- a/lisp/org/org-element.el
+++ b/lisp/org/org-element.el
@@ -6705,20 +6705,8 @@ The function returns the new value of `org-element--cache-change-warning'."
(setq org-element--cache-change-tic (buffer-chars-modified-tick))
(setq org-element--cache-last-buffer-size (buffer-size))
(goto-char beg)
- (beginning-of-line)
- (let ((bottom (save-excursion
- (goto-char end)
- (if (and (bolp)
- ;; When beg == end, still extent to eol.
- (> (point) beg))
- ;; 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)))))
+ (forward-line 0)
+ (let ((bottom (save-excursion (goto-char end) (line-end-position))))
(prog1
;; Use the worst change warning to not miss important edits.
;; This function is called before edit and after edit by
@@ -7859,7 +7847,7 @@ element ending there."
(setq cached-only nil))
(let (element)
(when (org-element--cache-active-p)
- (if (not org-element--cache) (org-element-cache-reset)
+ (if (not (org-with-base-buffer nil org-element--cache)) (org-element-cache-reset)
(unless cached-only (org-element--cache-sync (current-buffer) pom))))
(setq element (if cached-only
(when (and (org-element--cache-active-p)