diff --git a/init.el b/init.el index 619af46..6e847ae 100644 --- a/init.el +++ b/init.el @@ -572,8 +572,6 @@ db/bookmark-add-external db/bookmark-add-url db/lookup-smime-key - db/org-onenote-open - db/org-outlook-open db/dired-from-shell-command db/system-open)) @@ -710,6 +708,8 @@ With given ARG, display files in `db/important-document-path’." db/org-capture-code-snippet hydra-org-clock/body db/make-org-capture-frame + db/org-onenote-open + db/org-outlook-open db/org-rfc-open)) (use-package org diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index 846e7cf..f15e3db 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -440,6 +440,19 @@ Current Task: %s(db/org-clock-current-task); " ;;; Custom link handlers +(defun db/org-onenote-open (path) + "Visit OneNote document on PATH." + (unless (file-executable-p db/path-to-onenote) + (user-error "Path for OneNote is not executable, please customize `db/path-to-onenote’.")) + (start-process "OneNote" nil db/path-to-onenote "/hyperlink" path)) + +(defun db/org-outlook-open (id) + "Open the Outlook item identified by ID. + ID should be an Outlook GUID." + (unless (file-executable-p db/path-to-outlook) + (user-error "Path for Outlook is not executable, please customize `db/path-to-outlook’.")) + (w32-shell-execute "open" db/path-to-outlook (concat "/select outlook:" id))) + (defun db/org-rfc-open (number) "Open browser to show RFC of given NUMBER. If `db/rfc-cache-path' is defined, download the RFC in txt format diff --git a/site-lisp/db-utils.el b/site-lisp/db-utils.el index 01d8ded..7b347fb 100644 --- a/site-lisp/db-utils.el +++ b/site-lisp/db-utils.el @@ -491,19 +491,6 @@ This is done only if the value of this variable is not null." (call-process "xrandr" nil nil nil "--output" "HDMI-3" "--off")) -(defun db/org-onenote-open (path) - "Visit OneNote document on PATH." - (unless (file-executable-p db/path-to-onenote) - (user-error "Path for OneNote is not executable, please customize `db/path-to-onenote’.")) - (start-process "OneNote" nil db/path-to-onenote "/hyperlink" path)) - -(defun db/org-outlook-open (id) - "Open the Outlook item identified by ID. - ID should be an Outlook GUID." - (unless (file-executable-p db/path-to-outlook) - (user-error "Path for Outlook is not executable, please customize `db/path-to-outlook’.")) - (w32-shell-execute "open" db/path-to-outlook (concat "/select outlook:" id))) - ;;; Bookmarks