mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-25 07:02:53 +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 (derived-mode-p 'org-mode) (org-mode))
|
||||||
(unless (or visiting markerp)
|
(unless (or visiting markerp)
|
||||||
(buffer-disable-undo)
|
(buffer-disable-undo)
|
||||||
(erase-buffer)
|
;; FIXME: In Emacs 27, `insert-file-contents' seemingly
|
||||||
(insert-file-contents file))
|
;; 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)))
|
(let ((pos (org-find-entry-with-id id)))
|
||||||
(cond
|
(cond
|
||||||
((null pos) nil)
|
((null pos) nil)
|
||||||
|
|
Loading…
Reference in a new issue