branch: externals/org-remark
commit f37ddb69e781e0069684fc60b4ae7b81f978a3e7
Author: Noboru Ota <m...@nobiot.com>
Commit: Noboru Ota <m...@nobiot.com>

    fix(change): force trigger of notes buffer face
    
    Problem: changing to the same line-highlight does not trigger sync but
    this causes the icon for notes not being updated.
    
    Force tiggering the update save for :change:operation. The line-icons do
    not get updated because :change: to the same pen does not involve buffer
    modificaiton and thus the sync does not get triggered to update icons.
---
 org-remark.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/org-remark.el b/org-remark.el
index 407cea5f0c..9687f5fc03 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -873,7 +873,13 @@ round-trip back to the notes file."
              (org-remark-highlight-put-props ov notes-props))
            ;; Save the notes buffer when not loading
            (unless (eq notes-buf (current-buffer))
-             (with-current-buffer notes-buf (save-buffer))))))
+             ;; Force tiggering the update save for :change: operation
+             ;; line-icons do not get updated because it does not
+             ;; involve buffer modificaiton and thus the sync does not
+             ;; get triggered to update icons.
+             (with-current-buffer notes-buf
+               (unless (buffer-modified-p) (restore-buffer-modified-p t))
+               (save-buffer))))))
       (deactivate-mark)
       (org-remark-highlights-housekeep)
       (org-remark-highlights-sort)

Reply via email to