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

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

[elpa] externals/org-remark 42b77e896b 3/6: fix: Relative file name of t


From: ELPA Syncer
Subject: [elpa] externals/org-remark 42b77e896b 3/6: fix: Relative file name of the source file in the notes file
Date: Sat, 5 Feb 2022 07:57:43 -0500 (EST)

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

    fix: Relative file name of the source file in the notes file
    
    The relative file name of the source was not relative from the marginal 
notes
    file but from the source file itself -- this should be relative from the
    marginal notes.
---
 org-remark.el | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index 2d39bd4e0a..2c8bcf6fcb 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -1065,10 +1065,16 @@ Case 2. The overlay points to no buffer
 
 
 ;;;;; Other utilities
-(defun org-remark-source-path (path)
-  "Convert PATH either to absolute or relative for marginal notes files.
-Returns the standardized path."
-  (funcall org-remark-source-path-function path))
+(defun org-remark-source-file-name (filename)
+  "Convert FILENAME either to absolute or relative for marginal notes files.
+Returns the standardized filename.
+
+The current buffer is assumed to be visiting the source file.
+
+FILENAME should be an absolute file name of the source file."
+  ;; Get the default-directory of the notes
+  (with-current-buffer (find-file-noselect (org-remark-notes-get-file-name))
+    (funcall org-remark-source-file-name-function filename)))
 
 (defun org-remark-region-or-word ()
   "Return beg and end of the active region or of the word at point.



reply via email to

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