[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cleaning up and structuring user-emacs-directory

From: Yuan Fu
Subject: Re: Cleaning up and structuring user-emacs-directory
Date: Wed, 19 Aug 2020 12:47:13 -0400

I think one concern could be that if we change the cache directory, users would 
need to manually move their cache files, or lost their data. That doesn’t has 
to be the case, we can make this new feature opt-in:

(defvar user-cache-directory nil)

(defun expand-cache-name (name)
  (if user-cache-directory
      (expand-file-name name user-cache-directory)
    (expand-file-name user-emacs-directory)))


(defvar xxx-file (expand-file-name "xxx-file" user-emacs-directory))

Would become

(defvar xxx-file (expand-cache-name "xxx-file”))

This way, existing cache files in .Emacs.d are still valid, and people who want 
a clean .Emacs.d can define user-cache-directory to what ever they want.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]