summary refs log tree commit diff
path: root/emacs/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/init.el')
-rw-r--r--emacs/init.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/emacs/init.el b/emacs/init.el
index bcfd7a0..7d67d90 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -925,6 +925,17 @@ necessary variables are set."
   :mode ((rx (or ".lisp" ".cl") eos) . common-lisp-mode))
 
 
+(defun note/new (&optional other-window)
+  (interactive "P")
+  (let* ((uid (format-time-string "%Y-%m-%d-%H%M%S"))
+         (note (concat note/directory "/" uid "." note/file-ending)))
+    (if other-window
+        (progn
+          (insert "[[./" uid ".org]]")
+          (find-file-other-window note))
+      (find-file note))
+    ))
+
 (use-package ediff
   :defer t
   :custom