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,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
|
||||
|
|
|
|||
Loading…
Reference in a new issue