[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Bug: org-element--cache-sync called after switching buffers [8.3
Re: [O] Bug: org-element--cache-sync called after switching buffers [8.3.1 (8.3.1-16-gf6aa53-elpa @ /home/mah/.emacs.d/elpa/org-20150810/)]
Fri, 21 Aug 2015 17:20:13 +0200
"Mark A. Hershberger" <address@hidden> writes:
> While composing an email in mu4e, I get the following backtrace. It
> looks like this is because mu4e switches buffers between the time
> org-element-cache-reset is called and the time that
> org-element--cache-sync is called.
Does the following change solve the issue?
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 8f41ab2..3179fae 100644
@@ -4903,6 +4903,7 @@ This function assumes `org-element--cache' is a valid AVL
(defsubst org-element--cache-active-p ()
"Non-nil when cache is active in current buffer."
(or (derived-mode-p 'org-mode) orgstruct-mode)))
(defun org-element--cache-find (pos &optional side)
@@ -5615,7 +5616,8 @@ buffers."
(dolist (buffer (if all (buffer-list) (list (current-buffer))))
- (when (org-element--cache-active-p)
+ (when (and org-element-use-cache
+ (or (derived-mode-p 'org-mode) orgstruct-mode))
(org-set-local 'org-element--cache-objects (make-hash-table :test #'eq))