I am setting up a few hydras, one of which should open a frequently accessed file. The following command works, if I bind a keyboard sequence to it:
(lambda () (interactive) (find-file "~/capture.org"))
How would I rewrite it if I want to get the file (capture.org here) from a variable?
(setq my-file-variable "~/capture.org")
(lambda () (interactive) (find-file my-file-variable))
This returns an error: "Wrong type argument: stringp, ("~/capture.org")"
It seems that the variable contains a list with one element (the string I want), and not just the string.