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

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

[elpa] externals/org-remark 3d8ca6831d 1/3: Fix source-file-name incorre


From: ELPA Syncer
Subject: [elpa] externals/org-remark 3d8ca6831d 1/3: Fix source-file-name incorrect issue
Date: Mon, 18 Jul 2022 16:57:43 -0400 (EDT)

branch: externals/org-remark
commit 3d8ca6831dd5d4685f02d715a40b3f097fade027
Author: Nan Jun Jie <nanjunjie@139.com>
Commit: Nan Jun Jie <nanjunjie@139.com>

    Fix source-file-name incorrect issue
    
    `find-file-noselect` makes nodes buffer as current buffer, after that,
    `org-remark-source-get-file-name` will get the notes buffer's file
    name(`marginalia.org`) instead of the source file name. So org remark
    will report warning message like `No highlights or annotations found
    for marginalia.org`
    
    The fix finds source file name first, then get notes-buf.
---
 org-remark.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index be0a94b310..13b521175d 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -942,8 +942,8 @@ load the highlights"
 The file name is returned by `org-remark-notes-get-file-name'.
 Each highlight is a list in the following structure:
     (ID (BEG . END) LABEL)"
-  (when-let ((notes-buf (find-file-noselect (org-remark-notes-get-file-name)))
-             (source-file-name (org-remark-source-get-file-name 
(buffer-file-name))))
+  (when-let ((source-file-name (org-remark-source-get-file-name 
(buffer-file-name)))
+             (notes-buf (find-file-noselect (org-remark-notes-get-file-name))))
     ;; TODO check if there is any relevant notes for the current file
     ;; This can be used for adding icon to the highlight
     (let ((highlights))



reply via email to

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