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

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

[nongnu] elpa/crux 20c0784 104/112: Add support for org-mode links to cr


From: ELPA Syncer
Subject: [nongnu] elpa/crux 20c0784 104/112: Add support for org-mode links to crux-view-url
Date: Wed, 11 Aug 2021 09:58:03 -0400 (EDT)

branch: elpa/crux
commit 20c07848049716a0e1aa2560e23b5f4149f2a74f
Author: Trust me I am a doctor <pillule@riseup.net>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>

    Add support for org-mode links to crux-view-url
---
 crux.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/crux.el b/crux.el
index ca9d863..3fc313c 100644
--- a/crux.el
+++ b/crux.el
@@ -490,7 +490,9 @@ When invoke with C-u, the newly created file will be 
visited.
 (defun crux-view-url ()
   "Open a new buffer containing the contents of URL."
   (interactive)
-  (let* ((default (thing-at-point-url-at-point))
+  (let* ((default (if (eq major-mode 'org-mode)
+                      (org-element-property :raw-link (org-element-context))
+                    (thing-at-point-url-at-point)))
          (url (read-from-minibuffer "URL: " default)))
     (switch-to-buffer (url-retrieve-synchronously url))
     (rename-buffer url t)



reply via email to

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