I have (set-register ?E '(file . user-init-file))
, so that I can easily jump to my config file. Previously I used a string to specify the path to my init file, but I figured I'd tidy it up a bit.
However, it doesn't work, and emacs complains about (wrong-type-argument stringp user-init-file)
, giving the following stack trace with debug-on-error
enabled.
Debugger entered--Lisp error: (wrong-type-argument stringp user-init-file)
expand-file-name(user-init-file)
find-file-noselect(user-init-file nil nil nil)
find-file(user-init-file)
ad-Orig-jump-to-register(69 nil)
jump-to-register(69 nil)
call-interactively(jump-to-register nil nil)
For reference, this happens if I load emacs with -Q, and then eval the set-register...
and then attempt to jump to the register.
What's going on here? Things like (find-file user-init-file)
don't throw this error.