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

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

[elpa] externals/org-remark 697a990a34 158/173: revert f6c3f36 The scree


From: ELPA Syncer
Subject: [elpa] externals/org-remark 697a990a34 158/173: revert f6c3f36 The screen jerking was not OS or version; setup issue
Date: Fri, 28 Jan 2022 16:58:11 -0500 (EST)

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

    revert f6c3f36 The screen jerking was not OS or version; setup issue
---
 org-remark.el | 35 +++++++++++------------------------
 1 file changed, 11 insertions(+), 24 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index ba7eb3bdd8..060a1232bb 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -408,31 +408,18 @@ current buffer.
 This function ensures that there is only one cloned buffer for
 notes file by tracking it."
   (interactive "d\nP")
-  ;; Check if the current point is at a org-remark highlight overlay.
-  (when-let ((id (get-char-property point 'org-remark-id)))
-    ;; If the base-bufffer of the marginal notes buffer has not changed from 
the
-    ;; previous, don't kill it If it's different or new, kill the last marginal
-    ;; notes buffer and create a new clone indrect buffer.  We want only one of
-    ;; the clone indirect buffer for the Emacs session at a time.
-    (unless (buffer-live-p org-remark-last-notes-buffer)
-      (setq org-remark-last-notes-buffer nil))
-    (let ((ibuf org-remark-last-notes-buffer)
-          (notes-buf (find-file-noselect org-remark-notes-file-path))
-          (cbuf (current-buffer)))
-      (when (buffer-base-buffer ibuf) notes-buf
-            ;; killed buffer is not nil
-            (kill-buffer ibuf) (setq ibuf nil))
-      ;; ibuf (marignal notes buffer) does not exist or exist but it's not for
-      ;; the current main note. Clone a new indirect buffer.
-      (unless ibuf
-        (setq ibuf (make-indirect-buffer
-                    notes-buf org-remark-notes-buffer-name :clone)))
-      (display-buffer ibuf org-remark-notes-display-buffer-action)
-      (set-buffer ibuf)(widen)
+  (when (buffer-live-p org-remark-last-notes-buffer)
+      (kill-buffer org-remark-last-notes-buffer))
+  (when-let ((id (get-char-property point 'org-remark-id))
+             (ibuf (make-indirect-buffer
+                    (find-file-noselect org-remark-notes-file-path)
+                    org-remark-notes-buffer-name 'clone)))
+    (setq org-remark-last-notes-buffer ibuf)
+    (with-current-buffer ibuf
       (when-let (p (org-find-property org-remark-prop-id id))
-        (goto-char p)(org-narrow-to-subtree))
-      (setq org-remark-last-notes-buffer ibuf)
-      (unless view-only (select-window (get-buffer-window ibuf))))))
+        (widen)(goto-char p)(org-narrow-to-subtree)))
+    (display-buffer ibuf org-remark-notes-display-buffer-action)
+    (unless view-only (select-window (get-buffer-window ibuf)))))
 
 (defun org-remark-view (point)
   "View marginal notes for highlight at POINT.



reply via email to

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