diff options
author | noa | 2025-02-16 21:52:01 +0800 |
---|---|---|
committer | noa | 2025-02-16 21:52:01 +0800 |
commit | e7d5f0d3b4901a79f18faa5bc554ad440322aeb7 (patch) | |
tree | 66cc13e553c152cdaf01bb4edf951ab8f5e5a8dd /emacs/init.el | |
parent | eda24700293d6132ec338d5a060418e6ad333677 (diff) |
Add command to add a new note
Diffstat (limited to 'emacs/init.el')
-rw-r--r-- | emacs/init.el | 11 |
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 |