[Org] A custom link type for RFCs

This commit is contained in:
Daniel - 2019-05-31 21:38:05 +02:00
parent f518c0ca3d
commit f2115f5587
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
2 changed files with 12 additions and 1 deletions

View File

@ -569,7 +569,8 @@ search commands like `db/helm-shortcuts."
db/bookmark-add-url
db/lookup-smime-key
db/org-onenote-open
db/org-outlook-open))
db/org-outlook-open
db/org-rfc-open))
(use-package hydra
:commands (defhydra))
@ -782,6 +783,9 @@ search commands like `db/helm-shortcuts."
;; Skip some org mode regions to be skipped by ispell
(add-hook 'org-mode-hook #'endless/org-ispell)
;; Link type for RFCs
(org-link-set-parameters "rfc" :follow #'db/org-rfc-open)
;; Some timers
(unless (memq #'org-clock-save

View File

@ -519,6 +519,13 @@ This is done only if the value of this variable is not null."
(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."
(unless (string-match "[1-9][0-9]*" number)
(user-error "Not a valid number for an RFC: %s" number))
(browse-url (concat "https://tools.ietf.org/html/rfc" number)))
;;; Bookmarks