Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Multiple Emacs Flavor Setup
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pierre Balaye
Multiple Emacs Flavor Setup
Commits
e8c96c80
Commit
e8c96c80
authored
May 17, 2020
by
Pierre Balaye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Auto spacemacs configuration with configs dir contents
parent
1b2cced3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
10 deletions
+26
-10
00-run-installers.sh
00-run-installers.sh
+1
-1
04-multiple-spacemacs-configs.sh
04-multiple-spacemacs-configs.sh
+15
-1
dot.emacs-profiles.el
dot.emacs-profiles.el
+10
-8
No files found.
00-run-installers.sh
View file @
e8c96c80
...
...
@@ -9,7 +9,7 @@ mefs_indent_message () {
export
mefs_THISREPODIR
=
`
pwd
`
export
mefs_CHEMACSDIR
=
"
$mefs_EMACSDIR
/chemacs"
export
mefs_FLAVORDIR
=
"
$mefs_EMACSDIR
/flavors"
export
mefs_CONFIGDIR
=
"
$mefs_
FLAVOR
DIR
/configs"
export
mefs_CONFIGDIR
=
"
$mefs_
EMACS
DIR
/configs"
export
-f
mefs_indent_message
./01-create-dirs.sh
...
...
04-multiple-spacemacs-configs.sh
View file @
e8c96c80
#!/bin/bash
mefs_indent_message
"Multiple spacemacs..."
mefs_BEG_PATTERN
=
"SPACEMACS MULTIPLE CONFIGURATIONS STARTS HERE"
mefs_END_PATTERN
=
"SPACEMACS MULTIPLE CONFIGURATIONS ENDS HERE"
mefs_TEMPLATE1
=
'("<conf>" . ((user-emacs-directory . "~/emacs/flavors/<conf>")'
mefs_TEMPLATE2
=
'(env . (("SPACEMACSDIR" . "~/emacs/configs/<conf>")))))'
sed
-i
"/
$mefs_BEG_PATTERN
/,/
$mefs_END
/{/;;/!d}"
dot.emacs-profiles.el
mefs_CONFIGS
=
$(
ls
$mefs_CONFIGDIR
|
grep
spacemacs
)
for
conf
in
$mefs_CONFIGS
do
mefs_indent_message
"Creating dir for
$conf
"
mefs_indent_message
"Creating dir for
$conf
...
"
[
-d
${
mefs_FLAVORDIR
}
/
${
conf
}
]
||
cp
-r
$mefs_FLAVORDIR
/spacemacs-develop
${
mefs_FLAVORDIR
}
/
${
conf
}
mefs_indent_message
"Adding emacs profile for
$conf
..."
echo
"
${
mefs_TEMPLATE
//<conf>/
$conf
/
}
"
sed
-i
"/
$mefs_BEG_PATTERN
/a
${
mefs_TEMPLATE2
//<conf>/
$conf
/
}
"
dot.emacs-profiles.el
sed
-i
"/
$mefs_BEG_PATTERN
/a
${
mefs_TEMPLATE1
//<conf>/
$conf
/
}
"
dot.emacs-profiles.el
done
dot.emacs-profiles.el
View file @
e8c96c80
(
(
"vanilla"
.
((
user-emacs-directory
.
"~/emacs/configs/vanilla"
)))
(
"default"
.
((
user-emacs-directory
.
"~/emacs/configs/spacemacs-default"
)
(
env
.
((
"SPACEMACSDIR"
.
"~/emacs/flavors/spacemacs-default.d"
)))))
(
"minimal"
.
((
user-emacs-directory
.
"~/emacs/configs/spacemacs-minimal"
)
(
env
.
((
"SPACEMACSDIR"
.
"~/emacs/flavors/spacemacs-minimal.d"
)))))
(
"test"
.
((
user-emacs-directory
.
"~/emacs/configs/spacemacs-test"
)
(
env
.
((
"SPACEMACSDIR"
.
"~/emacs/flavors/spacemacs-test.d"
)))))
(
"doom"
.
((
user-emacs-directory
.
"~/emacs/flavors/doom-27"
)
(
env
.
((
"DOOMDIR"
.
"~/emacs/configs/doom-27.d"
)))))
(
"doom"
.
((
user-emacs-directory
.
"~/emacs/flavors/doom"
)
(
env
.
((
"DOOMDIR"
.
"~/emacs/configs/doom"
)))))
;; SPACEMACS MULTIPLE CONFIGURATIONS STARTS HERE
(
"spacemacs-test/"
.
((
user-emacs-directory
.
"~/emacs/flavors/spacemacs-test/"
)
(
env
.
((
"SPACEMACSDIR"
.
"~/emacs/configs/spacemacs-test/"
)))))
(
"spacemacs-minimal/"
.
((
user-emacs-directory
.
"~/emacs/flavors/spacemacs-minimal/"
)
(
env
.
((
"SPACEMACSDIR"
.
"~/emacs/configs/spacemacs-minimal/"
)))))
(
"spacemacs-default/"
.
((
user-emacs-directory
.
"~/emacs/flavors/spacemacs-default/"
)
(
env
.
((
"SPACEMACSDIR"
.
"~/emacs/configs/spacemacs-default/"
)))))
;; SPACEMACS MULTIPLE CONFIGURATIONS ENDS HERE
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment