[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-remark cc69b0359b 6/9: fix: inifinate loop when not
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-remark cc69b0359b 6/9: fix: inifinate loop when notes = source for notes-sync |
Date: |
Tue, 27 Dec 2022 19:58:31 -0500 (EST) |
branch: externals/org-remark
commit cc69b0359b234ecf68feb2b71b1cb295f40c3bdb
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
fix: inifinate loop when notes = source for notes-sync
---
org-remark.el | 39 ++++++++++++++++++++++++++-------------
1 file changed, 26 insertions(+), 13 deletions(-)
diff --git a/org-remark.el b/org-remark.el
index 16ad4d05c0..9ea50c5563 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -741,7 +741,7 @@ to the database."
;; TODO. The function should be based on parameters
(unless (overlay-get ov 'help-echo)
(overlay-put ov 'help-echo (plist-get notes-props :body)))
- (overlay-put ov 'org-remark-note-body
+ (overlay-put ov '_org-remark-note-body
(plist-get notes-props :body)))))
(deactivate-mark)
(org-remark-highlights-housekeep)
@@ -868,18 +868,31 @@ When a new notes file is created, add
(when (and orgid org-remark-use-org-id)
(insert (concat "[[id:" orgid "]" "[" title "]]"))))
(setq notes-props (list :body (org-remark-notes-get-text)))))
- (cond
- ;; fix GH issue #19
- ;; Temporarily remove `org-remark-save' from the `after-save-hook'
- ;; When the marginal notes buffer is the source buffer
- ((eq notes-buf main-buf)
+ ;; (cond
+ ;; ;; fix GH issue #19
+ ;; ;; Temporarily remove `org-remark-save' from the `after-save-hook'
+ ;; ;; When the marginal notes buffer is the source buffer
+ ;; ((eq notes-buf main-buf)
+ ;; (remove-hook 'after-save-hook #'org-remark-save t)
+ ;; (save-buffer)
+ ;; (add-hook 'after-save-hook #'org-remark-save nil t))
+ ;; ;; When marginal notes buffer is separate from the source buffer,
save the
+ ;; ;; notes buffer
+ ;; ((buffer-modified-p)
+
+ ;; Now that the notes-sync is put into after-save-buffer, we need
+ ;; to remove stop saving or remove 'after-save-hook temporarily
+ ;; to avoid (infinite) loop.
+
+ ;; (save-buffer)))
+ (when (eq notes-buf main-buf)
(remove-hook 'after-save-hook #'org-remark-save t)
- (save-buffer)
- (add-hook 'after-save-hook #'org-remark-save nil t))
- ;; When marginal notes buffer is separate from the source buffer, save
the
- ;; notes buffer
- ((buffer-modified-p)
- (save-buffer)))
+ (remove-hook 'after-save-hook #'org-remark-notes-sync-with-source t)
+ ;;(save-buffer)
+ (set-buffer-modified-p nil)
+ ;;(add-hook 'after-save-hook #'org-remark-save t)
+ ;;(add-hook 'after-save-hook #'org-remark-notes-sync-with-source t))
+ )
notes-props)))
@@ -1022,7 +1035,7 @@ killed so that this needs to be checked with
`buffer-live-p'.")
;; (dolist list)
(unless (overlay-get ov 'help-echo)
(overlay-put ov 'help-echo (plist-get props :body)))
- (overlay-put ov 'org-remark-note-body
+ (overlay-put ov '*org-remark-note-body
(plist-get props :body)))))
(defun org-remark-highlights-load ()
- [elpa] externals/org-remark updated (a6b79194d8 -> 5fb747a419), ELPA Syncer, 2022/12/27
- [elpa] externals/org-remark 854856059f 8/9: fix: issue #44 change CATEGORY, ELPA Syncer, 2022/12/27
- [elpa] externals/org-remark 47918fa751 2/9: feat: sync notes with source, ELPA Syncer, 2022/12/27
- [elpa] externals/org-remark cc69b0359b 6/9: fix: inifinate loop when notes = source for notes-sync,
ELPA Syncer <=
- [elpa] externals/org-remark b6fa1bea1a 4/9: fix: notes-update-source to allow for beg end adjustment, ELPA Syncer, 2022/12/27
- [elpa] externals/org-remark f0a4f23911 3/9: feat: notes-source sync setup, ELPA Syncer, 2022/12/27
- [elpa] externals/org-remark 2b0ccad245 1/9: refactor: org-remark-highlight-get-text -> notes-get-text, ELPA Syncer, 2022/12/27
- [elpa] externals/org-remark 5fb747a419 9/9: Merge branch 'notes-sync', ELPA Syncer, 2022/12/27
- [elpa] externals/org-remark eb6456d7f9 5/9: docs(notes-sync): add FIXME comment for the previous commit, ELPA Syncer, 2022/12/27
- [elpa] externals/org-remark 00e56e12a6 7/9: fix: text-property org-remark-label to be symbol, ELPA Syncer, 2022/12/27