From 799f599dcb403ca329b6b2b60501c11c5278ea5f Mon Sep 17 00:00:00 2001 From: bth Date: Fri, 7 Mar 2025 23:46:59 -0800 Subject: [PATCH] add-hook should be optional and locally loaded like this wasnt doing anything anyway --- elisp/um.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/elisp/um.el b/elisp/um.el index 86571c4..fd0ff43 100644 --- a/elisp/um.el +++ b/elisp/um.el @@ -79,15 +79,18 @@ ;; combined with the hook into `file-name-at-point-functions', this means I can ;; run find-file at point, followed by M-n : +;; Load like this: +;; (add-hook 'file-name-at-point-functions 'um-journal-find-file) +;; ;; TODO: reuse same fallback logic as the embark advice if I keep this. + ;;;###autoload (defun um-journal-find-file () (let ((default-directory (um-journal-path)) (thing (thing-at-point 'filename)) ) (expand-file-name thing)) -) -(add-hook 'file-name-at-point-functions 'um-journal-find-file nil t) + ) ;;;;;;;;;;;;;;;;;; ;; Embark solution