aboutsummaryrefslogtreecommitdiff
path: root/gui/conf
diff options
context:
space:
mode:
authorAdrian Kummerlaender2020-06-04 21:19:04 +0200
committerAdrian Kummerlaender2020-06-04 21:19:04 +0200
commitabba9f135875e046212922f7029a2f3055b570bf (patch)
treeedc605bceb728bcbcf1036ae9b7ff2501b5d3ac2 /gui/conf
parentac2cfe4fdafcde2a0a1969ba5fe6aec0bed1a0c9 (diff)
downloadnixos_home-abba9f135875e046212922f7029a2f3055b570bf.tar
nixos_home-abba9f135875e046212922f7029a2f3055b570bf.tar.gz
nixos_home-abba9f135875e046212922f7029a2f3055b570bf.tar.bz2
nixos_home-abba9f135875e046212922f7029a2f3055b570bf.tar.lz
nixos_home-abba9f135875e046212922f7029a2f3055b570bf.tar.xz
nixos_home-abba9f135875e046212922f7029a2f3055b570bf.tar.zst
nixos_home-abba9f135875e046212922f7029a2f3055b570bf.zip
Add function for quickly adding deft links in emacs
Diffstat (limited to 'gui/conf')
-rw-r--r--gui/conf/init.el12
1 files 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)