mirror of
https://github.com/emacscollective/emacs.g.git
synced 2025-07-05 16:37:39 -04:00
Assimilate borg v0.1.0
This commit is contained in:
commit
63b40497fc
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/var
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "borg"]
|
||||
path = lib/borg
|
||||
url = git@gitlab.com:tarsius/borg.git
|
40
Makefile
Normal file
40
Makefile
Normal file
@ -0,0 +1,40 @@
|
||||
# Copyright (C) 2016 Jonas Bernoulli
|
||||
#
|
||||
# Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
# License: GPL v3 <https://www.gnu.org/licenses/gpl-3.0.txt>
|
||||
|
||||
.PHONY: all help build quick bootstrap
|
||||
.FORCE:
|
||||
|
||||
all: build
|
||||
|
||||
help:
|
||||
$(info )
|
||||
$(info make [all|build] = rebuild all drones)
|
||||
$(info make quick = rebuild most drones)
|
||||
$(info make lib/DRONE = rebuild DRONE)
|
||||
$(info make bootstrap = bootstrap collective)
|
||||
@printf "\n"
|
||||
|
||||
build:
|
||||
@rm -f init.elc
|
||||
@emacs -Q --batch -L lib/borg --load borg \
|
||||
--funcall borg-initialize \
|
||||
--funcall borg-batch-rebuild
|
||||
|
||||
quick:
|
||||
@rm -f init.elc
|
||||
@emacs -Q --batch -L lib/borg --load borg \
|
||||
--funcall borg-initialize \
|
||||
--eval '(borg-batch-rebuild t)'
|
||||
|
||||
lib/%: .FORCE
|
||||
@emacs -Q --batch -L lib/borg --load borg \
|
||||
--funcall borg-initialize \
|
||||
--eval '(borg-build "$(@F)")'
|
||||
|
||||
bootstrap:
|
||||
git submodule init
|
||||
git submodule update
|
||||
git submodule foreach 'git checkout master; git reset --hard $sha1'
|
||||
make
|
61
README.md
Normal file
61
README.md
Normal file
@ -0,0 +1,61 @@
|
||||
Assimilate Emacs packages as Git submodules
|
||||
===========================================
|
||||
|
||||
*For more information see the [announcement][init] and the [manual].*
|
||||
|
||||
About `borg.el`
|
||||
---------------
|
||||
|
||||
[Borg][repo] is a bare-bones package manager for Emacs packages. It
|
||||
provides only a few essential features and should be combined with
|
||||
other tools such as Magit, `epkg`, `use-package`, and `auto-compile`.
|
||||
|
||||
Borg assimilates packages into the `~/.emacs.d` repository as Git
|
||||
submodules. An assimilated package is called a drone and a borg-based
|
||||
`~/.emacs.d` repository is called a collective.
|
||||
|
||||
About this collective
|
||||
---------------------
|
||||
|
||||
This particular collective is intended to be used to bootstrap private
|
||||
configurations. Fork your own copy and then start assimilating as you
|
||||
please.
|
||||
|
||||
If you wish you can later merge changes from the upstream repository,
|
||||
to get updates for the drones that have been assimilated in the base
|
||||
configuration. Very rarely additional drones might be assimilated or
|
||||
the configuration of existing drones might be tweaked.
|
||||
|
||||
Or you can just update and further configure these drones as you would
|
||||
update the drones you have assimilated yourself.
|
||||
|
||||
If you do base your own configuration on this collective and make it
|
||||
publically available as source of inspiration for others, then please
|
||||
do so by forking the upstream repository, which is available from
|
||||
[Github][gh-this], [Gitlab][gl-this], and [Bitbucket][bb-this].
|
||||
|
||||
You might also want to adjust this description.
|
||||
|
||||
Other collectives
|
||||
-----------------
|
||||
|
||||
It is also possible to create collectives that can be shared between
|
||||
and worked on by many Emacs users, i.e. borg-based starter-kits.
|
||||
Check out alternative collectives by browsing the repositories owned
|
||||
by the `emacscollective` organisation/group/team, which is available
|
||||
on [Github][gh-all], [Gitlab][gl-all], and [Bitbucket][bb-all].
|
||||
|
||||
Another alternative is the `bootstrap` collective. It assimilates a
|
||||
single drone, `borg` itself, and is intended for users for whom even
|
||||
the `emacs.g` collective is to opinionated.
|
||||
|
||||
[init]: https://emacsair.me/2016/05/17/assimilate-emacs-packages-as-git-submodules
|
||||
[repo]: https://gitlab.com/tarsius/borg
|
||||
[manual]: https://emacsmirror.net/manual/borg
|
||||
|
||||
[gh-this]: https://github.com/emacscollective/emacs.g
|
||||
[gl-this]: https://gitlab.com/emacscollective/emacs.g
|
||||
[bb-this]: https://bitbucket.com/emacscollective/emacs.g
|
||||
[gh-all]: https://github.com/emacscollective
|
||||
[gl-all]: https://gitlab.com/emacscollective
|
||||
[bb-all]: https://bitbucket.com/emacscollective
|
58
init.el
Normal file
58
init.el
Normal file
@ -0,0 +1,58 @@
|
||||
;;; init.el --- user-init-file -*- lexical-binding: t -*-
|
||||
;;; Early birds
|
||||
(progn ; startup
|
||||
(defvar before-user-init-time (current-time)
|
||||
"Value of `current-time' when Emacs begins loading `user-init-file'.")
|
||||
(message "Loading Emacs...done (%.3fs)"
|
||||
(float-time (time-subtract before-user-init-time
|
||||
before-init-time)))
|
||||
(setq user-init-file (or load-file-name buffer-file-name))
|
||||
(setq user-emacs-directory (file-name-directory user-init-file))
|
||||
(message "Loading %s..." user-init-file)
|
||||
(setq package-enable-at-startup nil)
|
||||
(setq inhibit-startup-buffer-menu t)
|
||||
(setq inhibit-startup-screen t)
|
||||
(setq inhibit-startup-echo-area-message "locutus")
|
||||
(setq initial-buffer-choice t)
|
||||
(setq initial-scratch-message "")
|
||||
(setq load-prefer-newer t))
|
||||
|
||||
(progn ; `borg'
|
||||
(add-to-list 'load-path (expand-file-name "lib/borg" user-emacs-directory))
|
||||
(require 'borg)
|
||||
(borg-initialize))
|
||||
|
||||
(progn ; `custom'
|
||||
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
|
||||
(when (file-exists-p custom-file)
|
||||
(load custom-file)))
|
||||
|
||||
(progn ; startup
|
||||
(message "Loading early birds...done (%.3fs)"
|
||||
(float-time (time-subtract (current-time)
|
||||
before-user-init-time))))
|
||||
|
||||
;;; Long tail
|
||||
|
||||
(progn ; startup
|
||||
(message "Loading %s...done (%.3fs)" user-init-file
|
||||
(float-time (time-subtract (current-time)
|
||||
before-user-init-time)))
|
||||
(add-hook 'after-init-hook
|
||||
(lambda ()
|
||||
(message
|
||||
"Loading %s...done (%.3fs) [after-init]" user-init-file
|
||||
(float-time (time-subtract (current-time)
|
||||
before-user-init-time))))
|
||||
t))
|
||||
|
||||
(progn ; personalize
|
||||
(let ((file (expand-file-name (concat (user-real-login-name) ".el")
|
||||
user-emacs-directory)))
|
||||
(when (file-exists-p file)
|
||||
(load file))))
|
||||
|
||||
;; Local Variables:
|
||||
;; indent-tabs-mode: nil
|
||||
;; End:
|
||||
;;; init.el ends here
|
1
lib/borg
Submodule
1
lib/borg
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit cc8e39ca9ccab32ec0c0b05b4db0aaf9524f07a1
|
Loading…
x
Reference in New Issue
Block a user