summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--custom/jao-custom-completion.el7
1 files changed, 2 insertions, 5 deletions
diff --git a/custom/jao-custom-completion.el b/custom/jao-custom-completion.el
index 0151de5..235161c 100644
--- a/custom/jao-custom-completion.el
+++ b/custom/jao-custom-completion.el
@@ -257,11 +257,8 @@
(defun jao-embark-targets--org-link ()
(when (derived-mode-p 'org-mode)
- (when (org-in-regexp org-link-bracket-re)
- (let ((lnk (match-string-no-properties 1)))
- (if (string-match-p "https?://.+" (or lnk ""))
- (cons 'url lnk)
- (cons 'org-link (match-string-no-properties 0)))))))
+ (let ((lnk (org-element-property :raw-link (org-element-context))))
+ (and lnk (cons 'org-link lnk)))))
(defun jao-embark-targets--gl-org-link ()
(when (org-in-regexp org-link-bracket-re)