diff options
author | jao <jao@gnu.org> | 2021-05-24 07:26:53 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-05-24 07:26:53 +0100 |
commit | 6cf23fbf572295a68604279d179c73990ac20c8f (patch) | |
tree | decd688cdd901885b900c850cca80c52c1100063 | |
parent | f5ca99beb75b4dbd04110a269139273c2057003c (diff) | |
download | elibs-6cf23fbf572295a68604279d179c73990ac20c8f.tar.gz elibs-6cf23fbf572295a68604279d179c73990ac20c8f.tar.bz2 |
embark target for global org links
-rw-r--r-- | completion.org | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/completion.org b/completion.org index a5d861b..27aa62e 100644 --- a/completion.org +++ b/completion.org @@ -334,8 +334,22 @@ "Actions for org links" ((kbd "RET") org-open-link-from-string)) + (defun jao-embark-targets--gl-org-link () + (when (org-in-regexp org-link-any-re) + (cons 'gl-org-link (match-string-no-properties 0)))) + + (embark-define-keymap jao-embark-targets-gl-org-link-map + "Actions for exteranl org links" + ((kbd "RET") org-open-at-point-global)) + + (add-to-list 'embark-target-finders #'jao-embark-targets--gl-org-link) + (add-to-list 'embark-keymap-alist + '(gl-org-link . jao-embark-targets-gl-org-link-map)) + (add-to-list 'embark-target-finders #'jao-embark-targets--org-link) - (add-to-list 'embark-keymap-alist '(org-link . jao-embark-targets-org-link-map)) + (add-to-list 'embark-keymap-alist + '(org-link . jao-embark-targets-org-link-map)) + #+end_src *** url targets #+begin_src emacs-lisp |