emacscollective / no-littering

Help keeping ~/.config/emacs clean
GNU General Public License v3.0
635 stars 69 forks source link

/etc & /var dirs created although custom `no-littering-etc-directory ` & `no-littering-var-directory` are preset #143

Closed caisah closed 3 years ago

caisah commented 3 years ago

I have something like

(setq
 no-littering-etc-directory (expand-file-name ".litter/etc/" user-emacs-directory)
 no-littering-var-directory (expand-file-name ".litter/var/" user-emacs-directory))
(require 'no-littering)

in my init file but /etc & /var/emacs-session dirs are being created in my .emacs.d directory on every session.

tarsius commented 3 years ago

You (are trying to) set the variables before loading the library, like you are supposed to. So far so good.

Never-the-less I see no way how this could possibly happen without no-littering for some reason getting loaded even earlier.

Prefix the above code with

(message "Is no-littering already loaded? %s" (featurep 'no-littering))
caisah commented 3 years ago

I did that and got: Is no-littering already loaded? nil

I forgot to mention: both /etc, /var/emacs-session folders are empty. .litter/etc & .litter/var are also created and work as expected.

tarsius commented 3 years ago

And you are absolutely sure you didn't just forget to remove these old directories? Are they being recreated by regular emacs sessions or only if you use -Q/-q? If you comment out everything related to no-littering, do these directories still get recreated? Are you making sure you load init.el resp. an updated init.elc and not some outdated init.elc, which was created from an init.el that did not yet set these two variables.

brsvh commented 3 years ago

I have the same issue, but I seem to have found the cause of my issue. They both directories are only created when I open the file that customized no-littering. And I use flycheck check my configuration, so I guess flycheck compilation did these.