diff options
author | jao <jao@gnu.org> | 2020-10-25 01:26:02 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2020-10-25 01:26:02 +0000 |
commit | 450d8da4d8ae965a4a7d9903772403b68c376d8f (patch) | |
tree | 470a6baa17455300dcb8540454ab08fa4652ab5e /sys | |
parent | 43f6cae85b24d0c986ab1ed45d399ef010ea1f4b (diff) | |
download | elibs-450d8da4d8ae965a4a7d9903772403b68c376d8f.tar.gz elibs-450d8da4d8ae965a4a7d9903772403b68c376d8f.tar.bz2 |
jao-org-links: extending doc: to deal with pdfs and page numbers
Diffstat (limited to 'sys')
-rw-r--r-- | sys/jao-devon.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/jao-devon.el b/sys/jao-devon.el index 4d454ba..65e989f 100644 --- a/sys/jao-devon.el +++ b/sys/jao-devon.el @@ -55,4 +55,21 @@ (jao-devon-add-html-page title url html)) (w3m-view-source)))) +(with-eval-after-load "org" + (autoload 'jao-as-safari-doc "jao-applescript.el") + + (defun jao-org-insert-devon-link () + (interactive) + (insert (jao-devon-selection))) + + (defun jao-org-insert-safari-link () + (interactive) + (let ((ln (jao-as-safari-doc))) + (when ln (jao-org-insert-link (car ln) (cdr ln))))) + + (org-add-link-type "x-devonthink-item" 'jao-devon-open 'identity) + + (define-key org-mode-map "\C-cd" 'jao-org-insert-devon-link) + (define-key org-mode-map "\C-cs" 'jao-org-insert-safari-link)) + (provide 'jao-devon) |