failed-at-uni · 2022-04-04 22:22
So I wanted to have a keybinding in my WM to open a specific Emacs session. I'm using DOOM but I don't think that matters in what I'm trying to do. I have a file saved out with doom/save-session and I want that session to autoload. I've tried doing some stuff on the command line...
\`emacs --eval='(doom/load-session "$HOME/goto/autosave)'\`
I tried a few other things but nothing is working. I'll have to try again later.
Hastrack · 2022-04-05 14:50
Environment variables aren't expanded, that might be the problem, you have to do it explicitly with =getenv=.
I don't use doom so I can't test it, but if env vars are the problem, this should work:
```
emacs --eval '(doom/load-session (concat (getenv "HOME") "/goto/autosave"))'
```
failed-at-uni · 2022-04-23 17:54
I had originally tried it without the $HOME. I just put in the past to hide things but so it still made sense.