summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs/init.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 116172f..927a73d 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -735,6 +735,14 @@ The misspelled word is taken from OVERLAY.  WORD is the corrected word."
   ("<f12>" . howm-list-all)
   ("<C-f12>" . howm-create))
 (setopt howm-file-name-format "%Y-%m-%dT%H%M%S.md")
+
+(defun noa/open-todays-diary ()
+  (interactive)
+  (let ((date (format-time-string "%Y-%m-%d")))
+    (find-file (format "~/Documents/notes/diary/%s.md"  date))
+    (if (= (buffer-size) 0)
+        (insert (concat "# " date "\n\n")))))
+
 ;;; Bibliography management
 (use-package ebib
   :ensure t