diff options
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) |