mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-30 08:08:26 +00:00
Fix Emacs 27 test failure
* lisp/org-id.el (org-id-find-id-in-file): Work around change functions not always firing up in Emacs 27 when using `insert-file-contents'.
This commit is contained in:
parent
933d282881
commit
3ec0933122
@ -686,8 +686,12 @@ optional argument MARKERP, return the position as a new marker."
|
||||
(unless (derived-mode-p 'org-mode) (org-mode))
|
||||
(unless (or visiting markerp)
|
||||
(buffer-disable-undo)
|
||||
(erase-buffer)
|
||||
(insert-file-contents file))
|
||||
;; FIXME: In Emacs 27, `insert-file-contents' seemingly
|
||||
;; does not trigger modification hooks in some
|
||||
;; scenarios. This is manifested in test failures due
|
||||
;; to element cache losing track of the modifications.
|
||||
(org-element-cache-reset)
|
||||
(insert-file-contents file nil nil nil 'replace))
|
||||
(let ((pos (org-find-entry-with-id id)))
|
||||
(cond
|
||||
((null pos) nil)
|
||||
|
Loading…
Reference in New Issue
Block a user