From abba9f135875e046212922f7029a2f3055b570bf Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 4 Jun 2020 21:19:04 +0200 Subject: Add function for quickly adding deft links in emacs --- gui/conf/init.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gui/conf/init.el b/gui/conf/init.el index 59e5a89..57b8791 100644 --- a/gui/conf/init.el +++ b/gui/conf/init.el @@ -72,7 +72,8 @@ (setq org-adapt-indentation nil) (setq org-hide-emphasis-markers t) (setq org-default-notes-file "~/org/inbox.org") - (setq org-agenda-files '("~/org"))) + (setq org-agenda-files '("~/org")) + (setq org-link-frame-setup '((file . find-file)))) ; open links in same frame (setq org-todo-keywords '((sequence "TODO(t)" "|" "DONE(d)") @@ -157,8 +158,15 @@ (setq org-confirm-babel-evaluate nil) +(defun org-deft-insert-link (file) + (interactive (list + (completing-read "Note: " + (deft-find-all-files)))) + (org-insert-link nil (concat "file:" file) (file-name-base file))) + (evil-leader/set-key - "e" 'org-babel-execute-src-block) + "e" 'org-babel-execute-src-block + "l" 'org-deft-insert-link) (use-package interleave :ensure t) -- cgit v1.2.3