[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-remark ed5f4314e8 05/37: refactor(sync): remove org
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-remark ed5f4314e8 05/37: refactor(sync): remove org-remark-notes-setup-done |
Date: |
Sat, 14 Jan 2023 10:58:00 -0500 (EST) |
branch: externals/org-remark
commit ed5f4314e8bc583f1c9d79037965f3e76b55c829
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
refactor(sync): remove org-remark-notes-setup-done
---
org-remark.el | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/org-remark.el b/org-remark.el
index 89c894846e..a1afc7b170 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -6,7 +6,7 @@
;; URL: https://github.com/nobiot/org-remark
;; Version: 1.0.5
;; Created: 22 December 2020
-;; Last modified: 07 January 2023
+;; Last modified: 08 January 2023
;; Package-Requires: ((emacs "27.1") (org "9.4"))
;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp,
@@ -129,14 +129,14 @@ returned by `org-remark-notes-get-file-name'.")
(defvar-local org-remark-highlights-hidden nil
"Keep hidden/shown state of the highlights in current buffer.")
-;; TODO org-remark-sync?
-(defvar-local org-remark-notes-setup-done nil)
(defvar-local org-remark-notes-source-buffers '()
"List of source buffers that have loaded current notes buffer.
Each notes' buffer locally keeps track of the source buffers that
have loaded notes from itself. Buffers in this list may be
killed so that this needs to be checked with `buffer-live-p'.")
-(defvar-local org-remark-source-setup-done nil)
+
+(defvar-local org-remark-source-setup-done nil
+ "Local indicator that sync with notes buffer is set up.")
(defvar org-remark-last-notes-buffer nil
"Stores the cloned indirect buffer visiting the notes file.
@@ -860,8 +860,9 @@ When a new notes file is created, add
(run-hook-with-args-until-success
'org-remark-highlight-link-to-source-functions filename)))
(notes-props))
- ;;; Set up notes buffer for sync, etc.
- (org-remark-notes-setup notes-buf source-buf)
+ ;;; Set up notes buffer for sync for the source buffer
+ (unless org-remark-source-setup-done
+ (org-remark-notes-setup notes-buf source-buf))
(with-current-buffer notes-buf
(when (featurep 'org-remark-convert-legacy)
(org-remark-convert-legacy-data))
;;`org-with-wide-buffer is a macro that should work for non-Org file'
@@ -1076,12 +1077,12 @@ properties, add prefix \"*\"."
(defun org-remark-notes-setup (notes-buf source-buf)
;;; Start tracking the source buffer in the notes buffer as local variable.
;;; This adds variable only to the base-buffer and not to the indrect buffer.
- (let ((source-setup-done org-remark-source-setup-done))
- (with-current-buffer notes-buf
- (unless (and org-remark-notes-setup-done source-setup-done)
- (cl-pushnew source-buf org-remark-notes-source-buffers)
- (add-hook 'after-save-hook #'org-remark-notes-sync-with-source nil
:local)
- (setq org-remark-notes-setup-done t)))))
+ (with-current-buffer notes-buf
+ (unless (member source-buf org-remark-notes-source-buffers)
+ (cl-pushnew source-buf org-remark-notes-source-buffers)
+ (add-hook 'after-save-hook #'org-remark-notes-sync-with-source nil
:local)))
+ (with-current-buffer source-buf
+ (setq org-remark-source-setup-done t)))
(defun org-remark-notes-housekeep ()
"Remove killed buffers from `org-remark-notes-source-buffers'."
- [elpa] externals/org-remark updated (af99b97204 -> f603ad6769), ELPA Syncer, 2023/01/14
- [elpa] externals/org-remark 837b25d3d7 01/37: refactor: -highlight-* functions, ELPA Syncer, 2023/01/14
- [elpa] externals/org-remark 0912cbb0af 04/37: fix: incorrect beg end of a highlight, ELPA Syncer, 2023/01/14
- [elpa] externals/org-remark ac09890168 02/37: refactor -notes-* functions, ELPA Syncer, 2023/01/14
- [elpa] externals/org-remark 754f7c1915 11/37: fix: deleted highlight overlay blocking saving multiple highlights, ELPA Syncer, 2023/01/14
- [elpa] externals/org-remark 75d8fd3c9d 19/37: refactor(mark): save notes buf only when create/change, ELPA Syncer, 2023/01/14
- [elpa] externals/org-remark ed5f4314e8 05/37: refactor(sync): remove org-remark-notes-setup-done,
ELPA Syncer <=
- [elpa] externals/org-remark eb7c4ebf59 10/37: docs: doc string, ELPA Syncer, 2023/01/14
- [elpa] externals/org-remark e4ba2bbd41 18/37: chore: copyright years to 2023, ELPA Syncer, 2023/01/14
- [elpa] externals/org-remark 7367b7d056 20/37: fix: Text cut off in notes if the highlight spans across two lines #56, ELPA Syncer, 2023/01/14
- [elpa] externals/org-remark af1d4261f3 24/37: docs: update README, ELPA Syncer, 2023/01/14
- [elpa] externals/org-remark 05e18aa08c 30/37: docs: README + user manual, ELPA Syncer, 2023/01/14
- [elpa] externals/org-remark 3d4ff2e030 03/37: doc: update docstring, ELPA Syncer, 2023/01/14
- [elpa] externals/org-remark 484d36ad89 06/37: docs(sync): doc string 'org-remark-highlight-save', ELPA Syncer, 2023/01/14
- [elpa] externals/org-remark a9a3520a64 07/37: refactor(save) save notes buffer for each highlight, ELPA Syncer, 2023/01/14
- [elpa] externals/org-remark 2f25bd97bc 15/37: refactor: change the default colors of yellow pen #52, ELPA Syncer, 2023/01/14
- [elpa] externals/org-remark f08df3f524 17/37: fix: prop name _org-remark-note-body -> *org-remark-note-body, ELPA Syncer, 2023/01/14