emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org aca62116da 12/31: org-persist-write: Update buffer


From: ELPA Syncer
Subject: [elpa] externals/org aca62116da 12/31: org-persist-write: Update buffer hash on save
Date: Sat, 29 Jan 2022 04:58:03 -0500 (EST)

branch: externals/org
commit aca62116da79d6f0cbc4061238f2c781e03a4b75
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    org-persist-write: Update buffer hash on save
---
 lisp/org-persist.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index aecfa57a73..664111a7ab 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -702,6 +702,11 @@ ASSOCIATED can be a plist, a buffer, or a string.
 A buffer is treated as (:buffer ASSOCIATED).
 A string is treated as (:file ASSOCIATED)."
   (setq associated (org-persist--normalize-associated associated))
+  ;; Update hash
+  (when (and (plist-get associated :file)
+             (plist-get associated :hash)
+             (get-file-buffer (plist-get associated :file)))
+    (setq associated (org-persist--normalize-associated (get-file-buffer 
(plist-get associated :file)))))
   (let ((collection (org-persist--get-collection container associated)))
     (setf collection (plist-put collection :associated associated))
     (unless (seq-find (lambda (v)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]