diff --git a/.gitignore b/.gitignore index c09a28e..770d239 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /.cask /.hive-maint /custom.el +/elpa /var diff --git a/.gitmodules b/.gitmodules index 645cbd5..292fd12 100644 --- a/.gitmodules +++ b/.gitmodules @@ -24,15 +24,20 @@ [submodule "epkg"] path = lib/epkg url = git@github.com:emacscollective/epkg.git -[submodule "finalize"] - path = lib/finalize - url = git@github.com:skeeto/elisp-finalize.git +[submodule "ghub"] + path = lib/ghub + url = git@github.com:magit/ghub.git [submodule "git-modes"] path = lib/git-modes url = git@github.com:magit/git-modes.git +[submodule "libgit"] + path = lib/libgit + url = git@github.com:magit/libegit2.git + build-step = make [submodule "magit"] path = lib/magit url = git@github.com:magit/magit.git + recursive-byte-compile = true info-path = Documentation [submodule "packed"] path = lib/packed @@ -44,6 +49,13 @@ build-step = make build-step = borg-byte-compile build-step = borg-update-autoloads +[submodule "transient"] + path = lib/transient + url = git@github.com:magit/transient.git + info-path = docs +[submodule "treepy"] + path = lib/treepy + url = git@github.com:volrath/treepy.el.git [submodule "use-package"] path = lib/use-package url = git@github.com:jwiegley/use-package.git diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3f01f9a --- /dev/null +++ b/LICENSE @@ -0,0 +1,15 @@ +Copyright 2016-2019 Jonas Bernoulli + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all +copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA +OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/Makefile b/Makefile index be44cf3..974ffd8 100644 --- a/Makefile +++ b/Makefile @@ -1,51 +1,7 @@ -# Copyright (C) 2016-2017 Jonas Bernoulli -# -# Author: Jonas Bernoulli -# License: GPL v3 +-include lib/borg/borg.mk -EMACS ?= emacs - -.PHONY: all help build build-init quick bootstrap -.FORCE: - -all: build - -help: - $(info ) - $(info make [all|build] = rebuild all drones and init files) - $(info make quick = rebuild most drones and init files) - $(info make lib/DRONE = rebuild DRONE) - $(info make build-init = rebuild init files) - $(info make bootstrap = bootstrap collective or new drones) - @printf "\n" - -build: - @rm -f init.elc - @$(EMACS) -Q --batch -L lib/borg --load borg \ - --funcall borg-initialize \ - --funcall borg-batch-rebuild 2>&1 - -build-init: - @rm -f init.elc - @$(EMACS) -Q --batch -L lib/borg --load borg \ - --funcall borg-initialize \ - --funcall borg-batch-rebuild-init 2>&1 - -quick: - @rm -f init.elc - @$(EMACS) -Q --batch -L lib/borg --load borg \ - --funcall borg-initialize \ - --eval '(borg-batch-rebuild t)' 2>&1 - -lib/%: .FORCE - @$(EMACS) -Q --batch -L lib/borg --load borg \ - --funcall borg-initialize \ - --eval '(borg-build "$(@F)")' 2>&1 - -bootstrap: - @printf "\n=== Running 'git submodule init' ===\n\n" - @git submodule init - @printf "\n=== Running 'bin/borg-bootstrap' ===\n" - @bin/borg-bootstrap - @printf "\n=== Running 'make build' ===\n\n" - @make build +bootstrap-borg: + @git submodule--helper clone --name borg --path lib/borg \ + --url git@github.com:emacscollective/borg.git + @cd lib/borg; git symbolic-ref HEAD refs/heads/master + @cd lib/borg; git reset --hard HEAD diff --git a/README.md b/README.md index 3e14f85..ca6df32 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Assimilate Emacs packages as Git submodules About `borg.el` --------------- -[Borg][repo] is a bare-bones package manager for Emacs packages. It +[Borg] 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`. @@ -30,32 +30,13 @@ 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 +publicly 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]. +[Github]. 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 +[Borg]: 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 +[Github]: https://github.com/emacscollective/emacs.g diff --git a/bin/borg-bootstrap b/bin/borg-bootstrap deleted file mode 100755 index a47033b..0000000 --- a/bin/borg-bootstrap +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh - -# Copyright (C) 2016-2017 Jonas Bernoulli -# -# Author: Jonas Bernoulli -# License: GPL v3 - -hive_remote=$(git config -f .gitmodules borg.collective) -push_remote=$(git config -f .gitmodules borg.pushDefault) - -toplevel=$(git rev-parse --show-toplevel) -test -n "$toplevel" || exit 2 -cd "$toplevel" - -git submodule--helper list | -while read mode sha1 stage path -do - if test -e "$path" && ! test -e "$path"/.git - then - name=$(git submodule--helper name "$path") - - echo "\n--- [$name] ---\n" - - git submodule--helper clone \ - --name "$name" \ - --path "$path" \ - --url $(git config -f .gitmodules submodule."$name".url) - - git config -f .gitmodules --get-all submodule."$name".remote | - while read remote remote_url - do - if ! test -e "$path"/.git - then - git submodule--helper clone \ - --name "$name" \ - --path "$path" \ - --url "$remote_url" && - git remote rename origin "$remote" - else - cd "$path" - git remote add "$remote" "$remote_url" - git fetch "$remote" - cd "$toplevel" - fi - - if test -e "$path"/.git - then - cd "$path" - if test "$remote" = "$hive_remote" - then - if test -e "$toplevel/.hive-maint" - then - git config remote.pushDefault "$remote" - else - branch=$(git rev-parse --abbrev-ref HEAD) - test -n "$branch" && - git config branch.master.remote "$remote" - fi - elif test "$remote" = "$push_remote" - then - git config remote.pushDefault "$remote" - fi - cd "$toplevel" - fi - done - - if test -e "$path"/.git - then - cd "$path" - if ! git reset --hard "$sha1" - then - echo >&2 "futile: Checkout of '$sha1' into submodule path '$path' failed" - git reset --hard HEAD - exit 1 - fi - cd "$toplevel" - else - echo >&2 "futile: Clone of any remote into submodule path '$path' failed" - exit 1 - fi - fi -done diff --git a/init.el b/init.el index 16ffe3c..518dca1 100644 --- a/init.el +++ b/init.el @@ -10,6 +10,7 @@ (setq user-emacs-directory (file-name-directory user-init-file)) (message "Loading %s..." user-init-file) (setq package-enable-at-startup nil) + ;; (package-initialize) (setq inhibit-startup-buffer-menu t) (setq inhibit-startup-screen t) (setq inhibit-startup-echo-area-message "locutus") @@ -38,9 +39,7 @@ (setq auto-compile-mode-line-counter t) (setq auto-compile-source-recreate-deletes-dest t) (setq auto-compile-toggle-deletes-nonlib-dest t) - (setq auto-compile-update-autoloads t) - (add-hook 'auto-compile-inhibit-compile-hook - 'auto-compile-inhibit-compile-detached-git-head)) + (setq auto-compile-update-autoloads t)) (use-package epkg :defer t @@ -48,6 +47,7 @@ (expand-file-name "var/epkgs/" user-emacs-directory))) (use-package custom + :no-require t :config (setq custom-file (expand-file-name "custom.el" user-emacs-directory)) (when (file-exists-p custom-file) @@ -77,6 +77,7 @@ :config (setq dired-listing-switches "-alh")) (use-package eldoc + :when (version< "25" emacs-version) :config (global-eldoc-mode)) (use-package help @@ -97,23 +98,12 @@ (use-package magit :defer t :bind (("C-x g" . magit-status) - ("C-x M-g" . magit-dispatch-popup)) + ("C-x M-g" . magit-dispatch)) :config (magit-add-section-hook 'magit-status-sections-hook - 'magit-insert-modules-unpulled-from-upstream - 'magit-insert-unpulled-from-upstream) - (magit-add-section-hook 'magit-status-sections-hook - 'magit-insert-modules-unpulled-from-pushremote - 'magit-insert-unpulled-from-upstream) - (magit-add-section-hook 'magit-status-sections-hook - 'magit-insert-modules-unpushed-to-upstream - 'magit-insert-unpulled-from-upstream) - (magit-add-section-hook 'magit-status-sections-hook - 'magit-insert-modules-unpushed-to-pushremote - 'magit-insert-unpulled-from-upstream) - (magit-add-section-hook 'magit-status-sections-hook - 'magit-insert-submodules - 'magit-insert-unpulled-from-upstream)) + 'magit-insert-modules + 'magit-insert-stashes + 'append)) (use-package man :defer t @@ -136,6 +126,7 @@ :config (savehist-mode)) (use-package saveplace + :when (version< "25" emacs-version) :config (save-place-mode)) (use-package simple diff --git a/lib/auto-compile b/lib/auto-compile index a31819a..3e92c5b 160000 --- a/lib/auto-compile +++ b/lib/auto-compile @@ -1 +1 @@ -Subproject commit a31819a1b75a2320edb0f7f25d6c6faf528bf41a +Subproject commit 3e92c5b1a94b0cf43f2d624180a1cb01df92afd8 diff --git a/lib/borg b/lib/borg index 34eac58..7efd982 160000 --- a/lib/borg +++ b/lib/borg @@ -1 +1 @@ -Subproject commit 34eac585d6829e17ce59b09fe6ad5d675302c096 +Subproject commit 7efd982e8e84b5761acbed9db98ec21eefca5048 diff --git a/lib/closql b/lib/closql index 6659783..1e78f96 160000 --- a/lib/closql +++ b/lib/closql @@ -1 +1 @@ -Subproject commit 66597831248bbe14ebc7bbf24b24cafebb5fd362 +Subproject commit 1e78f96dc976badb59067c986f7766cce89405cc diff --git a/lib/dash b/lib/dash index dcb0ec1..721436b 160000 --- a/lib/dash +++ b/lib/dash @@ -1 +1 @@ -Subproject commit dcb0ec1623517e54551b801846a272dd07fd55b2 +Subproject commit 721436b04da4e2795387cb48a98ac6de37ece0fd diff --git a/lib/diff-hl b/lib/diff-hl index bec9889..fb9eb1c 160000 --- a/lib/diff-hl +++ b/lib/diff-hl @@ -1 +1 @@ -Subproject commit bec9889de7bf48d28826039880cec9bfad24a628 +Subproject commit fb9eb1cd3c4c6ed24b93de1a7cfb369d2983be74 diff --git a/lib/emacsql b/lib/emacsql index e3bc9b1..a118b6c 160000 --- a/lib/emacsql +++ b/lib/emacsql @@ -1 +1 @@ -Subproject commit e3bc9b105f6f2de514dd689c8fa8f74f1d610a04 +Subproject commit a118b6c95af1306f0288a383d274b5dd93efbbda diff --git a/lib/epkg b/lib/epkg index 1768e91..075f6af 160000 --- a/lib/epkg +++ b/lib/epkg @@ -1 +1 @@ -Subproject commit 1768e91e02a2d6441c2d82a711912a9498d2316e +Subproject commit 075f6afa81f7a83a35088b699ed44d6029192198 diff --git a/lib/finalize b/lib/finalize deleted file mode 160000 index 0f7d47c..0000000 --- a/lib/finalize +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0f7d47c4d50f1c76fc3b43bfc2d4886dd3e8ca27 diff --git a/lib/ghub b/lib/ghub new file mode 160000 index 0000000..4ebe60b --- /dev/null +++ b/lib/ghub @@ -0,0 +1 @@ +Subproject commit 4ebe60b9522355c6ee95005bc7d8ba41df4a3c6b diff --git a/lib/git-modes b/lib/git-modes index 9f18eca..5546831 160000 --- a/lib/git-modes +++ b/lib/git-modes @@ -1 +1 @@ -Subproject commit 9f18eca514d242816a4969e86c4cfd2cf4dfe401 +Subproject commit 55468314a5f6b77d2c96be62c7005ac94545e217 diff --git a/lib/libgit b/lib/libgit new file mode 160000 index 0000000..65fde63 --- /dev/null +++ b/lib/libgit @@ -0,0 +1 @@ +Subproject commit 65fde63a0bde9b4cef74204db5d9ac0a740d6b4d diff --git a/lib/magit b/lib/magit index 4ad2ebf..798e47a 160000 --- a/lib/magit +++ b/lib/magit @@ -1 +1 @@ -Subproject commit 4ad2ebfef0afa7e5f5fb85e8d1146da613804fe5 +Subproject commit 798e47a1f07ac40c5a8c82372814c52be0478a76 diff --git a/lib/packed b/lib/packed index 94ea12b..c41c3df 160000 --- a/lib/packed +++ b/lib/packed @@ -1 +1 @@ -Subproject commit 94ea12b9d44bfa42c28d0548199f2fcd19e4aa6a +Subproject commit c41c3dfda86ae33832ffc146923e2a4675cbacfa diff --git a/lib/transient b/lib/transient new file mode 160000 index 0000000..7977732 --- /dev/null +++ b/lib/transient @@ -0,0 +1 @@ +Subproject commit 79777324858df408bd6ba7509d9f0b6987208d98 diff --git a/lib/treepy b/lib/treepy new file mode 160000 index 0000000..306f703 --- /dev/null +++ b/lib/treepy @@ -0,0 +1 @@ +Subproject commit 306f7031d26e4ebfc9ff36614acdc6993f3e23c3 diff --git a/lib/use-package b/lib/use-package index 360df30..42db6b3 160000 --- a/lib/use-package +++ b/lib/use-package @@ -1 +1 @@ -Subproject commit 360df30683a711c443f87e495ba14cdd125a505d +Subproject commit 42db6b3d90ee57d0f5947d3b0bf4b0010bdf7b40 diff --git a/lib/with-editor b/lib/with-editor index 2417261..4fe66d4 160000 --- a/lib/with-editor +++ b/lib/with-editor @@ -1 +1 @@ -Subproject commit 241726118dee067a8d9880d53c6a781d580ba8a1 +Subproject commit 4fe66d4d55c8eacebda53a13cc38e01d32bdaaa2