|
| From: | Ihor Radchenko |
| Subject: | Re: org-cite: how to force a reparsing of the .bib file |
| Date: | Wed, 23 Aug 2023 09:13:41 +0000 |
Leo Butler <Leo.Butler@umanitoba.ca> writes: > Does org-cite monitor contents or the timestamp? > I am using a symlink to the bib file. Timestamp. Does the attached patch fix the problem?
>From 39b503301fc7a3ea68733dfd9e4391e3f84efec8 Mon Sep 17 00:00:00 2001
Message-ID:
<39b503301fc7a3ea68733dfd9e4391e3f84efec8.1692781998.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
Date: Wed, 23 Aug 2023 12:12:13 +0300
Subject: [PATCH] oc-basic: Fix detecting changes in symlinked bibliography
* lisp/oc-basic.el (org-cite-basic--parse-bibliography): Use
`file-truename' to follow symlinks first before checking bibliography
file change times.
Reported-by: Leo Butler <Leo.Butler@umanitoba.ca>
Link: 877cpmkds1.fsf@t14.reltub.ca">https://orgmode.org/list/877cpmkds1.fsf@t14.reltub.ca
---
lisp/oc-basic.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el
index 84d9492ea..c4468e5a8 100644
--- a/lisp/oc-basic.el
+++ b/lisp/oc-basic.el
@@ -272,6 +272,9 @@ (defun org-cite-basic--parse-bibliography (&optional info)
(plist-get info :cite-basic/bibliography)
(let ((results nil))
(dolist (file (org-cite-list-bibliography-files))
+ ;; Follow symlinks, to look into modification time of the
+ ;; actual file, not its symlink.
+ (setq file (file-truename file))
(when (file-readable-p file)
(with-temp-buffer
(when (or (org-file-has-changed-p file)
--
2.41.0
-- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
| [Prev in Thread] | Current Thread | [Next in Thread] |