From d4b1077b6d85b69c31abea7c8802d2adda85cdc2 Mon Sep 17 00:00:00 2001
From: Raúl Benencia <id@rbenencia.name>
Date: Sun, 29 Sep 2024 16:20:17 -0700
Subject: emacs: update denote bindings and hooks

---
 .emacs.d/rul-lisp/packages/rul-write.el | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

(limited to '.emacs.d/rul-lisp')

diff --git a/.emacs.d/rul-lisp/packages/rul-write.el b/.emacs.d/rul-lisp/packages/rul-write.el
index 16eae84..b997ed9 100644
--- a/.emacs.d/rul-lisp/packages/rul-write.el
+++ b/.emacs.d/rul-lisp/packages/rul-write.el
@@ -7,7 +7,14 @@
 
 (use-package denote
   :ensure t
+  :hook (dired-mode . denote-dired-mode)
+  :bind
+  (("C-c n n" . denote)
+   ("C-c n r" . denote-rename-file)
+   ("C-c n l" . denote-link)
+   ("C-c n b" . denote-backlinks))
   :config
+  (denote-rename-buffer-mode 1)
   (setq denote-infer-keywords t)
   (setq denote-sort-keywords t)
   (setq denote-file-type 'org)
@@ -16,16 +23,14 @@
   (setq denote-link-fontify-backlinks t)
   (setq denote-rename-no-confirm t)
 
-  (add-hook 'find-file-hook #'denote-link-buttonize-buffer)
-  (add-hook 'dired-mode-hook #'denote-dired-mode-in-directories)  
-
   (let ((map global-map))
     (define-key map (kbd "C-c n j") #'rul/denote-journal)
     (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)
     (define-key map (kbd "C-c n r") #'denote-rename-file)
-    ))
+    )
+)
 
 (defun rul/denote-journal ()
   "Create an entry tagged 'journal' with the date as its title.
-- 
cgit v1.2.3