Merge branch 'master' into drone/pdf-tools

This commit is contained in:
Jonas Bernoulli
2020-02-19 13:06:37 +01:00
24 changed files with 67 additions and 190 deletions

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
/.cask /.cask
/.hive-maint /.hive-maint
/custom.el /custom.el
/elpa
/var /var

18
.gitmodules vendored
View File

@@ -24,15 +24,20 @@
[submodule "epkg"] [submodule "epkg"]
path = lib/epkg path = lib/epkg
url = git@github.com:emacscollective/epkg.git url = git@github.com:emacscollective/epkg.git
[submodule "finalize"] [submodule "ghub"]
path = lib/finalize path = lib/ghub
url = git@github.com:skeeto/elisp-finalize.git url = git@github.com:magit/ghub.git
[submodule "git-modes"] [submodule "git-modes"]
path = lib/git-modes path = lib/git-modes
url = git@github.com:magit/git-modes.git 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"] [submodule "magit"]
path = lib/magit path = lib/magit
url = git@github.com:magit/magit.git url = git@github.com:magit/magit.git
recursive-byte-compile = true
info-path = Documentation info-path = Documentation
[submodule "packed"] [submodule "packed"]
path = lib/packed path = lib/packed
@@ -44,6 +49,13 @@
build-step = make build-step = make
build-step = borg-byte-compile build-step = borg-byte-compile
build-step = borg-update-autoloads 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"] [submodule "use-package"]
path = lib/use-package path = lib/use-package
url = git@github.com:jwiegley/use-package.git url = git@github.com:jwiegley/use-package.git

15
LICENSE Normal file
View File

@@ -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.

View File

@@ -1,51 +1,7 @@
# Copyright (C) 2016-2017 Jonas Bernoulli -include lib/borg/borg.mk
#
# Author: Jonas Bernoulli <jonas@bernoul.li>
# License: GPL v3 <https://www.gnu.org/licenses/gpl-3.0.txt>
EMACS ?= emacs bootstrap-borg:
@git submodule--helper clone --name borg --path lib/borg \
.PHONY: all help build build-init quick bootstrap --url git@github.com:emacscollective/borg.git
.FORCE: @cd lib/borg; git symbolic-ref HEAD refs/heads/master
@cd lib/borg; git reset --hard HEAD
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

View File

@@ -6,7 +6,7 @@ Assimilate Emacs packages as Git submodules
About `borg.el` 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 provides only a few essential features and should be combined with
other tools such as Magit, `epkg`, `use-package`, and `auto-compile`. 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. update the drones you have assimilated yourself.
If you do base your own configuration on this collective and make it 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 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. 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 [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 [manual]: https://emacsmirror.net/manual/borg
[Github]: https://github.com/emacscollective/emacs.g
[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

View File

@@ -1,82 +0,0 @@
#!/bin/sh
# Copyright (C) 2016-2017 Jonas Bernoulli
#
# Author: Jonas Bernoulli <jonas@bernoul.li>
# License: GPL v3 <https://www.gnu.org/licenses/gpl-3.0.txt>
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

27
init.el
View File

@@ -10,6 +10,7 @@
(setq user-emacs-directory (file-name-directory user-init-file)) (setq user-emacs-directory (file-name-directory user-init-file))
(message "Loading %s..." user-init-file) (message "Loading %s..." user-init-file)
(setq package-enable-at-startup nil) (setq package-enable-at-startup nil)
;; (package-initialize)
(setq inhibit-startup-buffer-menu t) (setq inhibit-startup-buffer-menu t)
(setq inhibit-startup-screen t) (setq inhibit-startup-screen t)
(setq inhibit-startup-echo-area-message "locutus") (setq inhibit-startup-echo-area-message "locutus")
@@ -38,9 +39,7 @@
(setq auto-compile-mode-line-counter t) (setq auto-compile-mode-line-counter t)
(setq auto-compile-source-recreate-deletes-dest t) (setq auto-compile-source-recreate-deletes-dest t)
(setq auto-compile-toggle-deletes-nonlib-dest t) (setq auto-compile-toggle-deletes-nonlib-dest t)
(setq auto-compile-update-autoloads t) (setq auto-compile-update-autoloads t))
(add-hook 'auto-compile-inhibit-compile-hook
'auto-compile-inhibit-compile-detached-git-head))
(use-package epkg (use-package epkg
:defer t :defer t
@@ -48,6 +47,7 @@
(expand-file-name "var/epkgs/" user-emacs-directory))) (expand-file-name "var/epkgs/" user-emacs-directory)))
(use-package custom (use-package custom
:no-require t
:config :config
(setq custom-file (expand-file-name "custom.el" user-emacs-directory)) (setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(when (file-exists-p custom-file) (when (file-exists-p custom-file)
@@ -77,6 +77,7 @@
:config (setq dired-listing-switches "-alh")) :config (setq dired-listing-switches "-alh"))
(use-package eldoc (use-package eldoc
:when (version< "25" emacs-version)
:config (global-eldoc-mode)) :config (global-eldoc-mode))
(use-package help (use-package help
@@ -97,23 +98,12 @@
(use-package magit (use-package magit
:defer t :defer t
:bind (("C-x g" . magit-status) :bind (("C-x g" . magit-status)
("C-x M-g" . magit-dispatch-popup)) ("C-x M-g" . magit-dispatch))
:config :config
(magit-add-section-hook 'magit-status-sections-hook (magit-add-section-hook 'magit-status-sections-hook
'magit-insert-modules-unpulled-from-upstream 'magit-insert-modules
'magit-insert-unpulled-from-upstream) 'magit-insert-stashes
(magit-add-section-hook 'magit-status-sections-hook 'append))
'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))
(use-package man (use-package man
:defer t :defer t
@@ -136,6 +126,7 @@
:config (savehist-mode)) :config (savehist-mode))
(use-package saveplace (use-package saveplace
:when (version< "25" emacs-version)
:config (save-place-mode)) :config (save-place-mode))
(use-package simple (use-package simple

Submodule lib/finalize deleted from 0f7d47c4d5

1
lib/ghub Submodule

Submodule lib/ghub added at 4ebe60b952

1
lib/libgit Submodule

Submodule lib/libgit added at 65fde63a0b

1
lib/transient Submodule

Submodule lib/transient added at 7977732485

1
lib/treepy Submodule

Submodule lib/treepy added at 306f7031d2