aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/rul-lisp/packages
diff options
context:
space:
mode:
authorRaúl Benencia <id@rbenencia.name>2025-12-26 04:15:01 -0800
committerRaúl Benencia <id@rbenencia.name>2025-12-26 04:15:01 -0800
commitc80bf8c41884dbf634a570c2d77a90318889be5b (patch)
treeae73264ef5725fbb0acf51544d3c3d4949290e4f /.emacs.d/rul-lisp/packages
parente999844680c65bfc2e2c66855dec135b29c91f5a (diff)
emacs: rm custom denote-journal
Diffstat (limited to '.emacs.d/rul-lisp/packages')
-rw-r--r--.emacs.d/rul-lisp/packages/rul-write.el21
1 files changed, 1 insertions, 20 deletions
diff --git a/.emacs.d/rul-lisp/packages/rul-write.el b/.emacs.d/rul-lisp/packages/rul-write.el
index 4160d2f..ed7e706 100644
--- a/.emacs.d/rul-lisp/packages/rul-write.el
+++ b/.emacs.d/rul-lisp/packages/rul-write.el
@@ -24,7 +24,7 @@
(setq denote-rename-no-confirm t)
(let ((map global-map))
- (define-key map (kbd "C-c n j") #'rul/denote-journal)
+ (define-key map (kbd "C-c n j") #'denote-journal-new-or-existing-entry)
(define-key map (kbd "C-c n n") #'denote)
(define-key map (kbd "C-c n f") #'denote-open-or-create)
(define-key map (kbd "C-c n i") #'denote-link)
@@ -32,25 +32,6 @@
)
)
-(defun rul/denote-journal ()
- "Create an entry tagged 'journal' with the date as its title.
-If a journal for the current day exists, visit it. If multiple
-entries exist, prompt with completion for a choice between them.
-Else create a new file."
- (interactive)
- (let* ((today (format-time-string "%A %e %B %Y"))
- (string (denote-sluggify today "title"))
- (files (denote-directory-files-matching-regexp string)))
- (cond
- ((> (length files) 1)
- (find-file (completing-read "Select file: " files nil :require-match)))
- (files
- (find-file (car files)))
- (t
- (denote
- today
- '("journal"))))))
-
;; auto-fill mode
(add-hook 'text-mode-hook 'turn-on-auto-fill)
nihil fit ex nihilo