mirror of
https://github.com/plexus/chemacs2.git
synced 2026-09-10 07:26:27 -04:00
Merge pull request #5 from Xervon/master
Allow .emacs-profiles.el in $XDG_CONFIG_HOME/chemacs
This commit is contained in:
commit
ccea276c63
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
- Add support for early-init.el
|
||||
- Change installation from `~/.emacs` to `~/.emacs.d`
|
||||
- Allow .emacs-profiles and .emacs-profile to be stored in $XDG\_CONFIG\_HOME/chemacs
|
||||
|
||||
# 1.0 (2020-10-01 / 4dad0684)
|
||||
|
||||
|
|
|
|||
|
|
@ -195,6 +195,10 @@ In the following snippet =~/doom-emacs= is where you have cloned doom emacs.
|
|||
|
||||
Please refer to [[https://github.com/plexus/chemacs/issues/5][this]] discussion for details.
|
||||
|
||||
** FreeDesktop Directories
|
||||
|
||||
Both =~/.emacs-profiles.el= and =~/.emacs-profile= can also be stored under =$XDG_CONFIG_HOME/chemacs= (typically =~/.config/chemacs=) as =$XGD_CONFIG_HOME/chemacs/profiles.el= and =$XDG_CONFIG_HOME/chemacs/profile= respectively.
|
||||
|
||||
** LICENSE
|
||||
|
||||
Copyright © Arne Brasseur 2018-2020
|
||||
|
|
|
|||
|
|
@ -27,8 +27,12 @@
|
|||
|
||||
;;; Code:
|
||||
(defvar chemacs-version "2.0")
|
||||
(defvar chemacs-profiles-path "~/.emacs-profiles.el")
|
||||
(defvar chemacs-default-profile-path "~/.emacs-profile")
|
||||
(defvar config-home (or (getenv "XDG_CONFIG_HOME") "~/.config"))
|
||||
(defvar chemacs-profiles-paths (list "~/.emacs-profiles.el" (format "%s/%s" config-home "chemacs/profiles.el" )))
|
||||
(defvar chemacs-default-profile-paths (list "~/.emacs-profile" (format "%s/%s" config-home "profile")))
|
||||
|
||||
(defvar chemacs-profiles-path (or (car (seq-filter 'file-exists-p chemacs-profiles-paths)) (car chemacs-profiles-paths)))
|
||||
(defvar chemacs-default-profile-path (or (car (seq-filter 'file-exists-p chemacs-profiles-paths)) (car chemacs-profiles-paths)))
|
||||
|
||||
(when (not (file-exists-p chemacs-profiles-path))
|
||||
(error "[chemacs] %s does not exist." chemacs-profiles-path))
|
||||
|
|
|
|||
Loading…
Reference in a new issue