I would like an Emacs bookmark that jumps to a 'today' file. This is a different file every day, so I would like to use a function.
I tried an entry in bookmark-alist in the bookmarks file at .emacs.d/bookmarks:
("Today"
(filename . (today-file))
;; removed for brevity
)
(where the function today-file returns the filename)
But this give the error (wrong-type-argument stringp (today-file)) from file-readable-p.
My current workaround is a keybinding:
(define-key mode-specific-map "t" (lambda () (interactive) (find-file (today-file))))
which works.
How can I define a bookmark with a function that runs when I open the bookmark?