emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs and XDG Base Dir Spec was: persistent storage for Emacs packag


From: Barry Fishman
Subject: Re: Emacs and XDG Base Dir Spec was: persistent storage for Emacs packages
Date: Mon, 21 Oct 2013 11:25:24 -0400
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

On 2013-10-21 09:31:16 EDT, John Yates wrote:
> I found the discussion at the bottom of this page (Thomas Koch's 2nd
> reference) helpful:
>
>   https://wiki.debian.org/XDGBaseDirectorySpecification#state
>
> Decomposing emacs' use of external storage more or less according to the
> enumerated criteria is simply good hygiene.  It does not means that you
> have to embrace the freedesktop standard.
>
> In my own case I have already partitioned my emacs world into ~/emacs/ (a
> non-hidden directory containing elements I manage via github) and
> ~/.emacs.d/ (everything recreatable).  In particular, with the advent of
> better package management I put all downloaded packages beneath
> ~/.emacs.d/, on the theory that they can be recreated via download.  By
> contrast I put the configuration for those packages in ~/emacs/.

It seems that partitioning user file should include at least 3 distinct
catagories:

user-cache-dir    Files which can be deleted between sessions, without
                  any adverse effects.
user-config-dir   init.el, custom set varables, and state information
                  maintained between sessions.  It might contain
                  packages whose source has been modified by the user.
user-package-dir  User specific packages downloaded, and maintained
                  upstream, such as (but not limited to) ELPA.

The user-config-dir does cause a bootstrapping issue, so that it might
be useful to check for an environment variable like "EMACS_CONFIG_DIR",
or initialzation switch "-config-dir=" prior to loading any user files.
This would also allow running multiple emacs configurations without
interference (very useful for testing).

The cache information might be partitioned by process ID, so that
concurrently running emacs executables can coexist without
interference.  I'm not sure if this is really an issue.

The defaults might be ~/.emacs.d/cache/, ~/.emacs.d/config/, and
~/.emacs.d/package/".

The XDG setup would be ~/.cache/emacs/, ~/.config/emacs/, and
~/.local/share/emacs/.

-- 
Barry Fishman




reply via email to

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