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

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

[elpa] externals/org-remark 7995630552 2/8: update help-echo prop on sav


From: ELPA Syncer
Subject: [elpa] externals/org-remark 7995630552 2/8: update help-echo prop on save.
Date: Sat, 24 Dec 2022 02:57:58 -0500 (EST)

branch: externals/org-remark
commit 79956305529593bffe05a457d487bca6875bc0e8
Author: marty hiatt <martianhiatus [a t] riseup [d o t] net>
Commit: marty hiatt <martianhiatus [a t] riseup [d o t] net>

    update help-echo prop on save.
    
    -- this would be much better if we updated on leaving the notes buffer.
    -- as it is it updates on saving the main text buffer, which is not marked 
as
    -- changed if only the notes buffer is updated.
---
 org-remark.el | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index 0ebed66ea6..5947f97624 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -388,11 +388,20 @@ in the current buffer.  Each highlight is an overlay."
   (org-remark-highlights-sort)
   (let ((filename (buffer-file-name)))
     (dolist (h org-remark-highlights)
-      (let ((beg (overlay-start h))
-            (end (overlay-end h))
-            (props (overlay-properties h)))
+      (let* ((beg (overlay-start h))
+             (end (overlay-end h))
+             (props (overlay-properties h)))
+        (org-remark-highlight-update beg end)
         (org-remark-highlight-save filename beg end props)))))
 
+(defun org-remark-highlight-update (beg end)
+  "Update help echo text of overlay at BEG, END with TEXT."
+  (let* ((ov (car (overlays-at beg)))
+         (id (overlay-get ov 'org-remark-id))
+         (note (assoc id (org-remark-highlights-get)))
+         (text (car (last note))))
+    (overlay-put ov 'help-echo text)))
+
 (defun org-remark-open (point &optional view-only)
   "Open marginal notes file for highlight at POINT.
 The marginal notes will be narrowed to the relevant headline to



reply via email to

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