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

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

[elpa] externals/org-remark 48907778f4 3/6: fix :org-remark-link: prop f


From: ELPA Syncer
Subject: [elpa] externals/org-remark 48907778f4 3/6: fix :org-remark-link: prop for EWW
Date: Fri, 23 Dec 2022 10:57:56 -0500 (EST)

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

    fix :org-remark-link: prop for EWW
---
 org-remark.el | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index d16d6f2395..43307b77c0 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/nobiot/org-remark
 ;; Version: 1.0.5
 ;; Created: 22 December 2020
-;; Last modified: 14 December 2022
+;; Last modified: 23 December 2022
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp,
 
@@ -773,7 +773,14 @@ source with using ORGID."
          (notes-buf (find-file-noselect (org-remark-notes-get-file-name)))
          (main-buf (current-buffer))
          (line-num (org-current-line beg))
-         (orgid (org-remark-highlight-get-org-id beg)))
+         (orgid (org-remark-highlight-get-org-id beg))
+         (link (if buffer-file-name
+                   (concat "[[file:" filename
+                           (when line-num (format "::%d" line-num)) "]]")
+                 ;;FIXME we really should not assume EWW
+                 (when (eq major-mode 'eww-mode)
+                   ;;; FIXME we shhould not assume https?
+                   (concat "[[https://"; filename "]]")))))
     (with-current-buffer notes-buf
       (when (featurep 'org-remark-convert-legacy) 
(org-remark-convert-legacy-data))
       ;;`org-with-wide-buffer is a macro that should work for non-Org file'
@@ -790,11 +797,7 @@ source with using ORGID."
                                   (org-up-heading-safe) (point))))
              (id-headline (org-find-property org-remark-prop-id id)))
          ;; Add org-remark-link with updated line-num as a property
-         (plist-put props "org-remark-link" (concat
-                                             "[[file:"
-                                             filename
-                                             (when line-num (format "::%d" 
line-num))
-                                             "]]"))
+         (when link (plist-put props "org-remark-link" link))
          (if id-headline
              (progn
                (goto-char id-headline)



reply via email to

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