From 260840aa0a0fbed4ae454ef678d4bffd59ca41f0 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Mon, 19 Dec 2022 10:18:15 +0100 Subject: [PATCH] Move Org mode link abbreviations to :init block This allows to overwrite the default value via customization. --- init.el | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/init.el b/init.el index 2914bef..d31314c 100644 --- a/init.el +++ b/init.el @@ -903,10 +903,20 @@ org-outline-path-complete-in-steps nil org-refile-target-verify-function 'db/verify-refile-target) - ;; Bable + ;; Babel (setq org-babel-load-languages '((shell . t) - (emacs-lisp . t)))) + (emacs-lisp . t))) + + ;; Link shortcuts (some taken from the documentation) + + (setq org-link-abbrev-alist + '(("wpen" . "https://en.wikipedia.org/wiki/") + ("wpde" . "https://de.wikipedia.org/wiki/") + ("ddg" . "https://duckduckgo.com/?q=%s") + ("omap" . "https://nominatim.openstreetmap.org/search?q=%s&polygon=1") + ("github" . "https://github.com/") + ("gitlab" . "https://gitlab.com/")))) :config (progn ;; Some hooks from text-mode-hook, Org mode does not seem to run those? @@ -943,20 +953,6 @@ ;; Link type for RFCs (org-link-set-parameters "rfc" :follow #'db/org-rfc-open) - ;; Link shortcuts (some taken from the documentation) - (add-to-list 'org-link-abbrev-alist - '("wpen" . "https://en.wikipedia.org/wiki/")) - (add-to-list 'org-link-abbrev-alist - '("wpde" . "https://de.wikipedia.org/wiki/")) - (add-to-list 'org-link-abbrev-alist - '("ddg" . "https://duckduckgo.com/?q=%s")) - (add-to-list 'org-link-abbrev-alist - '("omap" . "https://nominatim.openstreetmap.org/search?q=%s&polygon=1")) - (add-to-list 'org-link-abbrev-alist - '("github" . "https://github.com/")) - (add-to-list 'org-link-abbrev-alist - '("gitlab" . "https://gitlab.com/")) - ;; Some timers (unless (memq #'org-clock-save