From 45f538b6f685a6dc2438cf64916494786c885f6e Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Fri, 24 Aug 2018 14:25:07 -0400 Subject: [PATCH 01/16] [emacs/notmuch] remove the g common binding and use notmuch's own G --- init.org | 2 -- 1 file changed, 2 deletions(-) diff --git a/init.org b/init.org index 87b9f02..e1a6686 100644 --- a/init.org +++ b/init.org @@ -1250,8 +1250,6 @@ See [[notmuch:id:87muuqsvci.fsf@fencepost.gnu.org][bug follow-up]]. ;; (advice-add #'notmuch-bury-or-kill-this-buffer ;; :override #'kill-this-buffer) :bind - (:map notmuch-common-keymap - ("g" . notmuch-poll-and-refresh-this-buffer)) (:map notmuch-hello-mode-map ("u" . (lambda () "Search for `unread'-tagged messages" -- 2.20.1 From 0f3d4eb551c2fb3b69f3f3ecbdfda33c12d4e5e8 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Fri, 24 Aug 2018 14:26:12 -0400 Subject: [PATCH 02/16] [emacs] add borg-nix-shell and use it to build notmuch's build deps - currently only works in regular emacs session and not via terminal: https://github.com/emacscollective/borg/issues/78 - TODO: add support for guix environment --- .gitmodules | 4 ++++ init.org | 3 +++ lib/borg-nix-shell | 1 + 3 files changed, 8 insertions(+) create mode 160000 lib/borg-nix-shell diff --git a/.gitmodules b/.gitmodules index 6f90e8d..e5a4bb5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,6 +16,9 @@ [submodule "borg"] path = lib/borg url = git@github.com:emacscollective/borg.git +[submodule "borg-nix-shell"] + path = lib/borg-nix-shell + url = git@github.com:thblt/borg-nix-shell.git [submodule "closql"] path = lib/closql url = git@github.com:emacscollective/closql.git @@ -130,6 +133,7 @@ url = https://git.notmuchmail.org/git/notmuch load-path = emacs info-path = doc/_build/texinfo + build-nix-shell-packages = pkgconfig gitMinimal xapian gmime talloc zlib pythonPackages.sphinx pythonPackages.python texinfo build-step = ./configure build-step = make build-step = make sphinx-texinfo diff --git a/init.org b/init.org index e1a6686..51cd9ca 100644 --- a/init.org +++ b/init.org @@ -234,6 +234,9 @@ can then be managed with the help of Magit or other tools. (require 'borg) (borg-initialize) +(require 'borg-nix-shell) +(setq borg-build-shell-command 'borg-nix-shell-build-command) + (with-eval-after-load 'bind-key (bind-keys :package borg diff --git a/lib/borg-nix-shell b/lib/borg-nix-shell new file mode 160000 index 0000000..84dac9e --- /dev/null +++ b/lib/borg-nix-shell @@ -0,0 +1 @@ +Subproject commit 84dac9e821ea445a6b4542d021d3094b0c1e55d3 -- 2.20.1 From 1dde553d9a6d52523575f41a560162c79f10c0a3 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Sat, 25 Aug 2018 01:17:54 -0400 Subject: [PATCH 03/16] [emacs] update 3 drones lib/helm master v3.0 lib/ox-hugo master v0.8-332-g8e244fa lib/projectile master v1.0.0-23-g62ef2ae --- lib/helm | 2 +- lib/ox-hugo | 2 +- lib/projectile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/helm b/lib/helm index c0449b9..757263f 160000 --- a/lib/helm +++ b/lib/helm @@ -1 +1 @@ -Subproject commit c0449b960ade2af56f7fc56569f9c213784ce19f +Subproject commit 757263f9332d2d338ac3619f50547ef2f9d2bd9e diff --git a/lib/ox-hugo b/lib/ox-hugo index 35b7e1a..8e244fa 160000 --- a/lib/ox-hugo +++ b/lib/ox-hugo @@ -1 +1 @@ -Subproject commit 35b7e1ae3b92061d088d4f90814afefd1dbadf3c +Subproject commit 8e244faf5c736b836dc8be53f197cbac7f5c6961 diff --git a/lib/projectile b/lib/projectile index a4b447d..62ef2ae 160000 --- a/lib/projectile +++ b/lib/projectile @@ -1 +1 @@ -Subproject commit a4b447d980b10cbb8d175d64e4305b4504c03d83 +Subproject commit 62ef2aea33600b0b992905a37eff6febf30268d6 -- 2.20.1 From 115adbfbef4cc2ca9cc8a074cad6c3d81e8f5d3a Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Sat, 25 Aug 2018 01:18:19 -0400 Subject: [PATCH 04/16] [rc/notmuch] add uw/se212 tag rule --- rc.org | 1 + 1 file changed, 1 insertion(+) diff --git a/rc.org b/rc.org index f9d482a..1821b82 100644 --- a/rc.org +++ b/rc.org @@ -2297,6 +2297,7 @@ notmuch tag -inbox +banking -- folder:amin/banking # notmuch tag -inbox +uw/cs136 -- folder:uwaterloo/lists/cs136 notmuch tag -inbox +uw/se463 -- folder:uwaterloo/lists/se463 +notmuch tag -inbox +uw/se212 -- folder:uwaterloo/lists/se212 notmuch tag -inbox +lists/clvsingle -- folder:uwaterloo/lists/Clvsingle notmuch tag -inbox +lists/gsa -- folder:uwaterloo/lists/GSA -- 2.20.1 From f1e3161264dec7f2d12f0280a0b71d11e62cc5c4 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Tue, 28 Aug 2018 22:31:51 -0400 Subject: [PATCH 05/16] [emacs] update 9 drones and remove general lib/borg master v2.0.0-68-ga495a46 lib/doom-modeline master 0.4.0-5-gad7c7ae lib/helm master v3.0-2-g40a3fd4f lib/magit master 2.13.0-193-g648ea6e5 lib/no-littering master v0.5.14-8-g3f6d290 lib/org master release_9.1.14-901-g38a89014a lib/ox-hugo master v0.8-348-g0af60fc lib/proof-site master v4.4-198-g69066bf2 lib/which-key master v3.3.0-2-gc938bbf --- .gitmodules | 3 --- lib/borg | 2 +- lib/doom-modeline | 2 +- lib/general | 1 - lib/helm | 2 +- lib/magit | 2 +- lib/no-littering | 2 +- lib/org | 2 +- lib/ox-hugo | 2 +- lib/proof-site | 2 +- lib/which-key | 2 +- 11 files changed, 9 insertions(+), 13 deletions(-) delete mode 160000 lib/general diff --git a/.gitmodules b/.gitmodules index e5a4bb5..f9a2383 100644 --- a/.gitmodules +++ b/.gitmodules @@ -77,9 +77,6 @@ [submodule "flycheck-haskell"] path = lib/flycheck-haskell url = git@github.com:flycheck/flycheck-haskell.git -[submodule "general"] - path = lib/general - url = git@github.com:noctuid/general.el.git [submodule "ghub"] path = lib/ghub url = git@github.com:magit/ghub.git diff --git a/lib/borg b/lib/borg index 6270c61..a495a46 160000 --- a/lib/borg +++ b/lib/borg @@ -1 +1 @@ -Subproject commit 6270c61097bf600e4b7e5b7ebc148d501c9fd409 +Subproject commit a495a46ca5c7deece51096a0b8a9e6f819c5382c diff --git a/lib/doom-modeline b/lib/doom-modeline index 9d15e92..ad7c7ae 160000 --- a/lib/doom-modeline +++ b/lib/doom-modeline @@ -1 +1 @@ -Subproject commit 9d15e923c6abe90ac554a0333f1be03d5f8d1ea7 +Subproject commit ad7c7ae7e4639a9b93d66d85bdd47b66d8f65365 diff --git a/lib/general b/lib/general deleted file mode 160000 index 6b8f7bc..0000000 --- a/lib/general +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6b8f7bc4b4e64328c48b6262c6fa2105578f9eab diff --git a/lib/helm b/lib/helm index 757263f..40a3fd4 160000 --- a/lib/helm +++ b/lib/helm @@ -1 +1 @@ -Subproject commit 757263f9332d2d338ac3619f50547ef2f9d2bd9e +Subproject commit 40a3fd4f232dc3cc0f9fc9a00276c1ee95992a2d diff --git a/lib/magit b/lib/magit index ce6bbc8..648ea6e 160000 --- a/lib/magit +++ b/lib/magit @@ -1 +1 @@ -Subproject commit ce6bbc83b642133740a91a493c1232caf77b0ede +Subproject commit 648ea6e54f061a42c05998b4d461f147baa931e3 diff --git a/lib/no-littering b/lib/no-littering index a8618ec..3f6d290 160000 --- a/lib/no-littering +++ b/lib/no-littering @@ -1 +1 @@ -Subproject commit a8618eca22e78b9e4f1a7385002f5db95e60acff +Subproject commit 3f6d290bb43d75ba749d56fffc21c15f1d4157d2 diff --git a/lib/org b/lib/org index 80d3340..38a8901 160000 --- a/lib/org +++ b/lib/org @@ -1 +1 @@ -Subproject commit 80d334085fa4c8811c2d4b08c5b54baebff9c50f +Subproject commit 38a89014abaa638c806c9869eb1ce32963292434 diff --git a/lib/ox-hugo b/lib/ox-hugo index 8e244fa..0af60fc 160000 --- a/lib/ox-hugo +++ b/lib/ox-hugo @@ -1 +1 @@ -Subproject commit 8e244faf5c736b836dc8be53f197cbac7f5c6961 +Subproject commit 0af60fc9f2c38606ae305d6ddedf996751dd02fe diff --git a/lib/proof-site b/lib/proof-site index 9578625..69066bf 160000 --- a/lib/proof-site +++ b/lib/proof-site @@ -1 +1 @@ -Subproject commit 95786256fc32ad6881b4d95d98b5b41acd171fc9 +Subproject commit 69066bf2cb97d6df74a069c3e90155e43353a2a0 diff --git a/lib/which-key b/lib/which-key index 013cdb7..c938bbf 160000 --- a/lib/which-key +++ b/lib/which-key @@ -1 +1 @@ -Subproject commit 013cdb7259c1ff1ce9fb7ffbc637fc368ebd8144 +Subproject commit c938bbf8d4b506d8a16bedf0059703236ce05a50 -- 2.20.1 From 4d987946cb62cd565b696cda7f2a2316fc93dc8b Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Wed, 29 Aug 2018 22:13:15 -0400 Subject: [PATCH 06/16] [emacs] have C-d quit eshell on empty prompt input --- init.org | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/init.org b/init.org index 51cd9ca..9c294be 100644 --- a/init.org +++ b/init.org @@ -753,6 +753,26 @@ There's no way I could top that, so I won't attempt to. (defalias 'locate #'counsel-locate)) #+end_src +*** eshell + +#+begin_src emacs-lisp +(use-package eshell + :commands eshell + :config + (eval-when-compile (defvar eshell-prompt-regexp)) + (defun amin/eshell-quit-or-delete-char (arg) + (interactive "p") + (if (and (eolp) (looking-back eshell-prompt-regexp nil)) + (eshell-life-is-too-much) + (delete-char arg))) + + (defun amin|eshell-setup () + (bind-keys :map eshell-mode-map + ("C-d" . amin/eshell-quit-or-delete-char))) + + :hook (eshell-mode . amin|eshell-setup)) +#+end_src + * Borg's =layer/essentials= TODO: break this giant source block down into individual org sections. -- 2.20.1 From d69459000d94b09a6912d9a439873bc39ca70706 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Wed, 29 Aug 2018 22:15:54 -0400 Subject: [PATCH 07/16] [emacs] assimilate shackle and add a few useful popup rules --- .gitmodules | 3 +++ init.org | 18 ++++++++++++++++++ lib/shackle | 1 + 3 files changed, 22 insertions(+) create mode 160000 lib/shackle diff --git a/.gitmodules b/.gitmodules index f9a2383..fa3abec 100644 --- a/.gitmodules +++ b/.gitmodules @@ -166,6 +166,9 @@ [submodule "s"] path = lib/s url = git@github.com:magnars/s.el.git +[submodule "shackle"] + path = lib/shackle + url = git@github.com:wasamasa/shackle.git [submodule "shrink-path"] path = lib/shrink-path url = git@gitlab.com:bennya/shrink-path.el.git diff --git a/init.org b/init.org index 9c294be..febf8aa 100644 --- a/init.org +++ b/init.org @@ -1177,6 +1177,24 @@ Emacs package that displays available keybindings in popup :after #'my-projectile-invalidate-cache)))) #+end_src +** [[https://github.com/wasamasa/shackle][shackle]] + +#+begin_src emacs-lisp +(use-package shackle + :demand t + :commands shackle-mode + :config + (shackle-mode 1) + (setq shackle-rules + '(("*Help*" :align right :select t :size 0.5) + ("\\`\\*helm.*?\\*\\'" :regexp t :align t) + ((compilation-mode "\\`\\*magit-diff: .*?\\'") :regexp t :noselect t) + ((inferior-scheme-mode "*shell*" "*eshell*") :popup t)) + shackle-default-rule '(:select t) + shackle-default-size 0.4 + shackle-inhibit-window-quit-on-same-windows t)) +#+end_src + * Email ** [[https://notmuchmail.org][notmuch]] diff --git a/lib/shackle b/lib/shackle new file mode 160000 index 0000000..4189c1c --- /dev/null +++ b/lib/shackle @@ -0,0 +1 @@ +Subproject commit 4189c1c773aab533969b587f7801ffbcd1d7d613 -- 2.20.1 From b36bd0dd05d7a650dde379096161500f06ba3bae Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Wed, 29 Aug 2018 22:26:05 -0400 Subject: [PATCH 08/16] [emacs] assimilate helpful and its deps, and add bindings --- .gitmodules | 12 ++++++++++++ init.org | 13 +++++++++++++ lib/elisp-refs | 1 + lib/helpful | 1 + lib/loop | 1 + lib/shut-up | 1 + 6 files changed, 29 insertions(+) create mode 160000 lib/elisp-refs create mode 160000 lib/helpful create mode 160000 lib/loop create mode 160000 lib/shut-up diff --git a/.gitmodules b/.gitmodules index fa3abec..6a2f4a9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -55,6 +55,9 @@ [submodule "eldoc-eval"] path = lib/eldoc-eval url = git@github.com:thierryvolpiatto/eldoc-eval.git +[submodule "elisp-refs"] + path = lib/elisp-refs + url = git@github.com:Wilfred/elisp-refs.git [submodule "emacsql"] path = lib/emacsql url = git@github.com:skeeto/emacsql.git @@ -89,6 +92,9 @@ [submodule "helm"] path = lib/helm url = git@github.com:emacs-helm/helm.git +[submodule "helpful"] + path = lib/helpful + url = git@github.com:Wilfred/helpful.git [submodule "hlint-refactor"] path = lib/hlint-refactor url = git@github.com:mpickering/hlint-refactor-mode.git @@ -105,6 +111,9 @@ [submodule "lean-mode"] path = lib/lean-mode url = git@github.com:leanprover/lean-mode.git +[submodule "loop"] + path = lib/loop + url = git@github.com:Wilfred/loop.el.git [submodule "magit"] path = lib/magit url = git@github.com:magit/magit.git @@ -172,6 +181,9 @@ [submodule "shrink-path"] path = lib/shrink-path url = git@gitlab.com:bennya/shrink-path.el.git +[submodule "shut-up"] + path = lib/shut-up + url = git@github.com:cask/shut-up.git [submodule "smex"] # used by counsel-M-x path = lib/smex url = git@github.com:nonsequitur/smex.git diff --git a/init.org b/init.org index febf8aa..56e7752 100644 --- a/init.org +++ b/init.org @@ -1195,6 +1195,19 @@ Emacs package that displays available keybindings in popup shackle-inhibit-window-quit-on-same-windows t)) #+end_src +** [[https://github.com/Wilfred/helpful][helpful]] + +#+begin_src emacs-lisp +(use-package helpful + :bind + (("C-h f" . helpful-callable) + ("C-h v" . helpful-variable) + ("C-h k" . helpful-key) + ("C-c C-d" . helpful-at-point) + ("C-h F" . helpful-function) + ("C-h C" . helpful-command))) +#+end_src + * Email ** [[https://notmuchmail.org][notmuch]] diff --git a/lib/elisp-refs b/lib/elisp-refs new file mode 160000 index 0000000..7faa172 --- /dev/null +++ b/lib/elisp-refs @@ -0,0 +1 @@ +Subproject commit 7faa17293b8fc9e4b5c98a0dbe53bf3c2705a3f2 diff --git a/lib/helpful b/lib/helpful new file mode 160000 index 0000000..6274c10 --- /dev/null +++ b/lib/helpful @@ -0,0 +1 @@ +Subproject commit 6274c100b50c977ed7310d0f99eba26951b51f13 diff --git a/lib/loop b/lib/loop new file mode 160000 index 0000000..e22807f --- /dev/null +++ b/lib/loop @@ -0,0 +1 @@ +Subproject commit e22807f83a0890dc8a904c51ee0742c34efccc6c diff --git a/lib/shut-up b/lib/shut-up new file mode 160000 index 0000000..081d6b0 --- /dev/null +++ b/lib/shut-up @@ -0,0 +1 @@ +Subproject commit 081d6b01e3ba0e60326558e545c4019219e046ce -- 2.20.1 From d5dbdde553828b1af43ba2a34347a367f9e2890e Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Wed, 29 Aug 2018 22:27:06 -0400 Subject: [PATCH 09/16] [rc/notmuch] add work and lists/alloytools tagging rules --- rc.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rc.org b/rc.org index 1821b82..2819060 100644 --- a/rc.org +++ b/rc.org @@ -2292,13 +2292,15 @@ notmuch tag -inbox +lists/haskell-weekly -- folder:amin/lists/haskell-weekly notmuch tag -inbox +pay -- folder:amin/pay notmuch tag -inbox +banking -- folder:amin/banking +notmuch tag -inbox +work -- folder:amin/work # # notmuch tag -inbox +uw/cs136 -- folder:uwaterloo/lists/cs136 -notmuch tag -inbox +uw/se463 -- folder:uwaterloo/lists/se463 notmuch tag -inbox +uw/se212 -- folder:uwaterloo/lists/se212 +notmuch tag -inbox +uw/se463 -- folder:uwaterloo/lists/se463 +notmuch tag -inbox +lists/alloytools -- folder:uwaterloo/lists/alloytools notmuch tag -inbox +lists/clvsingle -- folder:uwaterloo/lists/Clvsingle notmuch tag -inbox +lists/gsa -- folder:uwaterloo/lists/GSA notmuch tag -inbox +lists/math-grad -- folder:uwaterloo/lists/Math-grad -- 2.20.1 From 6ef44cb72c995c9a59b2fa2b7f3b14173628ae99 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Wed, 29 Aug 2018 23:02:42 -0400 Subject: [PATCH 10/16] [emacs] assimilate shell-pop --- .gitmodules | 3 +++ init.org | 11 +++++++++++ lib/shell-pop | 1 + 3 files changed, 15 insertions(+) create mode 160000 lib/shell-pop diff --git a/.gitmodules b/.gitmodules index 6a2f4a9..a4082c6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -178,6 +178,9 @@ [submodule "shackle"] path = lib/shackle url = git@github.com:wasamasa/shackle.git +[submodule "shell-pop"] + path = lib/shell-pop + url = git@github.com:kyagi/shell-pop-el.git [submodule "shrink-path"] path = lib/shrink-path url = git@gitlab.com:bennya/shrink-path.el.git diff --git a/init.org b/init.org index 56e7752..058401a 100644 --- a/init.org +++ b/init.org @@ -1208,6 +1208,17 @@ Emacs package that displays available keybindings in popup ("C-h C" . helpful-command))) #+end_src +** [[https://github.com/kyagi/shell-pop-el][shell-pop]] + +#+begin_src emacs-lisp +(use-package shell-pop + :config + (add-to-list 'shackle-rules '("\\*eshell\\*" :regexp t :same t)) + :custom + (shell-pop-universal-key "C-c e") + (shell-pop-shell-type '("eshell" "*eshell*" (lambda nil (eshell))))) +#+end_src + * Email ** [[https://notmuchmail.org][notmuch]] diff --git a/lib/shell-pop b/lib/shell-pop new file mode 160000 index 0000000..4a3a9d0 --- /dev/null +++ b/lib/shell-pop @@ -0,0 +1 @@ +Subproject commit 4a3a9d093ad1add792bba764c601aa28de302b34 -- 2.20.1 From a8702c0393a06887ad82331033be79f984ab31ce Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Wed, 29 Aug 2018 23:03:20 -0400 Subject: [PATCH 11/16] [emacs] C-l eshell clear binding and magit-dispatch-popup on bottom --- init.org | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/init.org b/init.org index 058401a..a74d8df 100644 --- a/init.org +++ b/init.org @@ -766,9 +766,16 @@ There's no way I could top that, so I won't attempt to. (eshell-life-is-too-much) (delete-char arg))) + (defun amin/eshell-clear () + (interactive) + (let ((inhibit-read-only t)) + (erase-buffer)) + (eshell-send-input)) + (defun amin|eshell-setup () (bind-keys :map eshell-mode-map - ("C-d" . amin/eshell-quit-or-delete-char))) + ("C-d" . amin/eshell-quit-or-delete-char) + ("C-l" . amin/eshell-clear))) :hook (eshell-mode . amin|eshell-setup)) #+end_src @@ -1189,6 +1196,7 @@ Emacs package that displays available keybindings in popup '(("*Help*" :align right :select t :size 0.5) ("\\`\\*helm.*?\\*\\'" :regexp t :align t) ((compilation-mode "\\`\\*magit-diff: .*?\\'") :regexp t :noselect t) + ("*magit-dispatch-popup*" :align bottom) ((inferior-scheme-mode "*shell*" "*eshell*") :popup t)) shackle-default-rule '(:select t) shackle-default-size 0.4 -- 2.20.1 From ba8fa06bd61b31db9868d19a25cd239e4cfd51e8 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Thu, 30 Aug 2018 00:49:15 -0400 Subject: [PATCH 12/16] =?utf8?q?[emacs]=20add=20crux-top-join-line=20bindi?= =?utf8?q?ngs=20(=C3=A0=20la=20evil-mode's=20J)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- init.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.org b/init.org index a74d8df..bc73a1d 100644 --- a/init.org +++ b/init.org @@ -1150,7 +1150,9 @@ Emacs package that displays available keybindings in popup ("C-c b K" . crux-kill-other-buffers) ("C-c f c" . crux-copy-file-preserve-attributes) ("C-c f D" . crux-delete-file-and-buffer) - ("C-c f R" . crux-rename-file-and-buffer))) + ("C-c f R" . crux-rename-file-and-buffer) + ("C-S-j" . crux-top-join-line) + ("C-c j" . crux-top-join-line))) #+end_src ** [[https://github.com/alezost/mwim.el][mwim]] -- 2.20.1 From eb689aa4385a8a98336b9a8259a55ca4e294d68e Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Thu, 30 Aug 2018 01:17:06 -0400 Subject: [PATCH 13/16] [emacs] automatically tangle init.org on save --- init.org | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/init.org b/init.org index bc73a1d..81c652e 100644 --- a/init.org +++ b/init.org @@ -665,6 +665,48 @@ In short, my favourite way of life. :after (:any org notmuch)) #+end_src +**** asynchronous tangle + +=amin/async-babel-tangle= is a function closely inspired by [[https://github.com/dieggsy/dotfiles/tree/cc10edf7701958eff1cd94d4081da544d882a28c/emacs.d#dotfiles][dieggsy's +d/async-babel-tangle]] which uses [[https://github.com/jwiegley/emacs-async][async]] to asynchronously tangle an org +file. + +#+begin_src emacs-lisp +(after! org + (defvar amin-show-async-tangle-results nil + "Keep *emacs* async buffers around for later inspection.") + + (defvar amin-show-async-tangle-time nil + "Show the time spent tangling the file.") + + (defun amin/async-babel-tangle () + "Tangle org file asynchronously." + (interactive) + (let* ((file-tangle-start-time (current-time)) + (file (buffer-file-name)) + (file-nodir (file-name-nondirectory file)) + (async-quiet-switch "-q")) + (async-start + `(lambda () + (require 'org) + (org-babel-tangle-file ,file)) + (unless amin-show-async-tangle-results + `(lambda (result) + (if result + (message "Tangled %s%s" + ,file-nodir + (if amin-show-async-tangle-time + (format " (%.3fs)" + (float-time (time-subtract (current-time) + ',file-tangle-start-time))) + "")) + (message "Tangling %s failed" ,file-nodir)))))))) + +(add-to-list + 'safe-local-variable-values + '(eval add-hook 'after-save-hook #'amin/async-babel-tangle 'append 'local)) +#+end_src + *** [[https://magit.vc/][Magit]] #+begin_quote @@ -1477,3 +1519,8 @@ Display how long it took to load the init file. #+begin_src emacs-lisp :comments none ;;; init.el ends here #+end_src + +* COMMENT Local Variables :ARCHIVE: +# Local Variables: +# eval: (add-hook 'after-save-hook #'amin/async-babel-tangle 'append 'local) +# End: -- 2.20.1 From b07c1cc4dfe36f215eac01e5c69e32cdc7607015 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Thu, 30 Aug 2018 17:08:19 -0400 Subject: [PATCH 14/16] [emacs] call compile after async tangle, auto-close *compilation* close *compilation* buffer on successful compile --- init.org | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/init.org b/init.org index 81c652e..8bce20c 100644 --- a/init.org +++ b/init.org @@ -679,6 +679,9 @@ file. (defvar amin-show-async-tangle-time nil "Show the time spent tangling the file.") + (defvar amin-async-tangle-post-compile "make ti" + "If non-nil, pass to `compile' after successful tangle.") + (defun amin/async-babel-tangle () "Tangle org file asynchronously." (interactive) @@ -693,18 +696,31 @@ file. (unless amin-show-async-tangle-results `(lambda (result) (if result - (message "Tangled %s%s" - ,file-nodir - (if amin-show-async-tangle-time - (format " (%.3fs)" - (float-time (time-subtract (current-time) - ',file-tangle-start-time))) - "")) + (progn + (message "Tangled %s%s" + ,file-nodir + (if amin-show-async-tangle-time + (format " (%.3fs)" + (float-time (time-subtract (current-time) + ',file-tangle-start-time))) + "")) + (when amin-async-tangle-post-compile + (compile amin-async-tangle-post-compile))) (message "Tangling %s failed" ,file-nodir)))))))) (add-to-list 'safe-local-variable-values '(eval add-hook 'after-save-hook #'amin/async-babel-tangle 'append 'local)) + +(setq compilation-exit-message-function + (lambda (status code msg) + "Close the compilation window if successful." + ;; if M-x compile exits with 0 + (when (and (eq status 'exit) (zerop code)) + (bury-buffer) + (delete-window (get-buffer-window (get-buffer "*compilation*")))) + ;; return the result of compilation-exit-message-function + (cons msg code))) #+end_src *** [[https://magit.vc/][Magit]] -- 2.20.1 From 72a03130c464f49fe9aa3b50c6ec5d6c9fa4fb1c Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Thu, 30 Aug 2018 17:53:00 -0400 Subject: [PATCH 15/16] [emacs] delete old backups automatically stops emacs from annoying me on exit --- init.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.org b/init.org index 8bce20c..3f3bc06 100644 --- a/init.org +++ b/init.org @@ -577,7 +577,8 @@ variable. #+begin_src emacs-lisp (setq backup-by-copying t - version-control t) + version-control t + delete-old-versions t) #+end_src *** Auto revert -- 2.20.1 From f7fddd5fc4d2c8e3314d1158076d6b5386c46d86 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Thu, 30 Aug 2018 17:57:14 -0400 Subject: [PATCH 16/16] [emacs] update 4 drones lib/doom-modeline master 0.4.0-6-gac03729 lib/magit master 2.13.0-203-g854fb0b0 lib/org master release_9.1.14-905-gee4dbaff6 lib/proof-site master v4.4-202-g6aeacf58 --- lib/doom-modeline | 2 +- lib/magit | 2 +- lib/org | 2 +- lib/proof-site | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/doom-modeline b/lib/doom-modeline index ad7c7ae..ac03729 160000 --- a/lib/doom-modeline +++ b/lib/doom-modeline @@ -1 +1 @@ -Subproject commit ad7c7ae7e4639a9b93d66d85bdd47b66d8f65365 +Subproject commit ac0372958bc3acb46862fcb79302a069ef19d4fa diff --git a/lib/magit b/lib/magit index 648ea6e..854fb0b 160000 --- a/lib/magit +++ b/lib/magit @@ -1 +1 @@ -Subproject commit 648ea6e54f061a42c05998b4d461f147baa931e3 +Subproject commit 854fb0b08e9aa0c7151c158e7f1eb0540c5235a5 diff --git a/lib/org b/lib/org index 38a8901..ee4dbaf 160000 --- a/lib/org +++ b/lib/org @@ -1 +1 @@ -Subproject commit 38a89014abaa638c806c9869eb1ce32963292434 +Subproject commit ee4dbaff60300ee1b4e9d91fe1e54e9fdf9ef257 diff --git a/lib/proof-site b/lib/proof-site index 69066bf..6aeacf5 160000 --- a/lib/proof-site +++ b/lib/proof-site @@ -1 +1 @@ -Subproject commit 69066bf2cb97d6df74a069c3e90155e43353a2a0 +Subproject commit 6aeacf5863e6f22b86d9fb8e57380ca29fbfddaa -- 2.20.1