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 a425f4c..ff2171d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,7 +3,7 @@ collective = emacsg [submodule "auto-compile"] path = lib/auto-compile - url = git@github.com:tarsius/auto-compile.git + url = git@github.com:emacscollective/auto-compile.git [submodule "borg"] path = lib/borg url = git@github.com:emacscollective/borg.git @@ -24,9 +24,9 @@ [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 @@ -38,9 +38,12 @@ path = lib/magit url = git@github.com:magit/magit.git info-path = Documentation +[submodule "magit-popup"] + path = lib/magit-popup + url = git@github.com:magit/magit-popup.git [submodule "packed"] path = lib/packed - url = git@github.com:tarsius/packed.git + url = git@github.com:emacscollective/packed.git [submodule "use-package"] path = lib/use-package url = git@github.com:jwiegley/use-package.git diff --git a/Makefile b/Makefile index 64395e1..974ffd8 100644 --- a/Makefile +++ b/Makefile @@ -1,49 +1,7 @@ -# Copyright (C) 2016-2017 Jonas Bernoulli -# -# Author: Jonas Bernoulli -# License: GPL v3 +-include lib/borg/borg.mk -.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..dcde751 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`. @@ -32,30 +32,11 @@ 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]. +[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 84d89dc..0000000 --- a/bin/borg-bootstrap +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh - -# Copyright (C) 2016 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 --abbref-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 6c19b07..d08eb0c 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") @@ -29,6 +30,11 @@ (require 'use-package) (setq use-package-verbose t)) +(use-package subr-x + :config + (put 'if-let 'byte-obsolete-info nil) + (put 'when-let 'byte-obsolete-info nil)) + (use-package auto-compile :demand t :config @@ -113,20 +119,9 @@ ("C-x M-g" . magit-dispatch-popup)) :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 diff --git a/lib/auto-compile b/lib/auto-compile index c978623..8d11786 160000 --- a/lib/auto-compile +++ b/lib/auto-compile @@ -1 +1 @@ -Subproject commit c9786234bdc32237e6c304e6a7c917504370358d +Subproject commit 8d117868a0a091389d528428136e60f951e9c550 diff --git a/lib/borg b/lib/borg index 35901e8..362ae8a 160000 --- a/lib/borg +++ b/lib/borg @@ -1 +1 @@ -Subproject commit 35901e83837cefce9f740eb848d196db8c9e272c +Subproject commit 362ae8aebc69aab81e04427d221717dd6bc1a81d diff --git a/lib/closql b/lib/closql index 73e68bc..01cb892 160000 --- a/lib/closql +++ b/lib/closql @@ -1 +1 @@ -Subproject commit 73e68bcfbe076e152beed1b8e5f894ca438f9770 +Subproject commit 01cb892f6a457fbff857d924cebfdc77f69bd45d diff --git a/lib/dash b/lib/dash index b4faa93..528e5a5 160000 --- a/lib/dash +++ b/lib/dash @@ -1 +1 @@ -Subproject commit b4faa9397e06206b646f684a603e320f962674d1 +Subproject commit 528e5a51f1af668e3075f2beccd2b39785ccb2ba diff --git a/lib/emacsql b/lib/emacsql index 1b37570..616dde3 160000 --- a/lib/emacsql +++ b/lib/emacsql @@ -1 +1 @@ -Subproject commit 1b37570bf5813e160fa18a766e20dfa690910519 +Subproject commit 616dde37524f47246bbb161f20d3f5f090f10fbf diff --git a/lib/epkg b/lib/epkg index f0959ca..c8ab0e5 160000 --- a/lib/epkg +++ b/lib/epkg @@ -1 +1 @@ -Subproject commit f0959ca39cdbcb72049b31cab6e7c449749bfefe +Subproject commit c8ab0e5e1fda70113633ac6ee01c0aaecd8a1a99 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..2962611 --- /dev/null +++ b/lib/ghub @@ -0,0 +1 @@ +Subproject commit 2962611aad56a0f1586383b3e4ba6a65508a3991 diff --git a/lib/magit b/lib/magit index f7c8924..24ce908 160000 --- a/lib/magit +++ b/lib/magit @@ -1 +1 @@ -Subproject commit f7c8924ca85fa0671c3c4c54d5e1cbe6106f3e8d +Subproject commit 24ce90832ddff0db86581c1b7e947e83a13fe83e diff --git a/lib/magit-popup b/lib/magit-popup new file mode 160000 index 0000000..5a2a6f2 --- /dev/null +++ b/lib/magit-popup @@ -0,0 +1 @@ +Subproject commit 5a2a6f2907a09c7592c4631d2678dd7ab44fd5a2 diff --git a/lib/packed b/lib/packed index 536f4a3..94ea12b 160000 --- a/lib/packed +++ b/lib/packed @@ -1 +1 @@ -Subproject commit 536f4a3bda06cc09759fed1aa0cdebb068ff75a1 +Subproject commit 94ea12b9d44bfa42c28d0548199f2fcd19e4aa6a diff --git a/lib/use-package b/lib/use-package index 7b05549..05a4033 160000 --- a/lib/use-package +++ b/lib/use-package @@ -1 +1 @@ -Subproject commit 7b055494e39efba8b237202b7c97f40aa19e2579 +Subproject commit 05a4033b830bf52c596ceedea10b2cbd91f85fdb diff --git a/lib/with-editor b/lib/with-editor index 4d3d50b..04d59d6 160000 --- a/lib/with-editor +++ b/lib/with-editor @@ -1 +1 @@ -Subproject commit 4d3d50b09dee3305a365d7eb005313d42dddd6ea +Subproject commit 04d59d68dab58a7cf3034c84d8ba0553b78ae30c