Multiple remote directories
prestancedesign opened this issue · 5 comments
Hi
Is there possible to set DirectoryVariables to point two locations like a staging and production website project ?
Best regards.
I usually have two settings for the remote variable in my .dir-locals.el
file and just toggle them by commenting / uncommenting. You need to refresh buffers before change takes place though. Would that work for you? I'm open to better ideas
Yes it's suffisant for me, thx for the information. 👍
Last question, how to refresh .dir-locals buffers ? Eval ? Revert buffer ?
For most buffers (revert-buffer)
is sufficient to reload DirectoryVariables
but for some reason it doesn't work with dired-mode
buffers, maybe it's a bug, for those you need to kill them and then re-open them to get new DirectoryVariables
.
I think it would be nice to be able to setup different deployment hosts with different settings (including SQL) and not having to comment / uncomment entire regions but I can't think of a good solution right now. If you use the (comment-region)
/ (uncomment-region)
in emacs-lisp
it's just a keypress to toggle configurations.
Reverting buffers can be a hassle sometimes so it would be great to find a better solution..
Reverting buffers can be a hassle sometimes so it would be great to find a better solution..
I don't know if it's better but there is an alternative find-alternative-file
https://emacs.stackexchange.com/a/189
but I can't think of a good solution right now
I'm not a long date user of Emacs (Spacemacs),but if I have an idea and/or inspiration I'll come back :)