add-hook should be optional and locally loaded like this wasnt doing anything anyway
This commit is contained in:
parent
56ca4c6ad4
commit
799f599dcb
1 changed files with 5 additions and 2 deletions
|
|
@ -79,7 +79,11 @@
|
||||||
;; combined with the hook into `file-name-at-point-functions', this means I can
|
;; combined with the hook into `file-name-at-point-functions', this means I can
|
||||||
;; run find-file at point, followed by M-n :
|
;; 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.
|
;; TODO: reuse same fallback logic as the embark advice if I keep this.
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun um-journal-find-file ()
|
(defun um-journal-find-file ()
|
||||||
(let ((default-directory (um-journal-path))
|
(let ((default-directory (um-journal-path))
|
||||||
|
|
@ -87,7 +91,6 @@
|
||||||
)
|
)
|
||||||
(expand-file-name thing))
|
(expand-file-name thing))
|
||||||
)
|
)
|
||||||
(add-hook 'file-name-at-point-functions 'um-journal-find-file nil t)
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;
|
||||||
;; Embark solution
|
;; Embark solution
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue