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

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

[elpa] externals/org-remark a9a3520a64 07/37: refactor(save) save notes


From: ELPA Syncer
Subject: [elpa] externals/org-remark a9a3520a64 07/37: refactor(save) save notes buffer for each highlight
Date: Sat, 14 Jan 2023 10:58:00 -0500 (EST)

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

    refactor(save) save notes buffer for each highlight
    
    This was removed in the course of refactoring for sync.  Now the
    behaviour of highlight-save is back to be the same as before in order
    not to surprise users.
---
 org-remark.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/org-remark.el b/org-remark.el
index ae7a39d659..b9e6d56f8e 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -904,6 +904,9 @@ buffer for automatic sync."
            (when (and orgid org-remark-use-org-id)
              (insert (concat "[[id:" orgid "]" "[" title "]]"))))
          (setq notes-props (list :body (org-remark-notes-get-body)))))
+      ;; Save the notes buf to file unless source and notes buffers are
+      ;; the same.
+      (unless (eq notes-buf source-buf) (save-buffer))
       notes-props)))
 
 (defun org-remark-highlight-load (highlight)
@@ -953,7 +956,6 @@ Assume the current buffer is the source buffer."
 ;;    or directly with the base buffer.  For automatic sync
 ;;    functionality, Org-remark interacts directly with the base buffer.
 
-
 (defun org-remark-notes-remove (id &optional delete)
   "Remove the note entry for highlight ID.
 By default, it deletes only the properties of the entry keeping



reply via email to

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