Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Multiple Emacs Flavor Setup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Balaye
Multiple Emacs Flavor Setup
Commits
e8c96c80
Commit
e8c96c80
authored
5 years ago
by
Pierre Balaye
Browse files
Options
Downloads
Patches
Plain Diff
Auto spacemacs configuration with configs dir contents
parent
1b2cced3
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
00-run-installers.sh
+1
-1
1 addition, 1 deletion
00-run-installers.sh
04-multiple-spacemacs-configs.sh
+15
-1
15 additions, 1 deletion
04-multiple-spacemacs-configs.sh
dot.emacs-profiles.el
+10
-8
10 additions, 8 deletions
dot.emacs-profiles.el
with
26 additions
and
10 deletions
00-run-installers.sh
+
1
−
1
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
...
...
This diff is collapsed.
Click to expand it.
04-multiple-spacemacs-configs.sh
+
15
−
1
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
This diff is collapsed.
Click to expand it.
dot.emacs-profiles.el
+
10
−
8
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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment