Today I started using desktop-mode. It's nice to be able to save a desktop using the desktop-save
command, and load one using the desktop-change-dir
command.
Sometimes I do M-x cd
to change the working directory in Emacs.
I have three clients at work, with files pertaining to them stored in ~/client_foo/
, ~/client_baa/
, ~/client_baz/
. What if I wanted Emacs to have a background color of black when cd'd in to the first clients directory, green for the second client, and brown for the third. Is there any module that can help me?
face-remap-add-relative
by testing thedefault-directory
-- i.e., shorten it to the root client directory and if it matches, set the color. You can use thefind-file-hook
to attach your color function. See these related threads: stackoverflow.com/a/28008006/2112489 and emacs.stackexchange.com/a/7283/2287