From 5660d7ba6bdb61e435c31e50e705aec97de70bd3 Mon Sep 17 00:00:00 2001 From: Max Nickel Date: Sun, 27 Oct 2019 17:31:53 -0400 Subject: [PATCH 001/983] [dired] add dired-git-info support --- modules/emacs/dired/autoload.el | 4 ++++ modules/emacs/dired/config.el | 8 ++++++++ modules/emacs/dired/packages.el | 1 + 3 files changed, 13 insertions(+) diff --git a/modules/emacs/dired/autoload.el b/modules/emacs/dired/autoload.el index 9b8a097ab..8e5526655 100644 --- a/modules/emacs/dired/autoload.el +++ b/modules/emacs/dired/autoload.el @@ -6,3 +6,7 @@ (interactive) (mapc #'kill-buffer (doom-buffers-in-mode 'dired-mode)) (message "Killed all dired buffers")) +;;;###autoload +(defun +dired/enable-git-info-h () + (if (locate-dominating-file "." ".git") + (dired-git-info-mode 1))) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index cbce83d3f..7e28c4a76 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -168,3 +168,11 @@ we have to clean it up ourselves." :when (executable-find doom-projectile-fd-binary) :defer t :init (advice-add #'find-dired :override #'fd-dired)) + + +(use-package! dired-git-info + :bind (:map dired-mode-map (")" . dired-git-info-mode)) + :after dired + :init + (progn + (add-hook 'dired-after-readin-hook '+dired/enable-git-info-h))) diff --git a/modules/emacs/dired/packages.el b/modules/emacs/dired/packages.el index 4eaa7ec7a..32126d7c3 100644 --- a/modules/emacs/dired/packages.el +++ b/modules/emacs/dired/packages.el @@ -2,6 +2,7 @@ ;;; emacs/dired/packages.el (package! diredfl) +(package! dired-git-info) (package! diff-hl) (package! dired-rsync) (when (featurep! +ranger) From 9d55e75bd85fbd649185da7015e6e842000c579c Mon Sep 17 00:00:00 2001 From: Max Nickel Date: Sun, 27 Oct 2019 17:32:52 -0400 Subject: [PATCH 002/983] [dired] add support for hiding dotfiles and hide details by default --- modules/emacs/dired/autoload.el | 17 +++++++++++++++++ modules/emacs/dired/config.el | 5 +++++ 2 files changed, 22 insertions(+) diff --git a/modules/emacs/dired/autoload.el b/modules/emacs/dired/autoload.el index 8e5526655..ca49283ac 100644 --- a/modules/emacs/dired/autoload.el +++ b/modules/emacs/dired/autoload.el @@ -6,7 +6,24 @@ (interactive) (mapc #'kill-buffer (doom-buffers-in-mode 'dired-mode)) (message "Killed all dired buffers")) + + ;;;###autoload (defun +dired/enable-git-info-h () (if (locate-dominating-file "." ".git") (dired-git-info-mode 1))) + +;;;###autoload +(defun +dired/dotfiles-hide () + (set (make-local-variable '+dired-dotfiles-show-p) nil) + (dired-mark-files-regexp "^\\\.") + (dired-do-kill-lines)) + +;;;###autoload +(defun +dired/dotfiles-toggle () + (interactive) + (when (equal major-mode 'dired-mode) + (if (or (not (boundp '+dired-dotfiles-show-p)) +dired-dotfiles-show-p) ; if currently showing + (+dired/dotfiles-hide) + (progn (revert-buffer) ; otherwise just revert to re-show + (set (make-local-variable '+dired-dotfiles-show-p) t))))) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index 7e28c4a76..64fdcc631 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -45,6 +45,11 @@ only variant that supports --group-directories-first." "--group-directories-first") " "))))) + ;; hide details by default + (add-hook 'dired-mode-hook 'dired-hide-details-mode) + ;; hide dotfiles by default + (add-hook 'dired-after-readin-hook '+dired/dotfiles-hide) + ;; Don't complain about this command being disabled when we use it (put 'dired-find-alternate-file 'disabled nil) From 49fce0b1c320b3c1ce7907f298eb54eab2aded5b Mon Sep 17 00:00:00 2001 From: Max Nickel Date: Sun, 27 Oct 2019 17:47:20 -0400 Subject: [PATCH 003/983] [dired] follow function naming conventions --- modules/emacs/dired/autoload.el | 6 +++--- modules/emacs/dired/config.el | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/emacs/dired/autoload.el b/modules/emacs/dired/autoload.el index ca49283ac..a59bccbb3 100644 --- a/modules/emacs/dired/autoload.el +++ b/modules/emacs/dired/autoload.el @@ -9,12 +9,12 @@ ;;;###autoload -(defun +dired/enable-git-info-h () +(defun +dired-enable-git-info-h () (if (locate-dominating-file "." ".git") (dired-git-info-mode 1))) ;;;###autoload -(defun +dired/dotfiles-hide () +(defun +dired-dotfiles-hide () (set (make-local-variable '+dired-dotfiles-show-p) nil) (dired-mark-files-regexp "^\\\.") (dired-do-kill-lines)) @@ -24,6 +24,6 @@ (interactive) (when (equal major-mode 'dired-mode) (if (or (not (boundp '+dired-dotfiles-show-p)) +dired-dotfiles-show-p) ; if currently showing - (+dired/dotfiles-hide) + (+dired-dotfiles-hide) (progn (revert-buffer) ; otherwise just revert to re-show (set (make-local-variable '+dired-dotfiles-show-p) t))))) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index 64fdcc631..fe430dd72 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -48,7 +48,7 @@ only variant that supports --group-directories-first." ;; hide details by default (add-hook 'dired-mode-hook 'dired-hide-details-mode) ;; hide dotfiles by default - (add-hook 'dired-after-readin-hook '+dired/dotfiles-hide) + (add-hook 'dired-after-readin-hook '+dired-dotfiles-hide) ;; Don't complain about this command being disabled when we use it (put 'dired-find-alternate-file 'disabled nil) @@ -180,4 +180,4 @@ we have to clean it up ourselves." :after dired :init (progn - (add-hook 'dired-after-readin-hook '+dired/enable-git-info-h))) + (add-hook 'dired-after-readin-hook '+dired-enable-git-info-h))) From 70e7b8a38898275e84bc35db50dea409ce4fb6cc Mon Sep 17 00:00:00 2001 From: Gerry Agbobada Date: Wed, 30 Oct 2019 09:36:05 +0100 Subject: [PATCH 004/983] Add flycheck-golangci-lint This plugin runs [golangci-lint](https://github.com/golangci/golangci-lint) in the background and gathers the results in a checker. --- modules/lang/go/README.org | 6 ++++++ modules/lang/go/config.el | 5 +++++ modules/lang/go/packages.el | 3 +++ 3 files changed, 14 insertions(+) diff --git a/modules/lang/go/README.org b/modules/lang/go/README.org index 916c9abdd..77299db90 100644 --- a/modules/lang/go/README.org +++ b/modules/lang/go/README.org @@ -27,6 +27,7 @@ This module adds [[https://golang.org][Go]] support. + [[../../editor/file-templates/templates/go-mode][File templates]] + [[https://github.com/hlissner/doom-snippets/tree/master/go-mode][Snippets]] + Generate testing code (~go-gen-test~) ++ Code checking (~flycheck-golangci-lint~) ** Module Flags This module provides no flags. @@ -39,6 +40,7 @@ This module provides no flags. + [[https://github.com/syohex/emacs-go-add-tags][go-add-tags]] + [[https://github.com/mdempsky/gocode][company-go]]* + [[https://github.com/s-kostyaev/go-gen-test][go-gen-test]] ++ [[https://github.com/weijiangan/flycheck-golangci-lint][flycheck-golangci-lint]] (if =:tools flycheck= is enabled) * Prerequisites ** Go @@ -82,6 +84,10 @@ go get -u golang.org/x/tools/cmd/guru go get -u github.com/cweill/gotests/... #+END_SRC ++ ~golangci-lint~ (optional: for flycheck to integrate golangci-lint results) + it is recommended to *not* use go get to install this one, check the + [[https://github.com/golangci/golangci-lint#binary-release][documentation]]. + * TODO Features * TODO Configuration diff --git a/modules/lang/go/config.el b/modules/lang/go/config.el index 0c13afd68..eae47576f 100644 --- a/modules/lang/go/config.el +++ b/modules/lang/go/config.el @@ -68,3 +68,8 @@ :config (set-company-backend! 'go-mode 'company-go) (setq company-go-show-annotation t)) + +(use-package! flycheck-golangci-lint + :when (featurep! :tools flycheck) + :hook (go-mode . flycheck-golangci-lint-setup) + :config (setenv "GO111MODULE" "on")) diff --git a/modules/lang/go/packages.el b/modules/lang/go/packages.el index bbf22ba0b..5203311e2 100644 --- a/modules/lang/go/packages.el +++ b/modules/lang/go/packages.el @@ -10,3 +10,6 @@ (when (featurep! :completion company) (package! company-go)) + +(when (featurep! :tools flycheck) + (package! flycheck-golangci-lint)) From b7046de2ca26b1ffe7bf0e2051c2a1c92ba2ddff Mon Sep 17 00:00:00 2001 From: Max Nickel Date: Sat, 2 Nov 2019 14:28:35 -0400 Subject: [PATCH 005/983] disable dired-git-info hook in remote directories --- modules/emacs/dired/autoload.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/emacs/dired/autoload.el b/modules/emacs/dired/autoload.el index a59bccbb3..bf911db28 100644 --- a/modules/emacs/dired/autoload.el +++ b/modules/emacs/dired/autoload.el @@ -10,7 +10,9 @@ ;;;###autoload (defun +dired-enable-git-info-h () - (if (locate-dominating-file "." ".git") + (if (and + (not (file-remote-p default-directory)) + (locate-dominating-file "." ".git")) (dired-git-info-mode 1))) ;;;###autoload From 0d7d107bbf7ddd43d74162287af031edebff5109 Mon Sep 17 00:00:00 2001 From: Max Nickel Date: Sat, 2 Nov 2019 14:29:51 -0400 Subject: [PATCH 006/983] remove unnecessary dotfile functions and hooks --- modules/emacs/dired/autoload.el | 15 --------------- modules/emacs/dired/config.el | 2 -- 2 files changed, 17 deletions(-) diff --git a/modules/emacs/dired/autoload.el b/modules/emacs/dired/autoload.el index bf911db28..145fdd557 100644 --- a/modules/emacs/dired/autoload.el +++ b/modules/emacs/dired/autoload.el @@ -14,18 +14,3 @@ (not (file-remote-p default-directory)) (locate-dominating-file "." ".git")) (dired-git-info-mode 1))) - -;;;###autoload -(defun +dired-dotfiles-hide () - (set (make-local-variable '+dired-dotfiles-show-p) nil) - (dired-mark-files-regexp "^\\\.") - (dired-do-kill-lines)) - -;;;###autoload -(defun +dired/dotfiles-toggle () - (interactive) - (when (equal major-mode 'dired-mode) - (if (or (not (boundp '+dired-dotfiles-show-p)) +dired-dotfiles-show-p) ; if currently showing - (+dired-dotfiles-hide) - (progn (revert-buffer) ; otherwise just revert to re-show - (set (make-local-variable '+dired-dotfiles-show-p) t))))) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index fe430dd72..579c27ba3 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -47,8 +47,6 @@ only variant that supports --group-directories-first." ;; hide details by default (add-hook 'dired-mode-hook 'dired-hide-details-mode) - ;; hide dotfiles by default - (add-hook 'dired-after-readin-hook '+dired-dotfiles-hide) ;; Don't complain about this command being disabled when we use it (put 'dired-find-alternate-file 'disabled nil) From 1b962937cea7c962b561f778f0f68a651f26a829 Mon Sep 17 00:00:00 2001 From: Max Nickel Date: Sat, 2 Nov 2019 14:31:20 -0400 Subject: [PATCH 007/983] add keybinding to toggle dired-omit-mode --- modules/emacs/dired/config.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index 579c27ba3..a07d530f1 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -164,7 +164,11 @@ we have to clean it up ourselves." ("\\.\\(?:mp4\\|mkv\\|avi\\|flv\\|rm\\|rmvb\\|ogv\\)\\(?:\\.part\\)?\\'" ,cmd) ("\\.\\(?:mp3\\|flac\\)\\'" ,cmd) ("\\.html?\\'" ,cmd) - ("\\.md\\'" ,cmd))))) + ("\\.md\\'" ,cmd)))) + (map! + :map dired-mode-map + :localleader + "h" #'dired-omit-mode)) (use-package! fd-dired From d295c5d7234767fdbcbabea59b779354afcc0e50 Mon Sep 17 00:00:00 2001 From: Max Nickel Date: Sat, 2 Nov 2019 14:31:53 -0400 Subject: [PATCH 008/983] disable dired-git-info when ranger is enabled and fix keybinding --- modules/emacs/dired/config.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index a07d530f1..b12efd497 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -178,8 +178,11 @@ we have to clean it up ourselves." (use-package! dired-git-info - :bind (:map dired-mode-map (")" . dired-git-info-mode)) + :unless (featurep! +ranger) :after dired :init - (progn - (add-hook 'dired-after-readin-hook '+dired-enable-git-info-h))) + (add-hook 'dired-after-readin-hook '+dired-enable-git-info-h) + :config + (map! + :map dired-mode-map + :ng ")" #'dired-git-info-mode)) From f5310fd0888b1a76484dfc670ac6bbcc11f9f6bb Mon Sep 17 00:00:00 2001 From: Ralf Beckmann Date: Sat, 9 Nov 2019 21:40:52 +0100 Subject: [PATCH 009/983] Added keybindings for commands that show keymaps A new prefix has been added to help-map. That prefix provides access to various commands that show keybindings/keymaps. --- modules/config/default/config.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index 49f68c592..62bbd5953 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -301,6 +301,16 @@ "rf" #'doom/reload-font "re" #'doom/reload-env + ;; make `describe-bindings' available under the b prefix which it previously + ;; occupied. Add more binding related commands under that prefix as well + "b" nil + "bb" #'describe-bindings + "bi" #'which-key-show-minor-mode-keymap + "bm" #'which-key-show-major-mode + "bt" #'which-key-show-top-level + "bf" #'which-key-show-full-keymap + "bk" #'which-key-show-keymap + ;; replaces `apropos-documentation' b/c `apropos' covers this "d" nil "d/" #'doom/help-search @@ -347,6 +357,9 @@ which-key-replacement-alist) (cl-pushnew `((,(format "\\`\\(?:<\\(?:\\(?:f1\\|help\\)>\\)\\|C-h\\|%s h\\) r\\'" prefix-re)) nil . "reload") + which-key-replacement-alist) + (cl-pushnew `((,(format "\\`\\(?:<\\(?:\\(?:f1\\|help\\)>\\)\\|C-h\\|%s h\\) b\\'" prefix-re)) + nil . "bindings") which-key-replacement-alist))) From c2d66ccdcfc06a43d13fcf38677b8b771f93c3a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alois=20Jan=C3=AD=C4=8Dek?= Date: Tue, 19 Nov 2019 13:24:54 +0100 Subject: [PATCH 010/983] ivy-posframe: ignore counsel-rg --- modules/completion/ivy/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 4cb329f78..6ea88af7b 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -333,7 +333,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." #'+ivy-display-at-frame-center-near-bottom-fn) ;; posframe doesn't work well with async sources - (dolist (fn '(swiper counsel-ag counsel-grep counsel-git-grep)) + (dolist (fn '(swiper counsel-rg counsel-grep counsel-git-grep)) (setf (alist-get fn ivy-posframe-display-functions-alist) #'ivy-display-function-fallback))) From c7420a4bd7ec3e80c7f5df4c07f25c5b77d07e83 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 20 Nov 2019 11:27:26 +0700 Subject: [PATCH 011/983] Speed up indent guessing Guessing the indentation can be awfully slow because it scans the whole buffer. This PR overrides the guessing mechanism to scan at most 10000 points. Signed-off-by: Rudi Grinberg --- core/core-editor.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/core-editor.el b/core/core-editor.el index e71dd4d4f..e98606e5f 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -358,6 +358,10 @@ files, so we replace calls to `pp' with the much faster `prin1'." :around #'dtrt-indent-mode (let ((dtrt-indent-run-after-smie dtrt-indent-run-after-smie)) (cl-letf* ((old-smie-config-guess (symbol-function 'smie-config-guess)) + (old-smie-config--guess (symbol-function 'symbol-config--guess)) + ((symbol-function 'symbol-config--guess) + (lambda (beg end) + (funcall old-smie-config--guess beg (min end 10000)))) ((symbol-function 'smie-config-guess) (lambda () (condition-case e (funcall old-smie-config-guess) From 34bc6650b1c42db30559d4894ade83e670c1c561 Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Wed, 20 Nov 2019 12:09:23 +0100 Subject: [PATCH 012/983] lang/latex: Support forward search with Skim --- modules/lang/latex/+viewers.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/lang/latex/+viewers.el b/modules/lang/latex/+viewers.el index 1e92f3bd9..5b1bf4330 100644 --- a/modules/lang/latex/+viewers.el +++ b/modules/lang/latex/+viewers.el @@ -10,7 +10,10 @@ (when (and IS-MAC (file-exists-p! (or "/Applications/Skim.app" "~/Applications/Skim.app"))) - (add-to-list 'TeX-view-program-selection '(output-pdf "Skim")))) + (add-to-list 'TeX-view-program-selection '(output-pdf "Skim")) + (if (file-exists-p! "~/Applications/Skim.app") + (add-to-list 'TeX-view-program-list '("Skim" "~/Applications/Skim.app/Contents/SharedSupport/displayline -b -g %n %o %b")) + (add-to-list 'TeX-view-program-list '("Skim" "/Applications/Skim.app/Contents/SharedSupport/displayline -b -g %n %o %b"))))) (`sumatrapdf (when (and IS-WINDOWS From 65805bdcb95dd72f3648977aed102346eaea6f94 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 00:34:44 -0500 Subject: [PATCH 013/983] docs/faq: revise 'customized without restarting' answer --- docs/faq.org | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/faq.org b/docs/faq.org index 695ee890c..973a5f458 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -757,17 +757,15 @@ tools for experienced Emacs users to skirt around it (most of the time): - Evaluate your changes on-the-fly with ~+eval/region~ (bound to the =gr= operator for evil users) or ~eval-last-sexp~ (bound to =C-x C-e=). Changes take effect immediately. -- On-the-fly evaluation won't work for all changes. For instance, changing your - ~doom!~ block (i.e. the list of modules for Doom to enable) will always - require a restart (and ~bin/doom refresh~). +- On-the-fly evaluation won't work for all changes. e.g. Changing your ~doom!~ + block (i.e. the list of modules for Doom to enable). - Doom provides ~M-x doom/reload~ for your convenience, which will run ~doom - refresh~, restart the Doom initialization process, and re-evaluate your - personal config, but this won't clear pre-existing state. That may or may not - be a problem, this hasn't be thoroughly tested and Doom cannot anticipate - complications arising from your private config. - - If you intend to use ~doom/reload~, you must design your config to be + But rather than running ~doom refresh~ and restarting Emacs, Doom provides + ~M-x doom/reload~ for your convenience (bound to =SPC h r r= and =C-h r r=). + This runs ~doom refresh~, restarts the Doom initialization process and + re-evaluates your personal config. However, this won't clear pre-existing + state; Doom won't unload modules/packages that have already been loaded and it + can't anticipate complications arising from a private config that isn't idempotent. - Many ~bin/doom~ commands are available as elisp commands with the ~doom//*~ prefix. e.g. ~doom//refresh~, ~doom//update~, etc. Feel free to use them, but From 643c7b0f18a2ea197421d7fb983b0fc44156ead5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 00:35:50 -0500 Subject: [PATCH 014/983] Fix doom//* commands Hopefully --- core/autoload/cli.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/autoload/cli.el b/core/autoload/cli.el index 0c455f741..e95218d17 100644 --- a/core/autoload/cli.el +++ b/core/autoload/cli.el @@ -20,15 +20,12 @@ (when (memq char '(?\n ?\r)) (ansi-color-apply-on-region (line-beginning-position -1) (line-end-position)) (redisplay)))))) - (doom-initialize t) (setq doom-modules (doom-modules)) - (doom-initialize-modules t) - (doom-initialize-packages t) (with-current-buffer (switch-to-buffer buf) (erase-buffer) (require 'package) (redisplay) - (doom-dispatch command nil) + (doom-cli-execute command nil) (print! (green "\nDone!")))) (when (featurep 'general) (general-auto-unbind-keys 'undo)) From a4fcbb40e94c64f32f53f89951dff72d1c56b585 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 00:36:40 -0500 Subject: [PATCH 015/983] Revert ed3408d #2085 --- core/core.el | 1 - 1 file changed, 1 deletion(-) diff --git a/core/core.el b/core/core.el index 6bc56a172..e01c7bd23 100644 --- a/core/core.el +++ b/core/core.el @@ -210,7 +210,6 @@ users).") tramp-auto-save-directory (concat doom-cache-dir "tramp-auto-save/") tramp-backup-directory-alist backup-directory-alist tramp-persistency-file-name (concat doom-cache-dir "tramp-persistency.el") - tramp-histfile-override (concat doom-cache-dir "tramp-histfile.el") url-cache-directory (concat doom-cache-dir "url/") url-configuration-directory (concat doom-etc-dir "url/") gamegrid-user-score-file-directory (concat doom-etc-dir "games/")) From 471cbde4969919224e418c2f5d28495ba3c211e2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 00:40:24 -0500 Subject: [PATCH 016/983] docs/index: add description to :lang javascript #2086 --- docs/index.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.org b/docs/index.org index eadfd4f4c..2ca87d62c 100644 --- a/docs/index.org +++ b/docs/index.org @@ -186,7 +186,7 @@ Modules that bring support for a language or group of languages to Emacs. + hy - TODO + [[file:../modules/lang/idris/README.org][idris]] - TODO + java =+meghanada +lsp= - TODO -+ [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - TODO ++ [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - Javascript, typescript, and coffeescript support + julia - TODO + kotlin - TODO + [[file:../modules/lang/latex/README.org][latex]] - TODO From 604cde933f9896523206567a124c37725f0b3fcd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 00:49:37 -0500 Subject: [PATCH 017/983] Refactor Skim forward-search fix --- modules/lang/latex/+viewers.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/lang/latex/+viewers.el b/modules/lang/latex/+viewers.el index 5b1bf4330..1195632ea 100644 --- a/modules/lang/latex/+viewers.el +++ b/modules/lang/latex/+viewers.el @@ -7,13 +7,15 @@ (dolist (viewer (reverse +latex-viewers)) (pcase viewer (`skim - (when (and IS-MAC - (file-exists-p! (or "/Applications/Skim.app" - "~/Applications/Skim.app"))) + (when-let + (app-path + (and IS-MAC + (file-exists-p! (or "/Applications/Skim.app" + "~/Applications/Skim.app")))) (add-to-list 'TeX-view-program-selection '(output-pdf "Skim")) - (if (file-exists-p! "~/Applications/Skim.app") - (add-to-list 'TeX-view-program-list '("Skim" "~/Applications/Skim.app/Contents/SharedSupport/displayline -b -g %n %o %b")) - (add-to-list 'TeX-view-program-list '("Skim" "/Applications/Skim.app/Contents/SharedSupport/displayline -b -g %n %o %b"))))) + (add-to-list 'TeX-view-program-list + (list "Skim" (format "%s/Contents/SharedSupport/displayline -b -g %%n %%o %%b" + app-path)))) (`sumatrapdf (when (and IS-WINDOWS From 36ba16b29586db8ffd6720143ac4287410fda15f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 02:00:24 -0500 Subject: [PATCH 018/983] Add -p/--purge switches to 'doom refresh' --- core/core-cli.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/core-cli.el b/core/core-cli.el index e1ca98b87..cbe938dd0 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -216,7 +216,8 @@ BODY will be run when this dispatcher is called." (load! "cli/install") (defcli! (refresh re) - ((if-necessary-p ["-n" "--if-necessary"] "Only regenerate autoloads files if necessary")) + ((if-necessary-p ["-n" "--if-necessary"] "Only regenerate autoloads files if necessary") + (purge-p ["-p" "--purge"] "Also purge orphaned repos and ELPA packages")) "Ensure Doom is properly set up. This is the equivalent of running autoremove, install, autoloads, then @@ -241,7 +242,7 @@ stale." (setq success t)) (and (doom-cli-packages-build) (setq success t)) - (and (doom-cli-packages-purge nil 'builds-p nil) + (and (doom-cli-packages-purge purge-p 'builds-p purge-p) (setq success t))) (doom-cli-reload-package-autoloads (or success (not if-necessary-p))) (doom-cli-byte-compile nil 'recompile)) From 7c2e4cd27a0bb0aec32bab605d03bc3ac802d7f4 Mon Sep 17 00:00:00 2001 From: Dan LaManna Date: Thu, 21 Nov 2019 12:48:50 -0500 Subject: [PATCH 019/983] lang/python: fix minor documentation mistakes --- modules/lang/python/README.org | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/lang/python/README.org b/modules/lang/python/README.org index 61becaa11..57e555f8f 100644 --- a/modules/lang/python/README.org +++ b/modules/lang/python/README.org @@ -89,7 +89,7 @@ Alternatively you can use the [[https://pypi.org/project/python-language-server/ * Features This module supports LSP. It requires installation of [[https://pypi.org/project/python-language-server/][Python Language -Server]] or [[https://github.com/Microsoft/python-language-server][Microsoft Lnaguaje Server]], see [[Language Server Protocol Support][LSP Support]]. +Server]] or [[https://github.com/Microsoft/python-language-server][Microsoft Language Server]], see [[Language Server Protocol Support][LSP Support]]. To enable support for auto-formatting with black enable ~:editor format-all~ in ~init.el~ file. @@ -116,11 +116,11 @@ To enable support for auto-formatting with black enable ~:editor format-all~ in | ~ t m~ | ~python-pytest-function-dwim~ | | ~ t r~ | ~python-pytest-repeat~ | | ~ t p~ | ~python-pytest-popup~ | -| ~ f d~ | ~anaconda-mode-find-definitions~ | -| ~ f h~ | ~anaconda-mode-show-doc~ | -| ~ f a~ | ~anaconda-mode-find-assignments~ | -| ~ f f~ | ~anaconda-mode-find-file~ | -| ~ f u~ | ~anaconda-mode-find-references~ | +| ~ g d~ | ~anaconda-mode-find-definitions~ | +| ~ g h~ | ~anaconda-mode-show-doc~ | +| ~ g a~ | ~anaconda-mode-find-assignments~ | +| ~ g f~ | ~anaconda-mode-find-file~ | +| ~ g u~ | ~anaconda-mode-find-references~ | * Configuration This module has the following variables to set extra arguments to [[https://ipython.org/][ipython]] and From 0212bb95f8a8360ed33334f9fb9854b4383f8328 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 13:54:37 -0500 Subject: [PATCH 020/983] term/shell: fix void-variable dir #2095 --- modules/term/shell/autoload.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/term/shell/autoload.el b/modules/term/shell/autoload.el index 6549e8b08..f60432db8 100644 --- a/modules/term/shell/autoload.el +++ b/modules/term/shell/autoload.el @@ -54,7 +54,8 @@ If popup is focused, kill it." (format "*doom:shell-popup:%s*" (if (bound-and-true-p persp-mode) (safe-persp-name (get-current-persp)) - "main"))))) + "main")))) + (dir default-directory)) (if-let (win (get-buffer-window buffer)) (if (eq (selected-window) win) (let (confirm-kill-processes) From e105c93b178c804a74c6d1c406592e983e1c49d9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 14:04:55 -0500 Subject: [PATCH 021/983] lang/latex: fix end-of-file syntax error --- modules/lang/latex/+viewers.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/latex/+viewers.el b/modules/lang/latex/+viewers.el index 1195632ea..337e4674d 100644 --- a/modules/lang/latex/+viewers.el +++ b/modules/lang/latex/+viewers.el @@ -15,7 +15,7 @@ (add-to-list 'TeX-view-program-selection '(output-pdf "Skim")) (add-to-list 'TeX-view-program-list (list "Skim" (format "%s/Contents/SharedSupport/displayline -b -g %%n %%o %%b" - app-path)))) + app-path))))) (`sumatrapdf (when (and IS-WINDOWS From cfe501fab0c79d65d32aabc3aa4c8832408bef91 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 14:10:11 -0500 Subject: [PATCH 022/983] Fix doom//*... again --- core/autoload/cli.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/autoload/cli.el b/core/autoload/cli.el index e95218d17..b66ca3e99 100644 --- a/core/autoload/cli.el +++ b/core/autoload/cli.el @@ -5,6 +5,8 @@ ;;;###autoload (defun doom--cli-run (command &rest _args) + (require 'core-cli) + (require 'core-packages) (when (featurep 'general) (general-auto-unbind-keys)) (let* ((evil-collection-mode-list nil) From d873e75e638c070f7aeee65fc08a34c76c22eafb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 14:19:14 -0500 Subject: [PATCH 023/983] Disable M-x customize & M-x customize-themes --- core/core-ui.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/core-ui.el b/core/core-ui.el index 4ac1f96ff..8c58cf0f3 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -616,6 +616,12 @@ startup (or theme switch) time, so long as `doom--prefer-theme-elc' is non-nil." ;; ;;; Fixes/hacks +;; Doom doesn't support `customize' and it never will. It's a clumsy interface +;; for something that should be configured from only one place ($DOOMDIR), so we +;; disable them. +(put 'customize 'disabled "Doom doesn't support `customize', configure Emacs from $DOOMDIR/config.el instead") +(put 'customize-themes 'disabled "Set `doom-theme' or use `load-theme' in $DOOMDIR/config.el instead") + ;; doesn't exist in terminal Emacs; we define it to prevent errors (unless (fboundp 'define-fringe-bitmap) (fset 'define-fringe-bitmap #'ignore)) From da07b63f40d8d2ce7eb4b399d288468ccadf8cad Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 14:21:16 -0500 Subject: [PATCH 024/983] lang/cc: fix #2097 wrong-type-arg listp on c-default-style --- modules/lang/cc/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/lang/cc/config.el b/modules/lang/cc/config.el index 4698c382f..4f30e5395 100644 --- a/modules/lang/cc/config.el +++ b/modules/lang/cc/config.el @@ -114,7 +114,8 @@ This is ignored by ccls.") (inclass +cc-c++-lineup-inclass +) (label . 0)))) - (setf (alist-get 'other c-default-style) "doom")) + (when (listp c-default-style) + (setf (alist-get 'other c-default-style) "doom"))) (use-package! modern-cpp-font-lock From 6f63a28c8fa8133c3360bda6db1c3b15e9760560 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 14:24:20 -0500 Subject: [PATCH 025/983] Require straight on doom//* commands --- core/autoload/cli.el | 1 + 1 file changed, 1 insertion(+) diff --git a/core/autoload/cli.el b/core/autoload/cli.el index b66ca3e99..59f5e9457 100644 --- a/core/autoload/cli.el +++ b/core/autoload/cli.el @@ -7,6 +7,7 @@ (defun doom--cli-run (command &rest _args) (require 'core-cli) (require 'core-packages) + (require 'straight) (when (featurep 'general) (general-auto-unbind-keys)) (let* ((evil-collection-mode-list nil) From d41e4983ec0055831f6d48765fd790b27c7306ea Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 14:42:37 -0500 Subject: [PATCH 026/983] Bind ' t' to load-theme And remap load-theme to counsel-load-theme. This replaces the keybind for help-with-tutorial, but `load-theme` is useful enough to warrant a keybind. `help-with-tutorial` is not. --- modules/completion/ivy/config.el | 1 + modules/config/default/config.el | 2 ++ 2 files changed, 3 insertions(+) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 6ea88af7b..bca1f21bb 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -197,6 +197,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." [remap evil-ex-registers] #'counsel-evil-registers [remap evil-show-marks] #'counsel-mark-ring [remap yank-pop] #'counsel-yank-pop + [remap load-theme] #'counsel-load-theme [remap locate] #'counsel-locate [remap unicode-chars-list-chars] #'counsel-unicode-char [remap compile] #'+ivy/compile diff --git a/modules/config/default/config.el b/modules/config/default/config.el index 49f68c592..f33873310 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -335,6 +335,8 @@ "h" nil ;; replaces `view-emacs-news' b/c it's on C-n too "n" #'doom/help-news + ;; replaces `help-with-tutorial', b/c it's less useful than `load-theme' + "t" #'load-theme ;; replaces `finder-by-keyword' b/c not usefull "p" #'doom/help-packages ;; replaces `describe-package' b/c redundant w/ `doom/describe-package' From db19241936e56bb0f406f7c3a3602908967e4f77 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 14:43:36 -0500 Subject: [PATCH 027/983] Use gcmh package to manage adjust GC interactively --- core/autoload/debug.el | 3 ++- core/core-packages.el | 2 +- core/core.el | 46 +++++++++++++----------------------------- 3 files changed, 17 insertions(+), 34 deletions(-) diff --git a/core/autoload/debug.el b/core/autoload/debug.el index 14ae8fc00..d08efec60 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -336,5 +336,6 @@ will be automatically appended to the result." (setq doom-debug-mode value debug-on-error value jka-compr-verbose value - lsp-log-io value) + lsp-log-io value + gcmh-verbose value) (message "Debug mode %s" (if value "on" "off")))) diff --git a/core/core-packages.el b/core/core-packages.el index fd5bb0a1a..02a30d3ca 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -43,7 +43,7 @@ package's name as a symbol, and whose CDR is the plist supplied to its `package!' declaration. Set by `doom-initialize-packages'.") -(defvar doom-core-packages '(straight use-package async) +(defvar doom-core-packages '(straight use-package async gcmh) "A list of packages that must be installed (and will be auto-installed if missing) and shouldn't be deleted.") diff --git a/core/core.el b/core/core.el index e01c7bd23..093efc1d3 100644 --- a/core/core.el +++ b/core/core.el @@ -25,6 +25,12 @@ ;; You get a minor speed up by nooping this. (setq file-name-handler-alist nil) +;; Restore `file-name-handler-alist', because it is needed for handling +;; encrypted or compressed files, among other things. +(defun doom-reset-file-handler-alist-h () + (setq file-name-handler-alist doom--initial-file-name-handler-alist)) +(add-hook 'emacs-startup-hook #'doom-reset-file-handler-alist-h) + ;; Load the bare necessities (require 'core-lib) @@ -49,10 +55,6 @@ DEBUG envvar will enable this at startup.") (defvar doom-interactive-mode (not noninteractive) "If non-nil, Emacs is in interactive mode.") -(defvar doom-gc-cons-threshold 16777216 ; 16mb - "The default value to use for `gc-cons-threshold'. If you experience freezing, -decrease this. If you experience stuttering, increase this.") - ;;; Directories/files (defconst doom-emacs-dir (eval-when-compile (file-truename user-emacs-directory)) @@ -261,34 +263,14 @@ users).") (unless IS-MAC (setq command-line-ns-option-alist nil)) (unless IS-LINUX (setq command-line-x-option-alist nil)) -;; Restore `file-name-handler-alist' because it is necessary for handling -;; encrypted or compressed files, among other things. -(defun doom-restore-file-name-handler-alist-h () - (setq file-name-handler-alist doom--initial-file-name-handler-alist)) -(add-hook 'emacs-startup-hook #'doom-restore-file-name-handler-alist-h) - -;; To speed up minibuffer commands (like helm and ivy), we defer garbage -;; collection while the minibuffer is active. -(defun doom-defer-garbage-collection-h () - "Increase `gc-cons-threshold' to stave off garbage collection." - (setq gc-cons-threshold most-positive-fixnum)) - -(defun doom-restore-garbage-collection-h () - "Restore `gc-cons-threshold' to a reasonable value so the GC can do its job." - ;; Defer it so that commands launched immediately after will enjoy the - ;; benefits. - (run-at-time - 1 nil (lambda () (setq gc-cons-threshold doom-gc-cons-threshold)))) - -(add-hook 'minibuffer-setup-hook #'doom-defer-garbage-collection-h) -(add-hook 'minibuffer-exit-hook #'doom-restore-garbage-collection-h) - -;; Not restoring these to their defaults will cause stuttering/freezes. -(add-hook 'emacs-startup-hook #'doom-restore-garbage-collection-h) - -;; When Emacs loses focus seems like a great time to do some garbage collection -;; all sneaky breeky like, so we can return to a fresh(er) Emacs. -(add-hook 'focus-out-hook #'garbage-collect) +;; Adopt a sneaky garbage collection strategy of waiting until idle time to +;; collect and staving off the collector while the user is working. +(unless doom-interactive-mode + (add-transient-hook! 'pre-command-hook (gcmh-mode +1)) + (with-eval-after-load 'gcmh + (setq gcmh-idle-delay 10 + gcmh-verbose doom-debug-mode) + (add-hook 'focus-out-hook #'gcmh-idle-garbage-collect))) ;; From fb13b902b01783ade0fafc78f0c5f7f786d5fce4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 14:45:18 -0500 Subject: [PATCH 028/983] Minor comment/doc revision & refactors --- core/core-projects.el | 1 - modules/email/mu4e/README.org | 4 +++- modules/lang/latex/README.org | 3 +++ modules/ui/popup/autoload/popup.el | 2 +- modules/ui/popup/autoload/settings.el | 6 +++--- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/core/core-projects.el b/core/core-projects.el index e2920934b..3f655e657 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -67,7 +67,6 @@ Emacs.") projectile-project-root-files '("TAGS") projectile-project-root-files-top-down-recurring '(".svn" "Makefile")) - ;; a more generic project root file (push (abbreviate-file-name doom-local-dir) projectile-globally-ignored-directories) ;; Disable commands that won't work, as is, and that Doom already provides a diff --git a/modules/email/mu4e/README.org b/modules/email/mu4e/README.org index 06c43b859..102135795 100644 --- a/modules/email/mu4e/README.org +++ b/modules/email/mu4e/README.org @@ -69,11 +69,13 @@ environment.systemPackages = with pkgs; [ [[https://github.com/Emiller88/dotfiles/blob/master/modules/shell/mail.nix][An example of setting up mbsync with home-manager]] ** openSUSE +Remove ~#~ in ~#sync_program=offlineimap~ to choose ~offlineimap~ instead of +~mbsync~. -Remove ~#~ in ~#sync_program=offlineimap~ to choose ~offlineimap~ instead of ~mbsync~. #+BEGIN_SRC sh :dir /sudo:: sync_program=isync # mbsync #sync_program=offlineimap + sudo zypper install maildir-utils $sync_programm #+END_SRC diff --git a/modules/lang/latex/README.org b/modules/lang/latex/README.org index 209af8708..173744725 100644 --- a/modules/lang/latex/README.org +++ b/modules/lang/latex/README.org @@ -7,6 +7,7 @@ - [[#description][Description]] - [[#module-flags][Module Flags]] - [[#plugins][Plugins]] +- [[#prerequisites][Prerequisites]] - [[#features][Features]] - [[#customization][Customization]] - [[#specifying-the-location-of-a-bibtex-file--corresponding-pdfs][Specifying the location of a bibtex file & corresponding PDFs]] @@ -38,6 +39,8 @@ Provide a helping hand when working with LaTeX documents. + [[https://github.com/vspinu/company-math][company-math]]* + [[https://github.com/tmalsburg/helm-bibtex][ivy-bibtex]]* or [[https://github.com/tmalsburg/helm-bibtex][helm-bibtex]]* +* TODO Prerequisites + * TODO Features * Customization diff --git a/modules/ui/popup/autoload/popup.el b/modules/ui/popup/autoload/popup.el index 30159d815..5979ca636 100644 --- a/modules/ui/popup/autoload/popup.el +++ b/modules/ui/popup/autoload/popup.el @@ -334,7 +334,7 @@ Any non-nil value besides the above will be used as the raw value for '(+popup-display-buffer-stacked-side-window-fn)) (display-buffer-alist +popup--display-buffer-alist) (buffer (current-buffer))) - (push (+popup--make "." +popup-defaults) display-buffer-alist) + (push (+popup-make-rule "." +popup-defaults) display-buffer-alist) (bury-buffer) (pop-to-buffer buffer))) diff --git a/modules/ui/popup/autoload/settings.el b/modules/ui/popup/autoload/settings.el index 7478b362e..15a39daf7 100644 --- a/modules/ui/popup/autoload/settings.el +++ b/modules/ui/popup/autoload/settings.el @@ -14,7 +14,7 @@ "Default properties for popup rules defined with `set-popup-rule!'.") ;;;###autoload -(defun +popup--make (predicate plist) +(defun +popup-make-rule (predicate plist) (if (plist-get plist :ignore) (list predicate nil) (let* ((plist (append plist +popup-defaults)) @@ -160,7 +160,7 @@ used. \(fn PREDICATE &key IGNORE ACTIONS SIDE SIZE WIDTH HEIGHT SLOT VSLOT TTL QUIT SELECT MODELINE AUTOSAVE PARAMETERS)" (declare (indent defun)) - (push (+popup--make predicate plist) +popup--display-buffer-alist) + (push (+popup-make-rule predicate plist) +popup--display-buffer-alist) (when (bound-and-true-p +popup-mode) (setq display-buffer-alist +popup--display-buffer-alist)) +popup--display-buffer-alist) @@ -183,7 +183,7 @@ Example: (declare (indent 0)) (dolist (rules rulesets) (dolist (rule rules) - (push (+popup--make (car rule) (cdr rule)) + (push (+popup-make-rule (car rule) (cdr rule)) +popup--display-buffer-alist))) (when (bound-and-true-p +popup-mode) (setq display-buffer-alist +popup--display-buffer-alist)) From 3a595b88642179732977d560e9351e40e931c014 Mon Sep 17 00:00:00 2001 From: Dan LaManna Date: Thu, 21 Nov 2019 14:43:09 -0500 Subject: [PATCH 029/983] tools/terraform: add readme file --- modules/tools/terraform/README.org | 69 ++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 modules/tools/terraform/README.org diff --git a/modules/tools/terraform/README.org b/modules/tools/terraform/README.org new file mode 100644 index 000000000..16eb3d7cd --- /dev/null +++ b/modules/tools/terraform/README.org @@ -0,0 +1,69 @@ +#+TITLE: tools/terraform +#+DATE: November 21, 2019 +#+SINCE: v2.1.0 +#+STARTUP: inlineimages + +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] +- [[#prerequisites][Prerequisites]] +- [[#features][Features]] + - [[#syntax-highlighting][Syntax highlighting]] + - [[#code-formatting][Code formatting]] + - [[#code-navigation][Code navigation]] + - [[#code-completion][Code completion]] + - [[#documentation][Documentation]] + - [[#executing-terraform-commands][Executing Terraform commands]] +- [[#appendix][Appendix]] + - [[#keybindings][Keybindings]] + - [[#localleader][:localleader]] + +* Description +This module adds support for working with [[https://www.terraform.io][Terraform]] files in Doom Emacs. This +includes syntax highlighting, intelligent code completion, and the ability to run +Terraform commands directly from Emacs. + +** Module Flags +This module provides no flags. + +** Plugins ++ [[https://github.com/syohex/emacs-terraform-mode][terraform-mode]] ++ [[https://github.com/rafalcieslak/emacs-company-terraform][company-terraform*]] + +* Prerequisites +The =terraform= executable must be installed and accessible from your PATH. + +* Features +** Syntax highlighting +Syntax highlighting is provided from =terraform-mode= and =hcl-mode=. + +** Code formatting +=:tools terraform= does not provide code formatting directly, but =:editor +format= works with Terraform files. + +** Code navigation +Code navigation is supported through =imenu= from =terraform-mode=. + +** Code completion +Code completion of Terraform builtins is provided from =company-terraform= and +generally works well despite being generated through a [[https://github.com/rafalcieslak/emacs-company-terraform/blob/master/company-terraform-data.el][static (outdated) file]]. + +=company-terraform= also provides code completion of resources within your project. + +** Documentation +Documentation is accessible through the normal =company-mode= show documentation +functionality, thanks to =company-terraform=. + +** Executing Terraform commands +=:tools terraform= provides commands under the =localleader= to run the most +common Terraform operations (see Keybindings below). + +* Appendix +** Keybindings +*** :localleader +| key | description | +|-----+-----------------------| +| =i= | Run =terraform init= | +| =p= | Run =terraform plan= | +| =a= | Run =terraform apply= | From ddd7d714ec20e2287cb0c7e0ef4c5bf72883e050 Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Wed, 20 Nov 2019 11:12:03 +0100 Subject: [PATCH 030/983] Make it clearer that JavaScript module also is for TypeScript squash! Make it clearer that JavaScript module also is for TypeScript --- docs/index.org | 2 +- modules/lang/javascript/README.org | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.org b/docs/index.org index 2ca87d62c..842bf2889 100644 --- a/docs/index.org +++ b/docs/index.org @@ -186,7 +186,7 @@ Modules that bring support for a language or group of languages to Emacs. + hy - TODO + [[file:../modules/lang/idris/README.org][idris]] - TODO + java =+meghanada +lsp= - TODO -+ [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - Javascript, typescript, and coffeescript support ++ [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - JavaScript, TypesCript, and CoffeeScript support + julia - TODO + kotlin - TODO + [[file:../modules/lang/latex/README.org][latex]] - TODO diff --git a/modules/lang/javascript/README.org b/modules/lang/javascript/README.org index cb1add7ab..6a43af3e8 100644 --- a/modules/lang/javascript/README.org +++ b/modules/lang/javascript/README.org @@ -15,7 +15,7 @@ - [[#commands][Commands]] * Description -This module adds Javascript support. +This module adds JavaScript and TypeScript support. + Code completion (tide) + REPL support (nodejs-repl) From cb73a68ab9c1b84a82561a89cc3f11410805b66d Mon Sep 17 00:00:00 2001 From: Dan LaManna Date: Thu, 21 Nov 2019 15:52:19 -0500 Subject: [PATCH 031/983] docs: update module list --- docs/index.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.org b/docs/index.org index 2ca87d62c..76e8a62af 100644 --- a/docs/index.org +++ b/docs/index.org @@ -246,7 +246,7 @@ Small modules that give Emacs access to external tools & services. + pdf - TODO + prodigy - TODO + rgb - TODO -+ terraform - TODO ++ [[file:../modules/tools/terraform/README.org][terraform]] + tmux - TODO + upload - TODO + [[file:../modules/tools/wakatime/README.org][wakatime]] - TODO From b372bc840b2a895482ac54bd0256daf7369e7f28 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 16:10:16 -0500 Subject: [PATCH 032/983] Correct capitalization --- docs/index.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.org b/docs/index.org index 842bf2889..2aef99015 100644 --- a/docs/index.org +++ b/docs/index.org @@ -186,7 +186,7 @@ Modules that bring support for a language or group of languages to Emacs. + hy - TODO + [[file:../modules/lang/idris/README.org][idris]] - TODO + java =+meghanada +lsp= - TODO -+ [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - JavaScript, TypesCript, and CoffeeScript support ++ [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - JavaScript, TypeScript, and CoffeeScript support + julia - TODO + kotlin - TODO + [[file:../modules/lang/latex/README.org][latex]] - TODO From 4aa4a26bc58465080920498bf848141ee49a60ac Mon Sep 17 00:00:00 2001 From: Dan LaManna Date: Thu, 21 Nov 2019 16:10:43 -0500 Subject: [PATCH 033/983] tools/terraform: add doctor dependency check --- modules/tools/terraform/doctor.el | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 modules/tools/terraform/doctor.el diff --git a/modules/tools/terraform/doctor.el b/modules/tools/terraform/doctor.el new file mode 100644 index 000000000..456d1f907 --- /dev/null +++ b/modules/tools/terraform/doctor.el @@ -0,0 +1,4 @@ +;;; tools/terraform/doctor.el -*- lexical-binding: t; -*- + +(unless (executable-find "terraform") + (warn! "Couldn't find terraform.")) From 01c98128a565bda4eb0ce64e6f6424afc08b0699 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 16:44:59 -0500 Subject: [PATCH 034/983] docs/faq: clarify theme-loading, add 'unable to find theme file' question --- docs/faq.org | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/docs/faq.org b/docs/faq.org index 973a5f458..70de86d94 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -55,6 +55,7 @@ - [[#changes-to-my-config-arent-taking-effect][Changes to my config aren't taking effect]] - [[#the-frame-goes-black-on-macos-while-in-full-screen-mode][The frame goes black on MacOS, while in full-screen mode]] - [[#doom-crashes-when][Doom crashes when...]] + - [[#cant-load-my-theme-unable-to-find-theme-file-for-x-errors][Can't load my theme; ~unable to find theme file for X~ errors]] - [[#contributing][Contributing]] * General @@ -584,7 +585,8 @@ explanation and examples. ** How do I change the theme? There are two ways to load a theme. Both assume the theme is installed and -available. They are: +available. You can either set ~doom-theme~ or manually load a theme with the +~load-theme~ function. #+BEGIN_SRC emacs-lisp ;;; in ~/.doom.d/config.el @@ -593,12 +595,14 @@ available. They are: (load-theme 'doom-tomorrow-night t) #+END_SRC +#+begin_quote At the moment, the only difference between the two is that ~doom-theme~ is loaded when Emacs has finished initializing at startup and ~load-theme~ loads the theme immediately. Which you choose depends on your needs, but I recommend setting ~doom-theme~ because, if I later discover a better way to load themes, I can easily change how Doom uses ~doom-theme~, but I can't (easily) control how you use the ~load-theme~ function. +#+end_quote *** Installing a third party theme To install a theme from a third party plugin, say, [[https://github.com/bbatsov/solarized-emacs][solarized]], you need only @@ -612,8 +616,8 @@ install it, then load it: (setq doom-theme 'solarized-dark) #+END_SRC -Don't forget to run ~doom refresh~ afterwards to ensure the package is -installed. +Don't forget to run ~doom refresh~ after adding that ~package!~ statement to +ensure the package is installed. ** How do I change the fonts? Doom exposes five (optional) variables for controlling fonts in Doom, they are: @@ -1066,7 +1070,6 @@ known fix for this. To work around it, you must either: support it), 3. Install Emacs via the =emacs-mac= homebrew formula. - ** Doom crashes when... Here are a few common causes for random crashes: @@ -1089,4 +1092,32 @@ Here are a few common causes for random crashes: Or disable the =:ui doom-dashboard= & =:tools magit= modules (see [[https://github.com/hlissner/doom-emacs/issues/1170][#1170]]). +** Can't load my theme; ~unable to find theme file for X~ errors +This means Emacs can't find the X-theme.el file for the theme you want to load. +Emacs will search for this file in ~custom-theme-load-path~ and +~custom-theme-directory~. There are a couple reasons why it can't be found: + +1. It is generally expected that third party themes will [[https://github.com/hlissner/emacs-doom-themes/blob/master/doom-themes.el#L400-L405][add themselves]] to + ~custom-theme-load-path~, but you will occasionally encounter a theme that + does not. This should be reported upstream. + + In the meantime, you can get around this by eagerly loading the package: + + #+BEGIN_SRC elisp + (require 'third-party-theme) + (setq doom-theme 'third-party) + #+END_SRC +2. You've appended ~-theme~ to the end of your theme's name. + + #+BEGIN_SRC elisp + (setq doom-theme 'third-party-theme) + #+END_SRC + + When you load a theme Emacs searches for ~X-theme.el~. If you set + ~doom-theme~ to ~'third-party-theme~, it will search for + ~third-party-theme-theme.el~. This is rarely intentional. Omit the ~-theme~ + suffix. +3. Did you run ~doom refresh~ after adding your third party theme plugin's + ~package!~ declaration to =~/.doom.d/packages.el=? + * TODO Contributing From cc793f323fe6955b7edf99b90a92ac5931b0b63c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 17:13:21 -0500 Subject: [PATCH 035/983] lang/org: add l prefix for link keybinds Moves 'SPC m l' and 'SPC m L' to 'SPC m l l' and 'SPC m l d', respectively. Relevant to #2101 --- modules/lang/org/config.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index a52611d85..b68b13754 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -628,8 +628,6 @@ between the two." "h" #'org-toggle-heading "i" #'org-toggle-item "I" #'org-toggle-inline-images - "l" #'org-insert-link - "L" #'+org/remove-link "n" #'org-store-link "o" #'org-set-property "p" #'org-priority @@ -673,6 +671,13 @@ between the two." "i" #'org-id-goto "r" #'org-refile-goto-last-stored "x" #'org-capture-goto-last-stored) + (:prefix ("l" . "links") + "l" #'org-insert-link + "L" #'org-insert-all-links + "s" #'org-store-link + "S" #'org-insert-last-stored-link + "i" #'org-id-store-link + "d" #'+org/remove-link) (:prefix ("r" . "refile") "." #'+org/refile-to-current-file "c" #'+org/refile-to-running-clock From a6e25209b8ecaf1d78bae5f37f98d74cb1bb0c5b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 17:14:10 -0500 Subject: [PATCH 036/983] Fix #2046 replacing process-environment, exec-path & shell-file-name --- core/core.el | 23 +++++++++++++++-------- core/test/test-core.el | 2 +- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/core/core.el b/core/core.el index 093efc1d3..1a5130f18 100644 --- a/core/core.el +++ b/core/core.el @@ -417,12 +417,13 @@ in interactive sessions, nil otherwise (but logs a warning)." (if (not (file-readable-p file)) (unless noerror (signal 'file-error (list "Couldn't read envvar file" file))) - (let (environment) + (let (envvars environment) (with-temp-buffer (save-excursion (insert "\n") (insert-file-contents file)) (while (re-search-forward "\n *\\([^#= \n]*\\)=" nil t) + (push (match-string 1) envvars) (push (buffer-substring (match-beginning 1) (1- (or (save-excursion @@ -431,13 +432,19 @@ in interactive sessions, nil otherwise (but logs a warning)." (point-max)))) environment))) (when environment - (setq-default - process-environment (nreverse environment) - exec-path (append (parse-colon-path (getenv "PATH")) - (list exec-directory)) - shell-file-name (or (getenv "SHELL") - shell-file-name)) - process-environment)))) + (setq process-environment + (append (nreverse environment) process-environment) + exec-path + (if (member "PATH" envvars) + (append (parse-colon-path (getenv "PATH")) + (list exec-directory)) + exec-path) + shell-file-name + (if (member "SHELL" envvars) + (setq shell-file-name + (or (getenv "SHELL") shell-file-name)) + shell-file-name)) + envvars)))) (defun doom-initialize (&optional force-p) "Bootstrap Doom, if it hasn't already (or if FORCE-P is non-nil). diff --git a/core/test/test-core.el b/core/test/test-core.el index 0207390b4..6b9305c13 100644 --- a/core/test/test-core.el +++ b/core/test/test-core.el @@ -117,7 +117,7 @@ (it "returns the new value for `process-environment'" (expect (doom-load-envvars-file doom-env-file) - :to-equal '("A=1" "B=2" "C=3"))) + :to-have-same-items-as '("A" "B" "C"))) (it "alters environment variables" (dolist (key '("A" "B" "C")) From 837203a876f946776d559eaace71d74d216ba035 Mon Sep 17 00:00:00 2001 From: Thijs Vermeir Date: Thu, 21 Nov 2019 22:58:12 +0100 Subject: [PATCH 037/983] lang/org: add support for org-cliplink --- modules/lang/org/config.el | 1 + modules/lang/org/packages.el | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index b68b13754..2492491b3 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -672,6 +672,7 @@ between the two." "r" #'org-refile-goto-last-stored "x" #'org-capture-goto-last-stored) (:prefix ("l" . "links") + "c" 'org-cliplink "l" #'org-insert-link "L" #'org-insert-all-links "s" #'org-store-link diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index 5f4a7f17e..fa055fb49 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -30,6 +30,7 @@ (package! org-yt :recipe (:host github :repo "TobiasZawada/org-yt")) (package! ox-clip) (package! toc-org) +(package! org-cliplink) (when (featurep! :editor evil +everywhere) (package! evil-org :recipe (:host github :repo "hlissner/evil-org-mode"))) From d5d5c0865891333d46556c841aa12108263c17aa Mon Sep 17 00:00:00 2001 From: Sean Farley Date: Thu, 21 Nov 2019 17:16:42 -0800 Subject: [PATCH 038/983] modeline: add irc-buffers back Now that doom-modeline #260 is resolved, `irc-buffers' is back so let's add it back to the `special' modeline definition. --- modules/ui/modeline/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/modeline/config.el b/modules/ui/modeline/config.el index ef23ab0c3..d26458f56 100644 --- a/modules/ui/modeline/config.el +++ b/modules/ui/modeline/config.el @@ -62,7 +62,7 @@ (doom-modeline-def-modeline 'special '(bar window-number matches buffer-info-simple buffer-position selection-info) - '(objed-state misc-info persp-name debug input-method irc buffer-encoding lsp major-mode process checker)) + '(objed-state misc-info persp-name debug input-method irc-buffers buffer-encoding lsp major-mode process checker)) (doom-modeline-def-modeline 'project '(bar window-number buffer-default-directory) From 441fc5115c89c87c08ee62b2311ea2a77f67153f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 21:30:25 -0500 Subject: [PATCH 039/983] Don't load user's init.el in sandbox sessions For 'C-c C-p' and 'C-c C-d', specifically. --- core/autoload/debug.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/autoload/debug.el b/core/autoload/debug.el index d08efec60..43ea2444c 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -209,8 +209,10 @@ markdown and copies it to your clipboard, ready to be pasted into bug reports!" (setq-default buffer-undo-tree (make-undo-tree)))) (pcase mode (`vanilla-doom+ ; Doom core + modules - private config - `((setq doom-init-modules-p t) - (load-file ,user-init-file) + `((load-file ,(expand-file-name "core.el" doom-core-dir)) + (doom-initialize) + (doom-initialize-core) + (add-hook 'window-setup-hook #'doom-display-benchmark-h) (setq doom-modules ',doom-modules) (maphash (lambda (key plist) (let ((doom--current-module key) @@ -225,8 +227,9 @@ markdown and copies it to your clipboard, ready to be pasted into bug reports!" (run-hook-wrapped 'doom-init-modules-hook #'doom-try-run-hook) (doom-run-all-startup-hooks-h))) (`vanilla-doom ; only Doom core - `((setq doom-init-modules-p t) - (load-file ,user-init-file) + `((load-file ,(expand-file-name "core.el" doom-core-dir)) + (doom-initialize) + (doom-initialize-core) (doom-run-all-startup-hooks-h))) (`vanilla ; nothing loaded `((package-initialize))))))) From 2dc50f49fcd73d1a09b1537dd95aa740584f2916 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Nov 2019 21:30:25 -0500 Subject: [PATCH 040/983] Fix #1500: rewrite font size adjustment commands --- core/autoload/fonts.el | 71 ++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 31 deletions(-) diff --git a/core/autoload/fonts.el b/core/autoload/fonts.el index 1dce4e1ae..d84a81b1c 100644 --- a/core/autoload/fonts.el +++ b/core/autoload/fonts.el @@ -44,21 +44,36 @@ acceptable values for this variable.") (defun doom-adjust-font-size (increment &optional frame) "Increase size of font in FRAME by INCREMENT. FRAME parameter defaults to current frame." - (let* ((frame (or frame (selected-frame))) - (font (frame-parameter frame 'font)) - (font (doom--font-name font frame))) - (let ((new-size (+ (string-to-number (aref font xlfd-regexp-pixelsize-subnum)) - increment))) - (unless (> new-size 0) - (error "Font is too small at %d" new-size)) - (aset font xlfd-regexp-pixelsize-subnum (number-to-string new-size))) - ;; Set point size & width to "*", so frame width will adjust to new font size - (aset font xlfd-regexp-pointsize-subnum "*") - (aset font xlfd-regexp-avgwidth-subnum "*") - (setq font (x-compose-font-name font)) - (unless (x-list-fonts font) - (error "Cannot change font size")) - (set-frame-parameter frame 'font font))) + (let (success) + (if (null increment) + (let ((frames (doom--frame-list frame))) + (dolist (frame frames) + (when (frame-parameter frame 'font-scale) + (set-frame-parameter frame 'font-scale nil))) + (set-frame-font doom-font 'keep-size frames) + (setq success (and frames t))) + (dolist (frame (doom--frame-list frame)) + (let* ((font (frame-parameter frame 'font)) + (font (doom--font-name font frame)) + (increment (* increment doom-font-increment)) + (zoom-factor (or (frame-parameter frame 'font-scale) 0))) + (let ((new-size (+ (string-to-number (aref font xlfd-regexp-pixelsize-subnum)) + increment))) + (unless (> new-size 0) + (error "Font is too small at %d" new-size)) + (aset font xlfd-regexp-pixelsize-subnum (number-to-string new-size))) + ;; Set point size & width to "*", so frame width will adjust to new font size + (aset font xlfd-regexp-pointsize-subnum "*") + (aset font xlfd-regexp-avgwidth-subnum "*") + (setq font (x-compose-font-name font)) + (unless (x-list-fonts font) + (error "Cannot change font size")) + (set-frame-parameter frame 'font font) + (set-frame-parameter frame 'font-scale (+ zoom-factor increment)) + (setq success t)))) + (when success + (run-hooks 'doom-change-font-size-hook) + t))) ;; @@ -76,20 +91,15 @@ See `doom-init-fonts-h'." ;;;###autoload (defun doom/increase-font-size (count) - "Enlargens the font size across the current frame." + "Enlargens the font size across the current and child frames." (interactive "p") - (let ((zoom-factor (or (frame-parameter nil 'font-scale) 0)) - (increment (* count doom-font-increment))) - (setq zoom-factor (+ zoom-factor increment)) - (doom-adjust-font-size increment) - (set-frame-parameter nil 'font-scale zoom-factor) - (run-hooks 'doom-change-font-size-hook))) + (doom-adjust-font-size count)) ;;;###autoload (defun doom/decrease-font-size (count) - "Shrinks the font size across the current frame." + "Shrinks the font size across the current and child frames." (interactive "p") - (doom/increase-font-size (- count))) + (doom-adjust-font-size (- count))) ;;;###autoload (defun doom/reset-font-size () @@ -103,13 +113,10 @@ Assuming it has been adjusted via `doom/increase-font-size' and (/= text-scale-mode-amount 0)) (text-scale-set 0) (setq success t)) - (when-let (factor (frame-parameter nil 'font-scale)) - (set-frame-font doom-font t) - (set-frame-parameter nil 'font-scale nil) + (when (doom-adjust-font-size nil) (setq success t)) (unless success - (user-error "The font hasn't been resized")) - (run-hooks 'doom-change-font-size-hook))) + (user-error "The font hasn't been resized")))) ;;;###autoload (define-minor-mode doom-big-font-mode @@ -130,5 +137,7 @@ This uses `doom/increase-font-size' under the hood, and enlargens the font by t (doom--frame-list frame)) (run-hooks 'doom-change-font-size-hook)) (set-frame-font doom-font t (doom--frame-list frame)) - (when doom-big-font-mode - (doom-adjust-font-size doom-big-font-increment frame))))) + (when (and doom-big-font-mode + (integerp doom-big-font-increment) + (/= doom-big-font-increment 0)) + (doom-adjust-font-size doom-big-font-increment))))) From 34500c91775b047f1c857c4418db20be94fea012 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 22 Nov 2019 12:17:40 -0500 Subject: [PATCH 041/983] Fix #2103: logic error initializing gcmh-mode --- core/core.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core.el b/core/core.el index 1a5130f18..5950e06bb 100644 --- a/core/core.el +++ b/core/core.el @@ -265,7 +265,7 @@ users).") ;; Adopt a sneaky garbage collection strategy of waiting until idle time to ;; collect and staving off the collector while the user is working. -(unless doom-interactive-mode +(when doom-interactive-mode (add-transient-hook! 'pre-command-hook (gcmh-mode +1)) (with-eval-after-load 'gcmh (setq gcmh-idle-delay 10 From aa19eeed0f1ca455da23550bbeafa3bab071fa3b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 22 Nov 2019 12:54:58 -0500 Subject: [PATCH 042/983] Fix #2100: shell modeline doesn't stay hidden --- modules/term/shell/autoload.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/term/shell/autoload.el b/modules/term/shell/autoload.el index f60432db8..183106785 100644 --- a/modules/term/shell/autoload.el +++ b/modules/term/shell/autoload.el @@ -69,7 +69,7 @@ If popup is focused, kill it." (with-current-buffer (pop-to-buffer buffer) (if (not (eq major-mode 'shell-mode)) (shell buffer) - (erase-buffer) + (run-mode-hooks 'shell-mode-hook) (cd dir)) (let ((process (get-buffer-process (current-buffer)))) (set-process-sentinel process #'+shell--sentinel) From fcbd91fc0dec91e197b83d53984d0c174a627ac2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 22 Nov 2019 13:13:00 -0500 Subject: [PATCH 043/983] Fix custom-set-theme-faces! applying only to 'user --- core/autoload/themes.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/autoload/themes.el b/core/autoload/themes.el index 363c4b33c..a0740e487 100644 --- a/core/autoload/themes.el +++ b/core/autoload/themes.el @@ -22,7 +22,7 @@ all themes. It will apply to all themes once they are loaded." (dolist (theme (doom-enlist (or ,theme 'user))) (when (or (eq theme 'user) (custom-theme-enabled-p theme)) - (apply #'custom-theme-set-faces 'user + (apply #'custom-theme-set-faces theme (mapcan #'doom--custom-theme-set-face (list ,@specs))))))) (when (or doom-init-theme-p (null doom-theme)) From a814998a75c7d3bca57cfb1fd18c6ce325fc4713 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 22 Nov 2019 13:41:59 -0500 Subject: [PATCH 044/983] docs/faq: revise how to change line numbers --- docs/faq.org | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/docs/faq.org b/docs/faq.org index 70de86d94..e63c98ccf 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -709,11 +709,6 @@ e.g. ** How do I change the style of line-numbers (or disable them altogether)? Doom uses the ~display-line-numbers~ package, which is built into Emacs 26+. -#+begin_quote -This package has been backported for Emacs 25 users, but is powered by =nlinum= -there (which will be removed when we drop 25 support). -#+end_quote - *** Disabling line numbers entirely #+BEGIN_SRC elisp (setq display-line-numbers-type nil) @@ -724,16 +719,24 @@ there (which will be removed when we drop 25 support). *** Switching to relative line numbers (permanently) To change the style of line numbers, change the value of the -~display-line-numbers-type~ variable. It accepts =t= (normal line numbers), -='relative= (relative line numbers), ='visual= (relative line numbers in screen -space) and =nil= (no line numbers). +~display-line-numbers-type~ variable. It accepts the following values: -You'll find more precise documentation on the variable through =SPC h v -display-line-numbers-type= or =C-h v display-line-numbers-type=. +#+begin_example +t normal line numbers +'relative relative line numbers +'visual relative line numbers in screen space +nil no line numbers +#+end_example -#+begin_quote -The ~'visual~ option is unavailable in Emacs 25. -#+end_quote +For example: + +#+BEGIN_SRC elisp +(setq display-line-numbers-type 'relative) +#+END_SRC + +You'll find more precise documentation on the variable through = v +display-line-numbers-type= (== is =SPC h= for evil users, =C-h= +otherwise). *** Switching the style of line numbers (temporarily) Use ~M-x doom/toggle-line-numbers~ (bound to =SPC t l= by default) to cycle From 88eb9d1d61b816745fa1d8fa09750e161cdf3dba Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 22 Nov 2019 13:51:05 -0500 Subject: [PATCH 045/983] Don't bind noninteractive while building autoloads See raxod502/straight.el#431 --- core/cli/autoloads.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 1e5906cf2..de32ff3cc 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -230,7 +230,6 @@ Run this whenever your `doom!' block, or a module autoload file, is modified." ;; The following bindings are in `package-generate-autoloads'. ;; Presumably for a good reason, so I just copied them - (noninteractive t) (backup-inhibited t) (version-control 'never) (case-fold-search nil) ; reduce magic @@ -375,7 +374,6 @@ This should be run whenever your `doom!' block or update your packages." (doom-load-autoloads-file doom-package-autoload-file)) (let (;; The following bindings are in `package-generate-autoloads'. ;; Presumably for a good reason, so I just copied them - (noninteractive t) (backup-inhibited t) (version-control 'never) (case-fold-search nil) ; reduce magic From c9ae1f0a30984e33bfd92ed33bba0b74c3c10aa0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 22 Nov 2019 16:14:05 -0500 Subject: [PATCH 046/983] cli/env: ignore GPG_TTY & TERM envvars --- core/cli/env.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/cli/env.el b/core/cli/env.el index 4368f948d..3cbef1b35 100644 --- a/core/cli/env.el +++ b/core/cli/env.el @@ -62,6 +62,8 @@ Why this over exec-path-from-shell? "^R?PROMPT$" "^DBUS_SESSION_BUS_ADDRESS$" "^GPG_AGENT_INFO$" + "^GPG_TTY$" + "^TERM$" "^SSH_AGENT_PID$" "^SSH_AUTH_SOCK$" ;; Doom envvars From 4351474bf31d772ffd71eb03ac29b30fafe6b354 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 22 Nov 2019 16:15:06 -0500 Subject: [PATCH 047/983] Add "X updated" notice after package is updated To make it clearer what package was just updated after spewing a lot of git log output. --- core/cli/packages.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index b25ce2194..a276e0dc5 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -152,20 +152,21 @@ declaration) or dependency thereof that hasn't already been." (straight-merge-package package) (let ((newcommit (straight-vc-get-commit type local-repo))) (if (string= commit newcommit) - (print! (info "(%d/%d) %s is up-to-date") i total package) + (print! (start "(%d/%d) %s is up-to-date") i total package) (ignore-errors (delete-directory (straight--build-dir package) 'recursive)) (puthash package t straight--packages-to-rebuild) - (print! (success "(%d/%d) %s updated (%s -> %s)") i total package - (substring commit 0 7) - (substring newcommit 0 7)) + (print! (info "(%d/%d) Updating %s...") i total package) (unless (string-empty-p output) (print-group! (print! (info "%s") output) (when (eq type 'git) (straight--call "git" "log" "--oneline" newcommit (concat "^" commit)) (print-group! - (print! "%s" (straight--process-get-output)))))))))) + (print! "%s" (straight--process-get-output)))))) + (print! (success "(%d/%d) %s updated (%s -> %s)") i total package + (substring commit 0 7) + (substring newcommit 0 7)))))) (cl-incf i)) (user-error (signal 'user-error (error-message-string e))) From e7019e4163855ff1ca512c80a393f0ffa4c819a5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 22 Nov 2019 16:16:27 -0500 Subject: [PATCH 048/983] Fix custom-set-*-faces! macros in Emacs 27 custom--inhibit-theme-enable is non-nil by default in Emacs 27, which inhibits uses of `custom-theme-set-faces` when modifying any theme other than 'user. --- core/autoload/themes.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/core/autoload/themes.el b/core/autoload/themes.el index a0740e487..2fb84ef3f 100644 --- a/core/autoload/themes.el +++ b/core/autoload/themes.el @@ -19,12 +19,13 @@ all themes. It will apply to all themes once they are loaded." `(let ((fn (gensym "doom--customize-themes-h-"))) (fset fn (lambda () - (dolist (theme (doom-enlist (or ,theme 'user))) - (when (or (eq theme 'user) - (custom-theme-enabled-p theme)) - (apply #'custom-theme-set-faces theme - (mapcan #'doom--custom-theme-set-face - (list ,@specs))))))) + (let (custom--inhibit-theme-enable) + (dolist (theme (doom-enlist (or ,theme 'user))) + (when (or (eq theme 'user) + (custom-theme-enabled-p theme)) + (apply #'custom-theme-set-faces theme + (mapcan #'doom--custom-theme-set-face + (list ,@specs)))))))) (when (or doom-init-theme-p (null doom-theme)) (funcall fn)) (add-hook 'doom-load-theme-hook fn 'append))) From d0021461f76bd0d8e808f5de748674f4ff983d6b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 22 Nov 2019 16:30:45 -0500 Subject: [PATCH 049/983] Fix duplicate snippets e.g. If you've cloned doom-snippets to $DOOMDIR/snippets. Also refactors how yas-snippet-dirs is initialized. --- modules/editor/snippets/config.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/editor/snippets/config.el b/modules/editor/snippets/config.el index a2ada2080..cf50175c5 100644 --- a/modules/editor/snippets/config.el +++ b/modules/editor/snippets/config.el @@ -16,6 +16,9 @@ yas-new-snippet yas-visit-snippet-file) :init + ;; Remove default ~/.emacs.d/snippets + (defvar yas-snippet-dirs nil) + ;; Ensure `yas-reload-all' is called as late as possible. Other modules could ;; have additional configuration for yasnippet. For example, file-templates. (add-transient-hook! 'yas-minor-mode-hook (yas-reload-all)) @@ -28,17 +31,17 @@ :config (setq yas-verbosity (if doom-debug-mode 3 0) - yas-also-auto-indent-first-line t - ;; Remove default ~/.emacs.d/snippets - yas-snippet-dirs (delete yas--default-user-snippets-dir - yas-snippet-dirs)) + yas-also-auto-indent-first-line t) (add-to-list 'load-path +snippets-dir) ;; default snippets library, if available (require 'doom-snippets nil t) ;; Allow private snippets in DOOMDIR/snippets - (add-to-list 'yas-snippet-dirs '+snippets-dir nil #'eq) + (add-to-list 'yas-snippet-dirs '+snippets-dir) + + ;; In case `+snippets-dir' and `doom-snippets-dir' are the same + (advice-add #'yas-snippet-dirs :filter-return #'delete-dups) ;; Remove GUI dropdown prompt (prefer ivy/helm) (delq! 'yas-dropdown-prompt yas-prompt-functions) From a5ff637e6fdd59354c26d77bca925e7cb2aa180d Mon Sep 17 00:00:00 2001 From: Ting Zhou Date: Fri, 22 Nov 2019 20:12:38 -0800 Subject: [PATCH 050/983] emacs/dired: ranger catch up dired-git-info --- modules/emacs/dired/config.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index b12efd497..099d35bb8 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -178,11 +178,12 @@ we have to clean it up ourselves." (use-package! dired-git-info - :unless (featurep! +ranger) :after dired :init (add-hook 'dired-after-readin-hook '+dired-enable-git-info-h) :config - (map! - :map dired-mode-map - :ng ")" #'dired-git-info-mode)) + (if (featurep! +ranger) + (map! :map ranger-mode-map + :ng ")" #'dired-git-info-mode) + (map! :map dired-mode-map + :ng ")" #'dired-git-info-mode))) From 9d9b6e514c8a5face57c8031c39150890aa69b8a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 22 Nov 2019 22:45:23 -0500 Subject: [PATCH 051/983] Refactor autoloads generater --- core/cli/autoloads.el | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index de32ff3cc..e8f56e62c 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -55,9 +55,10 @@ It also caches `load-path', `Info-directory-list', `doom-disabled-packages', (byte-compile-dynamic-docstrings t)) (condition-case-unless-debug e (when (byte-compile-file file) - (prog1 (load file 'noerror 'nomessage 'nosuffix) - (when noninteractive - (add-hook 'doom-cli-post-success-execute-hook #'doom--cli-warn-refresh-session-h)))) + (unless doom-interactive-mode + (add-hook 'doom-cli-post-success-execute-hook #'doom--cli-warn-refresh-session-h)) + (let (noninteractive) + (load file 'noerror 'nomessage 'nosuffix))) ((debug error) (let ((backup-file (concat file ".bk"))) (print! (warn "Copied backup to %s") (relpath backup-file)) @@ -100,8 +101,15 @@ even if it doesn't need reloading!" (cond ((not (doom-file-cookie-p file "if" t)) (print! (debug "Ignoring %s") (relpath file))) - ((let ((generated-autoload-load-name (file-name-sans-extension file))) - (autoload-generate-file-autoloads file (current-buffer))) + ((let ((generated-autoload-load-name (file-name-sans-extension file)) + ;; Prevent `autoload-find-file' from firing file hooks, + ;; e.g. adding to recentf. + find-file-hook + write-file-functions + ;; Prevent a possible source of crashes when there's a + ;; syntax error in the autoloads file + debug-on-error) + (quiet! (autoload-generate-file-autoloads file (current-buffer)))) (print! (debug "Nothing in %s") (relpath file))) ((cl-incf n) From 9676c7a8711fc1bd238a5be7248d094bcd0525c0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 22 Nov 2019 22:58:49 -0500 Subject: [PATCH 052/983] Update straight init Since straight-allow-recipe-inheritance was introduced upstream, we no longer need to merge recipes ourselves. --- core/core-packages.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index 02a30d3ca..b21e9518e 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -214,16 +214,13 @@ necessary package metadata is initialized and available for them." (setq doom-disabled-packages nil doom-packages (doom-package-list)) (cl-loop for (pkg . plist) in doom-packages - for ignored = (plist-get plist :ignore) - for disabled = (plist-get plist :disable) - if disabled + if (plist-get plist :disable) do (cl-pushnew pkg doom-disabled-packages) - else if (not ignored) + else if (not (plist-get plist :ignore)) do (with-demoted-errors "Package error: %s" (straight-register-package (if-let (recipe (plist-get plist :recipe)) - (let ((plist (straight-recipes-retrieve pkg))) - `(,pkg ,@(doom-plist-merge recipe (cdr plist)))) + (cons pkg recipe) pkg)))) (unless doom-interactive-mode (add-hook 'kill-emacs-hook #'doom--finalize-straight)))) From 803da8b3b96369065f8b8f93933aee1d86e8bfdc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 23 Nov 2019 00:12:26 -0500 Subject: [PATCH 053/983] Fix #2104: prevent double-package-init on 'doom refresh' 'Could not find package emacsmirror-mirror in recipe repositories' error, which shouldn't happen since emacsmirror-mirror is a recipe repo. --- core/cli/byte-compile.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/cli/byte-compile.el b/core/cli/byte-compile.el index 916a11ba9..e1ca66a6c 100644 --- a/core/cli/byte-compile.el +++ b/core/cli/byte-compile.el @@ -92,7 +92,8 @@ If RECOMPILE-P is non-nil, only recompile out-of-date files." ;; But first we must be sure that Doom and your private config have been ;; fully loaded. Which usually aren't so in an noninteractive session. (let ((doom-interactive-mode 'byte-compile)) - (doom-initialize 'force) + (doom-initialize) + (doom-initialize-packages) (doom-initialize-core)) ;; From 26c8f5c6ef79c8dfe2126447c9b117bd16adf298 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 23 Nov 2019 00:52:36 -0500 Subject: [PATCH 054/983] Bytecompiler bytecompiler, won't you shut up --- core/autoload/cli.el | 2 +- core/autoload/files.el | 1 + core/cli/help.el | 1 - core/cli/install.el | 2 +- core/cli/test.el | 2 +- core/core-cli.el | 1 + modules/editor/evil/autoload/advice.el | 12 ++++++------ modules/editor/evil/autoload/evil.el | 2 +- modules/editor/evil/autoload/textobjects.el | 4 ++-- modules/editor/evil/config.el | 2 +- modules/editor/word-wrap/autoload.el | 1 + modules/emacs/ibuffer/config.el | 2 +- modules/emacs/vc/autoload/vc.el | 1 + modules/lang/org/autoload/org-capture.el | 2 +- modules/lang/org/autoload/org-refile.el | 2 +- modules/lang/org/autoload/org.el | 3 +-- modules/lang/org/config.el | 7 ++++--- modules/term/eshell/autoload/commands.el | 4 ++-- modules/tools/eval/autoload/eval.el | 2 +- modules/tools/eval/autoload/evil.el | 4 ++-- modules/tools/eval/autoload/repl.el | 2 +- 21 files changed, 31 insertions(+), 28 deletions(-) diff --git a/core/autoload/cli.el b/core/autoload/cli.el index 59f5e9457..e7f45c810 100644 --- a/core/autoload/cli.el +++ b/core/autoload/cli.el @@ -113,7 +113,7 @@ Warning: freezes indefinitely on any stdin prompt." :connection-type 'pipe)) done-p) (set-process-filter - process (lambda (process output) + process (lambda (_process output) (princ output (current-buffer)) (princ output))) (set-process-sentinel diff --git a/core/autoload/files.el b/core/autoload/files.el index fd48fa0e7..f7cd34741 100644 --- a/core/autoload/files.el +++ b/core/autoload/files.el @@ -178,6 +178,7 @@ single file or nested compound statement of `and' and `or' statements." file)) (nth 7 (file-attributes file)))) +(defvar w32-get-true-file-attributes) ;;;###autoload (defun doom-directory-size (dir) "Returns the size of FILE (in DIR) in kilobytes." diff --git a/core/cli/help.el b/core/cli/help.el index 13e82ea77..2517a47b7 100644 --- a/core/cli/help.el +++ b/core/cli/help.el @@ -43,7 +43,6 @@ (print! (bold "Options:")) (print-group! (cl-loop for opt in optlist - for flags = (doom-cli-option-flags opt) for desc = (doom-cli-option-desc opt) for args = (doom-cli-option-args opt) for flagstr = (string-join (doom-cli-option-flags opt) ", ") diff --git a/core/cli/install.el b/core/cli/install.el index f4bf12126..e99ef25b0 100644 --- a/core/cli/install.el +++ b/core/cli/install.el @@ -5,7 +5,7 @@ (noenv-p ["--no-env"] "Don't generate an envvars file (see 'doom help env')") (noinstall-p ["--no-install"] "Don't auto-install packages") (nofonts-p ["--no-fonts"] "Don't install (or prompt to install) all-the-icons fonts") - &rest args) + &rest _args) "Installs and sets up Doom Emacs for the first time. This command does the following: diff --git a/core/cli/test.el b/core/cli/test.el index 4def753a3..d42c22045 100644 --- a/core/cli/test.el +++ b/core/cli/test.el @@ -13,7 +13,7 @@ :bare t (doom-initialize 'force) (require 'ansi-color) - (let (files error read-files) + (let (files read-files) (unless targets (setq targets (cons doom-core-dir diff --git a/core/core-cli.el b/core/core-cli.el index cbe938dd0..a58c6d073 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -187,6 +187,7 @@ BODY will be run when this dispatcher is called." :plist plist :fn (lambda (--alist--) + (ignore --alist--) (let ,(cl-loop for opt in speclist for optsym = (if (listp opt) (car opt) opt) unless (memq optsym cl--lambda-list-keywords) diff --git a/modules/editor/evil/autoload/advice.el b/modules/editor/evil/autoload/advice.el index 651393858..d1aed1b1b 100644 --- a/modules/editor/evil/autoload/advice.el +++ b/modules/editor/evil/autoload/advice.el @@ -158,9 +158,9 @@ more information on modifiers." ;; HACK This ping-ponging between the destination and source windows is to ;; update the window focus history, so that, if you close either split ;; afterwards you won't be sent to some random window. - (let* ((doom-inhibit-switch-window-hooks t) - (origwin (selected-window)) - (win (select-window (split-window origwin count 'below)))) + (let ((doom-inhibit-switch-window-hooks t) + (origwin (selected-window))) + (select-window (split-window origwin count 'below)) (unless evil-split-window-below (select-window origwin)) (run-hooks 'doom-switch-window-hook)) @@ -177,9 +177,9 @@ more information on modifiers." ;; HACK This ping-ponging between the destination and source windows is to ;; update the window focus history, so that, if you close either split ;; afterwards you won't be sent to some random window. - (let* ((doom-inhibit-switch-window-hooks t) - (origwin (selected-window)) - (win (select-window (split-window origwin count 'right)))) + (let ((doom-inhibit-switch-window-hooks t) + (origwin (selected-window))) + (select-window (split-window origwin count 'right)) (unless evil-vsplit-window-right (select-window origwin)) (run-hooks 'doom-switch-window-hook)) diff --git a/modules/editor/evil/autoload/evil.el b/modules/editor/evil/autoload/evil.el index a6548357a..ccbdebfdf 100644 --- a/modules/editor/evil/autoload/evil.el +++ b/modules/editor/evil/autoload/evil.el @@ -149,7 +149,7 @@ Widens narrowed buffers first. If BANG, use indirect buffer clones instead." (doom/narrow-buffer-indirectly beg end))) ;;;###autoload (autoload '+evil:yank-unindented "editor/evil/autoload/evil" nil t) -(evil-define-operator +evil:yank-unindented (beg end type register yank-handler) +(evil-define-operator +evil:yank-unindented (beg end _type _register _yank-handler) "Saves the (reindented) characters in motion into the kill-ring." :move-point nil :repeat nil diff --git a/modules/editor/evil/autoload/textobjects.el b/modules/editor/evil/autoload/textobjects.el index 6c7028bd6..bdadf229c 100644 --- a/modules/editor/evil/autoload/textobjects.el +++ b/modules/editor/evil/autoload/textobjects.el @@ -1,12 +1,12 @@ ;;; editor/evil/autoload/textobjects.el -*- lexical-binding: t; -*- ;;;###autoload (autoload '+evil:whole-buffer-txtobj "editor/evil/autoload/textobjects" nil nil) -(evil-define-text-object +evil:whole-buffer-txtobj (_count &optional _beg _end type) +(evil-define-text-object +evil:whole-buffer-txtobj (count &optional _beg _end type) "Text object to select the whole buffer." (evil-range (point-min) (point-max) type)) ;;;###autoload (autoload '+evil:defun-txtobj "editor/evil/autoload/textobjects" nil nil) -(evil-define-text-object +evil:defun-txtobj (_count &optional _beg _end type) +(evil-define-text-object +evil:defun-txtobj (count &optional _beg _end type) "Text object to select the whole buffer." (cl-destructuring-bind (beg . end) (bounds-of-thing-at-point 'defun) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 0873bea44..9d26bb57d 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -128,7 +128,7 @@ directives. By default, this only recognizes C directives.") (save-excursion (apply orig-fn args))) ;; In evil, registers 2-9 are buffer-local. In vim, they're global, so... - (defadvice! +evil--make-numbered-markers-global-a (arg) + (defadvice! +evil--make-numbered-markers-global-a (_arg) :after-until #'evil-global-marker-p (and (>= char ?2) (<= char ?9))) diff --git a/modules/editor/word-wrap/autoload.el b/modules/editor/word-wrap/autoload.el index 53bec3372..5e1b95ed8 100644 --- a/modules/editor/word-wrap/autoload.el +++ b/modules/editor/word-wrap/autoload.el @@ -6,6 +6,7 @@ (defvar +word-wrap--enable-visual-line-mode nil) (defvar +word-wrap--major-mode-indent-var nil) +(defvar adaptive-wrap-extra-indent) (defun +word-wrap--adjust-extra-indent-a (orig-fn beg end) "Contextually adjust extra word-wrap indentation." (let ((adaptive-wrap-extra-indent (+word-wrap--calc-extra-indent beg))) diff --git a/modules/emacs/ibuffer/config.el b/modules/emacs/ibuffer/config.el index 72755c9d3..653ee52b2 100644 --- a/modules/emacs/ibuffer/config.el +++ b/modules/emacs/ibuffer/config.el @@ -40,7 +40,7 @@ (file-size-human-readable (buffer-size))) (when (featurep! :completion ivy) - (defadvice! +ibuffer-use-counsel-maybe-a (file &optional wildcards) + (defadvice! +ibuffer-use-counsel-maybe-a (_file &optional _wildcards) "Use `counsel-find-file' instead of `find-file'." :override #'ibuffer-find-file (interactive) diff --git a/modules/emacs/vc/autoload/vc.el b/modules/emacs/vc/autoload/vc.el index f0a4a8096..c91328d6c 100644 --- a/modules/emacs/vc/autoload/vc.el +++ b/modules/emacs/vc/autoload/vc.el @@ -11,6 +11,7 @@ (format "https://%s/%s" (car remote-info) (cadr remote-info)) (error "Remote `%s' is unknown or contains an unsupported URL" remote)))) +(defvar git-link-default-branch) (defvar git-link-open-in-browser) (defvar git-link-use-commit) ;;;###autoload diff --git a/modules/lang/org/autoload/org-capture.el b/modules/lang/org/autoload/org-capture.el index 4707fab75..f054ede13 100644 --- a/modules/lang/org/autoload/org-capture.el +++ b/modules/lang/org/autoload/org-capture.el @@ -134,7 +134,7 @@ project." (+org--capture-ensure-heading (cdr headings) (1+ initial-level))))) (defun +org--capture-central-file (file project) - (let ((file (expand-file-name +org-capture-projects-file org-directory))) + (let ((file (expand-file-name file org-directory))) (set-buffer (org-capture-target-buffer file)) (org-capture-put-target-region-and-position) (widen) diff --git a/modules/lang/org/autoload/org-refile.el b/modules/lang/org/autoload/org-refile.el index 089484206..5f2a50457 100644 --- a/modules/lang/org/autoload/org-refile.el +++ b/modules/lang/org/autoload/org-refile.el @@ -59,6 +59,6 @@ (user-error "No saved location to refile to")) (let ((org-refile-keep arg) (completing-read-function - (lambda (_p coll _pred _rm _ii _h default &rest _) + (lambda (_p _coll _pred _rm _ii _h default &rest _) default))) (org-refile))) diff --git a/modules/lang/org/autoload/org.el b/modules/lang/org/autoload/org.el index 88241662f..2d14b5c28 100644 --- a/modules/lang/org/autoload/org.el +++ b/modules/lang/org/autoload/org.el @@ -68,8 +68,7 @@ 1))) (pcase direction (`below - (let ((at-eol (>= (point) (1- (line-end-position)))) - org-insert-heading-respect-content) + (let (org-insert-heading-respect-content) (goto-char (line-end-position)) (org-end-of-subtree) (insert "\n" (make-string level ?*) " "))) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 2492491b3..9f1e7d121 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -140,9 +140,10 @@ background (and foreground) match the current theme." ;; HACK Face specs fed directly to `org-todo-keyword-faces' don't respect ;; underlying faces like the `org-todo' face does, so we define our own ;; intermediary faces that extend from org-todo. - (custom-declare-face '+org-todo-active '((t (:inherit (bold font-lock-constant-face org-todo)))) "") - (custom-declare-face '+org-todo-project '((t (:inherit (bold font-lock-doc-face org-todo)))) "") - (custom-declare-face '+org-todo-onhold '((t (:inherit (bold warning org-todo)))) "") + (with-no-warnings + (custom-declare-face '+org-todo-active '((t (:inherit (bold font-lock-constant-face org-todo)))) "") + (custom-declare-face '+org-todo-project '((t (:inherit (bold font-lock-doc-face org-todo)))) "") + (custom-declare-face '+org-todo-onhold '((t (:inherit (bold warning org-todo)))) "")) (setq org-todo-keywords '((sequence "TODO(t)" ; A task that needs doing & is ready to do diff --git a/modules/term/eshell/autoload/commands.el b/modules/term/eshell/autoload/commands.el index efb706ec6..1225270a0 100644 --- a/modules/term/eshell/autoload/commands.el +++ b/modules/term/eshell/autoload/commands.el @@ -4,10 +4,10 @@ (defun eshell/emacs (&rest files) "Open a FILES in Emacs. For folks with a habit of using \"emacs\" to open files, even in eshell." - (if args + (if files (mapc #'find-file (mapcar #'expand-file-name - (eshell-flatten-list (reverse args)))) + (eshell-flatten-list (reverse files)))) (bury-buffer))) ;;;###autoload (defalias 'eshell/e #'eshell/emacs) diff --git a/modules/tools/eval/autoload/eval.el b/modules/tools/eval/autoload/eval.el index 41be372c4..b4a640474 100644 --- a/modules/tools/eval/autoload/eval.el +++ b/modules/tools/eval/autoload/eval.el @@ -1,7 +1,7 @@ ;;; tools/eval/autoload/eval.el -*- lexical-binding: t; -*- ;;;###autoload -(defun +eval-display-results-in-popup (output &optional source-buffer) +(defun +eval-display-results-in-popup (output &optional _source-buffer) "Display OUTPUT in a popup buffer." (if (with-temp-buffer (insert output) diff --git a/modules/tools/eval/autoload/evil.el b/modules/tools/eval/autoload/evil.el index 218b12ce6..13085c6bc 100644 --- a/modules/tools/eval/autoload/evil.el +++ b/modules/tools/eval/autoload/evil.el @@ -16,8 +16,8 @@ (+eval/region-and-replace beg end)) ;;;###autoload (autoload '+eval:repl "tools/eval/autoload/evil" nil t) -(evil-define-operator +eval:repl (beg end &optional bang) +(evil-define-operator +eval:repl (_beg _end) "Open REPL and send the current selection to it." :move-point nil - (interactive "") + (interactive "") (+eval/open-repl-other-window)) diff --git a/modules/tools/eval/autoload/repl.el b/modules/tools/eval/autoload/repl.el index 7db09a522..3cf83a8c2 100644 --- a/modules/tools/eval/autoload/repl.el +++ b/modules/tools/eval/autoload/repl.el @@ -49,7 +49,7 @@ buffer))) (defun +eval-open-repl (prompt-p &optional displayfn) - (cl-destructuring-bind (mode fn . plist) + (cl-destructuring-bind (_mode fn . plist) (or (assq major-mode +eval-repls) (list)) (when (or (not fn) prompt-p) From 44e22b7f80c6b5e908162dfe1fb2584b30187f28 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 23 Nov 2019 00:54:11 -0500 Subject: [PATCH 055/983] tools/magit: replace +magit/clone w/ magit-clone The former no longer works, since ghub's API has changed. Meanwhile, the magit-clone command has grown in features to match (and surpass) +magit/clone, so we'll just use that instead. --- modules/config/default/+emacs-bindings.el | 4 +-- modules/config/default/+evil-bindings.el | 4 +-- modules/tools/magit/autoload.el | 33 ----------------------- modules/tools/magit/config.el | 5 ---- 4 files changed, 4 insertions(+), 42 deletions(-) diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index e63e544ce..5f41a0883 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -133,7 +133,7 @@ :desc "Magit status" "g" #'magit-status :desc "Magit file delete" "x" #'magit-file-delete :desc "Magit blame" "B" #'magit-blame-addition - :desc "Magit clone" "C" #'+magit/clone + :desc "Magit clone" "C" #'magit-clone :desc "Magit fetch" "F" #'magit-fetch :desc "Magit buffer log" "L" #'magit-log :desc "Git stage file" "S" #'magit-stage-file @@ -162,7 +162,7 @@ :desc "List notifications" "n" #'forge-list-notifications) (:prefix ("c" . "create") :desc "Initialize repo" "r" #'magit-init - :desc "Clone repo" "R" #'+magit/clone + :desc "Clone repo" "R" #'magit-clone :desc "Commit" "c" #'magit-commit-create :desc "Fixup" "f" #'magit-commit-fixup :desc "Issue" "i" #'forge-create-issue diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 855eb6393..363ac1161 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -407,7 +407,7 @@ :desc "Magit status" "g" #'magit-status :desc "Magit file delete" "D" #'magit-file-delete :desc "Magit blame" "B" #'magit-blame-addition - :desc "Magit clone" "C" #'+magit/clone + :desc "Magit clone" "C" #'magit-clone :desc "Magit fetch" "F" #'magit-fetch :desc "Magit buffer log" "L" #'magit-log :desc "Git stage file" "S" #'magit-stage-file @@ -436,7 +436,7 @@ :desc "List notifications" "n" #'forge-list-notifications) (:prefix ("c" . "create") :desc "Initialize repo" "r" #'magit-init - :desc "Clone repo" "R" #'+magit/clone + :desc "Clone repo" "R" #'magit-clone :desc "Commit" "c" #'magit-commit-create :desc "Fixup" "f" #'magit-commit-fixup :desc "Branch" "b" #'magit-branch-and-checkout diff --git a/modules/tools/magit/autoload.el b/modules/tools/magit/autoload.el index 3dd37388c..bd42c1fdc 100644 --- a/modules/tools/magit/autoload.el +++ b/modules/tools/magit/autoload.el @@ -93,36 +93,3 @@ control in buffers." (run-with-timer 5 nil #'+magit--kill-buffer buf) (kill-process process) (kill-buffer buf))))))) - -(defvar +magit-clone-history nil - "History for `+magit/clone' prompt.") -;;;###autoload -(defun +magit/clone (url-or-repo dir) - "Like `magit-clone', but supports additional formats on top of absolute URLs: - -+ USER/REPO: assumes {`+magit-default-clone-url'}/USER/REPO -+ REPO: assumes {`+magit-default-clone-url'}/{USER}/REPO, where {USER} is - ascertained from your global gitconfig." - (interactive - (progn - (require 'ghub) - (let* ((user (ghub--username (ghub--host))) - (repo (read-from-minibuffer - "Clone repository (user/repo or url): " - (if user (concat user "/")) - nil nil '+magit-clone-history)) - (name (car (last (split-string repo "/" t))))) - (list repo - (read-directory-name - "Destination: " - magit-clone-default-directory - name nil name))))) - (magit-clone-regular - (cond ((string-match-p "^[^/]+$" url-or-repo) - (require 'ghub) - (format +magit-default-clone-url (ghub--username (ghub--host)) url-or-repo)) - ((string-match-p "^\\([^/]+\\)/\\([^/]+\\)/?$" url-or-repo) - (apply #'format +magit-default-clone-url (split-string url-or-repo "/" t))) - (url-or-repo)) - dir - nil)) diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index 483327e7d..13a818dc3 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -1,10 +1,5 @@ ;;; tools/magit/config.el -*- lexical-binding: t; -*- -(defvar +magit-default-clone-url "https://github.com/%s/%s" - "The default location for `+magit/clone' to clone relative URLs from. -It is passed a user and repository name.") - - ;; ;;; Packages From 5608ba723631fec97894652bd07c96934016b3cc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 23 Nov 2019 01:26:17 -0500 Subject: [PATCH 056/983] emacs/dired: disable dired-git-info-mode in wdired-mode And refactor ranger/dired keybind for dired-git-info-mode (#2106). --- modules/emacs/dired/config.el | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index 099d35bb8..e7782e820 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -182,8 +182,20 @@ we have to clean it up ourselves." :init (add-hook 'dired-after-readin-hook '+dired-enable-git-info-h) :config - (if (featurep! +ranger) - (map! :map ranger-mode-map - :ng ")" #'dired-git-info-mode) - (map! :map dired-mode-map - :ng ")" #'dired-git-info-mode))) + (map! :map (dired-mode-map ranger-mode-map) + :ng ")" #'dired-git-info-mode) + (after! wdired + ;; Temporarily disable `dired-git-info-mode' when entering wdired, due to + ;; reported incompatibilities. + (defvar +dired--git-info-p nil) + (defadvice! +dired--disable-git-info-a (&rest _) + :before #'wdired-change-to-wdired-mode + (setq +dired--git-info-p dired-git-info-mode) + (when +dired--git-info-p + (dired-git-info-mode -1))) + (defadvice! +dired--reactivate-git-info-a (&rest _) + :after '(wdired-exit + wdired-abort-changes + wdired-finish-edit) + (when +dired--git-info-p + (dired-git-info-mode +1))))) From 5ece51a2a6d66f551ae8a9bf1233afe85e6a37c4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 23 Nov 2019 01:44:49 -0500 Subject: [PATCH 057/983] Prevent straight recipe lookup errors #2104 Errors like 'Could not find package emacsmirror-mirror in recipe repositories' occur because I assumed that straight--reset-caches would unset `straight-recipe-repositories`. I'm not sure if that was ever the case, but it isn't now. --- core/core-packages.el | 1 + 1 file changed, 1 insertion(+) diff --git a/core/core-packages.el b/core/core-packages.el index b21e9518e..726510784 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -202,6 +202,7 @@ necessary package metadata is initialized and available for them." (doom-ensure-straight) (require 'straight)) (straight--reset-caches) + (setq straight-recipe-repositories nil) (mapc #'straight-use-recipes doom-core-package-sources) (straight-register-package `(straight :type git :host github From d11902f3135b26cc21c4c051996b34029329a69b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 23 Nov 2019 14:52:38 -0500 Subject: [PATCH 058/983] doom-module-from-path: return nil if not in a module #2107 --- core/core-modules.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core-modules.el b/core/core-modules.el index bea41a24a..ee1ed6b42 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -186,7 +186,8 @@ If ENABLED-ONLY, return nil if the containing module isn't enabled." (cdr doom--current-module)) doom--current-module) doom--current-module) - (doom-module-from-path (file!))) + (ignore-errors + (doom-module-from-path (file!)))) (let* ((file-name-handler-alist nil) (path (file-truename (or path (file!))))) (save-match-data From ebe1da4282e034c0a19fa4959396c4a9b3a0a28d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 23 Nov 2019 15:01:34 -0500 Subject: [PATCH 059/983] doom-module-from-path: exclude psuedo-modules #2107 Don't include :core and :private modules in ' d m'. They aren't real and no help can be derived from them. --- core/autoload/help.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 731c4737e..cb13f1c71 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -298,7 +298,7 @@ without needing to check if they are available." (describe-function fn)))) (defun doom--help-modules-list () - (cl-loop for path in (doom-module-load-path 'all) + (cl-loop for path in (cdr (doom-module-load-path 'all)) for (cat . mod) = (doom-module-from-path path) for location = (cons (or (doom-module-locate-path cat mod "README.org") (doom-module-locate-path cat mod)) @@ -332,7 +332,8 @@ without needing to check if they are available." (format "%s %s" (nth 1 sexp) (nth 2 sexp))))))) ((and buffer-file-name (when-let (mod (doom-module-from-path buffer-file-name)) - (format "%s %s" (car mod) (cdr mod))))) + (unless (memq (car mod) '(:core :private)) + (format "%s %s" (car mod) (cdr mod)))))) ((when-let (mod (cdr (assq major-mode doom--help-major-mode-module-alist))) (format "%s %s" (symbol-name (car mod)) @@ -355,7 +356,8 @@ current file is in, or d) the module associated with the current major mode (see nil t nil nil (doom--help-current-module-str))) (key (doom-module-from-path - (car (get-text-property 0 'location module-string))))) + (or (car (get-text-property 0 'location module-string)) + (user-error "Did not select a valid module"))))) (list (car key) (cdr key)))) (cl-check-type category symbol) @@ -363,7 +365,7 @@ current file is in, or d) the module associated with the current major mode (see (let ((path (doom-module-locate-path category module))) (unless (file-readable-p path) (error "'%s %s' isn't a valid module; it doesn't exist" category module)) - (if-let* ((readme-path (doom-module-locate-path category module "README.org"))) + (if-let (readme-path (doom-module-locate-path category module "README.org")) (find-file readme-path) (if (y-or-n-p (format "The '%s %s' module has no README file. Explore its directory?" category module)) From c86d4005181c42ea1447cbaf2aaacdb2e7723c9d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 23 Nov 2019 16:00:14 -0500 Subject: [PATCH 060/983] lang/rust: replace cargo.el w/ rustic-cargo #2108 --- Makefile | 85 ----------------------------------- modules/lang/rust/README.org | 5 +-- modules/lang/rust/autoload.el | 10 +++++ modules/lang/rust/config.el | 44 ++++++++---------- modules/lang/rust/packages.el | 3 -- 5 files changed, 31 insertions(+), 116 deletions(-) delete mode 100644 Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index 5bc6eb0f5..000000000 --- a/Makefile +++ /dev/null @@ -1,85 +0,0 @@ -DOOM = "bin/doom" -MODULES = $(patsubst modules/%/, %, $(sort $(dir $(wildcard modules/*/ modules/*/*/)))) - -all: deprecated - @$(DOOM) refresh - -deprecated: - @echo "Using make to manage your Doom config is deprecated" - @echo - @echo "Use the 'bin/doom' script instead. The equivalent of 'make' is 'doom refresh'." - @echo - @echo "See 'doom help' for a list of commands" - @echo - @read -p "Press enter to continue" - -## Shortcuts -a: autoloads -i: install -u: update -U: upgrade -r: autoremove -c: compile -cc: compile-core -cp: compile-plugins -re: recompile -d: doctor - -quickstart: install - - -## Package management -install: deprecated - @$(DOOM) install -update: deprecated - @$(DOOM) update -autoremove: deprecated - @$(DOOM) autoremove -autoloads: deprecated - @$(DOOM) autoloads -upgrade: deprecated - @$(DOOM) upgrade - -## Byte compilation -compile: deprecated - @$(DOOM) compile -compile-core: deprecated - @$(DOOM) compile :core -compile-private: deprecated - @$(DOOM) compile :private -compile-plugins: deprecated - @$(DOOM) build -recompile: deprecated - @$(DOOM) recompile -clean: deprecated - @$(DOOM) clean -# compile-module -# compile-module/submodule -$(patsubst %, compile-%, $(MODULES)): | .local/autoloads.el - @$(DOOM) $@ $(subst compile-, , $@) - - -## Unit tests -test: - @$(DOOM) test -test-core: - @$(DOOM) test :core -# test-module -# test-module/submodule -$(patsubst %, test-%, $(MODULES)): - @$(DOOM) test $(subst test-, , $@) - - -## Utility tasks -# Runs Emacs from a different folder than ~/.emacs.d; only use this for testing! -run: - @$(DOOM) run $(ARGS) -# Prints debug info about your current setup -info: - @$(DOOM) info - -# Diagnoses potential OS/environment issues -doctor: - @$(DOOM) doctor - -.PHONY: all compile test testi clean diff --git a/modules/lang/rust/README.org b/modules/lang/rust/README.org index 2a93bd352..068a2bab7 100644 --- a/modules/lang/rust/README.org +++ b/modules/lang/rust/README.org @@ -25,9 +25,8 @@ Add support to Rust language and cargo commands inside emacs. + ~+lsp~ to add support Language server protocol. ** Plugins -+ [[https://github.com/rust-lang/rust-mode][Rust-mode]] -+ [[https://github.com/racer-rust/emacs-racer][Racer-mode]] -+ [[https://github.com/racer-rust/emacs-racer][Cargo-mode]] ++ [[https://github.com/brotzeit/rustic][rustic]] ++ [[https://github.com/racer-rust/emacs-racer][racer]]* (unless =+lsp=) ** Hacks {A list of internal modifications to included packages} diff --git a/modules/lang/rust/autoload.el b/modules/lang/rust/autoload.el index 9f584cb44..dab7e68e4 100644 --- a/modules/lang/rust/autoload.el +++ b/modules/lang/rust/autoload.el @@ -14,3 +14,13 @@ (when buf (pop-to-buffer buf) t))) + + +;; +;;; Custom Cargo commands + +;;;###autoload +(defun +rust/cargo-audit () + "Run 'cargo audit' for the current project." + (interactive) + (rustic-run-cargo-command "cargo audit -f")) diff --git a/modules/lang/rust/config.el b/modules/lang/rust/config.el index 87f8bb602..b11bab2ee 100644 --- a/modules/lang/rust/config.el +++ b/modules/lang/rust/config.el @@ -9,6 +9,7 @@ (use-package! rustic :mode ("\\.rs$" . rustic-mode) + :commands rustic-run-cargo-command rustic-cargo-outdated :preface (setq rustic-rls-pkg (if (featurep! +lsp) 'lsp-mode)) :config @@ -32,7 +33,24 @@ (add-hook 'rustic-mode-hook #'rainbow-delimiters-mode) (when (featurep! +lsp) - (add-hook 'rustic-mode-local-vars-hook #'lsp!))) + (add-hook 'rustic-mode-local-vars-hook #'lsp!)) + + (map! :map rustic-mode-map + :localleader + (:prefix ("b" . "build") + :desc "cargo audit" "a" #'+rust/cargo-audit + :desc "cargo build" "b" #'rustic-cargo-build + :desc "cargo bench" "B" #'rustic-cargo-bench + :desc "cargo check" "c" #'rustic-cargo-check + :desc "cargo clippy" "C" #'rustic-cargo-clippy + :desc "cargo doc" "d" #'rustic-cargo-doc + :desc "cargo fmt" "f" #'rustic-cargo-fmt + :desc "cargo new" "n" #'rustic-cargo-new + :desc "cargo outdated" "o" #'rustic-cargo-outdated + :desc "cargo run" "r" #'rustic-cargo-run) + (:prefix ("t" . "cargo test") + :desc "all" "a" #'rustic-cargo-test + :desc "current test" "t" #'rustic-cargo-current-test))) (use-package! racer @@ -42,27 +60,3 @@ (set-lookup-handlers! 'rustic-mode :definition '(racer-find-definition :async t) :documentation '+rust-racer-lookup-documentation)) - - -;; -;;; Tools - -(use-package! cargo - :after rustic-mode - :config - (map! :map rustic-mode-map - :localleader - (:prefix ("b" . "build") - :desc "cargo add" "a" #'cargo-process-add - :desc "cargo build" "b" #'cargo-process-build - :desc "cargo bench" "B" #'cargo-process-bench - :desc "cargo check" "c" #'cargo-process-check - :desc "cargo clippy" "C" #'cargo-process-clippy - :desc "cargo doc" "d" #'cargo-process-doc - :desc "cargo run" "r" #'cargo-process-run - :desc "cargo search" "s" #'cargo-process-search - :desc "cargo update" "u" #'cargo-process-update) - (:prefix ("t" . "cargo test") - :desc "all" "a" #'cargo-process-test - :desc "current file" "f" #'cargo-process-current-file-tests - :desc "current test" "t" #'cargo-process-current-test))) diff --git a/modules/lang/rust/packages.el b/modules/lang/rust/packages.el index 05fab0577..8744139fd 100644 --- a/modules/lang/rust/packages.el +++ b/modules/lang/rust/packages.el @@ -4,6 +4,3 @@ (package! rustic) (unless (featurep! +lsp) (package! racer)) - -;; -(package! cargo) From 2769a1e24f94a6c194e9d4da649237469656e591 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 23 Nov 2019 16:12:06 -0500 Subject: [PATCH 061/983] lang/rust: update README #2108 --- modules/lang/rust/README.org | 57 +++++++++++++++++------------------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/modules/lang/rust/README.org b/modules/lang/rust/README.org index 068a2bab7..5203e9e40 100644 --- a/modules/lang/rust/README.org +++ b/modules/lang/rust/README.org @@ -1,6 +1,6 @@ #+TITLE: lang/rust #+DATE: June 5, 2019 -#+SINCE: {replace with next tagged release version} +#+SINCE: v3.0.0 #+STARTUP: inlineimages * Table of Contents :TOC_3:noexport: @@ -10,15 +10,18 @@ - [[#hacks][Hacks]] - [[#prerequisites][Prerequisites]] - [[#features][Features]] + - [[#keybinds][Keybinds]] - [[#configuration][Configuration]] + - [[#enable-rust-analyzer][Enable rust-analyzer]] - [[#troubleshooting][Troubleshooting]] - - [[#racer-installation-problems][Racer installation problems]] * Description -Add support to Rust language and cargo commands inside emacs. +This module adds support for the Rust language and integration for its tools, +e.g. ~cargo~. + Code completion (~racer~) + Syntax checking (~flycheck~) ++ LSP support (for rls and rust-analyzer) (~rustic~) + Snippets ** Module Flags @@ -29,56 +32,50 @@ Add support to Rust language and cargo commands inside emacs. + [[https://github.com/racer-rust/emacs-racer][racer]]* (unless =+lsp=) ** Hacks -{A list of internal modifications to included packages} ++ rustic has been modified /not/ to automatically install lsp-mode or elgot if + they're missing. Doom expects you to enable the =:tools lsp= module yourself. * Prerequisites -To get started with Rust, you can either use =rustup= and install rust with: +This module only requires ~rust~, which can be acquired through =rustup=: ~curl https://sh.rustup.rs -sSf | sh~ -Package manager is not recommended to install Nightly version of Rust what is -required for ~racer~ from [[https://github.com/racer-rust/racer#installation][version 2.1]] (more info in [[#Troubleshooting][Troubleshooting]]) +Optionally, this module also uses the following programs: -Some features have additional dependencies: - -+ The ~:editor format~ module uses ~rustfmt~ for rust files: ~rustup component - add rustfmt-preview~ ++ =racer= (if not using LSP): ~cargo +nightly install racer~ (requires rust nightly) ++ =RLS= or =rust-analyzer= (for LSP users) ++ =rustfmt= for ~:editor format~: ~rustup component add rustfmt-preview~ + The following commands require: + ~cargo-process-check~: ~cargo install cargo-check~ + ~cargo-process-clippy~: ~rustup component add clippy-preview~ - + ~cargo-process-{add,rm,upgrade}~: ~cargo install cargo-edit~ * Features -This module also supports LSP, it requires installation of Rust Language Server -[[https://github.com/rust-lang/rls][~RLS~]]. To enable this you need to enable ~lsp~ in ~:tools~ section in ~init.el~ file. - -Keybindings +This module also supports LSP, if you have [[https://github.com/rust-lang/rls][the Rust Language Server]] or +[[https://github.com/rust-analyzer/rust-analyzer][rust-analyzer]] installed. To enable it, you must enable the =:tools lsp= module +and the ~+lsp~ flag on this module. +** Keybinds | Binding | Description | |---------------------+-----------------------------| -| ~ b a~ | ~cargo add~ | +| ~ b a~ | ~cargo audit~ | | ~ b b~ | ~cargo build~ | | ~ b B~ | ~cargo bench~ | | ~ b c~ | ~cargo check~ | | ~ b C~ | ~cargo clippy~ | | ~ b d~ | ~cargo doc~ | +| ~ b n~ | ~cargo update~ | +| ~ b o~ | ~cargo outdated~ | | ~ b r~ | ~cargo run~ | -| ~ b s~ | ~cargo search~ | -| ~ b u~ | ~cargo update~ | | ~ t a~ | ~cargo test~ | -| ~ t f~ | ~run tests in current file~ | | ~ t t~ | ~run current test~ | * TODO Configuration -How to configure this module, including common problems and how to address them. +** Enable rust-analyzer +You'll need [[https://github.com/rust-analyzer/rust-analyzer][rust-analyzer]] installed on your system, then: -* Troubleshooting -** Racer installation problems -Racer need now ([[https://github.com/racer-rust/racer#installation][From 2.1 version]]) nightly version of Rust - -If you installed trough rustup -#+BEGIN_SRC sh -rustup toolchain add nightly - -cargo +nightly install racer +#+BEGIN_SRC elisp +(after! rustic + (setq rustic-lsp-server 'rust-analyzer)) #+END_SRC + +* TODO Troubleshooting From 5751f8c5a535dcfbed34bc4eb87561369d16f676 Mon Sep 17 00:00:00 2001 From: Giorgos Logiotatidis Date: Sun, 24 Nov 2019 13:21:49 +0200 Subject: [PATCH 062/983] Typo --- docs/getting_started.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting_started.org b/docs/getting_started.org index 54de52c43..a400edad1 100644 --- a/docs/getting_started.org +++ b/docs/getting_started.org @@ -332,7 +332,7 @@ wget -O ~/.emacs https://raw.githubusercontent.com/plexus/chemacs/master/.emacs *Warning: the =~/.emacs.d= directory must not exist for this to work.* #+end_quote -Then create =~/.emacs-profile.el= with a list of your Emacs profiles. This file +Then create =~/.emacs-profiles.el= with a list of your Emacs profiles. This file is structured like a =.dir-locals.el= file. Here is an example with Doom (as the default), Spacemacs, and Prelude: From a9f412bf5e4ac44b65fc4b3bb87d214f5f6e1ef9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 23 Nov 2019 20:45:53 -0500 Subject: [PATCH 063/983] Fix doom/help-* commands for helm users #2107 --- core/autoload/help.el | 125 ++++++++++++++++++++---------------------- 1 file changed, 59 insertions(+), 66 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index cb13f1c71..0663fd161 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -132,30 +132,30 @@ selection of all minor-modes, active or not." (depth (if (integerp depth) depth))) (message "Loading search results...") (unwind-protect - (delq nil - (org-map-entries - (lambda () - (cl-destructuring-bind (level _reduced-level _todo _priority text tags) - (org-heading-components) - (let ((path (org-get-outline-path))) - (when (and (or (null depth) - (<= level depth)) - (or (null tags) - (not (string-match-p ":TOC" tags)))) - (propertize - (mapconcat - 'identity - (list (mapconcat #'identity - (append (when include-files - (list (or (+org-get-global-property "TITLE") - (file-relative-name buffer-file-name)))) - path - (list (replace-regexp-in-string org-link-any-re "\\4" text))) - " > ") + (delq + nil + (org-map-entries + (lambda () + (cl-destructuring-bind (level _reduced-level _todo _priority text tags) + (org-heading-components) + (when (and (or (null depth) + (<= level depth)) + (or (null tags) + (not (string-match-p ":TOC" tags)))) + (let ((path (org-get-outline-path))) + (list (string-join + (list (string-join + (append (when include-files + (list (or (+org-get-global-property "TITLE") + (file-relative-name (buffer-file-name))))) + path + (list (replace-regexp-in-string org-link-any-re "\\4" text))) + " > ") tags) " ") - 'location (cons buffer-file-name (point))))))) - t 'agenda)) + (buffer-file-name) + (point)))))) + t 'agenda)) (mapc #'kill-buffer org-agenda-new-buffers) (setq org-agenda-new-buffers nil)))) @@ -163,17 +163,18 @@ selection of all minor-modes, active or not." ;;;###autoload (defun doom-completing-read-org-headings (prompt files &optional depth include-files initial-input extra-candidates) "TODO" - (let (ivy-sort-functions-alist) - (if-let* ((result (completing-read - prompt - (append (doom--org-headings files depth include-files) - extra-candidates) - nil nil initial-input))) - (cl-destructuring-bind (file . location) - (get-text-property 0 'location result) + (let ((alist + (append (doom--org-headings files depth include-files) + extra-candidates)) + ivy-sort-functions-alist) + (if-let (result (completing-read prompt alist nil nil initial-input)) + (cl-destructuring-bind (file &optional location) + (cdr (assoc result alist)) (find-file file) - (when location - (goto-char location))) + (cond ((functionp location) + (funcall location)) + (location + (goto-char location)))) (user-error "Aborted")))) ;;;###autoload @@ -201,9 +202,8 @@ selection of all minor-modes, active or not." "faq.org") 2 t initial-input (mapcar (lambda (x) - (propertize (concat "Doom Modules > " x) - 'location - (get-text-property (1- (length x)) 'location x))) + (setcar x (concat "Doom Modules > " (car x))) + x) (doom--help-modules-list)))) ;;;###autoload @@ -300,19 +300,14 @@ without needing to check if they are available." (defun doom--help-modules-list () (cl-loop for path in (cdr (doom-module-load-path 'all)) for (cat . mod) = (doom-module-from-path path) - for location = (cons (or (doom-module-locate-path cat mod "README.org") - (doom-module-locate-path cat mod)) - nil) - for format = (propertize (format "%s %s" cat mod) - 'location location) + for path = (or (doom-module-locate-path cat mod "README.org") + (doom-module-locate-path cat mod)) + for format = (format "%s %s" cat mod) if (doom-module-p cat mod) - collect format + collect (list format path) else if (and cat mod) - collect - (propertize - format - 'face 'font-lock-comment-face - 'location location))) + collect (list (propertize format 'face 'font-lock-comment-face) + path))) (defun doom--help-current-module-str () (cond ((and buffer-file-name @@ -330,10 +325,10 @@ without needing to check if they are available." (let ((sexp (sexp-at-point))) (when (memq (car-safe sexp) '(featurep! require!)) (format "%s %s" (nth 1 sexp) (nth 2 sexp))))))) - ((and buffer-file-name - (when-let (mod (doom-module-from-path buffer-file-name)) - (unless (memq (car mod) '(:core :private)) - (format "%s %s" (car mod) (cdr mod)))))) + ((when buffer-file-name + (when-let (mod (doom-module-from-path buffer-file-name)) + (unless (memq (car mod) '(:core :private)) + (format "%s %s" (car mod) (cdr mod)))))) ((when-let (mod (cdr (assq major-mode doom--help-major-mode-module-alist))) (format "%s %s" (symbol-name (car mod)) @@ -350,25 +345,23 @@ module derived from a `featurep!' or `require!' call, c) the module that the current file is in, or d) the module associated with the current major mode (see `doom--help-major-mode-module-alist')." (interactive - (let* ((module-string - (completing-read "Describe module: " - (doom--help-modules-list) - nil t nil nil - (doom--help-current-module-str))) - (key (doom-module-from-path - (or (car (get-text-property 0 'location module-string)) - (user-error "Did not select a valid module"))))) - (list (car key) - (cdr key)))) + (mapcar #'intern + (split-string + (completing-read "Describe module: " + (doom--help-modules-list) nil t nil nil + (doom--help-current-module-str)) + " " t))) (cl-check-type category symbol) (cl-check-type module symbol) - (let ((path (doom-module-locate-path category module))) + (cl-destructuring-bind (module-string path) + (or (assoc (format "%s %s" category module) (doom--help-modules-list)) + (user-error "'%s %s' is not a valid module" category module)) (unless (file-readable-p path) - (error "'%s %s' isn't a valid module; it doesn't exist" category module)) - (if-let (readme-path (doom-module-locate-path category module "README.org")) - (find-file readme-path) - (if (y-or-n-p (format "The '%s %s' module has no README file. Explore its directory?" - category module)) + (error "Can't find or read %S module at %S" module-string path)) + (if (not (file-directory-p path)) + (find-file path) + (if (y-or-n-p (format "The %S module has no README file. Explore its directory?" + module-string)) (doom-project-browse path) (user-error "Aborted module lookup"))))) From 3766dfeba977cdd7692017e6a7be309e394a78e8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 24 Nov 2019 00:01:37 -0500 Subject: [PATCH 064/983] docs/index: update readme links in module index --- docs/index.org | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/index.org b/docs/index.org index c3b7d4fa8..47d47f371 100644 --- a/docs/index.org +++ b/docs/index.org @@ -106,7 +106,7 @@ loaded last, before =:config= modules. + [[file:../modules/app/calendar/README.org][calendar]] - TODO + [[file:../modules/app/irc/README.org][irc]] - how neckbeards socialize + rss =+org= - an RSS client in Emacs -+ twitter - A twitter client for Emacs ++ [[file:../modules/app/twitter/README.org][twitter]] - A twitter client for Emacs + [[file:../modules/app/write/README.org][write]] =+wordnut +langtool= - Transforms emacs into an IDE for writers, and for writing fiction, notes, papers and so on. @@ -139,7 +139,7 @@ Modules that affect and augment your ability to manipulate or insert text. + god - run Emacs commands without modifier keys + [[file:../modules/editor/lispy/README.org][lispy]] - TODO + multiple-cursors - TODO -+ objed - TODO ++ [[file:../modules/editor/objed/README.org][objed]] - TODO + [[file:../modules/editor/parinfer/README.org][parinfer]] - TODO + rotate-text - TODO + [[file:../modules/editor/snippets/README.org][snippets]] - Snippet expansion for lazy typists @@ -159,13 +159,13 @@ Modules that reconfigure or augment packages or features built into Emacs. + wanderlust =+gmail= - TODO ** :input -+ chinese - TODO -+ japanese - TODO ++ [[file:../modules/input/chinese/README.org][chinese]] - TODO ++ [[file:../modules/input/japanese/README.org][japanese]] - TODO ** :lang Modules that bring support for a language or group of languages to Emacs. -+ agda - TODO ++ [[file:../modules/lang/agda/README.org][agda]] - TODO + assembly - TODO + [[file:../modules/lang/cc/README.org][cc]] =+lsp= - TODO + clojure - TODO @@ -191,7 +191,7 @@ Modules that bring support for a language or group of languages to Emacs. + kotlin - TODO + [[file:../modules/lang/latex/README.org][latex]] - TODO + lean - TODO -+ ledger - TODO ++ [[file:../modules/lang/ledger/README.org][ledger]] - TODO + lua =+moonscript= - TODO + [[file:../modules/lang/markdown/README.org][markdown]] =+grip= - TODO + [[file:../modules/lang/nim/README.org][nim]] - TODO @@ -260,7 +260,7 @@ Aesthetic modules that affect the Emacs interface or user experience. + [[file:../modules/ui/doom-quit/README.org][doom-quit]] - TODO + fill-column - TODO + [[file:../modules/ui/hl-todo/README.org][hl-todo]] - TODO -+ hydra - TODO ++ [[file:../modules/ui/hydra/README.org][hydra]] - TODO + indent-guides - TODO + [[file:../modules/ui/modeline/README.org][modeline]] - TODO + [[file:../modules/ui/nav-flash/README.org][nav-flash]] - TODO From d37ebee2f829321f49231651ac1201801f3f8991 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 24 Nov 2019 00:49:13 -0500 Subject: [PATCH 065/983] Print progress to same line on 'doom update' Experimental. --- core/cli/packages.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index a276e0dc5..75f0e546e 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -147,16 +147,16 @@ declaration) or dependency thereof that hasn't already been." (let* ((default-directory (straight--repos-dir local-repo)) (commit (straight-vc-get-commit type local-repo))) (if (not (straight-vc-fetch-from-remote recipe)) - (print! (warn "(%d/%d) Failed to fetch %s" i total package)) + (print! (warn "\033[K(%d/%d) Failed to fetch %s" i total package)) (let ((output (straight--process-get-output))) (straight-merge-package package) (let ((newcommit (straight-vc-get-commit type local-repo))) (if (string= commit newcommit) - (print! (start "(%d/%d) %s is up-to-date") i total package) + (print! (start "\033[K(%d/%d) %s is up-to-date\033[1A") i total package) (ignore-errors (delete-directory (straight--build-dir package) 'recursive)) (puthash package t straight--packages-to-rebuild) - (print! (info "(%d/%d) Updating %s...") i total package) + (print! (info "\033[K(%d/%d) Updating %s...") i total package) (unless (string-empty-p output) (print-group! (print! (info "%s") output) @@ -176,6 +176,7 @@ declaration) or dependency thereof that hasn't already been." (print! (error "%s" e)) (print-group! (print! (info "%s" (straight--process-get-output))))) (push package errors))))) + (princ "\033[K") (when errors (print! (error "There were %d errors, the offending packages are: %s") (length errors) (string-join errors ", "))) From 768d5b718c7fdda1b92d5b16681370e91c13a1b6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 24 Nov 2019 13:50:02 -0500 Subject: [PATCH 066/983] Fix #2111: +eval/buffer not capturing whole elisp buffer --- modules/lang/emacs-lisp/autoload.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/emacs-lisp/autoload.el b/modules/lang/emacs-lisp/autoload.el index 38505be87..054b0b9df 100644 --- a/modules/lang/emacs-lisp/autoload.el +++ b/modules/lang/emacs-lisp/autoload.el @@ -13,7 +13,7 @@ to a pop up buffer." (condition-case-unless-debug e (let ((result (let ((debug-on-error t)) - (eval (read (buffer-substring-no-properties beg end)) + (eval (read (format "(progn %s)" (buffer-substring-no-properties beg end))) `((buffer-file-name . ,buffer-file-name) (doom--current-module . ,(ignore-errors From b8c0126f8ccaa3e3da5ca19db04fc049c944879e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 24 Nov 2019 14:16:46 -0500 Subject: [PATCH 067/983] emacs/dired: don't enable dired-git-info in ranger It won't correctly disable on `C-c C-e`, but it does work find if enabled manually. Also: refactors +dired-enable-git-info-h and map! call Relevant to #2106 --- modules/emacs/dired/autoload.el | 9 ++++----- modules/emacs/dired/config.el | 10 +++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/modules/emacs/dired/autoload.el b/modules/emacs/dired/autoload.el index 145fdd557..e44d3dda0 100644 --- a/modules/emacs/dired/autoload.el +++ b/modules/emacs/dired/autoload.el @@ -7,10 +7,9 @@ (mapc #'kill-buffer (doom-buffers-in-mode 'dired-mode)) (message "Killed all dired buffers")) - ;;;###autoload (defun +dired-enable-git-info-h () - (if (and - (not (file-remote-p default-directory)) - (locate-dominating-file "." ".git")) - (dired-git-info-mode 1))) + "Enable `dired-git-info-mode' in git repos." + (and (not (file-remote-p default-directory)) + (locate-dominating-file "." ".git") + (dired-git-info-mode 1))) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index e7782e820..74f9950e1 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -165,10 +165,9 @@ we have to clean it up ourselves." ("\\.\\(?:mp3\\|flac\\)\\'" ,cmd) ("\\.html?\\'" ,cmd) ("\\.md\\'" ,cmd)))) - (map! - :map dired-mode-map - :localleader - "h" #'dired-omit-mode)) + (map! :map dired-mode-map + :localleader + "h" #'dired-omit-mode)) (use-package! fd-dired @@ -180,7 +179,8 @@ we have to clean it up ourselves." (use-package! dired-git-info :after dired :init - (add-hook 'dired-after-readin-hook '+dired-enable-git-info-h) + (unless (featurep! +ranger) + (add-hook 'dired-after-readin-hook '+dired-enable-git-info-h)) :config (map! :map (dired-mode-map ranger-mode-map) :ng ")" #'dired-git-info-mode) From ecb4a7e838f755f72d3cf63f34a505c741fa59a1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 24 Nov 2019 14:49:43 -0500 Subject: [PATCH 068/983] Move 'SPC f m' to 'SPC f R' 'SPC f R' was formerly projectile-recentf, which is already on 'SPC p r' --- modules/config/default/+evil-bindings.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 363ac1161..31ea50ce7 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -378,11 +378,10 @@ :desc "Find file" "f" #'find-file :desc "Find file from here" "F" #'+default/find-file-under-here :desc "Locate file" "l" #'locate - :desc "Move/rename file" "m" #'doom/move-this-file :desc "Find file in private config" "p" #'doom/find-file-in-private-config :desc "Browse private config" "P" #'doom/open-private-config :desc "Recent files" "r" #'recentf-open-files - :desc "Recent project files" "R" #'projectile-recentf + :desc "Rename/move file" "R" #'doom/move-this-file :desc "Save file" "s" #'save-buffer :desc "Save file as..." "S" #'write-file :desc "Sudo find file" "u" #'doom/sudo-find-file From a923f93cabbb02ab46367095ff474e6d9b5e90c0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 24 Nov 2019 14:57:14 -0500 Subject: [PATCH 069/983] ui/window-select: fix other-window keybind --- modules/ui/window-select/README.org | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/ui/window-select/README.org b/modules/ui/window-select/README.org index 34f5347b8..1f080e2e5 100644 --- a/modules/ui/window-select/README.org +++ b/modules/ui/window-select/README.org @@ -15,13 +15,11 @@ * Description This module provides several methods for selecting windows without the use of -the mouse or spatial navigation (e.g. =C-w {h,j,k,l}=). The command -~other-window~ is remapped to either ~switch-window~ or ~ace-window~, depending -on which backend you've enabled. +the mouse or spatial navigation (e.g. =C-w {h,j,k,l}=). -#+begin_quote -~other-window~ is bound to ~C-x o~ and ~SPC w o~. -#+end_quote +The command ~other-window~ is remapped to either ~switch-window~ or +~ace-window~, depending on which backend you've enabled. It is bound to ~C-x o~ +(and ~C-w C-w~ for evil users). It also provides numbered windows and selection with the ~winum~ package, if desired. Evil users can jump to window N in =C-w = (where N is a number From 5b190c9eca2446feac4c20145bc55dc5197a0ea3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 24 Nov 2019 19:20:28 -0500 Subject: [PATCH 070/983] Unfold hidden subtree after doom-completing-read-org-headings Affects doom/help* commands, as well as +default/org-notes-headlines, and others (any command that uses doom-completing-read-org-headings to search org files). --- core/autoload/help.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 0663fd161..75958ca5e 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -174,7 +174,12 @@ selection of all minor-modes, active or not." (cond ((functionp location) (funcall location)) (location - (goto-char location)))) + (goto-char location))) + (ignore-errors + (when (outline-invisible-p) + (save-excursion + (outline-previous-visible-heading 1) + (org-show-subtree))))) (user-error "Aborted")))) ;;;###autoload From 570894e1c8bd3db7e60559de3baf19c253d56140 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 24 Nov 2019 19:37:29 -0500 Subject: [PATCH 071/983] cli/upgrade: 'doom refresh' after upgrading, before updating Fixes an issue where uninitialized packages aren't installed when 'doom update' tries to update them. --- core/cli/upgrade.el | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/cli/upgrade.el b/core/cli/upgrade.el index 7b9912ecf..70dbd54e1 100644 --- a/core/cli/upgrade.el +++ b/core/cli/upgrade.el @@ -13,12 +13,15 @@ following shell commands: bin/doom refresh bin/doom update" :bare t - (when (doom-cli-upgrade doom-auto-accept force-p) - (require 'core-packages) - (doom-initialize) - (doom-initialize-packages) - (when (doom-cli-packages-update) - (doom-cli-reload-package-autoloads 'force)))) + (if (delq + nil (list + (doom-cli-upgrade doom-auto-accept force-p) + (doom-cli-execute "refresh" (if doom-auto-accept '("-y"))) + (when (doom-cli-packages-update) + (doom-cli-reload-package-autoloads 'force) + t))) + (print! (success "Done! Restart Emacs for changes to take effect.")) + (print! "Nothing to do. Doom is up-to-date!"))) ;; @@ -103,9 +106,6 @@ following shell commands: (equal (vc-git--rev-parse "HEAD") new-rev)) (error "Failed to check out %s" (substring new-rev 0 10))) (print! (success "Finished upgrading Doom Emacs"))) - (doom-cli-execute "refresh" (if auto-accept-p '("-y"))) - t) - - (print! (success "Done! Restart Emacs for changes to take effect.")))))) + t))))) (ignore-errors (doom-call-process "git" "remote" "remove" doom-repo-remote)))))) From ffc29a547c1d10aa4c7e6e514412e9c435c8c648 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 24 Nov 2019 19:39:10 -0500 Subject: [PATCH 072/983] Associate clojurescript-mode with :lang clojure For doom/help-modules --- core/autoload/help.el | 1 + 1 file changed, 1 insertion(+) diff --git a/core/autoload/help.el b/core/autoload/help.el index 75958ca5e..4d485508d 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -13,6 +13,7 @@ (lisp-mode :lang common-lisp) (csharp-mode :lang csharp) (clojure-mode :lang clojure) + (clojurescript-mode :lang clojure) (graphql-mode :lang data) (toml-mode :lang data) (json-mode :lang data) From 5623b8b9ba05cca4066337b586344e849b23d46a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 24 Nov 2019 19:40:00 -0500 Subject: [PATCH 073/983] lang/emacs-lisp: refactor +emacs-lisp-eval --- modules/lang/emacs-lisp/autoload.el | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/modules/lang/emacs-lisp/autoload.el b/modules/lang/emacs-lisp/autoload.el index 054b0b9df..2ee0a1c37 100644 --- a/modules/lang/emacs-lisp/autoload.el +++ b/modules/lang/emacs-lisp/autoload.el @@ -8,19 +8,18 @@ "Evaluate a region and print it to the echo area (if one line long), otherwise to a pop up buffer." (+eval-display-results - (let* ((buffer-file-name (buffer-file-name (buffer-base-buffer)))) - (string-trim-right - (condition-case-unless-debug e - (let ((result - (let ((debug-on-error t)) - (eval (read (format "(progn %s)" (buffer-substring-no-properties beg end))) - `((buffer-file-name . ,buffer-file-name) - (doom--current-module - . ,(ignore-errors - (doom-module-from-path buffer-file-name)))))))) - (require 'pp) - (replace-regexp-in-string "\\\\n" "\n" (pp-to-string result))) - (error (error-message-string e))))) + (string-trim-right + (condition-case-unless-debug e + (let ((result + (let ((debug-on-error t)) + (eval (read (format "(progn %s)" (buffer-substring-no-properties beg end))) + `((buffer-file-name . ,(buffer-file-name (buffer-base-buffer))) + (doom--current-module + . ,(ignore-errors + (doom-module-from-path buffer-file-name)))))))) + (require 'pp) + (replace-regexp-in-string "\\\\n" "\n" (pp-to-string result))) + (error (error-message-string e)))) (current-buffer))) (defvar +emacs-lisp--face nil) From 2a01de5f6c7fe5dfa21d96f503c73adf87c47d00 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 24 Nov 2019 23:29:34 -0500 Subject: [PATCH 074/983] docs/faq: clarify where to put snippets --- docs/faq.org | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/faq.org b/docs/faq.org index e63c98ccf..d04b0c505 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -540,7 +540,7 @@ section of the [[file:getting_started.org][Getting Started]] guide. With the ~package!~ macro's ~:disable~ property: #+BEGIN_SRC elisp -;;; in DOOMDIR/packages.el +;;; add to DOOMDIR/packages.el (package! irony :disable t) #+END_SRC @@ -589,7 +589,7 @@ available. You can either set ~doom-theme~ or manually load a theme with the ~load-theme~ function. #+BEGIN_SRC emacs-lisp -;;; in ~/.doom.d/config.el +;;; add to ~/.doom.d/config.el (setq doom-theme 'doom-tomorrow-night) ;; or (load-theme 'doom-tomorrow-night t) @@ -609,10 +609,10 @@ To install a theme from a third party plugin, say, [[https://github.com/bbatsov/ install it, then load it: #+BEGIN_SRC emacs-lisp -;; in ~/.doom.d/packages.el +;;; add to ~/.doom.d/packages.el (package! solarized) -;; in ~/.doom.d/config.el +;;; add to ~/.doom.d/config.el (setq doom-theme 'solarized-dark) #+END_SRC @@ -633,7 +633,7 @@ or [[https://wiki.archlinux.org/index.php/X_Logical_Font_Description][xlfd font e.g. #+BEGIN_SRC emacs-lisp -;; ~/.doom.d/config.el +;;; Add to ~/.doom.d/config.el (setq doom-font (font-spec :family "Input Mono Narrow" :size 12 :weight 'semi-light) doom-variable-pitch-font (font-spec :family "Fira Sans") ; inherits `doom-font''s :size doom-unicode-font (font-spec :family "Input Mono Narrow" :size 12) @@ -701,7 +701,7 @@ These variables control what key to use for leader and localleader keys: e.g. #+BEGIN_SRC emacs-lisp -;; in ~/.doom.d/config.el +;;; add to ~/.doom.d/config.el (setq doom-leader-key "," doom-localleader-key "\\") #+END_SRC @@ -711,6 +711,7 @@ Doom uses the ~display-line-numbers~ package, which is built into Emacs 26+. *** Disabling line numbers entirely #+BEGIN_SRC elisp +;;; add to ~/.doom.d/config.el (setq display-line-numbers-type nil) ;; or (remove-hook! '(prog-mode-hook text-mode-hook conf-mode-hook) @@ -731,6 +732,7 @@ nil no line numbers For example: #+BEGIN_SRC elisp +;;; add to ~/.doom.d/config.el (setq display-line-numbers-type 'relative) #+END_SRC @@ -903,10 +905,10 @@ putting in the time to learn them. Otherwise, it is trivial to install expand-region and binds keys to it yourself: #+BEGIN_SRC elisp -;; in ~/.doom.d/packages.el +;;; add to ~/.doom.d/packages.el (package! expand-region) -;; in ~/.doom.d/config.el +;;; add to ~/.doom.d/config.el (map! :nv "C-=" #'er/contract-region :nv "C-+" #'er/expand-region) #+END_SRC @@ -932,10 +934,10 @@ That said, if you still want ~exec-path-from-shell~, it is trivial to install yourself: #+BEGIN_SRC emacs-lisp -;; in ~/.doom.d/packages.el +;;; add to ~/.doom.d/packages.el (package! exec-path-from-shell) -;; in ~/.doom.d/config.el +;;; add to ~/.doom.d/config.el (require 'exec-path-from-shell) (when (display-graphic-p) (exec-path-from-shell-initialize)) From 0bf1ea65dc132eb224ba38a6be595fcead68cdab Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 25 Nov 2019 02:02:57 -0500 Subject: [PATCH 075/983] emacs/dired: disable dired-git-info by default It is unacceptably slow in version controlled directories with many files. --- modules/emacs/dired/config.el | 42 ++++++++++++++++------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index 74f9950e1..ce251de26 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -176,26 +176,22 @@ we have to clean it up ourselves." :init (advice-add #'find-dired :override #'fd-dired)) -(use-package! dired-git-info - :after dired - :init - (unless (featurep! +ranger) - (add-hook 'dired-after-readin-hook '+dired-enable-git-info-h)) - :config - (map! :map (dired-mode-map ranger-mode-map) - :ng ")" #'dired-git-info-mode) - (after! wdired - ;; Temporarily disable `dired-git-info-mode' when entering wdired, due to - ;; reported incompatibilities. - (defvar +dired--git-info-p nil) - (defadvice! +dired--disable-git-info-a (&rest _) - :before #'wdired-change-to-wdired-mode - (setq +dired--git-info-p dired-git-info-mode) - (when +dired--git-info-p - (dired-git-info-mode -1))) - (defadvice! +dired--reactivate-git-info-a (&rest _) - :after '(wdired-exit - wdired-abort-changes - wdired-finish-edit) - (when +dired--git-info-p - (dired-git-info-mode +1))))) +;;;###package dired-git-info +(map! :after dired + :map (dired-mode-map ranger-mode-map) + :ng ")" #'dired-git-info-mode) +(after! wdired + ;; Temporarily disable `dired-git-info-mode' when entering wdired, due to + ;; reported incompatibilities. + (defvar +dired--git-info-p nil) + (defadvice! +dired--disable-git-info-a (&rest _) + :before #'wdired-change-to-wdired-mode + (setq +dired--git-info-p (bound-and-true-p dired-git-info-mode)) + (when +dired--git-info-p + (dired-git-info-mode -1))) + (defadvice! +dired--reactivate-git-info-a (&rest _) + :after '(wdired-exit + wdired-abort-changes + wdired-finish-edit) + (when +dired--git-info-p + (dired-git-info-mode +1)))) From 9bd3a988f103a0e78501e962e37a6776e858923d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 25 Nov 2019 02:10:11 -0500 Subject: [PATCH 076/983] Remove :tools wakatime module Doesn't appear to be working anymore and it's OOTB setup/config is too trivial to warrant its own module. --- docs/index.org | 1 - init.example.el | 1 - modules/tools/wakatime/README.org | 35 ---------------- modules/tools/wakatime/autoload.el | 65 ------------------------------ modules/tools/wakatime/packages.el | 4 -- 5 files changed, 106 deletions(-) delete mode 100644 modules/tools/wakatime/README.org delete mode 100644 modules/tools/wakatime/autoload.el delete mode 100644 modules/tools/wakatime/packages.el diff --git a/docs/index.org b/docs/index.org index 47d47f371..d51c59518 100644 --- a/docs/index.org +++ b/docs/index.org @@ -249,7 +249,6 @@ Small modules that give Emacs access to external tools & services. + [[file:../modules/tools/terraform/README.org][terraform]] + tmux - TODO + upload - TODO -+ [[file:../modules/tools/wakatime/README.org][wakatime]] - TODO ** :ui Aesthetic modules that affect the Emacs interface or user experience. diff --git a/init.example.el b/init.example.el index 7965ffdab..8f4723917 100644 --- a/init.example.el +++ b/init.example.el @@ -93,7 +93,6 @@ ;;terraform ; infrastructure as code ;;tmux ; an API for interacting with tmux ;;upload ; map local to remote projects via ssh/ftp - ;;wakatime :lang ;;agda ; types of types of types of types... diff --git a/modules/tools/wakatime/README.org b/modules/tools/wakatime/README.org deleted file mode 100644 index 2427fee03..000000000 --- a/modules/tools/wakatime/README.org +++ /dev/null @@ -1,35 +0,0 @@ -#+TITLE: tools/wakatime -#+DATE: June 7, 2018 -#+SINCE: v2.0.4 -#+STARTUP: inlineimages - -* Table of Contents :TOC_3:noexport: -- [[Description][Description]] - - [[Module Flags][Module Flags]] - - [[Plugins][Plugins]] -- [[Prerequisites][Prerequisites]] -- [[Configuration][Configuration]] - - [[Obfuscate project file names][Obfuscate project file names]] - -* Description -This module integrates [[https://wakatime.com][wakatime]] into Emacs. - -** Module Flags -This module provides no flags. - -** Plugins -+ wakatime-mode - -* Prerequisites -This module requires an account and API key from wakatime.com. - -Run ~M-x +wakatime/setup~ to set things up. - -* Configuration -** Obfuscate project file names -#+BEGIN_SRC emacs-lisp -(setq +wakatime-hide-filenames t) -#+END_SRC - -This will hide what files and folders you're working in from prying eyes on your -profile. diff --git a/modules/tools/wakatime/autoload.el b/modules/tools/wakatime/autoload.el deleted file mode 100644 index 8602b2d37..000000000 --- a/modules/tools/wakatime/autoload.el +++ /dev/null @@ -1,65 +0,0 @@ -;;; tools/wakatime/autoload.el -*- lexical-binding: t; -*- - -(defvar +wakatime-home (concat doom-cache-dir "wakatime/") - "Path to the directory where wakatime files are stored.") - -(defvar +wakatime-hide-filenames nil - "If non-nil, obfuscate files and only show what projects you're working on.") - -;;;###autoload -(add-hook 'doom-init-modules-hook #'+wakatime-delayed-autostart-h) - -;;;###autoload -(defun +wakatime/setup () - "Setup Wakatime in Emacs and start `global-wakatime-mode'. - -This will prompt you for your api key. You only need to run this when your api -changes." - (interactive) - (when (y-or-n-p "No API key is registered. Open a browser on the wakatime api key page?") - (browse-url "https://wakatime.com/settings/api-key")) - (let ((api-key (read-string "Enter your wakatime API key: "))) - (unless api-key - (user-error "No api key was received.")) - (require 'wakatime-mode) - (customize-set-variable 'wakatime-api-key api-key) - (customize-save-customized) - (unless (or (and wakatime-cli-path (file-executable-p wakatime-cli-path)) - (not (equal (wakatime-find-binary "wakatime") "wakatime"))) - (user-error "Couldn't find wakatime executable (%s)" - (or wakatime-cli-path "wakatime"))) - (global-wakatime-mode +1) - (message "Wakatime enabled. You're good to go!"))) - -;;;###autoload -(defun +wakatime-autostart-h (&rest _) - "Initialize wakatime (if `wakatime-api-key' is set, otherwise no-op with a -warning)." - (interactive) - (require 'wakatime-mode) - (if (not wakatime-api-key) - (message "wakatime-mode isn't set up. Run `M-x +wakatime/setup' to do so.") - (when +wakatime-home - (unless (file-directory-p +wakatime-home) - (make-directory +wakatime-home t))) - (global-wakatime-mode +1)) - ;; - (remove-hook 'doom-switch-buffer-hook #'+wakatime-autostart-h) - (advice-remove 'after-find-file #'+wakatime-autostart-h)) - -;;;###autoload -(defun +wakatime-delayed-autostart-h (&rest _) - "Lazily initialize `wakatime-mode' until the next time you switch buffers or -open a file." - (add-hook 'doom-switch-buffer-hook #'+wakatime-autostart-h) - ;; this is necessary in case the user opens emacs with file arguments - (advice-add 'after-find-file :before #'+wakatime-autostart-h)) - -(defadvice! +wakatime--append-options-a (ret) - "Modifies the wakatime command string so that `+wakatime-hide-filenames' and -`+wakatime-home' are respected." - :filter-return #'wakatime-client-command - (concat (when +wakatime-home - (format "WAKATIME_HOME=%s " (shell-quote-argument +wakatime-home))) - ret - (if +wakatime-hide-filenames " --hide-filenames"))) diff --git a/modules/tools/wakatime/packages.el b/modules/tools/wakatime/packages.el deleted file mode 100644 index 2df681c92..000000000 --- a/modules/tools/wakatime/packages.el +++ /dev/null @@ -1,4 +0,0 @@ -;; -*- no-byte-compile: t; -*- -;;; tools/wakatime/packages.el - -(package! wakatime-mode) From b665e31bcb358956632f9437dd037bad01b1a4dd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 25 Nov 2019 02:10:51 -0500 Subject: [PATCH 077/983] Restore mode-line help-echo properties And moved it to my private config. --- core/core-ui.el | 5 ----- 1 file changed, 5 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index 8c58cf0f3..9d2549f18 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -345,11 +345,6 @@ treat Emacs as a non-application window." ;; But don't let the minibuffer grow beyond this size max-mini-window-height 0.15) -;; Disable help mouse-overs for mode-line segments (i.e. :help-echo text). -;; They're generally unhelpful and only add confusing visual clutter. -(setq mode-line-default-help-echo nil - show-help-function nil) - ;; Typing yes/no is obnoxious when y/n will do (fset #'yes-or-no-p #'y-or-n-p) From 886fa36ac8073af30fb8a2d48f1ac12b843d1ef7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 25 Nov 2019 02:14:58 -0500 Subject: [PATCH 078/983] Improve 'doom purge' progress output --- core/cli/packages.el | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 75f0e546e..387b3b45e 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -212,14 +212,14 @@ declaration) or dependency thereof that hasn't already been." (defun doom--cli-packages-regraft-repo (repo) (let ((default-directory (straight--repos-dir repo))) (if (not (file-directory-p ".git")) - (ignore (print! (warn "repos/%s is not a git repo, skipping" repo))) + (ignore (print! (warn "\033[Krepos/%s is not a git repo, skipping" repo))) (let ((before-size (doom-directory-size default-directory))) (straight--call "git" "reset" "--hard") (straight--call "git" "clean" "-ffd") (if (not (car (straight--call "git" "replace" "--graft" "HEAD"))) - (print! (info "repos/%s is already compact" repo)) + (print! (info "\033[Krepos/%s is already compact\033[1A" repo)) (straight--call "git" "gc") - (print! (success "Regrafted repos/%s (from %0.1fKB to %0.1fKB)") + (print! (success "\033[KRegrafted repos/%s (from %0.1fKB to %0.1fKB)") repo before-size (doom-directory-size default-directory)) (print-group! (print! "%s" (straight--process-get-output))))) t))) @@ -229,11 +229,13 @@ declaration) or dependency thereof that hasn't already been." (progn (print! (info "No repos to regraft")) 0) (let ((before-size (doom-directory-size (straight--repos-dir)))) - (prog1 (print-group! (delq nil (mapcar #'doom--cli-packages-regraft-repo repos))) - (let ((after-size (doom-directory-size (straight--repos-dir)))) - (print! (success "Finished regrafting. Size before: %0.1fKB and after: %0.1fKB (%0.1fKB)") - before-size after-size - (- after-size before-size))))))) + (print-group! + (prog1 (delq nil (mapcar #'doom--cli-packages-regraft-repo repos)) + (princ "\033[K") + (let ((after-size (doom-directory-size (straight--repos-dir)))) + (print! (success "Finished regrafting. Size before: %0.1fKB and after: %0.1fKB (%0.1fKB)") + before-size after-size + (- after-size before-size)))))))) (defun doom--cli-packages-purge-repo (repo) (let ((repo-dir (straight--repos-dir repo))) @@ -302,6 +304,7 @@ If ELPA-P, include packages installed with package.el (M-x package-install)." (setq success t))) (if (not regraft-repos-p) (print! (info "Skipping regrafting")) + (print! (start "Regrafting %d repos..." (length repos-to-regraft))) (and (doom--cli-packages-regraft-repos repos-to-regraft) (setq success t))) (when success From a0e9981210b592eaa445f534eee080bad783a575 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 25 Nov 2019 13:51:23 -0500 Subject: [PATCH 079/983] ui/popup: update configuration section in README --- modules/ui/popup/README.org | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ui/popup/README.org b/modules/ui/popup/README.org index 3a8128983..21e7d6a50 100644 --- a/modules/ui/popup/README.org +++ b/modules/ui/popup/README.org @@ -72,13 +72,13 @@ Omitted parameters in a ~set-popup-rules!~ will use the defaults set in ~+popup-defaults~. ** Disabling hidden mode-line in popups -The mode-line is hidden in popups, by default. To disable this, you can either: +By default, the mode-line is hidden in popups. To disable this, you can either: 1. Change the default ~:modeline~ property in ~+popup-defaults~: #+BEGIN_SRC emacs-lisp - ;; put in private/$USER/config.el - (map-put +popup-defaults :modeline t) + ;; add to $DOOMDIR/config.el + (plist-put +popup-defaults :modeline t) #+END_SRC A value of ~t~ will instruct popups to use the default mode-line. Any @@ -87,7 +87,7 @@ The mode-line is hidden in popups, by default. To disable this, you can either: 2. Completely disable management of the mode-line in popups: #+BEGIN_SRC emacs-lisp - ;; in ~/.doom.d/config.el + ;; add to ~/.doom.d/config.el (remove-hook '+popup-buffer-mode-hook #'+popup-set-modeline-on-enable-h) #+END_SRC From 6232f12dfdf473c02a51b0e59c6fa2a67ac5d7b5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 25 Nov 2019 14:02:17 -0500 Subject: [PATCH 080/983] editor/evil: update hacks section in README --- modules/editor/evil/README.org | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/editor/evil/README.org b/modules/editor/evil/README.org index f1f81294a..5fc532a9f 100644 --- a/modules/editor/evil/README.org +++ b/modules/editor/evil/README.org @@ -44,7 +44,6 @@ This holy module brings the vim experience to Emacs. + [[https://github.com/emacs-evil/evil-collection][evil-collection]]* ** Hacks -+ When a window is split, the new window will be focused. + The o/O keys will respect and continue commented lines (can be disabled by setting ~+evil-want-o/O-to-continue-comments~ to ~nil~). + In visual mode, =*= and =#= will search for the current selection instead of From 69366ed67437884d8cd2bfa6c73abdc3f65ebaa6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 25 Nov 2019 15:28:38 -0500 Subject: [PATCH 081/983] docs/api: correct global-set-key uses --- docs/api.org | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api.org b/docs/api.org index 578418981..c7a72541a 100644 --- a/docs/api.org +++ b/docs/api.org @@ -269,9 +269,9 @@ These are side-by-side comparisons, showing how to bind keys with and without (map! :map lua-mode-map "SPC m b" nil) ;; bind multiple keys -(global-set-key "C-x x" #'do-something) -(global-set-key "C-x y" #'do-something-else) -(global-set-key "C-x z" #'do-another-thing) +(global-set-key (kbd "C-x x") #'do-something) +(global-set-key (kbd "C-x y") #'do-something-else) +(global-set-key (kbd "C-x z") #'do-another-thing) (map! "C-x x" #'do-something "C-x y" #'do-something-else "C-x z" #'do-another-thing) From 811dbc4e68e24dc0520fd00ece017715ef68255e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 25 Nov 2019 16:20:53 -0500 Subject: [PATCH 082/983] app/write: conform hooks to conventions --- modules/app/write/autoload.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/app/write/autoload.el b/modules/app/write/autoload.el index 8a2f21044..f1fa84601 100644 --- a/modules/app/write/autoload.el +++ b/modules/app/write/autoload.el @@ -16,28 +16,28 @@ (setq-local line-spacing +write-line-spacing))) ;;;###autoload -(defun +write|init-org-mode () +(defun +write-init-org-mode-h () "Initializes `org-mode' specific settings for `+write-mode'." (when (eq major-mode 'org-mode) (+org-pretty-mode (if +write-mode +1 -1)))) ;;;###autoload -(defun +write|init-line-numbers () +(defun +write-init-line-numbers-h () (display-line-numbers-mode (if +write-mode +1 -1))) ;;;###autoload -(defun +write|init-mixed-pitch () +(defun +write-init-mixed-pitch-h () (mixed-pitch-mode (if +write-mode +1 -1))) ;;;###autoload -(defun +write|init-visual-fill-column () +(defun +write-init-visual-fill-column-h () (visual-fill-column-mode (if +write-mode +1 -1))) ;;;###autoload (add-hook! '+write-mode-hook #'(flyspell-mode visual-line-mode - +write|init-mixed-pitch - +write|init-visual-fill-column - +write|init-line-numbers - +write|init-org-mode)) + +write-init-mixed-pitch-h + +write-init-visual-fill-column-h + +write-init-line-numbers-h + +write-init-org-mode-h)) From f6ec3181c8d45f7f1469f0c7e8d1309d02747b28 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 25 Nov 2019 16:34:56 -0500 Subject: [PATCH 083/983] Fix doom/reload-autoloads --- core/autoload/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/autoload/config.el b/core/autoload/config.el index e345e7ab7..c93caa156 100644 --- a/core/autoload/config.el +++ b/core/autoload/config.el @@ -89,7 +89,7 @@ line." (require 'core-cli) (require 'core-packages) (doom-initialize-packages) - (doom-reload-autoloads nil 'force)) + (doom-cli-reload-autoloads nil 'force)) ;;;###autoload (defun doom/reload-env () From 9a93aa1df99423c57e08147e3219f059a00b60a5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 25 Nov 2019 18:39:51 -0500 Subject: [PATCH 084/983] tools/debugger: fix invalid-function "..." error ...when invoking debugger, due to minibuffer-history being evaluated for some reason. --- modules/tools/debugger/config.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tools/debugger/config.el b/modules/tools/debugger/config.el index f75993866..8c62c94b1 100644 --- a/modules/tools/debugger/config.el +++ b/modules/tools/debugger/config.el @@ -104,8 +104,8 @@ (if (boundp 'starting-directory) (realgud-cmdbuf-info-starting-directory= starting-directory)) (set minibuffer-history-var - (cl-remove-duplicates - (cons cmd-str (eval minibuffer-history)) :from-end)))))) + (cl-remove-duplicates (cons cmd-str minibuffer-history) + :from-end t)))))) (t (if cmd-buf (switch-to-buffer cmd-buf)) (message "Error running command: %s" (mapconcat #'identity cmd-args " ")))) From 46d3d8d85c6d191f3abce1fb546b73b6111d9624 Mon Sep 17 00:00:00 2001 From: Gerry Agbobada Date: Tue, 26 Nov 2019 00:54:51 +0100 Subject: [PATCH 085/983] Fix dap-debug-template-conf.. void-variable The variable changed name in emacs-lsp/dap-mode@7768e145be56c9c6f2575ef9090b763bc9fb3730 --- modules/tools/debugger/autoload/debugger.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tools/debugger/autoload/debugger.el b/modules/tools/debugger/autoload/debugger.el index 5c3dd1390..73394337c 100644 --- a/modules/tools/debugger/autoload/debugger.el +++ b/modules/tools/debugger/autoload/debugger.el @@ -7,7 +7,7 @@ (bound-and-true-p lsp--buffer-deferred) (require 'dap-mode nil t) dap-mode) - (mapcar #'car dap--debug-template-configurations))) + (mapcar #'car dap-debug-template-configurations))) (defun +debugger-list-for-realgud () (cl-loop for (sym . plist) in +debugger--realgud-alist @@ -49,7 +49,7 @@ for what debugger to use. If the prefix ARG is set, prompt anyway." (unless (fboundp debugger) (user-error "Couldn't find debugger backend %S" debugger)) (setq-local +debugger--last debugger) - (if (assoc debugger dap--debug-template-configurations) + (if (assoc debugger dap-debug-template-configurations) (dap-debug debugger) (call-interactively debugger))) (+debugger/start-last))) From 439fac65d7b9f0b4c11bad024ef8335233d42960 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 25 Nov 2019 20:43:48 -0500 Subject: [PATCH 086/983] editor/evil: evil-respect-visual-line-mode = nil To match vim's behavior. --- modules/editor/evil/config.el | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 9d26bb57d..0296cfab6 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -39,7 +39,6 @@ directives. By default, this only recognizes C directives.") evil-ex-visual-char-range t ; column range for ex commands evil-insert-skip-empty-lines t evil-mode-line-format 'nil - evil-respect-visual-line-mode t ;; more vim-like behavior evil-symbol-word-search t ;; cursor appearance From 2ce2fce377444b6d96f632b23e7d36b7ba9e13d8 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Mon, 25 Nov 2019 21:28:27 -0500 Subject: [PATCH 087/983] Fix grammar --- docs/faq.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/faq.org b/docs/faq.org index d04b0c505..ed45af2ec 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -116,8 +116,8 @@ To paraphrase (and expand upon) a [[https://www.reddit.com/r/emacs/comments/6pa0 you into Doom. + *Doom manages its packages outside of Emacs.* Spacemacs installs (and checks for packages) on startup or on demand. Doom leaves package management to be - done externally, through the ~bin/doom~ script. This allows package management - can be scripted on the command line and enables a number of startup + done externally, through the ~bin/doom~ script. This allows for package + management to be scripted on the command line and enables a number of startup optimizations we wouldn't have otherwise. ** Why such a complicated package management system? From b6a9fcb12bad5f8f4af7c0040f226c64b42c4da0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 27 Nov 2019 22:06:19 -0500 Subject: [PATCH 088/983] lang/org: fix #2117 --- modules/lang/org/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 9f1e7d121..7a9e44920 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -527,7 +527,7 @@ eldoc string." (separator (or separator "/"))) (string-join (cl-loop for part - in (cdr (split-string (substring-no-properties result) separator)) + in (split-string (substring-no-properties result) separator) for n from 0 for face = (nth (% n org-n-level-faces) org-level-faces) collect From b33630057d9725fa68eaa1b70a20f009284588d7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 27 Nov 2019 22:09:55 -0500 Subject: [PATCH 089/983] lang/org: load contrib/journal if +journal --- modules/lang/org/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 7a9e44920..ad64023d0 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -981,6 +981,7 @@ compelling reason, so..." ;;; Custom org modules (if (featurep! +dragndrop) (load! "contrib/dragndrop")) (if (featurep! +ipython) (load! "contrib/ipython")) + (if (featurep! +journal) (load! "contrib/journal")) (if (featurep! +pomodoro) (load! "contrib/pomodoro")) (if (featurep! +present) (load! "contrib/present")) From 9bd8904838b5637c50709b7c091404365f7a7d07 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 27 Nov 2019 23:52:08 -0500 Subject: [PATCH 090/983] lang/org: fix #2119 --- modules/lang/org/contrib/journal.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/contrib/journal.el b/modules/lang/org/contrib/journal.el index 7324073cc..f5855e058 100644 --- a/modules/lang/org/contrib/journal.el +++ b/modules/lang/org/contrib/journal.el @@ -14,4 +14,4 @@ "p" #'org-journal-search-prev) (:map org-journal-mode-map "n" #'org-journal-open-next-entry - "p" #'org-journal-open-previous-entry)) + "p" #'org-journal-open-previous-entry))) From ae80f1f67d1abf4e30b09184465231767082ad36 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 28 Nov 2019 15:32:50 -0500 Subject: [PATCH 091/983] Simplify github issue templates; correct labels If they're too long, people won't read them. If they're too short, people won't know what to do. If there are too many of them, people can't decide which to use. Removed the question template because it's redundant with "open a blank issue". --- .github/ISSUE_TEMPLATE/bug_report.md | 30 +++++++++-------------- .github/ISSUE_TEMPLATE/feature_request.md | 18 +++++++------- .github/ISSUE_TEMPLATE/how_to.md | 20 ++++++--------- .github/ISSUE_TEMPLATE/question.md | 9 ------- 4 files changed, 29 insertions(+), 48 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/question.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 1a70d0fd7..247844e6b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,32 +1,26 @@ --- name: Bug report -about: Something went wrong, please fix it! +about: Doom might be misbehaving labels: is:bug title: "[BUG] " assignees: '' --- **Describe the issue** -Start with a brief 1 or 2 sentence summary of issue. - -Then follow with a longer explanation, if necessary. Here are some suggestions -on what to include: -- What you expected vs what actually happened -- Screenshots/casts of your issue -- A link to your private config -- Labels for any keys you reference (use `SPC h k` to inspect a key) -- Any warnings or errors logged to \*Messages\* (`SPC h e` or `M-x - view-echo-area-messages`). +- What did you expect to happen? +- What actually happened? +- Do you have screenshots/casts of your issue? +- What commands are bound to any keys you've referenced? (use `SPC h k` to + inspect keys) +- Can you include a link to your private config? +- Were any warnings or errors logged to \*Messages\* (`SPC h e` or `M-x + view-echo-area-messages` will open it).
-If available, please a backtrace of the error here.
+Include a backtrace of the error.
 
-To acquire a backtrace, enable `debug-on-error` then recreate the error. Here
-are ways to enable `debug-on-error`:
-- `M-x toggle-debug-on-error`,
-- Start Emacs with `emacs --debug-init`
-- If the error occurred while using `bin/doom`, use the `-d`/`--debug`
-- switches or the `DEBUG` environment variable.
+How to acquire a backtrace:
+https://github.com/hlissner/doom-emacs/blob/develop/docs/getting_started.org#how-to-extract-a-backtrace-from-an-error
 
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index b3b4514c6..7148f9f30 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,22 +1,19 @@ --- name: Feature request -about: Make suggestions for improving Doom Emacs +about: It'd be cool if Doom did/had/would... labels: is:request title: "[REQUEST] " assignees: '' --- **Describe the feature** -Start with a brief 1 or 2 sentence summary of feature. - -Then follow up with an extended explanation, if necessary. Here are some -suggestions on what to include: +- What is your request? - How is it helpful? -- How is the feature used? +- How is it used? - If the feature involves new plugins, include links to them -- iF the feature involves replacement of current functionality, describe how the - new functionality is better. -- If the feature is implemented in another editor Emacs distro: +- If the feature involves replacement of current functionality, how the new + functionality is better? +- If the feature is implemented in another editor or Emacs distro: - Include screenshots or screencasts of it - Include links to its implementation - Include names of commands (and not just the keybinds to invoke them) @@ -25,4 +22,7 @@ suggestions on what to include: **System information**
 Include the output of `M-x doom/info` or `~/.emacs.d/bin/doom info` here.
+
+It's possible Doom already has the feature you're requesting. This will tell me
+why you aren't seeing it.
 
diff --git a/.github/ISSUE_TEMPLATE/how_to.md b/.github/ISSUE_TEMPLATE/how_to.md index 033e31a80..7336a60a5 100644 --- a/.github/ISSUE_TEMPLATE/how_to.md +++ b/.github/ISSUE_TEMPLATE/how_to.md @@ -1,23 +1,19 @@ --- name: How do I... about: How to get Doom/Emacs to behave a certain way -labels: is:howto, status:pending-review +labels: is:question title: "[HOWTO] " assignees: '' --- **What I want to achieve** -Start with a brief 1 or 2 sentence summary of what you're trying to achieve. - -Follow up with an expanded explanation, if necessary. A few suggestions of what -you could include are: -- Code or steps you've tried that did not yield the results you wanted. -- Screenshots/casts of a proposed workflow in another editor or Emacs distro, -- Additional material or links to resources that could help clarify what you are - trying to do. -- A link to your private config, if available. -- The names of commands available in other Emacs distros (rather than just the - keybinds that invoke them). +- What are you trying to achieve? +- What have you tried? +- Do you have screenshots/casts of this workflow in another editor or Emacs + distro? (If possible, include names of specific commands or functions from + other editors/kemacs distros) +- Do you have extra material or links to resources that could help clarify what + you are trying to do? **System information** diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 0853f526f..000000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: Question -about: A question about the project or maintainer -labels: is:question, status:pending-review -title: "[QUESTION] " -assignees: '' ---- - -What would you like to know? From 8f77c41a488aa0de4858bb8d6eb0ba2262a1cd7f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 28 Nov 2019 15:35:30 -0500 Subject: [PATCH 092/983] font-use-system-font = t if no font is set --- core/core-ui.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core-ui.el b/core/core-ui.el index 9d2549f18..9f667d7aa 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -526,7 +526,8 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.") default-frame-alist :key #'car :test #'eq)) ((display-graphic-p) - (setq doom-font (face-attribute 'default :font))))) + (setq font-use-system-font t + doom-font (face-attribute 'default :font))))) (defun doom-init-extra-fonts-h (&optional frame) "Loads `doom-variable-pitch-font',`doom-serif-font' and `doom-unicode-font'." From f9591472185f256f29cb9e688a4cdfcf90f1dbda Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 28 Nov 2019 15:36:07 -0500 Subject: [PATCH 093/983] Reset projectile-use-git-grep Other search engines are no longer our responsibility. --- core/core-projects.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/core-projects.el b/core/core-projects.el index 3f655e657..fad112f82 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -38,8 +38,7 @@ Emacs.") projectile-ignored-projects '("~/" "/tmp") projectile-kill-buffers-filter 'kill-only-files projectile-files-cache-expire 604800 ; expire after a week - projectile-sort-order 'recentf - projectile-use-git-grep t) ; use git-grep for text searches + projectile-sort-order 'recentf) (global-set-key [remap evil-jump-to-tag] #'projectile-find-tag) (global-set-key [remap find-tag] #'projectile-find-tag) From 4fed5e7eb3d9f7c4135c4b730459f393b5fcbbf8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 28 Nov 2019 19:56:05 -0500 Subject: [PATCH 094/983] Fix doom/kill-buried-buffers deleting windows --- core/autoload/buffers.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/autoload/buffers.el b/core/autoload/buffers.el index 4f355417a..65c094eb2 100644 --- a/core/autoload/buffers.el +++ b/core/autoload/buffers.el @@ -340,7 +340,11 @@ current project." (list (doom-buried-buffers (if current-prefix-arg (doom-project-buffer-list))) t)) - (doom/kill-all-buffers buffer-list interactive)) + (mapc #'kill-buffer buffer-list) + (when interactive + (message "Killed %s buried buffers" + (- (length buffer-list) + (length (cl-remove-if-not #'buffer-live-p buffer-list)))))) ;;;###autoload (defun doom/kill-project-buffers (project &optional interactive) From c69a85c8030a5c2f3cd98b7b00f244a963447c59 Mon Sep 17 00:00:00 2001 From: Julian DeMille <8127111+juliandemille@users.noreply.github.com> Date: Thu, 28 Nov 2019 21:48:26 -0500 Subject: [PATCH 095/983] Add LSP support to Kotlin `lsp-mode` has built in support for Kotlin. This makes it automatically used if you use the `+lsp` flag. --- modules/lang/kotlin/config.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/lang/kotlin/config.el b/modules/lang/kotlin/config.el index 06a1588b8..a78cb85c6 100644 --- a/modules/lang/kotlin/config.el +++ b/modules/lang/kotlin/config.el @@ -1,5 +1,10 @@ ;;; lang/kotlin/config.el -*- lexical-binding: t; -*- +(use-package! kotlin-mode + :init + (when (featurep! +lsp) + (add-hook 'kotlin-mode-local-vars-hook #'lsp!))) + (after! kotlin-mode (set-docsets! 'kotlin-mode "Kotlin") From 591d8d8e56196af9a18c914c8e9dcc19eae2aa7b Mon Sep 17 00:00:00 2001 From: Julian DeMille <8127111+juliandemille@users.noreply.github.com> Date: Thu, 28 Nov 2019 21:52:58 -0500 Subject: [PATCH 096/983] Fix location of lsp hook in kotlin/config.el --- modules/lang/kotlin/config.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/lang/kotlin/config.el b/modules/lang/kotlin/config.el index a78cb85c6..fb26af8fc 100644 --- a/modules/lang/kotlin/config.el +++ b/modules/lang/kotlin/config.el @@ -1,11 +1,8 @@ ;;; lang/kotlin/config.el -*- lexical-binding: t; -*- -(use-package! kotlin-mode - :init - (when (featurep! +lsp) - (add-hook 'kotlin-mode-local-vars-hook #'lsp!))) - (after! kotlin-mode + (when (featurep! +lsp) + (add-hook 'kotlin-mode-local-vars-hook #'lsp!)) (set-docsets! 'kotlin-mode "Kotlin") (map! :map kotlin-mode-map From e799022a1e9babb2683f47463f2bf65312c7c790 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 28 Nov 2019 21:53:12 -0500 Subject: [PATCH 097/983] lang/org: fix 'wrong-number-of-arguments quote 3' error --- modules/lang/org/contrib/journal.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/lang/org/contrib/journal.el b/modules/lang/org/contrib/journal.el index f5855e058..f7bc10502 100644 --- a/modules/lang/org/contrib/journal.el +++ b/modules/lang/org/contrib/journal.el @@ -7,8 +7,7 @@ (expand-file-name "\\(?1:[0-9]\\{4\\}\\)\\(?2:[0-9][0-9]\\)\\(?3:[0-9][0-9]\\)\\'" org-journal-dir)) - (map! :map org-mode-map - :localleader + (map! :localleader (:map org-journal-search-mode-map "n" #'org-journal-search-next "p" #'org-journal-search-prev) From 3fb52110a4102ca61dcbf02f874392493d704125 Mon Sep 17 00:00:00 2001 From: Julian DeMille <8127111+juliandemille@users.noreply.github.com> Date: Thu, 28 Nov 2019 21:53:46 -0500 Subject: [PATCH 098/983] Add LSP check to kotlin/doctor.el --- modules/lang/kotlin/doctor.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/lang/kotlin/doctor.el b/modules/lang/kotlin/doctor.el index 63eabc017..3e8451a82 100644 --- a/modules/lang/kotlin/doctor.el +++ b/modules/lang/kotlin/doctor.el @@ -2,3 +2,7 @@ (unless (executable-find "ktlint") (warn! "ktlint not found. flycheck-kotlin won't work.")) + +(assert! (or (not (featurep! +lsp)) + (featurep! :tools lsp)) + "This module requires (:tools lsp)") From 4337ce3a256a4805d57d57cab069ccdee145a46e Mon Sep 17 00:00:00 2001 From: Julian DeMille <8127111+juliandemille@users.noreply.github.com> Date: Thu, 28 Nov 2019 21:54:59 -0500 Subject: [PATCH 099/983] Add +lsp to kotlin in index.org --- docs/index.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.org b/docs/index.org index d51c59518..52e25ff7b 100644 --- a/docs/index.org +++ b/docs/index.org @@ -188,7 +188,7 @@ Modules that bring support for a language or group of languages to Emacs. + java =+meghanada +lsp= - TODO + [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - JavaScript, TypeScript, and CoffeeScript support + julia - TODO -+ kotlin - TODO ++ kotlin =+lsp+= - TODO + [[file:../modules/lang/latex/README.org][latex]] - TODO + lean - TODO + [[file:../modules/lang/ledger/README.org][ledger]] - TODO From ba2e7836ab5813a1895718ecefb2961b90a30017 Mon Sep 17 00:00:00 2001 From: Yiming Chen Date: Sat, 30 Nov 2019 22:00:24 +0800 Subject: [PATCH 100/983] email/mu4e: add featurep check for workspaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - if module workspaces is not used, an error would be raised when calling =mu4e `=mu4e: Symbol’s function definition is void: +workspace-switch` - if module workspaces is not used, an error would be raised when quiting mu4e `=mu4e: Symbol’s function definition is void: +workspace/delete` --- modules/email/mu4e/autoload/email.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/email/mu4e/autoload/email.el b/modules/email/mu4e/autoload/email.el index 1fb11cf76..d8ed1d87d 100644 --- a/modules/email/mu4e/autoload/email.el +++ b/modules/email/mu4e/autoload/email.el @@ -52,7 +52,8 @@ default/fallback account." "Start email client." (interactive) (require 'mu4e) - (+workspace-switch +mu4e-workspace-name t) + (if (featurep :ui 'workspaces) + (+workspace-switch +mu4e-workspace-name t)) (mu4e~start 'mu4e~main-view) ;; (save-selected-window ;; (prolusion-mail-show)) @@ -74,5 +75,6 @@ default/fallback account." (defun +mu4e-kill-mu4e-h () ;; (prolusion-mail-hide) - (when (+workspace-exists-p +mu4e-workspace-name) + (when (and (featurep :ui 'workspaces) + (+workspace-exists-p +mu4e-workspace-name)) (+workspace/delete +mu4e-workspace-name))) From 93205d4401745f1f8cb856bbd832cce30318bdbc Mon Sep 17 00:00:00 2001 From: Yiming Chen Date: Sat, 30 Nov 2019 22:26:27 +0800 Subject: [PATCH 101/983] email/mu4e: fix refile target - before this change: refile would use mu4e-trash-folder as the target - after this change: refile would use mu4e-refile-folder as expected --- modules/email/mu4e/config.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/email/mu4e/config.el b/modules/email/mu4e/config.el index 870a5348e..1a4adb51f 100644 --- a/modules/email/mu4e/config.el +++ b/modules/email/mu4e/config.el @@ -166,9 +166,9 @@ :action #'+mu4e--mark-seen) ;; Refile will be my "archive" function. (alist-get 'refile mu4e-marks) - (list :char '("d" . "▼") - :prompt "dtrash" - :dyn-target (lambda (_target msg) (mu4e-get-trash-folder msg)) + (list :char '("r" . "▼") + :prompt "rrefile" + :dyn-target (lambda (_target msg) (mu4e-get-refile-folder msg)) :action #'+mu4e--mark-seen)) ;; This hook correctly modifies gmail flags on emails when they are marked. From ae5a18c364ca2eb6994fcfc61f1267090c0ccda2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 29 Nov 2019 21:54:51 -0500 Subject: [PATCH 102/983] lang/org: respect org-agenda-sticky And remove remappings of org-agenda-{q,Q}uit to org-agenda-exit --- modules/lang/org/config.el | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index ad64023d0..04d124f6e 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -547,10 +547,11 @@ eldoc string." "Prevent temporarily-opened agenda buffers from being associated with the current workspace (and clean them up)." (when (and org-agenda-new-buffers (bound-and-true-p persp-mode)) - (let (persp-autokill-buffer-on-remove) - (persp-remove-buffer org-agenda-new-buffers - (get-current-persp) - nil)) + (unless org-agenda-sticky + (let (persp-autokill-buffer-on-remove) + (persp-remove-buffer org-agenda-new-buffers + (get-current-persp) + nil))) (dolist (buffer org-agenda-new-buffers) (with-current-buffer buffer ;; HACK Org agenda opens temporary agenda incomplete org-mode @@ -689,10 +690,6 @@ between the two." "r" #'org-refile)) ; to all `org-refile-targets' (map! :after org-agenda - :map org-agenda-mode-map - ;; Always clean up after itself - [remap org-agenda-quit] #'org-agenda-exit - [remap org-agenda-Quit] #'org-agenda-exit :localleader "d" #'org-agenda-deadline (:prefix ("c" . "clock") From 19e4c42adc700d0b3a169a48355e6d3188e40368 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 29 Nov 2019 21:55:18 -0500 Subject: [PATCH 103/983] lang/org: org-tags-column = 0 --- modules/lang/org/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 04d124f6e..7c30cdc1a 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -111,7 +111,7 @@ path too.") (?B . warning) (?C . success)) org-startup-indented t - org-tags-column -80 + org-tags-column 0 org-use-sub-superscripts '{}) (setq org-refile-targets From b0734aa61cc59995bc172fd76b5ae597a6aa67a3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 30 Nov 2019 14:05:37 -0500 Subject: [PATCH 104/983] lang/org: fix 'void-function t' error running shell links --- modules/lang/org/config.el | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 7c30cdc1a..53abfaee2 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -188,7 +188,6 @@ background (and foreground) match the current theme." ;; You don't need my permission (just be careful, mkay?) org-confirm-babel-evaluate nil org-link-elisp-confirm-function nil - org-link-shell-confirm-function t ; except you, too dangerous ;; Show src buffer in popup, and don't monopolize the frame org-src-window-setup 'other-window) From 5baa1eb631af82a287b3d44716a7b3a186e5f073 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 30 Nov 2019 14:45:41 -0500 Subject: [PATCH 105/983] lang/org: fix non-prefix-key SPC errors on org-agenda --- modules/lang/org/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 53abfaee2..9388779e1 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -689,6 +689,7 @@ between the two." "r" #'org-refile)) ; to all `org-refile-targets' (map! :after org-agenda + :map org-agenda-mode-map :localleader "d" #'org-agenda-deadline (:prefix ("c" . "clock") From 4126d3be81ca93324165dee03075de4ec0047d58 Mon Sep 17 00:00:00 2001 From: Yiming Chen Date: Sun, 1 Dec 2019 09:30:03 +0800 Subject: [PATCH 106/983] email/mu4e: delete other windows when opening mu4e --- modules/email/mu4e/autoload/email.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/email/mu4e/autoload/email.el b/modules/email/mu4e/autoload/email.el index d8ed1d87d..171e989a1 100644 --- a/modules/email/mu4e/autoload/email.el +++ b/modules/email/mu4e/autoload/email.el @@ -54,6 +54,8 @@ default/fallback account." (require 'mu4e) (if (featurep :ui 'workspaces) (+workspace-switch +mu4e-workspace-name t)) + (delete-other-windows) + (switch-to-buffer (doom-fallback-buffer)) (mu4e~start 'mu4e~main-view) ;; (save-selected-window ;; (prolusion-mail-show)) From a7eef56b9d3b2a77fc83b2194bd8f19baaad8588 Mon Sep 17 00:00:00 2001 From: Yiming Chen Date: Sun, 1 Dec 2019 09:30:33 +0800 Subject: [PATCH 107/983] email/mu4e: restore window config when mu4e quit - see https://github.com/hlissner/doom-emacs/pull/2123#issuecomment-560010891 --- modules/email/mu4e/autoload/email.el | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/email/mu4e/autoload/email.el b/modules/email/mu4e/autoload/email.el index 171e989a1..ebd81aa61 100644 --- a/modules/email/mu4e/autoload/email.el +++ b/modules/email/mu4e/autoload/email.el @@ -44,6 +44,7 @@ default/fallback account." (defvar +mu4e-workspace-name "*mu4e*" "TODO") +(defvar +mu4e--old-wconf nil) (add-hook 'mu4e-main-mode-hook #'+mu4e-init-h) @@ -53,7 +54,8 @@ default/fallback account." (interactive) (require 'mu4e) (if (featurep :ui 'workspaces) - (+workspace-switch +mu4e-workspace-name t)) + (+workspace-switch +mu4e-workspace-name t) + (setq +mu4e--old-wconf (current-window-configuration))) (delete-other-windows) (switch-to-buffer (doom-fallback-buffer)) (mu4e~start 'mu4e~main-view) @@ -77,6 +79,10 @@ default/fallback account." (defun +mu4e-kill-mu4e-h () ;; (prolusion-mail-hide) - (when (and (featurep :ui 'workspaces) - (+workspace-exists-p +mu4e-workspace-name)) - (+workspace/delete +mu4e-workspace-name))) + (cond + ((and (featurep :ui 'workspaces) (+workspace-exists-p +mu4e-workspace-name)) + (+workspace/delete +mu4e-workspace-name)) + + (+mu4e--old-wconf + (set-window-configuration +mu4e--old-wconf) + (setq +mu4e--old-wconf nil)))) From dd004dea79ffb3be7a26585c9bbc529f83b48593 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 1 Dec 2019 15:02:38 +0700 Subject: [PATCH 108/983] Easier creation of named workspaces When a user tries to switch to a named workspace that doesn't exist, creat it, instead of just failing. Signed-off-by: Rudi Grinberg --- modules/ui/workspaces/autoload/workspaces.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/ui/workspaces/autoload/workspaces.el b/modules/ui/workspaces/autoload/workspaces.el index 7821c19af..be87f477a 100644 --- a/modules/ui/workspaces/autoload/workspaces.el +++ b/modules/ui/workspaces/autoload/workspaces.el @@ -318,9 +318,7 @@ end of the workspace list." (error "No workspace at #%s" (1+ index))) (+workspace-switch dest))) ((stringp index) - (unless (member index names) - (error "No workspace named %s" index)) - (+workspace-switch index)) + (+workspace-switch index t)) (t (error "Not a valid index: %s" index))) (unless (called-interactively-p 'interactive) From e16d6a8d7c401fe943c4e5d967548c8e9a9ed26c Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 1 Dec 2019 14:37:17 +0700 Subject: [PATCH 109/983] Add evil-quick-diff This introduces the `g o d` text object for comparing regions. It works like evil-exchange. Select two regions in sequence with `g o d` and an ediff buffer of the selections will pop up. Signed-off-by: Rudi Grinberg --- modules/editor/evil/README.org | 1 + modules/editor/evil/config.el | 2 ++ modules/editor/evil/packages.el | 1 + 3 files changed, 4 insertions(+) diff --git a/modules/editor/evil/README.org b/modules/editor/evil/README.org index 5fc532a9f..38563af10 100644 --- a/modules/editor/evil/README.org +++ b/modules/editor/evil/README.org @@ -42,6 +42,7 @@ This holy module brings the vim experience to Emacs. + [[https://github.com/bling/evil-visualstar][evil-visualstar]] + [[https://github.com/ninrod/exato][exato]] + [[https://github.com/emacs-evil/evil-collection][evil-collection]]* ++ [[https://www.github.com/rgrinberg/evil-quick-diff][evil-quick-diff]] ** Hacks + The o/O keys will respect and continue commented lines (can be disabled by diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 0296cfab6..651b823ea 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -283,6 +283,8 @@ directives. By default, this only recognizes C directives.") (evil-exchange-cancel) t)))) +(use-package! evil-quick-diff + :commands (evil-quick-diff evil-quick-diff-cancel)) (use-package! evil-nerd-commenter :commands (evilnc-comment-operator diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index 7e08dfe70..a05949c77 100644 --- a/modules/editor/evil/packages.el +++ b/modules/editor/evil/packages.el @@ -16,6 +16,7 @@ (package! evil-traces) (package! evil-visualstar) (package! exato) +(package! evil-quick-diff :recipe (:host github :repo "rgrinberg/evil-quick-diff")) ;; (when (featurep! +everywhere) From 4b77b413c59dead37cdfafc0ef43d88f68d94c53 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 1 Dec 2019 16:13:40 +0700 Subject: [PATCH 110/983] Add ivy command for workspace switching --- modules/ui/workspaces/autoload/workspaces.el | 31 +++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/modules/ui/workspaces/autoload/workspaces.el b/modules/ui/workspaces/autoload/workspaces.el index be87f477a..438962e14 100644 --- a/modules/ui/workspaces/autoload/workspaces.el +++ b/modules/ui/workspaces/autoload/workspaces.el @@ -299,13 +299,10 @@ workspace, otherwise the new workspace is blank." (+workspace/display))) ((debug error) (+workspace-error (cadr e) t)))) -;;;###autoload -(defun +workspace/switch-to (index) - "Switch to a workspace at a given INDEX. A negative number will start from the -end of the workspace list." - (interactive - (list (or current-prefix-arg - (completing-read "Switch to workspace: " (+workspace-list-names))))) + +(defun +workspace--switch-to (index &optional skip-warnings) + "Generic workspace switching action. It is used by both the ivy and normal +command." (when (and (stringp index) (string-match-p "^[0-9]+$" index)) (setq index (string-to-number index))) @@ -322,11 +319,29 @@ end of the workspace list." (t (error "Not a valid index: %s" index))) (unless (called-interactively-p 'interactive) - (if (equal (+workspace-current-name) old-name) + (if (and (not skip-warnings) (equal (+workspace-current-name) old-name)) (+workspace-message (format "Already in %s" old-name) 'warn) (+workspace/display)))) ('error (+workspace-error (cadr ex) t)))) +;;;###autoload +(defun +ivy/workspace/switch-to () + (interactive) + (ivy-read "Switch to workspace: " + (+workspace-list-names) + :caller #'+ivy/workspace/switch-to + :preselect (+workspace-current-name) + :action (lambda (w) (+workspace--switch-to w t)))) + +;;;###autoload +(defun +workspace/switch-to (index) + "Switch to a workspace at a given INDEX. A negative number will start from the +end of the workspace list." + (interactive + (list (or current-prefix-arg + (completing-read "Switch to workspace: " (+workspace-list-names))))) + (+workspace/switch-to index)) + ;;;###autoload (dotimes (i 9) (defalias (intern (format "+workspace/switch-to-%d" i)) From 7b7cf327abf789f0396be0b2da47a0612fae05b3 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 1 Dec 2019 16:17:33 +0700 Subject: [PATCH 111/983] Use ivy to switch workspaces when user uses ivy --- modules/config/default/+evil-bindings.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 31ea50ce7..599985089 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -298,7 +298,8 @@ (:when (featurep! :ui workspaces) (:prefix-map ("TAB" . "workspace") :desc "Display tab bar" "TAB" #'+workspace/display - :desc "Switch workspace" "." #'+workspace/switch-to + :desc "Switch workspace" "." + (if (featurep! :completion ivy) #'ivy/workspace/switch-to #'+workspace/switch-to) :desc "Switch to last workspace" "`" #'+workspace/other :desc "New workspace" "n" #'+workspace/new :desc "Load workspace from file" "l" #'+workspace/load From 296d5aed0fb5246dc248703f2da90cde909414a0 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 1 Dec 2019 17:24:47 +0700 Subject: [PATCH 112/983] Fix typo Missing + in function name --- modules/config/default/+evil-bindings.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 599985089..1282622c0 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -299,7 +299,7 @@ (:prefix-map ("TAB" . "workspace") :desc "Display tab bar" "TAB" #'+workspace/display :desc "Switch workspace" "." - (if (featurep! :completion ivy) #'ivy/workspace/switch-to #'+workspace/switch-to) + (if (featurep! :completion ivy) #'+ivy/workspace/switch-to #'+workspace/switch-to) :desc "Switch to last workspace" "`" #'+workspace/other :desc "New workspace" "n" #'+workspace/new :desc "Load workspace from file" "l" #'+workspace/load From e91dacea2d7b930d912b23458bcf21f974f80fb6 Mon Sep 17 00:00:00 2001 From: Gerry Agbobada <10496163+gagbo@users.noreply.github.com> Date: Sun, 1 Dec 2019 20:45:13 +0100 Subject: [PATCH 113/983] Remove envvar setter in golangci-lint checker This allows users to be responsible for their use of the feature. I definitely misread the documentation about the checker. --- modules/lang/go/config.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/lang/go/config.el b/modules/lang/go/config.el index a19bfde14..b5605a83b 100644 --- a/modules/lang/go/config.el +++ b/modules/lang/go/config.el @@ -72,5 +72,4 @@ (use-package! flycheck-golangci-lint :when (featurep! :tools flycheck) - :hook (go-mode . flycheck-golangci-lint-setup) - :config (setenv "GO111MODULE" "on")) + :hook (go-mode . flycheck-golangci-lint-setup)) From bf0efe81ae99a600959e2a47f39617735a35ee14 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 1 Dec 2019 05:07:55 -0500 Subject: [PATCH 114/983] editor/evil: add :l[ine]diff ex command Relevant to #2126 --- modules/editor/evil/+commands.el | 1 + modules/editor/evil/config.el | 2 ++ 2 files changed, 3 insertions(+) diff --git a/modules/editor/evil/+commands.el b/modules/editor/evil/+commands.el index 56f36286b..18124a446 100644 --- a/modules/editor/evil/+commands.el +++ b/modules/editor/evil/+commands.el @@ -14,6 +14,7 @@ (evil-ex-define-cmd "na[rrow]" #'+evil:narrow-buffer) (evil-ex-define-cmd "retab" #'+evil:retab) (evil-ex-define-cmd "rev[erse]" #'+evil:reverse-lines) +(evil-ex-define-cmd "l[ine]diff" #'evil-quick-diff) ;;; External resources ;; TODO (evil-ex-define-cmd "db" #'doom:db) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 651b823ea..ba8064eba 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -283,9 +283,11 @@ directives. By default, this only recognizes C directives.") (evil-exchange-cancel) t)))) + (use-package! evil-quick-diff :commands (evil-quick-diff evil-quick-diff-cancel)) + (use-package! evil-nerd-commenter :commands (evilnc-comment-operator evilnc-inner-comment From 35ce37532b106322c906f1c14f61894abb41938c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 1 Dec 2019 05:10:40 -0500 Subject: [PATCH 115/983] ui/workspaces: merge +ivy/workspace/switch-to into +workspace/switch-to Relevant to #2127 Closes #2130 --- modules/config/default/+evil-bindings.el | 3 +- modules/ui/workspaces/autoload/workspaces.el | 36 +++++++------------- 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 1282622c0..31ea50ce7 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -298,8 +298,7 @@ (:when (featurep! :ui workspaces) (:prefix-map ("TAB" . "workspace") :desc "Display tab bar" "TAB" #'+workspace/display - :desc "Switch workspace" "." - (if (featurep! :completion ivy) #'+ivy/workspace/switch-to #'+workspace/switch-to) + :desc "Switch workspace" "." #'+workspace/switch-to :desc "Switch to last workspace" "`" #'+workspace/other :desc "New workspace" "n" #'+workspace/new :desc "Load workspace from file" "l" #'+workspace/load diff --git a/modules/ui/workspaces/autoload/workspaces.el b/modules/ui/workspaces/autoload/workspaces.el index 438962e14..349c6ddfd 100644 --- a/modules/ui/workspaces/autoload/workspaces.el +++ b/modules/ui/workspaces/autoload/workspaces.el @@ -299,10 +299,18 @@ workspace, otherwise the new workspace is blank." (+workspace/display))) ((debug error) (+workspace-error (cadr e) t)))) - -(defun +workspace--switch-to (index &optional skip-warnings) - "Generic workspace switching action. It is used by both the ivy and normal -command." +;;;###autoload +(defun +workspace/switch-to (index) + "Switch to a workspace at a given INDEX. A negative number will start from the +end of the workspace list." + (interactive + (list (or current-prefix-arg + (if (featurep! :completion ivy) + (ivy-read "Switch to workspace: " + (+workspace-list-names) + :caller #'+workspace/switch-to + :preselect (+workspace-current-name)) + (completing-read "Switch to workspace: " (+workspace-list-names)))))) (when (and (stringp index) (string-match-p "^[0-9]+$" index)) (setq index (string-to-number index))) @@ -319,29 +327,11 @@ command." (t (error "Not a valid index: %s" index))) (unless (called-interactively-p 'interactive) - (if (and (not skip-warnings) (equal (+workspace-current-name) old-name)) + (if (equal (+workspace-current-name) old-name) (+workspace-message (format "Already in %s" old-name) 'warn) (+workspace/display)))) ('error (+workspace-error (cadr ex) t)))) -;;;###autoload -(defun +ivy/workspace/switch-to () - (interactive) - (ivy-read "Switch to workspace: " - (+workspace-list-names) - :caller #'+ivy/workspace/switch-to - :preselect (+workspace-current-name) - :action (lambda (w) (+workspace--switch-to w t)))) - -;;;###autoload -(defun +workspace/switch-to (index) - "Switch to a workspace at a given INDEX. A negative number will start from the -end of the workspace list." - (interactive - (list (or current-prefix-arg - (completing-read "Switch to workspace: " (+workspace-list-names))))) - (+workspace/switch-to index)) - ;;;###autoload (dotimes (i 9) (defalias (intern (format "+workspace/switch-to-%d" i)) From 5e4e1d7a79dc2890f24630acdbe1a5ac25c455a9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 1 Dec 2019 05:11:18 -0500 Subject: [PATCH 116/983] Move SPC n {n,N} to SPC n {f,F}; add SPC n o - For consistency with out find-file commands in other prefixes - 'SPC n n' -> 'SPC n f' - 'SPC n N' -> 'SPC n F' - New keybinds - 'SPC n n' = +default/org-notes-headlings (search headings in org-agenda-files) - 'SPC n o' = org-clock-goto --- modules/config/default/+evil-bindings.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 31ea50ce7..8d3dfb855 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -458,11 +458,12 @@ :desc "Org agenda" "a" #'org-agenda :desc "Org capture" "c" #'org-capture :desc "Open deft" "d" #'deft - :desc "Search org agenda headlines" "h" #'+default/org-notes-headlines + :desc "Find file in notes" "f" #'+default/find-in-notes + :desc "Browse notes" "F" #'+default/browse-notes :desc "Org store link" "l" #'org-store-link + :desc "Search org agenda headlines" "n" #'+default/org-notes-headlines :desc "Tags search" "m" #'org-tags-view - :desc "Find file in notes" "n" #'+default/find-in-notes - :desc "Browse notes" "N" #'+default/browse-notes + :desc "Active org-clock" "o" #'org-clock-goto :desc "Todo list" "t" #'org-todo-list :desc "Search notes" "s" #'+default/org-notes-search :desc "View search" "v" #'org-search-view From c7a6cf8403147348a4e7164110fc6aace0a985a3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 1 Dec 2019 05:13:10 -0500 Subject: [PATCH 117/983] lang/haskell: change default to +dante #2121 --- docs/index.org | 2 +- init.example.el | 2 +- modules/lang/haskell/README.org | 60 ++++++++++++++++----------------- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/docs/index.org b/docs/index.org index 52e25ff7b..190483268 100644 --- a/docs/index.org +++ b/docs/index.org @@ -182,7 +182,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/faust/README.org][faust]] - TODO + [[file:../modules/lang/fsharp/README.org][fsharp]] - TODO + [[file:../modules/lang/go/README.org][go]] =+lsp= - TODO -+ [[file:../modules/lang/haskell/README.org][haskell]] =+intero +dante +lsp= - TODO ++ [[file:../modules/lang/haskell/README.org][haskell]] =+dante +intero +lsp= - TODO + hy - TODO + [[file:../modules/lang/idris/README.org][idris]] - TODO + java =+meghanada +lsp= - TODO diff --git a/init.example.el b/init.example.el index 8f4723917..609e159a1 100644 --- a/init.example.el +++ b/init.example.el @@ -112,7 +112,7 @@ ;;faust ; dsp, but you get to keep your soul ;;fsharp ; ML stands for Microsoft's Language ;;go ; the hipster dialect - ;;(haskell +intero) ; a language that's lazier than I am + ;;(haskell +dante) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python ;;idris ; ;;(java +meghanada) ; the poster child for carpal tunnel syndrome diff --git a/modules/lang/haskell/README.org b/modules/lang/haskell/README.org index 9f160ca88..d2cd8d55d 100644 --- a/modules/lang/haskell/README.org +++ b/modules/lang/haskell/README.org @@ -9,17 +9,17 @@ - [[#module-flags][Module Flags]] - [[#plugins][Plugins]] - [[#prerequisites][Prerequisites]] - - [[#stack][Stack]] - [[#cabal][Cabal]] - [[#lsp][LSP]] + - [[#stack][Stack]] - [[#haskell-packages][Haskell packages]] - [[#configuration][Configuration]] - [[#using-the-new-style-cabal-repl][Using the new-style cabal REPL]] - [[#troubleshooting][Troubleshooting]] * Description -This module adds [[https://www.haskell.org/][Haskell]] support, powered by either [[https://haskell-lang.org/intero][intero]] (the default), [[https://github.com/jyp/dante][dante]] -or [[https://github.com/emacs-lsp/lsp-haskell][LSP]]. +This module adds [[https://www.haskell.org/][Haskell]] support, powered by either [[https://github.com/jyp/dante][dante]] (the default), LSP or +[[https://haskell-lang.org/intero][intero]]. + Code completion (~company-ghc~) + Look up documentation (~hoogle~) @@ -38,54 +38,32 @@ Here are a few resources I've found indespensible in my Haskell adventures: + [[https://docs.haskellstack.org/en/stable/README/][The Haskell Tool Stack docs]] ** Module Flags -+ =+intero= Enables intero; a comprehensive, stack-based development environment - for Haskell. + =+dante= Enables dante; a fork of intero aimed at lightweightedness. It doesn't depend on =stack=, supports both ~cabal~-only and ~stack~ projects, but lacks eldoc support. + =+lsp= Enables lsp-haskell (this requires the ~:tools lsp~ to be enabled). ++ =+intero= (Deprecated) Enables intero; a comprehensive, stack-based + development environment for Haskell. ** Plugins + [[https://github.com/haskell/haskell-mode][haskell-mode]] + =+dante= + [[https://github.com/jyp/dante][dante]] + [[https://github.com/jyp/attrap][attrap]] -+ =+intero= - + [[https://github.com/chrisdone/intero][intero]] + =+lsp= + [[https://github.com/emacs-lsp/lsp-haskell][lsp-haskell]] ++ =+intero= + + [[https://github.com/chrisdone/intero][intero]] * Prerequisites Depending on whether you use Intero, Dante or LSP, your dependencies will differ: -+ Intero and LSP users need =stack= + Dante users need =cabal=, =ghc= and =ghc-mod= + LSP users need the =haskell-ide-engine= LSP server ++ Intero and LSP users need =stack= + All users will need the =hoogle= package -** Stack -To use Intero, you need =stack=: - -*** MacOS -#+BEGIN_SRC sh -brew install haskell-stack -stack setup -#+END_SRC -*** Arch Linux -#+BEGIN_SRC sh -sudo pacman -S stack -# Replace pacaur with your AUR package manager of choice -pacaur -S ncurses5-compat-lib -stack setup -#+END_SRC - -*** openSUSE -#+BEGIN_SRC sh :dir /sudo:: -sudo zypper install stack -stack setup -#+END_SRC - ** Cabal To use Dante, you need =cabal= (the haskell package builder) and =ghci= (the compiler, syntax checker & repl): @@ -127,6 +105,28 @@ make yay -S haskell-ide-engine-git #+END_SRC +** Stack +To use Intero or LSP, you need =stack=: + +*** MacOS +#+BEGIN_SRC sh +brew install haskell-stack +stack setup +#+END_SRC +*** Arch Linux +#+BEGIN_SRC sh +sudo pacman -S stack +# Replace pacaur with your AUR package manager of choice +pacaur -S ncurses5-compat-lib +stack setup +#+END_SRC + +*** openSUSE +#+BEGIN_SRC sh :dir /sudo:: +sudo zypper install stack +stack setup +#+END_SRC + ** Haskell packages You'll need to install the following packages using ~stack~ or ~cabal~: From 3743bc70ab227b90bb0b48b5d7aa04ed8f519075 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 1 Dec 2019 05:13:54 -0500 Subject: [PATCH 118/983] tools/direnv: fix async-shell-command --- modules/tools/direnv/config.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/tools/direnv/config.el b/modules/tools/direnv/config.el index cb05ee4b9..ae6ef6e3e 100644 --- a/modules/tools/direnv/config.el +++ b/modules/tools/direnv/config.el @@ -54,4 +54,16 @@ flycheck issues with direnv and on nix." (funcall orig-fn)) (doom-log "Couldn't find direnv executable"))) + (defadvice! +direnv-update-async-shell-command-a (command &optional output-buffer _error-buffer) + :before #'shell-command + (when (string-match "[ \t]*&[ \t]*\\'" command) + (let ((environment process-environment) + (path exec-path) + (shell shell-file-name)) + (with-current-buffer + (get-buffer-create (or output-buffer "*Async Shell Command*")) + (setq-local process-environment environment) + (setq-local exec-path path) + (setq-local shell-file-name shell))))) + (direnv-mode +1)) From 2326379d688eed92c91c7ba0215ea89969a4d944 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 1 Dec 2019 05:14:16 -0500 Subject: [PATCH 119/983] ui/doom: swap bg for doom-{snazzy,spacegrey,tomorrow-night} --- modules/ui/doom/config.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index f95c73a0d..4856584eb 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -10,11 +10,12 @@ (doom-one . t) (doom-one-light . t) (doom-opera . t) + (doom-snazzy . t) (doom-solarized-dark . t) (doom-solarized-light) - (doom-spacegrey) + (doom-spacegrey . t) (doom-vibrant) - (doom-tomorrow-night)) + (doom-tomorrow-night . t)) "An alist of themes that support `solaire-mode'. If CDR is t, then `solaire-mode-swap-bg' will be used automatically, when the theme is loaded.") From f6a10f1268f72197c3e4e52b4f924e891907649d Mon Sep 17 00:00:00 2001 From: Yiming Chen Date: Mon, 2 Dec 2019 08:20:57 +0800 Subject: [PATCH 120/983] email/mu4e: avoid delete-other-windows twice - `+workspace-switch` already does this for us - see also https://github.com/hlissner/doom-emacs/pull/2123#discussion_r352371828 --- modules/email/mu4e/autoload/email.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/email/mu4e/autoload/email.el b/modules/email/mu4e/autoload/email.el index ebd81aa61..b5cef3f8c 100644 --- a/modules/email/mu4e/autoload/email.el +++ b/modules/email/mu4e/autoload/email.el @@ -55,9 +55,9 @@ default/fallback account." (require 'mu4e) (if (featurep :ui 'workspaces) (+workspace-switch +mu4e-workspace-name t) - (setq +mu4e--old-wconf (current-window-configuration))) - (delete-other-windows) - (switch-to-buffer (doom-fallback-buffer)) + (setq +mu4e--old-wconf (current-window-configuration)) + (delete-other-windows) + (switch-to-buffer (doom-fallback-buffer))) (mu4e~start 'mu4e~main-view) ;; (save-selected-window ;; (prolusion-mail-show)) From 199a6fab7989571a607fb534449f48be3d2ce7fa Mon Sep 17 00:00:00 2001 From: Brian Wignall Date: Sun, 1 Dec 2019 22:31:19 -0500 Subject: [PATCH 121/983] Fix typos --- init.example.el | 2 +- modules/config/default/config.el | 2 +- modules/editor/evil/autoload/ex.el | 2 +- modules/lang/haskell/+dante.el | 2 +- modules/lang/haskell/README.org | 2 +- modules/lang/org/README.org | 2 +- modules/ui/unicode/autoload.el | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/init.example.el b/init.example.el index 609e159a1..14b0990a8 100644 --- a/init.example.el +++ b/init.example.el @@ -78,7 +78,7 @@ ;;ein ; tame Jupyter notebooks with emacs (eval +overlay) ; run code, run (also, repls) flycheck ; tasing you for every semicolon you forget - ;;flyspell ; tasing you for misspelling mispelling + ;;flyspell ; tasing you for misspelling misspelling ;;gist ; interacting with github gists (lookup ; helps you navigate your code and documentation +docsets) ; ...or in Dash docsets locally diff --git a/modules/config/default/config.el b/modules/config/default/config.el index 09bb3127c..41ea8d05c 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -347,7 +347,7 @@ "n" #'doom/help-news ;; replaces `help-with-tutorial', b/c it's less useful than `load-theme' "t" #'load-theme - ;; replaces `finder-by-keyword' b/c not usefull + ;; replaces `finder-by-keyword' b/c not useful "p" #'doom/help-packages ;; replaces `describe-package' b/c redundant w/ `doom/describe-package' "P" #'find-library) diff --git a/modules/editor/evil/autoload/ex.el b/modules/editor/evil/autoload/ex.el index 6ad458106..776b1395e 100644 --- a/modules/editor/evil/autoload/ex.el +++ b/modules/editor/evil/autoload/ex.el @@ -168,7 +168,7 @@ function and open its documentation with `helpful-function'. Otherwise, it will search for it with `apropos'. If QUERY is empty, this runs the equivalent of 'M-x apropos'. If BANG is -non-nil, a search is preformed against Doom's manual (wiht `doom/help-search')." +non-nil, a search is preformed against Doom's manual (with `doom/help-search')." (interactive "") (if bang (doom/help-search query) diff --git a/modules/lang/haskell/+dante.el b/modules/lang/haskell/+dante.el index 801303b9b..c5474bb32 100644 --- a/modules/lang/haskell/+dante.el +++ b/modules/lang/haskell/+dante.el @@ -8,7 +8,7 @@ "+c" "-Wwarn=missing-home-modules" "-fno-diagnostics-show-caret" - ;; neccessary to make attrap-attrap useful: + ;; necessary to make attrap-attrap useful: "-Wall" ;; necessary to make company completion useful: "-fdefer-typed-holes" diff --git a/modules/lang/haskell/README.org b/modules/lang/haskell/README.org index d2cd8d55d..bb4762289 100644 --- a/modules/lang/haskell/README.org +++ b/modules/lang/haskell/README.org @@ -30,7 +30,7 @@ This module adds [[https://www.haskell.org/][Haskell]] support, powered by eithe + [[https://github.com/hlissner/doom-snippets/tree/master/haskell-mode][Snippets]] ** External resources -Here are a few resources I've found indespensible in my Haskell adventures: +Here are a few resources I've found indispensable in my Haskell adventures: + [[http://learnyouahaskell.com/][Learn you a haskell for great good]] + [[http://haskellbook.com/][Haskell Programming from first principles]] diff --git a/modules/lang/org/README.org b/modules/lang/org/README.org index 650e68850..34c06010e 100644 --- a/modules/lang/org/README.org +++ b/modules/lang/org/README.org @@ -127,7 +127,7 @@ https://www.mfoot.com/blog/2015/11/22/literate-emacs-configuration-with-org-mode + Statistics cookies are updated when saving the buffer of exiting insert mode (see ~+org-enable-auto-update-cookies-h~). + Org-protocol has been lazy loaded (see ~+org-init-protocol-lazy-loader-h~); - loaded when the server recieves a request for an org-protocol:// url. + loaded when the server receives a request for an org-protocol:// url. + Babel and babel plugins are now lazy loaded (see ~+org-init-babel-lazy-loader-h~); loaded when a src block is executed. No need to use ~org-babel-do-load-languages~ in your config, just install your babel diff --git a/modules/ui/unicode/autoload.el b/modules/ui/unicode/autoload.el index 279176d97..25f194426 100644 --- a/modules/ui/unicode/autoload.el +++ b/modules/ui/unicode/autoload.el @@ -3,7 +3,7 @@ ;;;###autoload (add-hook! 'doom-init-ui-hook (defun +unicode-init-fonts-h () - "Set up `unicode-fonts' to eventually run; accomodating the daemon, if + "Set up `unicode-fonts' to eventually run; accommodating the daemon, if necessary." (setq-default bidi-display-reordering t doom-unicode-font nil) From 4a0eb58558beb1dd23c15ab26be319f05bb5aa7f Mon Sep 17 00:00:00 2001 From: Brian Wignall Date: Sun, 1 Dec 2019 22:37:36 -0500 Subject: [PATCH 122/983] Fix mis-misspelling --- init.example.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.example.el b/init.example.el index 14b0990a8..609e159a1 100644 --- a/init.example.el +++ b/init.example.el @@ -78,7 +78,7 @@ ;;ein ; tame Jupyter notebooks with emacs (eval +overlay) ; run code, run (also, repls) flycheck ; tasing you for every semicolon you forget - ;;flyspell ; tasing you for misspelling misspelling + ;;flyspell ; tasing you for misspelling mispelling ;;gist ; interacting with github gists (lookup ; helps you navigate your code and documentation +docsets) ; ...or in Dash docsets locally From c2add4a55d58c40a877dfdde3a9d3e562c287c86 Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Mon, 2 Dec 2019 09:07:07 -0500 Subject: [PATCH 123/983] Fix typo --- docs/faq.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/faq.org b/docs/faq.org index ed45af2ec..44c3cee82 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -69,7 +69,7 @@ config for it, you're doomed from the get go. ** Does Doom work on Windows? Windows support is weak and will generally lag behind Linux/MacOS support, so your mileage will vary. However, many have reported success installing Doom -Emacs on Windows (using WSL, WSL2 or scope/chocolatey). You'll find install +Emacs on Windows (using WSL, WSL2 or scoop/chocolatey). You'll find install instructions for Windows in the [[file:getting_started.org::On Windows][Getting Starting guide]]. If you're a Windows user, help us improve our documentation on Windows support! From bf0a797a36f00a4119e69bc4672708367a560691 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 1 Dec 2019 22:57:13 -0500 Subject: [PATCH 124/983] lang/rust: rustic-format-on-save -> rustic-format-trigger The former is deprecated for the latter. --- modules/lang/rust/config.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/lang/rust/config.el b/modules/lang/rust/config.el index b11bab2ee..4ef184795 100644 --- a/modules/lang/rust/config.el +++ b/modules/lang/rust/config.el @@ -11,24 +11,24 @@ :mode ("\\.rs$" . rustic-mode) :commands rustic-run-cargo-command rustic-cargo-outdated :preface - (setq rustic-rls-pkg (if (featurep! +lsp) 'lsp-mode)) + (setq rustic-rls-pkg (if (featurep! +lsp) 'lsp-mode) + ;; `rustic-setup-rls' uses `package-installed-p' to determine if + ;; lsp-mode/elgot are available. This breaks because Doom doesn't use + ;; package.el to begin with (and lazy loads it). This is already handled + ;; by the :tools lsp module, so... + rustic-lsp-setup-p nil) :config (set-docsets! 'rustic-mode "Rust") (setq rustic-indent-method-chain t rustic-flycheck-setup-mode-line-p nil ;; use :editor format instead - rustic-format-on-save nil + rustic-format-trigger nil ;; REVIEW `rust-ordinary-lt-gt-p' is terribly expensive in large rust ;; buffers, so we disable it, but only for evil users, because it ;; affects `forward-sexp' and its ilk. See ;; https://github.com/rust-lang/rust-mode/issues/288. - rustic-match-angle-brackets (not (featurep! :editor evil)) - ;; `rustic-setup-rls' uses `package-installed-p' to determine if - ;; lsp-mode/elgot are available. This breaks because Doom doesn't use - ;; package.el to begin with (and lazy loads it). This is already handled - ;; by the :tools lsp module, so... - rustic-lsp-setup-p nil) + rustic-match-angle-brackets (not (featurep! :editor evil))) (add-hook 'rustic-mode-hook #'rainbow-delimiters-mode) From 5ad4a018b1dd42838d12e51745118224a68312a0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 1 Dec 2019 23:00:05 -0500 Subject: [PATCH 125/983] ui/hl-todo: map keywords to faces, not color strings Future proofs changes the loaded them. --- modules/ui/hl-todo/config.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/ui/hl-todo/config.el b/modules/ui/hl-todo/config.el index 547b54afe..09c793b74 100644 --- a/modules/ui/hl-todo/config.el +++ b/modules/ui/hl-todo/config.el @@ -5,12 +5,12 @@ :config (setq hl-todo-highlight-punctuation ":" hl-todo-keyword-faces - `(("TODO" . ,(face-foreground 'warning)) - ("FIXME" . ,(face-foreground 'error)) - ("HACK" . ,(face-foreground 'font-lock-constant-face)) - ("REVIEW" . ,(face-foreground 'font-lock-keyword-face)) - ("NOTE" . ,(face-foreground 'success)) - ("DEPRECATED" . ,(face-foreground 'font-lock-doc-face)))) + `(("TODO" warning bold) + ("FIXME" error bold) + ("HACK" font-lock-constant-face bold) + ("REVIEW" font-lock-keyword-face bold) + ("NOTE" success bold) + ("DEPRECATED" font-lock-doc-face bold))) ;; Use a more primitive todo-keyword detection method in major modes that ;; don't use/have a valid syntax table entry for comments. From 724bf9aa0860f96afc7a300da2bbaa0650cc9bb5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 2 Dec 2019 16:07:25 -0500 Subject: [PATCH 126/983] Refactor evaluation of doom!'s arguments And update doom!'s docstring --- core/core-modules.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/core/core-modules.el b/core/core-modules.el index ee1ed6b42..8f1985517 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -333,14 +333,15 @@ This value is cached. If REFRESH-P, then don't use the cached value." (defmacro doom! (&rest modules) "Bootstraps DOOM Emacs and its modules. +If the first item in MODULES doesn't satisfy `keywordp', MODULES is evaluated, +otherwise, MODULES is a multiple-property list (a plist where each key can have +multiple, linear values). + The bootstrap process involves making sure the essential directories exist, core packages are installed, `doom-autoload-file' is loaded, `doom-packages-file' cache exists (and is loaded) and, finally, loads your private init.el (which should contain your `doom!' block). -If the cache exists, much of this function isn't run, which substantially -reduces startup time. - The overall load order of Doom is as follows: ~/.emacs.d/init.el @@ -359,9 +360,10 @@ The overall load order of Doom is as follows: Module load order is determined by your `doom!' block. See `doom-modules-dirs' for a list of all recognized module trees. Order defines precedence (from most to least)." - `(let ((modules ',modules)) - (unless (keywordp (car modules)) - (setq modules (eval modules t))) + `(let ((modules + ,@(if (keywordp (car modules)) + (list (list 'quote modules)) + modules))) (unless doom-modules (setq doom-modules (make-hash-table :test 'equal From a0d94e0db780840bc9e1f46facead2efcbacd18a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 2 Dec 2019 16:09:18 -0500 Subject: [PATCH 127/983] cli/upgrade: fix -y/--yes for 'doom upgrade' Otherwise, 'doom upgrade' throws 'Unrecognized switch "-y"' error after updating Doom. --- core/cli/upgrade.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/cli/upgrade.el b/core/cli/upgrade.el index 70dbd54e1..8b7f6ae69 100644 --- a/core/cli/upgrade.el +++ b/core/cli/upgrade.el @@ -16,7 +16,7 @@ following shell commands: (if (delq nil (list (doom-cli-upgrade doom-auto-accept force-p) - (doom-cli-execute "refresh" (if doom-auto-accept '("-y"))) + (doom-cli-execute "refresh") (when (doom-cli-packages-update) (doom-cli-reload-package-autoloads 'force) t))) From 24506f15bfd4966ae7d03bd6070c777fdee418e3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 2 Dec 2019 16:24:02 -0500 Subject: [PATCH 128/983] cli/env: fix doom-env-ignored-vars not being ignored And add HOME to ignored vars. --- core/cli/env.el | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/cli/env.el b/core/cli/env.el index 3cbef1b35..9b28a6804 100644 --- a/core/cli/env.el +++ b/core/cli/env.el @@ -57,20 +57,20 @@ Why this over exec-path-from-shell? ;; Helpers (defvar doom-env-ignored-vars - '("^PWD$" - "^PS1$" - "^R?PROMPT$" - "^DBUS_SESSION_BUS_ADDRESS$" + '("^DBUS_SESSION_BUS_ADDRESS$" "^GPG_AGENT_INFO$" "^GPG_TTY$" - "^TERM$" + "^HOME$" + "^PS1$" + "^PWD$" + "^R?PROMPT$" "^SSH_AGENT_PID$" "^SSH_AUTH_SOCK$" - ;; Doom envvars - "^INSECURE$" - "^DEBUG$" - "^YES$" "^TERM$" + ;; Doom envvars + "^DEBUG$" + "^INSECURE$" + "^YES$" "^__") "Environment variables to not save in `doom-env-file'. @@ -122,7 +122,7 @@ default, on Linux, this is '$SHELL -ic /usr/bin/env'. Variables in ;; user's interactive shell, therefore we just dump ;; `process-environment' to a file. (dolist (env process-environment) - (if (cl-find-if (doom-rpartial #'string-match-p env) + (if (cl-find-if (doom-rpartial #'string-match-p (car (split-string env "="))) doom-env-ignored-vars) (print! (info "Ignoring %s") env) (insert env "\n"))) From 9775939f9d8f1fe26cc5fd807cfcfe83ef1939c2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 2 Dec 2019 16:34:11 -0500 Subject: [PATCH 129/983] lang/rust: fix #2132 Prevents rust-mode from taking over *.rs files. --- modules/lang/rust/config.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/lang/rust/config.el b/modules/lang/rust/config.el index 4ef184795..dcaa14cd2 100644 --- a/modules/lang/rust/config.el +++ b/modules/lang/rust/config.el @@ -56,6 +56,12 @@ (use-package! racer :unless (featurep! +lsp) :hook (rustic-mode . racer-mode) + :init + ;; Fix #2132: `racer' depends on `rust-mode', which tries to modify + ;; `auto-mode-alist'. We make extra sure that doesn't stick, especially when a + ;; buffer is reverted, as it is after rustfmt is done wiht it. + (after! rust-mode + (setq auto-mode-alist (delete '("\\.rs\\'" . rust-mode)) auto-mode-alist)) :config (set-lookup-handlers! 'rustic-mode :definition '(racer-find-definition :async t) From ef4e9b31befe600bb49f1bf7315a80b95a95517d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 2 Dec 2019 19:55:05 -0500 Subject: [PATCH 130/983] lang/org: org-babel-lisp-eval-fn = sly-eval --- modules/lang/org/config.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 9388779e1..7088e4c35 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -189,7 +189,9 @@ background (and foreground) match the current theme." org-confirm-babel-evaluate nil org-link-elisp-confirm-function nil ;; Show src buffer in popup, and don't monopolize the frame - org-src-window-setup 'other-window) + org-src-window-setup 'other-window + ;; Our :lang common-lisp module uses sly, so... + org-babel-lisp-eval-fn #'sly-eval) ;; I prefer C-c C-c over C-c ' (more consistent) (define-key org-src-mode-map (kbd "C-c C-c") #'org-edit-src-exit) From 41e2fb3f76322c22cb37f46c8c1c5649064b3ae6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 2 Dec 2019 20:19:41 -0500 Subject: [PATCH 131/983] Replace doom-large-file-size w/ doom-large-file-size-alist Now you can have major-mode-specific large-filesize thresholds, since not all major modes are created equal. --- core/core-editor.el | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index e98606e5f..e31ed14ec 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -12,11 +12,14 @@ successfully sets indent_style/indent_size.") (defvar-local doom-large-file-p nil) (put 'doom-large-file-p 'permanent-local t) -(defvar doom-large-file-size 1 - "The threshold above which Doom enables emergency optimizations. +(defvar doom-large-file-size-alist '((t . 1.0)) + "An alist mapping major mode to filesize thresholds. -This threshold is in MB. See `doom--optimize-for-large-files-a' for -implementation details.") +If a file is opened and discovered to be larger than the threshold, Doom +performs emergency optimizations to prevent Emacs from hanging, crashing or +becoming unusably slow. + +These thresholds are in MB, and is used by `doom--optimize-for-large-files-a'.") (defvar doom-large-file-excluded-modes '(so-long-mode special-mode archive-mode tar-mode jka-compr @@ -31,7 +34,7 @@ implementation details.") (defadvice! doom--optimize-for-large-files-a (orig-fn &rest args) "Set `doom-large-file-p' if the file is too large. -Uses `doom-large-file-size' to determine when a file is too large. When +Uses `doom-large-file-size-alist' to determine when a file is too large. When `doom-large-file-p' is set, other plugins can detect this and reduce their runtime costs (or disable themselves) to ensure the buffer is as fast as possible." @@ -41,7 +44,9 @@ possible." (not doom-large-file-p) (file-readable-p buffer-file-name) (> (nth 7 (file-attributes buffer-file-name)) - (* 1024 1024 doom-large-file-size)))) + (* 1024 1024 + (cdr (or (assq major-mode doom-large-file-size-alist) + (assq 't doom-large-file-size-alist))))))) (prog1 (apply orig-fn args) (if (memq major-mode doom-large-file-excluded-modes) (setq doom-large-file-p nil) From 3c90c6994b7b1fad0382b8f349cb1726635998a9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 2 Dec 2019 20:20:07 -0500 Subject: [PATCH 132/983] lang/clojure: set large-file-size threshold to 0.5mb --- modules/lang/clojure/config.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/lang/clojure/config.el b/modules/lang/clojure/config.el index ade5c0713..1cc35c480 100644 --- a/modules/lang/clojure/config.el +++ b/modules/lang/clojure/config.el @@ -3,6 +3,10 @@ (after! projectile (pushnew! projectile-project-root-files "project.clj" "build.boot" "deps.edn")) +;; Large clojure buffers tend to be slower than large buffers of other modes, so +;; it should have a lower threshold too. +(add-to-list 'doom-large-file-size-alist '(clojure-mode . 0.5)) + ;; ;;; Packages From 153fbbc466bdebf3eef6798d64448a1df71b08b8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 2 Dec 2019 20:21:41 -0500 Subject: [PATCH 133/983] cli/upgrade: print git fetch log on successful upgrade --- core/cli/upgrade.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/cli/upgrade.el b/core/cli/upgrade.el index 8b7f6ae69..cfdf2d6ee 100644 --- a/core/cli/upgrade.el +++ b/core/cli/upgrade.el @@ -66,10 +66,10 @@ following shell commands: (doom-call-process "git" "remote" "remove" doom-repo-remote) (unwind-protect - (progn + (let (result) (or (zerop (car (doom-call-process "git" "remote" "add" doom-repo-remote doom-repo-url))) (error "Failed to add %s to remotes" doom-repo-remote)) - (or (zerop (car (doom-call-process "git" "fetch" "--tags" doom-repo-remote branch))) + (or (zerop (car (setq result (doom-call-process "git" "fetch" "--tags" doom-repo-remote branch)))) (error "Failed to fetch from upstream")) (let ((this-rev (vc-git--rev-parse "HEAD")) @@ -102,8 +102,9 @@ following shell commands: (print! (start "Upgrading Doom Emacs...")) (print-group! (doom-clean-byte-compiled-files) - (unless (and (zerop (car (doom-call-process "git" "reset" "--hard" target-remote))) - (equal (vc-git--rev-parse "HEAD") new-rev)) + (if (and (zerop (car (doom-call-process "git" "reset" "--hard" target-remote))) + (equal (vc-git--rev-parse "HEAD") new-rev)) + (print! (info "%s") (cdr result)) (error "Failed to check out %s" (substring new-rev 0 10))) (print! (success "Finished upgrading Doom Emacs"))) t))))) From 7cec80e9f109e3612f0e06e245263d38c2b68198 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 2 Dec 2019 20:28:55 -0500 Subject: [PATCH 134/983] lang/org: fix #2117 regression --- modules/lang/org/config.el | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 7088e4c35..0f3a0ba3c 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -524,17 +524,16 @@ conditions where a window's buffer hasn't changed at the time this hook is run." "Remove link syntax and fix variable height text (e.g. org headings) in the eldoc string." :around #'org-format-outline-path - (let ((result (funcall orig-fn path width prefix separator)) - (separator (or separator "/"))) - (string-join - (cl-loop for part - in (split-string (substring-no-properties result) separator) - for n from 0 - for face = (nth (% n org-n-level-faces) org-level-faces) - collect - (org-add-props (replace-regexp-in-string org-link-any-re "\\4" part) - nil 'face `(:foreground ,(face-foreground face nil t) :weight bold))) - separator))) + (funcall orig-fn + (cl-loop for part in path + ;; Remove full link syntax + for part = (replace-regexp-in-string org-link-any-re "\\4" part) + for n from 0 + for face = (nth (% n org-n-level-faces) org-level-faces) + collect + (org-add-props part + nil 'face `(:foreground ,(face-foreground face nil t) :weight bold))) + width prefix separator)) (defun +org--restart-mode-h () "Restart `org-mode', but only once." From f5910caea8399c577be7ca5e45945525a25a5710 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 3 Dec 2019 10:01:16 +0700 Subject: [PATCH 135/983] Add lang/factor module (#2129) Factor is a stack based programming language with an awesome emacs mode. * remove extra layer of nesting for keybinds * use-package! * lazy load fuel * fue listener typo * remove extra space * Add README --- init.example.el | 1 + modules/lang/factor/README.org | 43 ++++++++++++++++++++++++++++++ modules/lang/factor/config.el | 47 +++++++++++++++++++++++++++++++++ modules/lang/factor/packages.el | 4 +++ 4 files changed, 95 insertions(+) create mode 100644 modules/lang/factor/README.org create mode 100644 modules/lang/factor/config.el create mode 100644 modules/lang/factor/packages.el diff --git a/init.example.el b/init.example.el index 609e159a1..52398c67f 100644 --- a/init.example.el +++ b/init.example.el @@ -121,6 +121,7 @@ ;;kotlin ; a better, slicker Java(Script) ;;latex ; writing papers in Emacs has never been so fun ;;lean + ;;factor ;;ledger ; an accounting system in Emacs ;;lua ; one-based indices? one-based indices markdown ; writing docs for people to ignore diff --git a/modules/lang/factor/README.org b/modules/lang/factor/README.org new file mode 100644 index 000000000..e697945dc --- /dev/null +++ b/modules/lang/factor/README.org @@ -0,0 +1,43 @@ +#+TITLE: lang/factor +#+DATE: December 3, 2019 +#+SINCE: v3.0.0 +#+STARTUP: inlineimages + +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] + - [[#hacks][Hacks]] +- [[#prerequisites][Prerequisites]] +- [[#configuration][Configuration]] +- [[#troubleshooting][Troubleshooting]] + +* Description +This module adds support to the [[https://github.com/factor/factor][factor]] programming language and its associated +_fuel_ emacs plugin. + ++ If possible, include a brief list of feature highlights here ++ Like code completion, syntax checking or available snippets ++ Include links to packages & external things where possible + +** Module Flags +This module provides no flags. + +** Plugins +{A list of linked plugins} + +** Hacks +{A list of internal modifications to included packages} + +* Prerequisites +You must install [[https://github.com/factor/factor][factor]] to use the advanced functionality of this module. + +* Configuration +This module requires the installation of factor to be available at +=fuel-factor-root-dir=. Here's an example of how to set it: +#+BEGIN_SRC emacs-lisp +(setq fuel-factor-root-dir "/Applications/factor") +#+END_SRC + +* Troubleshooting +Common issues and their solution, or places to look for help. diff --git a/modules/lang/factor/config.el b/modules/lang/factor/config.el new file mode 100644 index 000000000..738070e37 --- /dev/null +++ b/modules/lang/factor/config.el @@ -0,0 +1,47 @@ +;;; lang/factor/config.el -*- lexical-binding: t; -*- + +(use-package! fuel-mode + :defer t + :init + (set-eval-handler! 'factor-mode #'fuel-eval-region) + (set-repl-handler! 'factor-mode #'run-factor) + :config + (set-lookup-handlers! 'factor-mode + :definition #'fuel-edit-word-at-point + :references #'fuel-show-callers + :documentation #'fuel-help)) + +(map! :after factor-mode + :map factor-mode-map + :localleader + "t" #'fuel-test-vocab + (:prefix ("e" . "eval") + "d" #'fuel-eval-definition + "R" #'fuel-eval-extended-region + "r" #'fuel-eval-region) + (:prefix ("h" . "help") + "p" #'fuel-apropos + "v" #'fuel-show-file-words + "c" #'fuel-show-callees + "e" #'fuel-stack-effect-region) + (:prefix ("s" . "scaffold") + "v" #'fuel-scaffold-vocab + "h" #'fuel-scaffold-help + "t" #'fuel-scaffold-tests) + (:prefix ("r" . "refactor") + "s" #'fuel-refactor-extract-sexp + "w" #'fuel-refactor-extract-region + "v" #'fuel-refactor-extract-vocab + "i" #'fuel-refactor-inline-word + "g" #'fuel-refactor-make-generic + "u" #'fuel-update-usings + "r" #'fuel-refactor-rename-word)) + +(map! :after fuel-listener + :map fuel-listener-mode-map + :localleader + "e" #'fuel-edit-vocabulary + "r" #'fuel-refresh-all + "i" #'fuel-stack-mode + "h" #'fuel-help + "s" #'fuel-scaffold-vocab) diff --git a/modules/lang/factor/packages.el b/modules/lang/factor/packages.el new file mode 100644 index 000000000..50fec36be --- /dev/null +++ b/modules/lang/factor/packages.el @@ -0,0 +1,4 @@ +;; -*- no-byte-compile: t; -*- +;;; lang/factor/packages.el + +(package! fuel) From 7eb4e6348ab3ba5b837dff9bfba142bad0f968d7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 2 Dec 2019 22:05:40 -0500 Subject: [PATCH 136/983] lang/factor: lazy load set-{eval,repl}-handler! calls --- modules/lang/factor/config.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/lang/factor/config.el b/modules/lang/factor/config.el index 738070e37..bf8d725ea 100644 --- a/modules/lang/factor/config.el +++ b/modules/lang/factor/config.el @@ -3,8 +3,9 @@ (use-package! fuel-mode :defer t :init - (set-eval-handler! 'factor-mode #'fuel-eval-region) - (set-repl-handler! 'factor-mode #'run-factor) + (after! factor-mode + (set-eval-handler! 'factor-mode #'fuel-eval-region) + (set-repl-handler! 'factor-mode #'run-factor)) :config (set-lookup-handlers! 'factor-mode :definition #'fuel-edit-word-at-point From 1655524836bb8c23f18e825aca2e3f7c882e4706 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 3 Dec 2019 03:54:29 -0500 Subject: [PATCH 137/983] emacs/dired: don't enable dired-hide-details-mode by default --- modules/emacs/dired/config.el | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index ce251de26..300fef9c0 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -45,9 +45,6 @@ only variant that supports --group-directories-first." "--group-directories-first") " "))))) - ;; hide details by default - (add-hook 'dired-mode-hook 'dired-hide-details-mode) - ;; Don't complain about this command being disabled when we use it (put 'dired-find-alternate-file 'disabled nil) From 0bd0ac4ab9683e3f320bc536aac69cfe62ad20fc Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 3 Dec 2019 23:38:00 +0700 Subject: [PATCH 138/983] Popup rules for more builtin types process, timer, abbreviations, output, occur buffers are all better displayed in a maximized fashion. Otherwise, they aren't really useful. Signed-off-by: Rudi Grinberg --- modules/ui/popup/config.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/ui/popup/config.el b/modules/ui/popup/config.el index f34a49835..22ea2b4fe 100644 --- a/modules/ui/popup/config.el +++ b/modules/ui/popup/config.el @@ -158,6 +158,12 @@ prevent the popup(s) from messing up the UI (or vice versa)." ("^\\*Backtrace" :vslot 99 :size 0.4 :quit nil) ("^\\*CPU-Profiler-Report " :side bottom :vslot 100 :slot 1 :height 0.4 :width 0.5 :quit nil) ("^\\*Memory-Profiler-Report " :side bottom :vslot 100 :slot 2 :height 0.4 :width 0.5 :quit nil) + ("^\\*Proced*" :ignore t) + ("^\\*timer-list*" :ignore t) + ("^\\*Process-List*" :ignore t) + ("^\\*Abbrevs*" :ignore t) + ("^\\*Output*" :ignore t) + ("^\\*Occur*" :ignore t) ("^\\*unsent mail*" :ignore t))) (add-hook 'doom-init-ui-hook #'+popup-mode 'append) From cf02fe5c2ecccee2a868ac75456302a83e938155 Mon Sep 17 00:00:00 2001 From: J Hacksworth Date: Tue, 3 Dec 2019 11:33:18 -0500 Subject: [PATCH 139/983] lang/org: Bind org-agenda-show-and-scroll-up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Default Org binds 'SPC' to `org-agenda-show-and-scroll-up`, which displays the original location of the Agenda item in another window without moving focus from the Agenda window. This is useful to preview items while staying in the Agenda window. Since we can't use 'SPC', bind it to ‘C-SPC’, Doom's canonical "preview" key for helm and ivy. See https://orgmode.org/manual/Agenda-commands.html --- modules/lang/org/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 0f3a0ba3c..d42ea28f4 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -691,6 +691,7 @@ between the two." (map! :after org-agenda :map org-agenda-mode-map + :m "C-SPC" #'org-agenda-show-and-scroll-up :localleader "d" #'org-agenda-deadline (:prefix ("c" . "clock") From ca63b0bbfc1342c7192d601af847eeeb85153c3f Mon Sep 17 00:00:00 2001 From: Yiming Chen Date: Wed, 4 Dec 2019 08:20:17 +0800 Subject: [PATCH 140/983] ui/popup: respect :select nil when reusing a window - before this change: when reusing a window, select option would get ignored - after this change: when reusing a window, select option would be used just as a new popup --- modules/ui/popup/autoload/popup.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ui/popup/autoload/popup.el b/modules/ui/popup/autoload/popup.el index 5979ca636..9d93da4d4 100644 --- a/modules/ui/popup/autoload/popup.el +++ b/modules/ui/popup/autoload/popup.el @@ -189,7 +189,10 @@ and enables `+popup-buffer-mode'." (window (display-buffer-reuse-window buffer alist))) (when window (unless +popup--inhibit-select - (select-window window)) + (let ((select (+popup-parameter 'select window))) + (if (functionp select) + (funcall select window origin) + (select-window (if select window origin))))) window)) (when-let (popup (cl-loop for func in actions if (funcall func buffer alist) From 359ae77250431e868508fcfe8052196ec7f2757e Mon Sep 17 00:00:00 2001 From: Yiming Chen Date: Wed, 4 Dec 2019 08:32:27 +0800 Subject: [PATCH 141/983] ui/popup: extract +popup--maybe-select-window helper function --- modules/ui/popup/autoload/popup.el | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/ui/popup/autoload/popup.el b/modules/ui/popup/autoload/popup.el index 9d93da4d4..b98b55e48 100644 --- a/modules/ui/popup/autoload/popup.el +++ b/modules/ui/popup/autoload/popup.el @@ -132,6 +132,15 @@ the buffer is visible, then set another timer and try again later." (let ((ignore-window-parameters t)) (split-window window size side))) +(defun +popup--maybe-select-window (window) + "Select a window based on `+popup--inhibit-select' and this window's `select' parameter." + (unless +popup--inhibit-select + (let ((origin (selected-window)) + (select (+popup-parameter 'select window))) + (if (functionp select) + (funcall select window origin) + (select-window (if select window origin)))))) + ;;;###autoload (defun +popup--init (window &optional alist) "Initializes a popup window. Run any time a popup is opened. It sets the @@ -179,8 +188,7 @@ and enables `+popup-buffer-mode'." ;;;###autoload (defun +popup-buffer (buffer &optional alist) "Open BUFFER in a popup window. ALIST describes its features." - (let* ((origin (selected-window)) - (window-min-height 3) + (let* ((window-min-height 3) (alist (+popup--normalize-alist alist)) (actions (or (cdr (assq 'actions alist)) +popup-default-display-buffer-actions))) @@ -188,21 +196,13 @@ and enables `+popup-buffer-mode'." (alist (remove (assq 'window-height alist) alist)) (window (display-buffer-reuse-window buffer alist))) (when window - (unless +popup--inhibit-select - (let ((select (+popup-parameter 'select window))) - (if (functionp select) - (funcall select window origin) - (select-window (if select window origin))))) + (+popup--maybe-select-window window) window)) (when-let (popup (cl-loop for func in actions if (funcall func buffer alist) return it)) (+popup--init popup alist) - (unless +popup--inhibit-select - (let ((select (+popup-parameter 'select popup))) - (if (functionp select) - (funcall select popup origin) - (select-window (if select popup origin))))) + (+popup--maybe-select-window popup) popup)))) ;;;###autoload From 79faa02d6b966ee6f03ec4ea710c23b1cc055521 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 3 Dec 2019 19:59:27 -0500 Subject: [PATCH 142/983] Record origin window earlier The selected window could change in between +popup--maybe-select-window calls. --- modules/ui/popup/autoload/popup.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/ui/popup/autoload/popup.el b/modules/ui/popup/autoload/popup.el index b98b55e48..fc945beb4 100644 --- a/modules/ui/popup/autoload/popup.el +++ b/modules/ui/popup/autoload/popup.el @@ -132,11 +132,10 @@ the buffer is visible, then set another timer and try again later." (let ((ignore-window-parameters t)) (split-window window size side))) -(defun +popup--maybe-select-window (window) +(defun +popup--maybe-select-window (window &optional origin) "Select a window based on `+popup--inhibit-select' and this window's `select' parameter." (unless +popup--inhibit-select - (let ((origin (selected-window)) - (select (+popup-parameter 'select window))) + (let ((select (+popup-parameter 'select window))) (if (functionp select) (funcall select window origin) (select-window (if select window origin)))))) @@ -188,7 +187,8 @@ and enables `+popup-buffer-mode'." ;;;###autoload (defun +popup-buffer (buffer &optional alist) "Open BUFFER in a popup window. ALIST describes its features." - (let* ((window-min-height 3) + (let* ((origin (selected-window)) + (window-min-height 3) (alist (+popup--normalize-alist alist)) (actions (or (cdr (assq 'actions alist)) +popup-default-display-buffer-actions))) @@ -196,13 +196,13 @@ and enables `+popup-buffer-mode'." (alist (remove (assq 'window-height alist) alist)) (window (display-buffer-reuse-window buffer alist))) (when window - (+popup--maybe-select-window window) + (+popup--maybe-select-window window origin) window)) (when-let (popup (cl-loop for func in actions if (funcall func buffer alist) return it)) (+popup--init popup alist) - (+popup--maybe-select-window popup) + (+popup--maybe-select-window popup origin) popup)))) ;;;###autoload From bcdb9f583a7c61e95080bc37972b458782d93275 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 3 Dec 2019 20:00:38 -0500 Subject: [PATCH 143/983] Require origin argument If it doesn't satisfy windowp, it'll cause errors. --- modules/ui/popup/autoload/popup.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/popup/autoload/popup.el b/modules/ui/popup/autoload/popup.el index fc945beb4..f658454c3 100644 --- a/modules/ui/popup/autoload/popup.el +++ b/modules/ui/popup/autoload/popup.el @@ -132,7 +132,7 @@ the buffer is visible, then set another timer and try again later." (let ((ignore-window-parameters t)) (split-window window size side))) -(defun +popup--maybe-select-window (window &optional origin) +(defun +popup--maybe-select-window (window origin) "Select a window based on `+popup--inhibit-select' and this window's `select' parameter." (unless +popup--inhibit-select (let ((select (+popup-parameter 'select window))) From 235d31e82ef5962f0625500de067cec57a6922ab Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 3 Dec 2019 14:51:44 -0500 Subject: [PATCH 144/983] Shorten def-package{,-hook}! deprecation warnings --- core/core-modules.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core-modules.el b/core/core-modules.el index 8f1985517..dec2c65c5 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -591,12 +591,12 @@ This is a wrapper around `eval-after-load' that: ;; DEPRECATED (defmacro def-package! (&rest args) (make-obsolete 'def-package! 'use-package! "2.0.9") - (message "`def-package!' is renamed and is now deprecated; use `use-package!' instead") + (message "`def-package!' was renamed to `use-package!'; use that instead.") `(use-package! ,@args)) (defmacro def-package-hook! (&rest args) (make-obsolete 'def-package-hook! 'use-package-hook! "2.0.9") - (message "`def-package-hook!' is renamed and is now deprecated; use `use-package-hook!' instead") + (message "`def-package-hook!' was renamed to `use-package-hook!'; use that instead.") `(use-package-hook! ,@args)) (provide 'core-modules) From e28b4215ec7f6804fced51316a8c7e15832a7c35 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 3 Dec 2019 20:41:17 -0500 Subject: [PATCH 145/983] lang/rust: fix wrong-number-of-args: delete error Reported in hlissner/doom-emacs@9775939 --- modules/lang/rust/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/rust/config.el b/modules/lang/rust/config.el index dcaa14cd2..42d44d98c 100644 --- a/modules/lang/rust/config.el +++ b/modules/lang/rust/config.el @@ -61,7 +61,7 @@ ;; `auto-mode-alist'. We make extra sure that doesn't stick, especially when a ;; buffer is reverted, as it is after rustfmt is done wiht it. (after! rust-mode - (setq auto-mode-alist (delete '("\\.rs\\'" . rust-mode)) auto-mode-alist)) + (setq auto-mode-alist (delete '("\\.rs\\'" . rust-mode) auto-mode-alist))) :config (set-lookup-handlers! 'rustic-mode :definition '(racer-find-definition :async t) From 5213a0b4f1f2186ed8dfc3beb4009764d9c933fe Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 3 Dec 2019 20:42:39 -0500 Subject: [PATCH 146/983] tools/flycheck: fix error list popup rule --- modules/tools/flycheck/config.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/tools/flycheck/config.el b/modules/tools/flycheck/config.el index dc77b4790..060f971cc 100644 --- a/modules/tools/flycheck/config.el +++ b/modules/tools/flycheck/config.el @@ -24,8 +24,7 @@ errors.") ;; Don't commandeer input focus if the error message pops up (happens when ;; tooltips and childframes are disabled). - (after! flycheck - (set-popup-rule! flycheck-error-message-buffer :select nil)) + (set-popup-rule! "^\\*Flycheck error messages\\*" :select nil) (add-hook! 'doom-escape-hook :append (defun +flycheck-buffer-h () From 2c79ab354a069ba4328d1ea287123a1a50db1d45 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 3 Dec 2019 20:42:57 -0500 Subject: [PATCH 147/983] Add evil-numbers inc commands to evil-mc-custom-known-commands --- modules/editor/multiple-cursors/config.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/editor/multiple-cursors/config.el b/modules/editor/multiple-cursors/config.el index c132feba0..128dff885 100644 --- a/modules/editor/multiple-cursors/config.el +++ b/modules/editor/multiple-cursors/config.el @@ -63,7 +63,10 @@ ;; Add `evil-org' support (evil-org-delete . evil-mc-execute-default-evil-delete) (evil-org-delete-char . evil-mc-execute-default-evil-delete) - (evil-org-delete-backward-char . evil-mc-execute-default-evil-delete))) + (evil-org-delete-backward-char . evil-mc-execute-default-evil-delete) + ;; `evil-numbers' + (evil-numbers/inc-at-pt-incremental) + (evil-numbers/dec-at-pt-incremental))) (cl-pushnew `(,(car fn) (:default . ,(or (cdr fn) #'evil-mc-execute-default-call-with-count))) evil-mc-custom-known-commands :test #'eq From 894c4e1855eee67b409357309d316047f0eab0af Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 4 Dec 2019 09:46:27 +0700 Subject: [PATCH 148/983] Fix popup ignore rules * Process Lis is without a space * Escape trailing star * Combine all rules --- modules/ui/popup/config.el | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/ui/popup/config.el b/modules/ui/popup/config.el index 22ea2b4fe..4a6796d89 100644 --- a/modules/ui/popup/config.el +++ b/modules/ui/popup/config.el @@ -158,13 +158,7 @@ prevent the popup(s) from messing up the UI (or vice versa)." ("^\\*Backtrace" :vslot 99 :size 0.4 :quit nil) ("^\\*CPU-Profiler-Report " :side bottom :vslot 100 :slot 1 :height 0.4 :width 0.5 :quit nil) ("^\\*Memory-Profiler-Report " :side bottom :vslot 100 :slot 2 :height 0.4 :width 0.5 :quit nil) - ("^\\*Proced*" :ignore t) - ("^\\*timer-list*" :ignore t) - ("^\\*Process-List*" :ignore t) - ("^\\*Abbrevs*" :ignore t) - ("^\\*Output*" :ignore t) - ("^\\*Occur*" :ignore t) - ("^\\*unsent mail*" :ignore t))) + ("^\\*\\(?:Proced\\|timer-list\\|Process List\\|Abbrevs\\|Output\\|Occur\\|unsent mail\\)\\*" :ignore t))) (add-hook 'doom-init-ui-hook #'+popup-mode 'append) From 7f5f23bdc5048d156ff16d278f600f790f14360c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 3 Dec 2019 22:23:05 -0500 Subject: [PATCH 149/983] completion/ivy: update keybinds in readme --- modules/completion/ivy/README.org | 35 +++++++++++++++++-------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/modules/completion/ivy/README.org b/modules/completion/ivy/README.org index 0bc51166f..b21b92c61 100644 --- a/modules/completion/ivy/README.org +++ b/modules/completion/ivy/README.org @@ -14,7 +14,7 @@ - [[#arch-linux][Arch Linux]] - [[#opensuse][openSUSE]] - [[#features][Features]] - - [[#jump-to-file-project-navigation][Jump-to-file project navigation]] + - [[#jump-to-navigation][Jump-to navigation]] - [[#project-search--replace][Project search & replace]] - [[#in-buffer-searching][In-buffer searching]] - [[#ivy-integration-for-various-completing-commands][Ivy integration for various completing commands]] @@ -88,7 +88,7 @@ sudo zypper install ripgrep Ivy and its ilk are large plugins. Covering everything about them is outside of this documentation's scope, so only Doom-specific Ivy features are listed here: -** Jump-to-file project navigation +** Jump-to navigation Inspired by Sublime Text's jump-to-anywhere, CtrlP/Unite in Vim, and Textmate's Command-T, this module provides similar functionality by bringing ~projectile~ and ~ivy~ together. @@ -99,22 +99,23 @@ https://assets.doomemacs.org/completion/ivy/projectile.png |----------------------+-------------------------------------| | =SPC p f=, =SPC SPC= | Jump to file in project | | =SPC f f=, =SPC .= | Jump to file from current directory | +| =SPC s i= | Jump to symbol in file | ** Project search & replace This module provides interactive text search and replace using ripgrep. -| Keybind | Description | -|-----------+---------------------------------| -| =SPC s b= | Search the current buffer | -| =SPC s p= | Search project | -| =SPC s d= | Search this directory | -| =SPC p t= | List all TODO/FIXMEs in project | +| Keybind | Description | +|-----------+--------------------------| +| =SPC s p= | Search project | +| =SPC s P= | Search another project | +| =SPC s d= | Search this directory | +| =SPC s D= | Search another directory | https://assets.doomemacs.org/completion/ivy/search.png -The universal argument (=SPC u= for evil users; =C-u= otherwise) changes the -behavior of these commands, instructing the underlying search engine to include -ignored files. +Prefixing these keys with the universal argument (=SPC u= for evil users; =C-u= +otherwise) changes the behavior of these commands, instructing the underlying +search engine to include ignored files. This module also provides Ex Commands for evil users: @@ -123,15 +124,16 @@ This module also provides Ex Commands for evil users: | ~:pg[rep][!] [QUERY]~ | Search project (if ~!~, include hidden files) | | ~:pg[rep]d[!] [QUERY]~ | Search from current directory (if ~!~, don't search recursively) | -The optional BANG functions is equivalent to the universal argument for the -previous commands. +The optional `!` is equivalent to the universal argument for the previous +commands. ----- -While in a search these extra keybindings are available to you: +These keybindings are available while a search is active: | Keybind | Description | |-----------+-----------------------------------------------| +| =C-c C-o= | Open a buffer with your search results | | =C-c C-e= | Open a writable buffer of your search results | | =C-SPC= | Preview the current candidate | | =M-RET= | Open the selected candidate in other-window | @@ -146,8 +148,9 @@ https://assets.doomemacs.org/completion/ivy/search-replace.png The =swiper= package provides an interactive buffer search powered by ivy. It can be invoked with: -+ =SPC s s= -+ =SPC s S= (uses thing at point as initial input) ++ =SPC s s= (~swiper-isearch~) ++ =SPC s S= (~swiper-isearch-thing-at-point~) ++ =SPC s b= (~swiper~) + ~:sw[iper] [QUERY]~ https://assets.doomemacs.org/completion/ivy/swiper.png From 4ced3d3e839b4a312e9f5e4736c12bc0247903c9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 4 Dec 2019 20:37:59 -0500 Subject: [PATCH 150/983] Fix doom/reload #2153 --- core/autoload/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/autoload/config.el b/core/autoload/config.el index c93caa156..579d0f447 100644 --- a/core/autoload/config.el +++ b/core/autoload/config.el @@ -63,7 +63,7 @@ Runs `doom-reload-hook' afterwards." (user-error "Aborted")) (require 'core-cli) (let ((doom-reloading-p t)) - (compile (format "%s/bin/doom refresh -f" doom-emacs-dir)) + (compile (format "%s/bin/doom refresh" doom-emacs-dir)) (while compilation-in-progress (sit-for 1)) (doom-initialize 'force) From 6bb597564bc762d60f08ad06609f7a29e57b33d7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 4 Dec 2019 21:51:59 -0500 Subject: [PATCH 151/983] ui/doom: swap bg for doom-tomorrow-day Fix hlissner/emacs-doom-themes#362 --- modules/ui/doom/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index 4856584eb..efa2f4345 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -15,6 +15,7 @@ (doom-solarized-light) (doom-spacegrey . t) (doom-vibrant) + (doom-tomorrow-day . t) (doom-tomorrow-night . t)) "An alist of themes that support `solaire-mode'. If CDR is t, then `solaire-mode-swap-bg' will be used automatically, when the theme is loaded.") From 6f1665563c3075664475637fc2c2aa7088aacb13 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 4 Dec 2019 23:32:13 -0500 Subject: [PATCH 152/983] Error if +default/lsp-format-region-or-buffer in non-lsp buffer --- modules/config/default/autoload/default.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/config/default/autoload/default.el b/modules/config/default/autoload/default.el index ad49e2f6d..28d2caed1 100644 --- a/modules/config/default/autoload/default.el +++ b/modules/config/default/autoload/default.el @@ -311,6 +311,8 @@ ARG is set, prompt for a known project to search from." (defun +default/lsp-format-region-or-buffer () "Format the buffer (or selection) with LSP." (interactive) + (unless (bound-and-true-p lsp-mode) + (user-error "Not in an LSP buffer")) (call-interactively (if (use-region-p) #'lsp-format-region From 172260118e9435a7c5380ed5fd2eee75fc8945a2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 14:50:05 -0500 Subject: [PATCH 153/983] core/core-cli: only load the libraries we need --- core/core-cli.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/core-cli.el b/core/core-cli.el index a58c6d073..4a2d0e510 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -5,8 +5,11 @@ ;; Eagerly load these libraries because we may be in a session that hasn't been ;; fully initialized (e.g. where autoloads files haven't been generated or ;; `load-path' populated). -(mapc (doom-rpartial #'load nil (not doom-debug-mode) 'nosuffix) - (file-expand-wildcards (concat doom-core-dir "autoload/*.el"))) +(load! "autoload/cli") +(load! "autoload/debug") +(load! "autoload/files") +(load! "autoload/format") +(load! "autoload/plist") ;; From 4300957aea2660bf9aafa516d074d9e80c99ad35 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 14:52:30 -0500 Subject: [PATCH 154/983] Add NOERROR arg to doom-initialize --- core/core-cli.el | 2 +- core/core.el | 33 ++++++++++++++++----------------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/core/core-cli.el b/core/core-cli.el index 4a2d0e510..3893a126a 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -197,7 +197,7 @@ BODY will be run when this dispatcher is called." collect (list optsym `(cdr (assq ',optsym --alist--)))) ,@(unless (plist-get plist :bare) '((unless doom-init-p - (doom-initialize 'force) + (doom-initialize 'force 'noerror) (doom-initialize-modules)))) ,@body))) doom--cli-commands) diff --git a/core/core.el b/core/core.el index 5950e06bb..91dc7dff0 100644 --- a/core/core.el +++ b/core/core.el @@ -402,18 +402,21 @@ If RETURN-P, return the message as a string instead of displaying it." (setq doom-init-time (float-time (time-subtract (current-time) before-init-time)))))) -(defun doom-load-autoloads-file (file) - "Tries to load FILE (an autoloads file). Return t on success, throws an error -in interactive sessions, nil otherwise (but logs a warning)." +(defun doom-load-autoloads-file (file &optional noerror) + "Tries to load FILE (an autoloads file). +Return t on success, nil otherwise (but logs a warning)." (condition-case e (let (command-switch-alist) - (load (substring file 0 -3) 'noerror 'nomessage)) + (load (substring file 0 -3) noerror 'nomessage)) ((debug error) (message "Autoload file error: %s -> %s" (file-name-nondirectory file) e) nil))) (defun doom-load-envvars-file (file &optional noerror) - "Read and set envvars from FILE." + "Read and set envvars from FILE. +If NOERROR is non-nil, don't throw an error if the file doesn't exist or is +unreadable. Returns a list of VAR=VALUE strings for all environment variables +set." (if (not (file-readable-p file)) (unless noerror (signal 'file-error (list "Couldn't read envvar file" file))) @@ -446,16 +449,13 @@ in interactive sessions, nil otherwise (but logs a warning)." shell-file-name)) envvars)))) -(defun doom-initialize (&optional force-p) +(defun doom-initialize (&optional force-p noerror) "Bootstrap Doom, if it hasn't already (or if FORCE-P is non-nil). -The bootstrap process involves making sure 1) the essential directories exist, -2) the core packages are installed, 3) `doom-autoload-file' and -`doom-package-autoload-file' exist and have been loaded, and 4) Doom's core -files are loaded. - -If the cache exists, much of this function isn't run, which substantially -reduces startup time. +The bootstrap process ensures that the essential directories exist, all core +packages are installed, `doom-autoload-file' and `doom-package-autoload-file' +exist and are loaded, and that `core-packages' is auto-loaded when `package' or +`straight' are. The overall load order of Doom is as follows: @@ -494,12 +494,12 @@ to least)." (let (;; `doom-autoload-file' tells Emacs where to load all its functions ;; from. This includes everything in core/autoload/*.el and autoload ;; files in enabled modules. - (core-autoloads-p (doom-load-autoloads-file doom-autoload-file)) + (core-autoloads-p (doom-load-autoloads-file doom-autoload-file noerror)) ;; Loads `doom-package-autoload-file', which loads a concatenated ;; package autoloads file which caches `load-path', `auto-mode-alist', ;; `Info-directory-list', and `doom-disabled-packages'. A big ;; reduction in startup time. - (pkg-autoloads-p (doom-load-autoloads-file doom-package-autoload-file))) + (pkg-autoloads-p (doom-load-autoloads-file doom-package-autoload-file noerror))) (if (and core-autoloads-p pkg-autoloads-p (not force-p)) ;; In case we want to use package.el or straight via M-x @@ -523,8 +523,7 @@ to least)." (doom-initialize-packages force-p)) (unless (or (and core-autoloads-p pkg-autoloads-p) - force-p - (not doom-interactive-mode)) + noerror) (unless core-autoloads-p (warn "Your Doom core autoloads file is missing")) (unless pkg-autoloads-p From 35bb87edebc933dec6af51e50d4748e47f3cf33e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 14:52:46 -0500 Subject: [PATCH 155/983] Fix unrelated errors when missing autoloads files It should warn the user that the autoloads files are missing and need to be generated, but instead displayed an unrelated error. --- core/core.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/core.el b/core/core.el index 91dc7dff0..98c806e26 100644 --- a/core/core.el +++ b/core/core.el @@ -510,6 +510,12 @@ to least)." (require 'core-packages) (doom-initialize-packages))) + ;; Eagerly load these libraries because we may be in a session that hasn't been + ;; fully initialized (e.g. where autoloads files haven't been generated or + ;; `load-path' populated). + (mapc (doom-rpartial #'load nil (not doom-debug-mode) 'nosuffix) + (file-expand-wildcards (concat doom-core-dir "autoload/*.el"))) + ;; Create all our core directories to quell file errors (dolist (dir (list doom-local-dir doom-etc-dir From d232ba241fc3c3f9b6f06ff92beff6162c4f1664 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 14:54:49 -0500 Subject: [PATCH 156/983] Remove 'doom autoloads' It's redundant with doom refresh --- core/cli/autoloads.el | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index e8f56e62c..fa113ed9f 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -11,23 +11,6 @@ one wants that.") (defvar generated-autoload-file) -;; -;;; Commands - -(defcli! (autoloads a) () - "Regenerates Doom's autoloads files. - -It scans and reads autoload cookies (;;;###autoload) in core/autoload/*.el, -modules/*/*/autoload.el and modules/*/*/autoload/*.el, and generates and -byte-compiles `doom-autoload-file', as well as `doom-package-autoload-file' -(created from the concatenated autoloads files of all installed packages). - -It also caches `load-path', `Info-directory-list', `doom-disabled-packages', -`package-activated-list' and `auto-mode-alist'." - (straight-check-all) - (doom-cli-reload-autoloads nil 'force)) - - ;; ;;; Helpers From 4b05a64263d98b39a2f4014dd64090246787dd91 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 14:55:01 -0500 Subject: [PATCH 157/983] Ensure no autoloads files are preloaded on 'doom refresh' --- core/core-cli.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/core-cli.el b/core/core-cli.el index 3893a126a..a235fa63b 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -235,10 +235,18 @@ recompile. Run this whenever you: It will ensure that unneeded packages are removed, all needed packages are installed, autoloads files are up-to-date and no byte-compiled files have gone stale." + :bare t (print! (green "Initiating a refresh of Doom Emacs...\n")) (let (success) (when (file-exists-p doom-env-file) (doom-cli-reload-env-file 'force)) + + (mapc #'doom--cli-delete-autoloads-file + (list doom-autoload-file + doom-package-autoload-file)) + + (doom-initialize 'force 'noerror) + (doom-initialize-modules) (doom-cli-reload-core-autoloads (not if-necessary-p)) (unwind-protect (progn From 96e0ccab21b93e32cd7b4e8526e19cebdf5a5520 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 14:55:13 -0500 Subject: [PATCH 158/983] Add sync alias for 'doom refresh' --- core/core-cli.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-cli.el b/core/core-cli.el index a235fa63b..081da1d0d 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -219,7 +219,7 @@ BODY will be run when this dispatcher is called." (load! "cli/help") (load! "cli/install") -(defcli! (refresh re) +(defcli! (refresh re sync) ((if-necessary-p ["-n" "--if-necessary"] "Only regenerate autoloads files if necessary") (purge-p ["-p" "--purge"] "Also purge orphaned repos and ELPA packages")) "Ensure Doom is properly set up. From c13b8df5dfd30f2b4f0becd9314cd793fb2534ea Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 14:56:16 -0500 Subject: [PATCH 159/983] Minor refactors & reformatting --- core/autoload/help.el | 8 ++++---- modules/completion/ivy/config.el | 4 +++- modules/ui/doom/config.el | 5 ++--- modules/ui/workspaces/config.el | 6 ++++-- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 4d485508d..fa010b9e3 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -306,14 +306,14 @@ without needing to check if they are available." (defun doom--help-modules-list () (cl-loop for path in (cdr (doom-module-load-path 'all)) for (cat . mod) = (doom-module-from-path path) - for path = (or (doom-module-locate-path cat mod "README.org") - (doom-module-locate-path cat mod)) + for readme-path = (or (doom-module-locate-path cat mod "README.org") + (doom-module-locate-path cat mod)) for format = (format "%s %s" cat mod) if (doom-module-p cat mod) - collect (list format path) + collect (list format readme-path) else if (and cat mod) collect (list (propertize format 'face 'font-lock-comment-face) - path))) + readme-path))) (defun doom--help-current-module-str () (cond ((and buffer-file-name diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index bca1f21bb..31ca4eb4b 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -333,7 +333,9 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." (setf (alist-get t ivy-posframe-display-functions-alist) #'+ivy-display-at-frame-center-near-bottom-fn) - ;; posframe doesn't work well with async sources + ;; posframe doesn't work well with async sources (the posframe will + ;; occasionally stop responding/redrawing), and causes violent resizing of the + ;; posframe. (dolist (fn '(swiper counsel-rg counsel-grep counsel-git-grep)) (setf (alist-get fn ivy-posframe-display-functions-alist) #'ivy-display-function-fallback))) diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index efa2f4345..82da526b8 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -14,9 +14,9 @@ (doom-solarized-dark . t) (doom-solarized-light) (doom-spacegrey . t) - (doom-vibrant) (doom-tomorrow-day . t) - (doom-tomorrow-night . t)) + (doom-tomorrow-night . t) + (doom-vibrant)) "An alist of themes that support `solaire-mode'. If CDR is t, then `solaire-mode-swap-bg' will be used automatically, when the theme is loaded.") @@ -24,7 +24,6 @@ ;; ;;; Packages -;; (use-package! doom-themes :defer t :init diff --git a/modules/ui/workspaces/config.el b/modules/ui/workspaces/config.el index e401719ca..cc5057665 100644 --- a/modules/ui/workspaces/config.el +++ b/modules/ui/workspaces/config.el @@ -162,8 +162,10 @@ stored in `persp-save-dir'.") ("C" counsel-projectile-switch-project-action-configure "run project configure command") ("e" counsel-projectile-switch-project-action-edit-dir-locals "edit project dir-locals") ("v" counsel-projectile-switch-project-action-vc "open project in vc-dir / magit / monky") - ("s" (lambda (project) (let ((projectile-switch-project-action (lambda () (call-interactively #'+ivy/project-search)))) - (counsel-projectile-switch-project-by-name project))) "search project") + ("s" (lambda (project) + (let ((projectile-switch-project-action + (lambda () (call-interactively #'+ivy/project-search)))) + (counsel-projectile-switch-project-by-name project))) "search project") ("xs" counsel-projectile-switch-project-action-run-shell "invoke shell from project root") ("xe" counsel-projectile-switch-project-action-run-eshell "invoke eshell from project root") ("xt" counsel-projectile-switch-project-action-run-term "invoke term from project root") From 1c402950af2d30794ff755f887fcd2ae2e4fd1b8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 14:59:47 -0500 Subject: [PATCH 160/983] Display command aliases from 'doom help CMD' --- core/cli/help.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/cli/help.el b/core/cli/help.el index 2517a47b7..a1afd3e36 100644 --- a/core/cli/help.el +++ b/core/cli/help.el @@ -27,7 +27,8 @@ until (memq arg cl--lambda-list-keywords) collect (format "[%s]" (upcase (symbol-name arg))))) " ") - ""))) + "")) + (print! "Aliases: %s" (string-join (doom-cli-aliases cli) ", "))) (defun doom--cli-print-desc (cli &optional short) (print! "%s" From e3f867429758450c74cf557f7490b8469f5d466f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 15:01:04 -0500 Subject: [PATCH 161/983] Group 'doom refresh' with maintenance commands --- core/core-cli.el | 62 ++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/core/core-cli.el b/core/core-cli.el index 081da1d0d..8a9610393 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -219,10 +219,12 @@ BODY will be run when this dispatcher is called." (load! "cli/help") (load! "cli/install") -(defcli! (refresh re sync) +(defcligroup! "Maintenance" + "For managing your config and packages" + (defcli! (refresh re sync) ((if-necessary-p ["-n" "--if-necessary"] "Only regenerate autoloads files if necessary") (purge-p ["-p" "--purge"] "Also purge orphaned repos and ELPA packages")) - "Ensure Doom is properly set up. + "Ensure Doom is properly set up. This is the equivalent of running autoremove, install, autoloads, then recompile. Run this whenever you: @@ -235,30 +237,35 @@ recompile. Run this whenever you: It will ensure that unneeded packages are removed, all needed packages are installed, autoloads files are up-to-date and no byte-compiled files have gone stale." - :bare t - (print! (green "Initiating a refresh of Doom Emacs...\n")) - (let (success) - (when (file-exists-p doom-env-file) - (doom-cli-reload-env-file 'force)) + :bare t + (print! (green "Initiating a refresh of Doom Emacs...\n")) + (let (success) + (when (file-exists-p doom-env-file) + (doom-cli-reload-env-file 'force)) - (mapc #'doom--cli-delete-autoloads-file - (list doom-autoload-file - doom-package-autoload-file)) + (mapc #'doom--cli-delete-autoloads-file + (list doom-autoload-file + doom-package-autoload-file)) - (doom-initialize 'force 'noerror) - (doom-initialize-modules) - (doom-cli-reload-core-autoloads (not if-necessary-p)) - (unwind-protect - (progn - (and (doom-cli-packages-install) - (setq success t)) - (and (doom-cli-packages-build) - (setq success t)) - (and (doom-cli-packages-purge purge-p 'builds-p purge-p) - (setq success t))) - (doom-cli-reload-package-autoloads (or success (not if-necessary-p))) - (doom-cli-byte-compile nil 'recompile)) - t)) + (doom-initialize 'force 'noerror) + (doom-initialize-modules) + (doom-cli-reload-core-autoloads (not if-necessary-p)) + (unwind-protect + (progn + (and (doom-cli-packages-install) + (setq success t)) + (and (doom-cli-packages-build) + (setq success t)) + (and (doom-cli-packages-purge purge-p 'builds-p purge-p) + (setq success t))) + (doom-cli-reload-package-autoloads (or success (not if-necessary-p))) + (doom-cli-byte-compile nil 'recompile)) + t)) + + (load! "cli/env") + (load! "cli/upgrade") + (load! "cli/packages") + (load! "cli/autoloads")) (defcligroup! "Diagnostics" "For troubleshooting and diagnostics" @@ -266,13 +273,6 @@ stale." (load! "cli/debug") (load! "cli/test")) -(defcligroup! "Maintenance" - "For managing your config and packages" - (load! "cli/env") - (load! "cli/upgrade") - (load! "cli/packages") - (load! "cli/autoloads")) - (defcligroup! "Compilation" "For compiling Doom and your config" (load! "cli/byte-compile")) From 6facc534ce4023e18f25d03c6636ca9a1ab76d98 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 16:10:46 -0500 Subject: [PATCH 162/983] completion/helm: replace helm-ag with helm-rg --- modules/completion/helm/autoload/helm.el | 52 ++++++------------------ modules/completion/helm/config.el | 18 ++++---- modules/completion/helm/packages.el | 2 +- 3 files changed, 22 insertions(+), 50 deletions(-) diff --git a/modules/completion/helm/autoload/helm.el b/modules/completion/helm/autoload/helm.el index 70105d239..ec741c093 100644 --- a/modules/completion/helm/autoload/helm.el +++ b/modules/completion/helm/autoload/helm.el @@ -51,46 +51,18 @@ workspace." (declare (indent defun)) (unless (executable-find "rg") (user-error "Couldn't find ripgrep in your PATH")) - (require 'helm-ag) - (helm-ag--init-state) - (let* ((project-root (or (doom-project-root) default-directory)) - (directory (or in project-root)) - (default-directory directory) - (helm-ag--default-directory directory) - (helm-ag--default-target (list directory)) - (query (or query - (when (use-region-p) - (let ((beg (or (bound-and-true-p evil-visual-beginning) (region-beginning))) - (end (or (bound-and-true-p evil-visual-end) (region-end)))) - (when (> (abs (- end beg)) 1) - (rxt-quote-pcre (buffer-substring-no-properties beg end))))) - "")) - (prompt (format "[rg %s] " - (cond ((file-equal-p directory project-root) - (projectile-project-name)) - ((file-equal-p directory default-directory) - "./") - ((file-relative-name directory project-root))))) - (command - (list "rg --no-heading --line-number --color never" - "-S" - (when all-files "-z -uu") - (unless recursive "--maxdepth 1"))) - (helm-ag-base-command (string-join (delq nil command) " "))) - ;; TODO Define our own sources instead - (helm-attrset 'name (format "[rg %s] Searching %s" - (string-join (delq nil (cdr command)) " ") - (abbreviate-file-name directory)) - helm-source-do-ag) - (helm-attrset '+helm-command command helm-source-do-ag) - (cl-letf (((symbol-function 'helm-do-ag--helm) - (lambda () (helm :sources '(helm-source-do-ag) - :prompt prompt - :buffer "*helm-rg*" - :keymap helm-do-ag-map - :input query - :history 'helm-ag--helm-history)))) - (helm-do-ag directory)))) + (require 'helm-rg) + (let ((helm-rg-default-directory (or in (doom-project-root) default-directory)) + (helm-rg-default-extra-args + (delq nil (list (when all-files "-z -uu") + (unless recursive "--maxdepth 1"))))) + (helm-rg (or query + (when (use-region-p) + (let ((beg (or (bound-and-true-p evil-visual-beginning) (region-beginning))) + (end (or (bound-and-true-p evil-visual-end) (region-end)))) + (when (> (abs (- end beg)) 1) + (buffer-substring-no-properties beg end)))) + "")))) ;;;###autoload (defun +helm/project-search (&optional arg initial-query directory) diff --git a/modules/completion/helm/config.el b/modules/completion/helm/config.el index 071c33335..7ee5d35a5 100644 --- a/modules/completion/helm/config.el +++ b/modules/completion/helm/config.el @@ -77,7 +77,6 @@ be negative.") (let ((fuzzy (featurep! +fuzzy))) (setq helm-M-x-fuzzy-match fuzzy - helm-ag-fuzzy-match fuzzy helm-apropos-fuzzy-match fuzzy helm-apropos-fuzzy-match fuzzy helm-bookmark-show-location fuzzy @@ -125,14 +124,15 @@ be negative.") :config (helm-flx-mode +1)) -(after! helm-ag - (map! :map helm-ag-edit-map :n "RET" #'compile-goto-error) - (define-key helm-ag-edit-map [remap quit-window] #'helm-ag--edit-abort) - (set-popup-rule! "^\\*helm-ag-edit" :size 0.35 :ttl 0 :quit nil) - ;; Recenter after jumping to match - (advice-add #'helm-ag--find-file-action :after-while #'doom-recenter-a) - ;; And record position before jumping - (advice-add #'helm-ag--find-file-action :around #'doom-set-jump-maybe-a)) +(after! helm-rg + (set-popup-rule! "^helm-rg-" :ttl nil :select t :size 0.45) + (map! :map helm-rg-map + "C-c C-e" #'helm-rg--bounce) + (map! :map helm-rg--bounce-mode-map + "q" #'kill-current-buffer + "C-c C-c" (λ! (helm-rg--bounce-dump) (kill-current-buffer)) + "C-x C-c" #'helm-rg--bounce-dump-current-file + "C-c C-k" #'kill-current-buffer)) ;;;###package helm-bookmark diff --git a/modules/completion/helm/packages.el b/modules/completion/helm/packages.el index eb343b566..4bfb434f0 100644 --- a/modules/completion/helm/packages.el +++ b/modules/completion/helm/packages.el @@ -2,7 +2,7 @@ ;;; completion/helm/packages.el (package! helm) -(package! helm-ag) +(package! helm-rg) (package! helm-c-yasnippet) (package! helm-company) (package! helm-describe-modes :recipe (:host github :repo "emacs-helm/helm-describe-modes")) From c1e3e3cc04242e445252d8ecedae5b85981e175a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 16:10:57 -0500 Subject: [PATCH 163/983] Fix helm-project-* override advice --- modules/completion/helm/config.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/completion/helm/config.el b/modules/completion/helm/config.el index 7ee5d35a5..7eee2c9b2 100644 --- a/modules/completion/helm/config.el +++ b/modules/completion/helm/config.el @@ -100,9 +100,9 @@ be negative.") ;; HACK Doom doesn't support these commands, which invite the user to install ;; the package via ELPA. Force them to use +helm/* instead, because they work ;; out of the box. - (advice-add #'helm-projectile-rg :override #'+helm/rg) - (advice-add #'helm-projectile-ag :override #'+helm/ag) - (advice-add #'helm-projectile-grep :override #'+helm/grep) + (advice-add #'helm-projectile-rg :override #'+helm/project-search) + (advice-add #'helm-projectile-ag :override #'+helm/project-search) + (advice-add #'helm-projectile-grep :override #'+helm/project-search) ;; Hide the modeline (defun +helm--hide-mode-line (&rest _) From 1a4add463076dac568ea724f7fa9790171f0ede0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 16:11:19 -0500 Subject: [PATCH 164/983] ivy-height = 20 for swiper-isearch helm users --- modules/completion/helm/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/completion/helm/config.el b/modules/completion/helm/config.el index 7eee2c9b2..a7c8162ca 100644 --- a/modules/completion/helm/config.el +++ b/modules/completion/helm/config.el @@ -176,6 +176,7 @@ be negative.") (set-keymap-parent helm-projectile-find-file-map helm-map)) +(setq ivy-height 20) ; for `swiper-isearch' (after! swiper-helm (setq swiper-helm-display-function (lambda (buf &optional _resume) (pop-to-buffer buf))) From 7a34c56e5226ee660f4775feb4cb68bbb044cd74 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 16:21:08 -0500 Subject: [PATCH 165/983] lang/python: don't update buffer-dedicated REPLs --- modules/lang/python/autoload/python.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/python/autoload/python.el b/modules/lang/python/autoload/python.el index b799441a0..6cfd0429b 100644 --- a/modules/lang/python/autoload/python.el +++ b/modules/lang/python/autoload/python.el @@ -16,8 +16,8 @@ python-shell-interpreter python-shell-interpreter-args)) (python-shell-interpreter pipenv)) - (run-python nil t t)) - (run-python nil t t))))) + (run-python nil nil t)) + (run-python nil nil t))))) ;;;###autoload (defun +python/open-ipython-repl () From 341e8b353195857836100e60f19973d403e7fee7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 19:34:09 -0500 Subject: [PATCH 166/983] cli/help: only show aliases if there are any --- core/cli/help.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/cli/help.el b/core/cli/help.el index a1afd3e36..39e136b54 100644 --- a/core/cli/help.el +++ b/core/cli/help.el @@ -28,7 +28,8 @@ collect (format "[%s]" (upcase (symbol-name arg))))) " ") "")) - (print! "Aliases: %s" (string-join (doom-cli-aliases cli) ", "))) + (when-let (aliases (doom-cli-aliases cli)) + (print! "Aliases: %s" (string-join aliases ", ")))) (defun doom--cli-print-desc (cli &optional short) (print! "%s" From d525b5502bc280516f8984202b0c7322b74e86d8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 19:50:38 -0500 Subject: [PATCH 167/983] Update tests with new arg for doom-initialize --- core/cli/test.el | 2 +- core/test/test-core.el | 25 ++++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/core/cli/test.el b/core/cli/test.el index d42c22045..1b307f9ea 100644 --- a/core/cli/test.el +++ b/core/cli/test.el @@ -11,7 +11,7 @@ (defcli! test (&rest targets) "Run Doom unit tests." :bare t - (doom-initialize 'force) + (doom-initialize 'force 'noerror) (require 'ansi-color) (let (files read-files) (unless targets diff --git a/core/test/test-core.el b/core/test/test-core.el index 6b9305c13..8a0844cd5 100644 --- a/core/test/test-core.el +++ b/core/test/test-core.el @@ -13,15 +13,15 @@ (setq doom-init-p nil)) (it "initializes once" - (expect (doom-initialize)) - (expect (not (doom-initialize))) - (expect (not (doom-initialize))) + (expect (doom-initialize nil 'noerror)) + (expect (not (doom-initialize nil 'noerror))) + (expect (not (doom-initialize nil 'noerror))) (expect doom-init-p)) (it "initializes multiple times, if forced" - (expect (doom-initialize)) - (expect (not (doom-initialize))) - (expect (doom-initialize 'force))) + (expect (doom-initialize nil 'noerror)) + (expect (not (doom-initialize nil 'noerror))) + (expect (doom-initialize 'force 'noerror))) (describe "package initialization" (before-each @@ -29,18 +29,18 @@ (it "initializes packages if core autoload file doesn't exist" (let ((doom-autoload-file "doesnotexist")) - (doom-initialize)) + (expect (doom-initialize nil 'noerror)) (expect 'doom-initialize-packages :to-have-been-called)) (it "doesn't initialize packages if core autoload file was loaded" (let ((doom-interactive-mode t)) (spy-on 'doom-load-autoloads-file :and-return-value t) - (doom-initialize) + (doom-initialize nil 'noerror) (expect 'doom-load-autoloads-file :to-have-been-called-with doom-package-autoload-file) (expect 'doom-initialize-packages :to-have-been-called))) (it "initializes packages when forced" - (doom-initialize 'force) + (doom-initialize 'force 'noerror) (expect 'doom-initialize-packages :to-have-been-called))) (describe "autoloads files" @@ -49,15 +49,14 @@ (spy-on 'warn :and-return-value t)) (it "loads autoloads files" - (ignore-errors (doom-initialize)) + (ignore-errors (doom-initialize nil 'noerror)) (expect 'doom-load-autoloads-file :to-have-been-called-with doom-autoload-file) (expect 'doom-load-autoloads-file :to-have-been-called-with doom-package-autoload-file)) - (it "throws doom-autoload-error in interactive session where autoload files don't exist" - (let ((doom-interactive-mode t) - (doom-autoload-file "doesnotexist") + (it "throws doom-autoload-error when autoload files don't exist" + (let ((doom-autoload-file "doesnotexist") (doom-package-autoload-file "doesnotexist")) (expect (doom-initialize) :to-throw 'doom-autoload-error))))) From cd3190b594d8eb9c1c926d2dc66af50ce1f4a88a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 19:51:53 -0500 Subject: [PATCH 168/983] Comment autoloads file deletion in 'doom refresh' --- core/core-cli.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/core-cli.el b/core/core-cli.el index 8a9610393..c7b041275 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -243,12 +243,14 @@ stale." (when (file-exists-p doom-env-file) (doom-cli-reload-env-file 'force)) + ;; Ensures that no pre-existing state pollutes the generation of the new + ;; autoloads files. (mapc #'doom--cli-delete-autoloads-file (list doom-autoload-file doom-package-autoload-file)) - (doom-initialize 'force 'noerror) (doom-initialize-modules) + (doom-cli-reload-core-autoloads (not if-necessary-p)) (unwind-protect (progn From f2f85032468d28a1027bd1e1de40a45ca742e1df Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 20:21:15 -0500 Subject: [PATCH 169/983] lang/rust: use default LSP client instead of rustic's --- modules/lang/rust/config.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/lang/rust/config.el b/modules/lang/rust/config.el index 42d44d98c..5f69dcb3d 100644 --- a/modules/lang/rust/config.el +++ b/modules/lang/rust/config.el @@ -11,12 +11,9 @@ :mode ("\\.rs$" . rustic-mode) :commands rustic-run-cargo-command rustic-cargo-outdated :preface - (setq rustic-rls-pkg (if (featurep! +lsp) 'lsp-mode) - ;; `rustic-setup-rls' uses `package-installed-p' to determine if - ;; lsp-mode/elgot are available. This breaks because Doom doesn't use - ;; package.el to begin with (and lazy loads it). This is already handled - ;; by the :tools lsp module, so... - rustic-lsp-setup-p nil) + ;; We use the superior default client provided by `lsp-mode', not the one + ;; rustic-mode sets up for us. + (setq rustic-lsp-client nil) :config (set-docsets! 'rustic-mode "Rust") From 8809bbc33daee68a7623dab393636be2273d924e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 20:46:36 -0500 Subject: [PATCH 170/983] cli/test: fix startup error in bootstrapper --- core/cli/test.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/cli/test.el b/core/cli/test.el index 1b307f9ea..0d5949ada 100644 --- a/core/cli/test.el +++ b/core/cli/test.el @@ -48,7 +48,7 @@ doom-auto-accept t) (require 'core ,(locate-library "core")) (require 'core-cli) - (doom-initialize 'force) + (doom-initialize 'force 'noerror) (doom-initialize-modules) (doom-cli-reload-core-autoloads 'force) (when (doom-cli-packages-install) From 318754c4d2e94f637806aedf8665aa3806ef3099 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 20:48:53 -0500 Subject: [PATCH 171/983] Prevent eval results from consuming > half the frame --- modules/tools/eval/autoload/eval.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/tools/eval/autoload/eval.el b/modules/tools/eval/autoload/eval.el index b4a640474..1bad3201e 100644 --- a/modules/tools/eval/autoload/eval.el +++ b/modules/tools/eval/autoload/eval.el @@ -18,7 +18,9 @@ (+word-wrap-mode +1) (visual-line-mode +1))) (when-let (win (display-buffer output-buffer)) - (fit-window-to-buffer win)) + (fit-window-to-buffer + win (/ (frame-height) 2) + nil (/ (frame-width) 2))) (select-window origin) output-buffer) (message "%s" output))) From b0e6373694212db9eca0317378dc3d3965c7f015 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Dec 2019 21:06:16 -0500 Subject: [PATCH 172/983] Prevent errors when starting tests --- core/test/helpers.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/test/helpers.el b/core/test/helpers.el index 618087fb4..446ec12d6 100644 --- a/core/test/helpers.el +++ b/core/test/helpers.el @@ -3,7 +3,7 @@ (eval-and-compile (setq doom-interactive-mode 'test) - (doom-initialize 'force) + (doom-initialize 'force 'noerror) (require 'buttercup) (setq split-width-threshold 0 split-height-threshold 0 From 4faa9f7ce203bf552c6e991744a2d646f52679fa Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 6 Dec 2019 01:22:58 -0500 Subject: [PATCH 173/983] Rebind ' d s'; bind ' d x' --- modules/config/default/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index 41ea8d05c..74c3bbc55 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -329,7 +329,8 @@ "dP" #'doom/help-package-homepage "dc" #'doom/goto-config-file "dC" #'doom/help-package-config - "ds" #'doom/sandbox + "ds" #'doom/help-search + "dx" #'doom/sandbox "dt" #'doom/toggle-profiler "dv" #'doom/version From 0b3895d1e2088862306cd19f91962734883e080d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 6 Dec 2019 01:24:25 -0500 Subject: [PATCH 174/983] Unbind ' {/,d /}' --- modules/config/default/config.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index 74c3bbc55..f1112c064 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -313,7 +313,6 @@ ;; replaces `apropos-documentation' b/c `apropos' covers this "d" nil - "d/" #'doom/help-search "da" #'doom/help-autodefs "db" #'doom/report-bug "dd" #'doom/toggle-debug-mode @@ -337,7 +336,6 @@ ;; replaces `apropos-command' "a" #'apropos "A" #'apropos-documentation - "/" #'apropos-documentation ;; replaces `describe-copying' b/c not useful "C-c" #'describe-coding-system ;; replaces `Info-got-emacs-command-node' b/c redundant w/ `Info-goto-node' From a30fb6fa59b1036c3cd9c640e16fb688c8207227 Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Fri, 6 Dec 2019 18:11:50 +0800 Subject: [PATCH 175/983] Fix interactive call of doom/narrow-buffer-indirectly Optional 3rd arg was removed in f9190c08bfb908df1df3cc49ee2ecec4b360d42c --- core/autoload/ui.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/autoload/ui.el b/core/autoload/ui.el index 7a0b8a447..80735e26f 100644 --- a/core/autoload/ui.el +++ b/core/autoload/ui.el @@ -179,8 +179,7 @@ narrowing doesn't affect other windows displaying the same buffer. Call Inspired from http://demonastery.org/2013/04/emacs-evil-narrow-region/" (interactive (list (or (bound-and-true-p evil-visual-beginning) (region-beginning)) - (or (bound-and-true-p evil-visual-end) (region-end)) - current-prefix-arg)) + (or (bound-and-true-p evil-visual-end) (region-end)))) (unless (region-active-p) (setq beg (line-beginning-position) end (line-end-position))) From cd158c5656eeec84cff7f119f5761edb7754d53c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 6 Dec 2019 13:23:54 -0500 Subject: [PATCH 176/983] cli/install: fix missing autoloads error #2157 --- core/cli/install.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/cli/install.el b/core/cli/install.el index e99ef25b0..bb21dacc1 100644 --- a/core/cli/install.el +++ b/core/cli/install.el @@ -63,7 +63,7 @@ DOOMDIR environment variable. e.g. ;; In case no init.el was present the first time `doom-initialize-modules' was ;; called in core.el (e.g. on first install) - (doom-initialize 'force) + (doom-initialize 'force 'noerror) (doom-initialize-modules) ;; Ask if user would like an envvar file generated From 6cf17b1237693c8e0c6823ba2f2f929fd00ca568 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 6 Dec 2019 13:38:57 -0500 Subject: [PATCH 177/983] config/default: rebind 'SPC n {c,C,n,S}' 'SPC n c' -> Toggle last org clock 'SPC n C' -> Cancel current org clock 'SPC n n' -> org-capture 'SPC n S' -> Search org-directory headings Closes #2043 --- modules/config/default/+evil-bindings.el | 6 ++++-- modules/lang/org/autoload/org.el | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 8d3dfb855..6c2a6f2de 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -456,16 +456,18 @@ (:prefix-map ("n" . "notes") :desc "Search notes for symbol" "*" #'+default/search-notes-for-symbol-at-point :desc "Org agenda" "a" #'org-agenda - :desc "Org capture" "c" #'org-capture + :desc "Toggle org-clock" "c" #'+org/toggle-clock + :desc "Cancel org-clock" "C" #'org-clock-cancel :desc "Open deft" "d" #'deft :desc "Find file in notes" "f" #'+default/find-in-notes :desc "Browse notes" "F" #'+default/browse-notes :desc "Org store link" "l" #'org-store-link - :desc "Search org agenda headlines" "n" #'+default/org-notes-headlines :desc "Tags search" "m" #'org-tags-view + :desc "Org capture" "n" #'org-capture :desc "Active org-clock" "o" #'org-clock-goto :desc "Todo list" "t" #'org-todo-list :desc "Search notes" "s" #'+default/org-notes-search + :desc "Search org agenda headlines" "S" #'+default/org-notes-headlines :desc "View search" "v" #'org-search-view :desc "Org export to clipboard" "y" #'+org/export-to-clipboard :desc "Org export to clipboard as RTF" "Y" #'+org/export-to-clipboard-as-rich-text diff --git a/modules/lang/org/autoload/org.el b/modules/lang/org/autoload/org.el index 2d14b5c28..44107a1ca 100644 --- a/modules/lang/org/autoload/org.el +++ b/modules/lang/org/autoload/org.el @@ -273,6 +273,24 @@ If on a: (ignore-errors (org-promote))) ((call-interactively #'self-insert-command)))) +;;;###autoload +(defun +org/toggle-clock (arg) + "Toggles clock on the last clocked item. + +Clock out if an active clock is running. Clock in otherwise. + +If in an org file, clock in on the item at point. Otherwise clock into the last +task you clocked into. + +See `org-clock-out', `org-clock-in' and `org-clock-in-last' for details on how +the prefix ARG changes this command's behavior." + (interactive "P") + (if (org-clocking-p) + (if arg + (org-clock-cancel) + (org-clock-out)) + (org-clock-in-last arg))) + ;;; Folds ;;;###autoload From bfdd09b5c20fd169a8d6a3e65d34e4c6a0f47a54 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 6 Dec 2019 13:59:13 -0500 Subject: [PATCH 178/983] ui/doom: swap solaire bg for doom-challenger-deep --- modules/ui/doom/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index 82da526b8..bced52b36 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -1,7 +1,8 @@ ;;; ui/doom/config.el -*- lexical-binding: t; -*- (defvar +doom-solaire-themes - '((doom-city-lights . t) + '((doom-challenger-deep . t) + (doom-city-lights . t) (doom-dracula . t) (doom-molokai) (doom-nord . t) From 77b0784075c567211bbf0281ebb66552d67a70c3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 6 Dec 2019 16:59:17 -0500 Subject: [PATCH 179/983] lang/org: add helm support to goto localleader keybinds --- modules/lang/org/config.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index d42ea28f4..7a8f2c106 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -668,6 +668,9 @@ between the two." (:when (featurep! :completion ivy) "g" #'counsel-org-goto "G" #'counsel-org-goto-all) + (:when (featurep! :completion helm) + "g" #'helm-org-in-buffer-headings + "G" #'helm-org-agenda-files-headings) "c" #'org-clock-goto "C" (λ! (org-clock-goto 'select)) "i" #'org-id-goto From c8cfa31a1e2145786d0c01358feab211f96ca3d5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 6 Dec 2019 17:00:01 -0500 Subject: [PATCH 180/983] lang/org: add goto-visible & refile-to-visible commands - Bind 'gsh' to goto-visible command in org-mode - Bind ' g v' to goto-visible - Bind ' r v' to refile-to-visible - Add avy package to lang/org module Powered by avy. --- modules/config/default/+evil-bindings.el | 4 ++++ modules/lang/org/autoload/org-avy.el | 19 +++++++++++++++++++ modules/lang/org/autoload/org-refile.el | 19 +++++++++++++++++++ modules/lang/org/config.el | 2 ++ modules/lang/org/packages.el | 1 + 5 files changed, 45 insertions(+) create mode 100644 modules/lang/org/autoload/org-avy.el diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 6c2a6f2de..e278284d3 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -85,6 +85,10 @@ :n "q" #'kill-current-buffer) :m "gs" #'+evil/easymotion ; lazy-load `evil-easymotion' + (:after org + :map org-mode-map + :m "gsh" #'+org/goto-visible) + (:when (featurep! :editor multiple-cursors) :prefix "gz" :nv "d" #'evil-mc-make-and-goto-next-match diff --git a/modules/lang/org/autoload/org-avy.el b/modules/lang/org/autoload/org-avy.el new file mode 100644 index 000000000..0e10663e7 --- /dev/null +++ b/modules/lang/org/autoload/org-avy.el @@ -0,0 +1,19 @@ +;;; lang/org/autoload/org-avy.el -*- lexical-binding: t; -*- + +;;;###autoload +(defun +org-headline-avy () + "TODO" + (save-excursion + (when-let* ((org-reverse-note-order t) + (pos (avy-with avy-goto-line (avy-jump (rx bol (1+ "*") (1+ blank)))))) + (when (integerp (car pos)) + ;; If avy is aborted with "C-g", it returns `t', so we know it was NOT + ;; aborted when it returns an int. If it doesn't return an int, we + ;; return nil. + (copy-marker (car pos)))))) + +;;;###autoload +(defun +org/goto-visible () + "TODO" + (interactive) + (goto-char (+org-headline-avy))) diff --git a/modules/lang/org/autoload/org-refile.el b/modules/lang/org/autoload/org-refile.el index 5f2a50457..ba4aa4101 100644 --- a/modules/lang/org/autoload/org-refile.el +++ b/modules/lang/org/autoload/org-refile.el @@ -62,3 +62,22 @@ (lambda (_p _coll _pred _rm _ii _h default &rest _) default))) (org-refile))) + +(defvar org-after-refile-insert-hook) +;; Inspired by org-teleport and alphapapa/alpha-org +;;;###autoload +(defun +org/refile-to-visible () + "Refile current heading as first child of visible heading selected with Avy." + (interactive) + (when-let (marker (+org-headline-avy)) + (let* ((buffer (marker-buffer marker)) + (filename + (buffer-file-name (or (buffer-base-buffer buffer) + buffer))) + (heading + (org-with-point-at marker + (org-get-heading 'no-tags 'no-todo))) + ;; Won't work with target buffers whose filename is nil + (rfloc (list heading filename nil marker)) + (org-after-refile-insert-hook (cons #'org-reveal org-after-refile-insert-hook))) + (org-refile nil nil rfloc)))) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 7a8f2c106..307c0a2b6 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -675,6 +675,7 @@ between the two." "C" (λ! (org-clock-goto 'select)) "i" #'org-id-goto "r" #'org-refile-goto-last-stored + "v" #'+org/goto-visible "x" #'org-capture-goto-last-stored) (:prefix ("l" . "links") "c" 'org-cliplink @@ -690,6 +691,7 @@ between the two." "l" #'+org/refile-to-last-location "o" #'+org/refile-to-other-window "O" #'+org/refile-to-other-buffers + "v" #'+org/refile-to-visible "r" #'org-refile)) ; to all `org-refile-targets' (map! :after org-agenda diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index fa055fb49..43899dba1 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -24,6 +24,7 @@ (package! org-plus-contrib) ; install cutting-edge version of org-mode +(package! avy) (package! htmlize) (package! org-bullets :recipe (:host github :repo "Kaligule/org-bullets")) (package! org-fancy-priorities) From 996188250b178056fb84336173e4e1a1c666561d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 6 Dec 2019 17:16:34 -0500 Subject: [PATCH 181/983] Minor refactors & comment revision --- core/core.el | 20 ++++++++------------ init.el | 2 +- modules/app/regex/config.el | 1 - modules/completion/helm/config.el | 1 + modules/completion/ivy/config.el | 2 ++ modules/lang/java/config.el | 1 - modules/lang/solidity/README.org | 10 +++++----- modules/term/vterm/config.el | 2 +- modules/ui/popup/+hacks.el | 7 ------- 9 files changed, 18 insertions(+), 28 deletions(-) diff --git a/core/core.el b/core/core.el index 98c806e26..ad8256de3 100644 --- a/core/core.el +++ b/core/core.el @@ -247,8 +247,8 @@ users).") ;; Don't ping things that look like domain names. (setq ffap-machine-p-known 'reject) -;; Performance on Windows is considerably worse than elsewhere. We'll need -;; everything we can get. +;; Performance on Windows is considerably worse than elsewhere, especially if +;; WSL is involved. We'll need everything we can get. (when IS-WINDOWS ;; Reduce the workload when doing file IO (setq w32-get-true-file-attributes nil) @@ -258,13 +258,13 @@ users).") ;; been determined. (setq inhibit-compacting-font-caches t)) -;; Remove command line options that aren't relevant to our current OS; that -;; means less to process at startup. +;; Remove command line options that aren't relevant to our current OS; means +;; slightly less to process at startup. (unless IS-MAC (setq command-line-ns-option-alist nil)) (unless IS-LINUX (setq command-line-x-option-alist nil)) ;; Adopt a sneaky garbage collection strategy of waiting until idle time to -;; collect and staving off the collector while the user is working. +;; collect; staving off the collector while the user is working. (when doom-interactive-mode (add-transient-hook! 'pre-command-hook (gcmh-mode +1)) (with-eval-after-load 'gcmh @@ -377,9 +377,7 @@ If this is a daemon session, load them all immediately instead." ;;; Bootstrap helpers (defun doom-try-run-hook (hook) - "Run HOOK (a hook function), but handle errors better, to make debugging -issues easier. - + "Run HOOK (a hook function) with better error handling. Meant to be used with `run-hook-wrapped'." (doom-log "Running doom hook: %s" hook) (condition-case e @@ -406,8 +404,7 @@ If RETURN-P, return the message as a string instead of displaying it." "Tries to load FILE (an autoloads file). Return t on success, nil otherwise (but logs a warning)." (condition-case e - (let (command-switch-alist) - (load (substring file 0 -3) noerror 'nomessage)) + (load (substring file 0 -3) noerror 'nomessage) ((debug error) (message "Autoload file error: %s -> %s" (file-name-nondirectory file) e) nil))) @@ -415,8 +412,7 @@ Return t on success, nil otherwise (but logs a warning)." (defun doom-load-envvars-file (file &optional noerror) "Read and set envvars from FILE. If NOERROR is non-nil, don't throw an error if the file doesn't exist or is -unreadable. Returns a list of VAR=VALUE strings for all environment variables -set." +unreadable. Returns the names of envvars that were changed." (if (not (file-readable-p file)) (unless noerror (signal 'file-error (list "Couldn't read envvar file" file))) diff --git a/init.el b/init.el index 4ddc67d78..ce908b1b2 100644 --- a/init.el +++ b/init.el @@ -35,7 +35,7 @@ ;; In noninteractive sessions, prioritize non-byte-compiled source files to ;; prevent the use of stale byte-code. Otherwise, it saves us a little IO time -;; to skip the mtime checks on every *.elc file we load. +;; to skip the mtime checks on every *.elc file. (setq load-prefer-newer noninteractive) (let (file-name-handler-alist) diff --git a/modules/app/regex/config.el b/modules/app/regex/config.el index f48488d01..595d619e4 100644 --- a/modules/app/regex/config.el +++ b/modules/app/regex/config.el @@ -49,4 +49,3 @@ https://mediatemple.net" (set-popup-rules! '(("^\\*doom-regex\\*$" :size 4 :quit nil) ("^\\*doom-regex-groups" :side 'left :size 28 :select nil :quit nil))) - diff --git a/modules/completion/helm/config.el b/modules/completion/helm/config.el index a7c8162ca..84b68f738 100644 --- a/modules/completion/helm/config.el +++ b/modules/completion/helm/config.el @@ -125,6 +125,7 @@ be negative.") (after! helm-rg + (setq helm-rg-display-buffer-normal-method #'pop-to-buffer) (set-popup-rule! "^helm-rg-" :ttl nil :select t :size 0.45) (map! :map helm-rg-map "C-c C-e" #'helm-rg--bounce) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 31ca4eb4b..a5f5f7125 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -128,6 +128,8 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." (use-package! ivy-rich :after ivy :config + (setq ivy-rich-parse-remote-buffer nil) + (when (featurep! +icons) (cl-pushnew '(+ivy-rich-buffer-icon) (cadr (plist-get ivy-rich-display-transformers-list diff --git a/modules/lang/java/config.el b/modules/lang/java/config.el index e4818df76..4b04f3dff 100644 --- a/modules/lang/java/config.el +++ b/modules/lang/java/config.el @@ -46,4 +46,3 @@ If the depth is 2, the first two directories are removed: net.lissner.game.") :mode "\\.g\\(?:radle\\|roovy\\)$" :config (set-eval-handler! 'groovy-mode "groovy")) - diff --git a/modules/lang/solidity/README.org b/modules/lang/solidity/README.org index e0800b5a8..d91d419f3 100644 --- a/modules/lang/solidity/README.org +++ b/modules/lang/solidity/README.org @@ -7,11 +7,11 @@ This module adds [[https://github.com/ethereum/solidity][Solidity]] support thro + Gas estimation (~C-c C-g~) * Table of Contents :TOC: -- [[Module Flags][Module Flags]] -- [[Prerequisites][Prerequisites]] - - [[Solc][Solc]] - - [[Solium][Solium]] -- [[TODO][TODO]] +- [[#module-flags][Module Flags]] +- [[#prerequisites][Prerequisites]] + - [[#solc][Solc]] + - [[#solium][Solium]] +- [[#todo][TODO]] * Module Flags This module provides no flags. diff --git a/modules/term/vterm/config.el b/modules/term/vterm/config.el index c5d155b6b..046ae33d9 100644 --- a/modules/term/vterm/config.el +++ b/modules/term/vterm/config.el @@ -1,7 +1,7 @@ ;;; term/vterm/config.el -*- lexical-binding: t; -*- (use-package! vterm - :when (fboundp 'module-load) + :when module-file-suffix :defer t :preface (setq vterm-install t) :config diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index ae046ae96..ee20515db 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -199,13 +199,6 @@ the command buffer." (setq win (get-buffer-window (get-buffer (help-buffer))))) (delete-window win)))) - ;; `helm-ag' - (defadvice! +popup--helm-pop-to-buffer-a (orig-fn &rest args) - :around #'helm-ag--edit - (pop-to-buffer - (save-window-excursion (apply orig-fn args) - (current-buffer))))) - ;;;###package Info (defadvice! +popup--switch-to-info-window-a (&rest _) From a7d5da494ea37d5c124e9e32d94920ce816ab275 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 6 Dec 2019 21:45:38 -0500 Subject: [PATCH 182/983] Fix end-of-file syntax error --- modules/ui/popup/+hacks.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index ee20515db..1a82e2ffe 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -197,7 +197,7 @@ the command buffer." (when (and (helm-attr 'help-running-p) (string= candidate (helm-attr 'help-current-symbol)) (setq win (get-buffer-window (get-buffer (help-buffer))))) - (delete-window win)))) + (delete-window win))))) ;;;###package Info From 0ea197473236f4597895cb323b82f67b45c08dc4 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sat, 7 Dec 2019 23:02:06 +0700 Subject: [PATCH 183/983] Add ibuffer filter group for the workspace This introduces the +ibuffer-current-workspace function which open an ibuffer with only buffers from the current workspace. Signed-off-by: Rudi Grinberg --- modules/emacs/ibuffer/config.el | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/modules/emacs/ibuffer/config.el b/modules/emacs/ibuffer/config.el index 653ee52b2..9ad9e56d2 100644 --- a/modules/emacs/ibuffer/config.el +++ b/modules/emacs/ibuffer/config.el @@ -39,6 +39,23 @@ :header-mouse-map ibuffer-size-header-map) (file-size-human-readable (buffer-size))) + (when (featurep! :ui workspaces) + (define-ibuffer-filter workspace-buffers + "Filter for workspace buffers" + (:reader + (+workspace-get (read-string "workspace name: ")) :description "workspace") + (memq buf (+workspace-buffer-list qualifier))) + + (defun +ibuffer/workspace (workspace-name) + "Open an ibuffer window for a workspace" + (ibuffer nil (format "%s buffers" workspace-name) + (list (cons 'workspace-buffers (+workspace-get workspace-name))))) + + (defun +ibuffer-current-workspace () + "Open an ibuffer window for the current workspace" + (interactive) + (+ibuffer/workspace (+workspace-current-name)))) + (when (featurep! :completion ivy) (defadvice! +ibuffer-use-counsel-maybe-a (_file &optional _wildcards) "Use `counsel-find-file' instead of `find-file'." From 04e5a8db25ec86a44c900c66fc49ffee9c90f335 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 8 Dec 2019 00:21:07 -0500 Subject: [PATCH 184/983] docs/faq: fix strike-through markup #2165 --- docs/faq.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/faq.org b/docs/faq.org index 44c3cee82..6c249615a 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -121,7 +121,7 @@ To paraphrase (and expand upon) a [[https://www.reddit.com/r/emacs/comments/6pa0 optimizations we wouldn't have otherwise. ** Why such a complicated package management system? -Doom had ++four++ *five* goals for its package management system: +Doom had +four+ *five* goals for its package management system: 1. *Scriptability:* package management should be shell-scriptable, so updating can be automated. From 33b78499fc0f447659430b74a854487b79a1d4b9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 8 Dec 2019 00:21:29 -0500 Subject: [PATCH 185/983] emacs/dired: fix {fd,find}-dired opening results in a popup #2159 --- modules/emacs/dired/config.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index 300fef9c0..70e4e3471 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -170,7 +170,9 @@ we have to clean it up ourselves." (use-package! fd-dired :when (executable-find doom-projectile-fd-binary) :defer t - :init (advice-add #'find-dired :override #'fd-dired)) + :init + (advice-add #'find-dired :override #'fd-dired) + (set-popup-rule! "^\\*F\\(?:d\\|ind\\)\\*$" :ignore t)) ;;;###package dired-git-info From ecb76d536b33c334c6b34b4d9018abd1c71d03ce Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 8 Dec 2019 00:56:11 -0500 Subject: [PATCH 186/983] cli: clarify post-error debug mode instructions --- bin/doom | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/bin/doom b/bin/doom index 834e56afd..ddb82518f 100755 --- a/bin/doom +++ b/bin/doom @@ -69,7 +69,6 @@ with a different private module." ((condition-case e (let ((start-time (current-time))) (and (doom-cli-execute command args) - (terpri) (print! (success "Finished! (%.4fs)") (float-time (time-subtract (current-time) @@ -78,20 +77,30 @@ with a different private module." (print! (error "%s\n") (error-message-string e)) (print! (yellow "See 'doom help %s' for documentation on this command.") (car args))) ((debug error) - (message "--------------------------------------------------\n") - (message "There was an unexpected error:") - (message " %s (%s)" (get (car e) 'error-message) (car e)) - (dolist (item (cdr e)) - (message " %s" item)) + (print! (error "There was an unexpected error:")) + (print-group! + (print! "%s %s" (bold "Type:") (car e)) + (print! (bold "Message:")) + (print-group! + (print! "%s" (get (car e) 'error-message))) + (print! (bold "Data:")) + (print-group! + (if (cdr e) + (dolist (item (cdr e)) + (print! "%S" item)) + (print! "n/a")))) (unless debug-on-error - (message - (concat "\nRun the command again with the -d (or --debug) option to enable debug\n" - "mode and, hopefully, generate a stack trace. If you decide to file a bug\n" - "report, please include it!\n\n" - "Emacs outputs to standard error, so you'll need to redirect stderr to\n" - "stdout to pipe this to a file or clipboard!\n\n" - " e.g. doom -d install 2>&1 | clipboard-program\n")) - (signal 'doom-error e))))))) + (terpri) + (print! + (concat "Run the command again with the -d (or --debug) switch to enable debug\n" + "mode and (hopefully) generate a backtrace from this error:\n" + "\n %s\n\n" + "If you file a bug report, please include it!") + (string-join (append (list (file-name-nondirectory load-file-name) "-d" command) + args) + " ")) + ;; Ensure the process returns non-zero + (error ""))))))) (doom-cli-execute :main (cdr (member "--" argv))) (setq argv nil)) From dc8b3dd57dd812b988de6029a62af7f23070a3af Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 8 Dec 2019 00:57:10 -0500 Subject: [PATCH 187/983] Slight reformatting of 'doom refresh' & 'doom compile' output --- core/cli/byte-compile.el | 9 ++++---- core/core-cli.el | 47 ++++++++++++++++++++-------------------- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/core/cli/byte-compile.el b/core/cli/byte-compile.el index e1ca66a6c..ab65a3ad5 100644 --- a/core/cli/byte-compile.el +++ b/core/cli/byte-compile.el @@ -123,9 +123,9 @@ If RECOMPILE-P is non-nil, only recompile out-of-date files." (cl-return nil)) (print! - (info (if recompile-p - "Recompiling stale elc files..." - "Byte-compiling your config (may take a while)..."))) + (start (if recompile-p + "Recompiling stale elc files..." + "Byte-compiling your config (may take a while)..."))) (print-group! (require 'use-package) (condition-case e @@ -200,4 +200,5 @@ module. This does not include your byte-compiled, third party packages.'" finally do (print! (if success (success "All elc files deleted") - (info "No elc files to clean")))))) + (info "No elc files to clean")))) + t)) diff --git a/core/core-cli.el b/core/core-cli.el index c7b041275..a445468c6 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -238,31 +238,32 @@ It will ensure that unneeded packages are removed, all needed packages are installed, autoloads files are up-to-date and no byte-compiled files have gone stale." :bare t - (print! (green "Initiating a refresh of Doom Emacs...\n")) - (let (success) - (when (file-exists-p doom-env-file) - (doom-cli-reload-env-file 'force)) + (print! (start "Initiating a refresh of Doom Emacs...")) + (print-group! + (let (success) + (when (file-exists-p doom-env-file) + (doom-cli-reload-env-file 'force)) - ;; Ensures that no pre-existing state pollutes the generation of the new - ;; autoloads files. - (mapc #'doom--cli-delete-autoloads-file - (list doom-autoload-file - doom-package-autoload-file)) - (doom-initialize 'force 'noerror) - (doom-initialize-modules) + ;; Ensures that no pre-existing state pollutes the generation of the new + ;; autoloads files. + (mapc #'doom--cli-delete-autoloads-file + (list doom-autoload-file + doom-package-autoload-file)) + (doom-initialize 'force 'noerror) + (doom-initialize-modules) - (doom-cli-reload-core-autoloads (not if-necessary-p)) - (unwind-protect - (progn - (and (doom-cli-packages-install) - (setq success t)) - (and (doom-cli-packages-build) - (setq success t)) - (and (doom-cli-packages-purge purge-p 'builds-p purge-p) - (setq success t))) - (doom-cli-reload-package-autoloads (or success (not if-necessary-p))) - (doom-cli-byte-compile nil 'recompile)) - t)) + (doom-cli-reload-core-autoloads (not if-necessary-p)) + (unwind-protect + (progn + (and (doom-cli-packages-install) + (setq success t)) + (and (doom-cli-packages-build) + (setq success t)) + (and (doom-cli-packages-purge purge-p 'builds-p purge-p) + (setq success t))) + (doom-cli-reload-package-autoloads (or success (not if-necessary-p))) + (doom-cli-byte-compile nil 'recompile)) + t))) (load! "cli/env") (load! "cli/upgrade") From 78ca3974390465dfeb10f5a688ebc9d848035f2b Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 8 Dec 2019 16:17:39 +0700 Subject: [PATCH 188/983] Do not quit utop buffers automatically --- modules/lang/ocaml/config.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/lang/ocaml/config.el b/modules/lang/ocaml/config.el index 69ff8282d..69ce17737 100644 --- a/modules/lang/ocaml/config.el +++ b/modules/lang/ocaml/config.el @@ -37,7 +37,9 @@ (set-eval-handler! 'tuareg-mode #'utop-eval-region) (defun +ocaml-init-utop-h () (when (executable-find "utop") - (utop-minor-mode))))) + (utop-minor-mode))) + :config + (set-popup-rule! "^\\*utop\\*" :quit nil))) (use-package! merlin From 9ad0e710f5c7a58451060c84a08aaa07b75b9d94 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 8 Dec 2019 16:17:53 +0700 Subject: [PATCH 189/983] Do not quit scheme repl's automatically --- modules/lang/scheme/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/lang/scheme/config.el b/modules/lang/scheme/config.el index 9f4e286a0..8fbceb2c1 100644 --- a/modules/lang/scheme/config.el +++ b/modules/lang/scheme/config.el @@ -39,4 +39,5 @@ "q" #'geiser-repl-exit "r" #'geiser-restart-repl "R" #'geiser-reload - "c" #'geiser-repl-clear-buffer))) + "c" #'geiser-repl-clear-buffer)) + (set-popup-rule! "\\* [A-Za-z0-9_-]+ REPL \\*" :quit nil)) From 10b06b06d99eddc018f8569ded4731986dcca6fc Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 8 Dec 2019 16:28:13 +0700 Subject: [PATCH 190/983] popup rules for geiser buffers --- modules/lang/scheme/config.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/lang/scheme/config.el b/modules/lang/scheme/config.el index 8fbceb2c1..03641843f 100644 --- a/modules/lang/scheme/config.el +++ b/modules/lang/scheme/config.el @@ -40,4 +40,6 @@ "r" #'geiser-restart-repl "R" #'geiser-reload "c" #'geiser-repl-clear-buffer)) - (set-popup-rule! "\\* [A-Za-z0-9_-]+ REPL \\*" :quit nil)) + (set-popup-rule! + '(("\\*[Gg]eiser \\(?:[Mm]essages\\|DBG\\|Xref\\)\\*" :quit nil) + ( "\\* [A-Za-z0-9_-]+ REPL \\*" :quit nil)))) From a57610ccceac7f26787a9224d147a8e7e64125a6 Mon Sep 17 00:00:00 2001 From: chrunchyjesus Date: Sun, 8 Dec 2019 14:20:14 +0100 Subject: [PATCH 191/983] add common paths to be ignored in most js projects --- .../editor/file-templates/templates/gitignore-mode/__ | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/editor/file-templates/templates/gitignore-mode/__ b/modules/editor/file-templates/templates/gitignore-mode/__ index cb95699c3..ef1380d91 100644 --- a/modules/editor/file-templates/templates/gitignore-mode/__ +++ b/modules/editor/file-templates/templates/gitignore-mode/__ @@ -20,5 +20,12 @@ tmp/ '("*.class" "build")) ((string= type-ignore "js") - '("*.tern-port"))) + '("*.tern-port" + "node_modules/" + "npm-debug.log*" + "yarn-debug.log*" + "yarn-error.log*" + "*.tsbuildinfo" + ".npm" + ".eslintcache"))) "\n"))` From 1a1b5c650ca45e753bf5c83f1cb9f7da26c538d4 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 8 Dec 2019 21:17:01 +0700 Subject: [PATCH 192/983] Move geiser rules above map --- modules/lang/scheme/config.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/lang/scheme/config.el b/modules/lang/scheme/config.el index 03641843f..4face46ed 100644 --- a/modules/lang/scheme/config.el +++ b/modules/lang/scheme/config.el @@ -17,6 +17,9 @@ :definition #'geiser-edit-symbol-at-point :documentation #'geiser-doc-symbol-at-point)) :config + (set-popup-rule! + '(("\\*[Gg]eiser \\(?:[Mm]essages\\|DBG\\|Xref\\)\\*" :quit nil) + ( "\\* [A-Za-z0-9_-]+ REPL \\*" :quit nil))) (map! :localleader :map scheme-mode-map "'" #'geiser-mode-switch-to-repl @@ -39,7 +42,4 @@ "q" #'geiser-repl-exit "r" #'geiser-restart-repl "R" #'geiser-reload - "c" #'geiser-repl-clear-buffer)) - (set-popup-rule! - '(("\\*[Gg]eiser \\(?:[Mm]essages\\|DBG\\|Xref\\)\\*" :quit nil) - ( "\\* [A-Za-z0-9_-]+ REPL \\*" :quit nil)))) + "c" #'geiser-repl-clear-buffer))) From abdc5502bcb886482db63922917c9741c1dcc100 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 8 Dec 2019 21:19:30 +0700 Subject: [PATCH 193/983] Use [set-popup-rules!] instead of [set-popup-rule!] --- modules/lang/scheme/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/scheme/config.el b/modules/lang/scheme/config.el index 4face46ed..67e5bfd6a 100644 --- a/modules/lang/scheme/config.el +++ b/modules/lang/scheme/config.el @@ -17,7 +17,7 @@ :definition #'geiser-edit-symbol-at-point :documentation #'geiser-doc-symbol-at-point)) :config - (set-popup-rule! + (set-popup-rules! '(("\\*[Gg]eiser \\(?:[Mm]essages\\|DBG\\|Xref\\)\\*" :quit nil) ( "\\* [A-Za-z0-9_-]+ REPL \\*" :quit nil))) (map! :localleader From 617e46152ff10be1785712324e128e4302f011a7 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sat, 9 Nov 2019 15:21:08 -0600 Subject: [PATCH 194/983] add github-review --- modules/tools/magit/config.el | 1 + modules/tools/magit/packages.el | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index 13a818dc3..764d35b21 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -110,6 +110,7 @@ ensure it is built when we actually use Forge." (dolist (hook forge-bug-reference-hooks) (add-hook hook #'forge-bug-reference-setup))))))) +(use-package! github-review) (use-package! magit-todos :after magit diff --git a/modules/tools/magit/packages.el b/modules/tools/magit/packages.el index c9e45de54..426dc4d95 100644 --- a/modules/tools/magit/packages.el +++ b/modules/tools/magit/packages.el @@ -5,5 +5,6 @@ (package! forge) (package! magit-gitflow) (package! magit-todos) + (package! github-review) (when (featurep! :editor evil +everywhere) (package! evil-magit))) From 89f4f9d88fc83c9a4255c255caa7d2e215d083db Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sun, 1 Dec 2019 16:09:24 -0600 Subject: [PATCH 195/983] fix(magit): add bindings for github-review --- modules/tools/magit/autoload.el | 41 +++++++++++++++++++++++++++++++++ modules/tools/magit/config.el | 11 ++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/modules/tools/magit/autoload.el b/modules/tools/magit/autoload.el index bd42c1fdc..2cd1bda2e 100644 --- a/modules/tools/magit/autoload.el +++ b/modules/tools/magit/autoload.el @@ -93,3 +93,44 @@ control in buffers." (run-with-timer 5 nil #'+magit--kill-buffer buf) (kill-process process) (kill-buffer buf))))))) + +;;;###autoload +(defun +magit/start-github-review (arg) + (interactive "P") + (call-interactively + (if (or arg (not (featurep 'forge))) + #'github-review-start + #'github-review-forge-pr-at-point))) + +(defvar +magit-clone-history nil + "History for `+magit/clone' prompt.") +;;;###autoload +(defun +magit/clone (url-or-repo dir) + "Like `magit-clone', but supports additional formats on top of absolute URLs: + ++ USER/REPO: assumes {`+magit-default-clone-url'}/USER/REPO ++ REPO: assumes {`+magit-default-clone-url'}/{USER}/REPO, where {USER} is + ascertained from your global gitconfig." + (interactive + (progn + (require 'ghub) + (let* ((user (ghub--username (ghub--host))) + (repo (read-from-minibuffer + "Clone repository (user/repo or url): " + (if user (concat user "/")) + nil nil '+magit-clone-history)) + (name (car (last (split-string repo "/" t))))) + (list repo + (read-directory-name + "Destination: " + magit-clone-default-directory + name nil name))))) + (magit-clone-regular + (cond ((string-match-p "^[^/]+$" url-or-repo) + (require 'ghub) + (format +magit-default-clone-url (ghub--username (ghub--host)) url-or-repo)) + ((string-match-p "^\\([^/]+\\)/\\([^/]+\\)/?$" url-or-repo) + (apply #'format +magit-default-clone-url (split-string url-or-repo "/" t))) + (url-or-repo)) + dir + nil)) diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index 764d35b21..73a8508b3 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -110,7 +110,16 @@ ensure it is built when we actually use Forge." (dolist (hook forge-bug-reference-hooks) (add-hook hook #'forge-bug-reference-setup))))))) -(use-package! github-review) + +(use-package! github-review + :after magit + :config + (transient-append-suffix 'magit-merge "i" + '("y" "Review pull request" +magit/start-github-review)) + (after! forge + (transient-append-suffix 'forge-dispatch "c u" + '("c r" "Review pull request" +magit/start-github-review)))) + (use-package! magit-todos :after magit From bc89de4228f833bdbec8127f9851f6ce372b8277 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 8 Dec 2019 16:10:31 -0500 Subject: [PATCH 196/983] Move vc-follow-symlinks to core-editor And remove vc-make-backup-files setting. nil is already its default --- core/core-editor.el | 3 ++- modules/emacs/vc/config.el | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index e31ed14ec..cd4d539ff 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -56,7 +56,8 @@ possible." ;; Resolve symlinks when opening files, so that any operations are conducted ;; from the file's true directory (like `find-file'). -(setq find-file-visit-truename t) +(setq find-file-visit-truename t + vc-follow-symlinks t) ;; Disable the warning "X and Y are the same file". It's fine to ignore this ;; warning as it will redirect you to the existing buffer anyway. diff --git a/modules/emacs/vc/config.el b/modules/emacs/vc/config.el index a8a595052..9c16d9cca 100644 --- a/modules/emacs/vc/config.el +++ b/modules/emacs/vc/config.el @@ -4,11 +4,6 @@ (setenv "GIT_ASKPASS" "git-gui--askpass")) -;;;###package vc -(setq vc-make-backup-files nil - vc-follow-symlinks t) - - (after! vc-annotate (set-popup-rules! '(("^\\vc-d" :select nil) ; *vc-diff* @@ -21,7 +16,6 @@ (define-key vc-annotate-mode-map [remap quit-window] #'kill-current-buffer)) - (after! git-timemachine ;; Sometimes I forget `git-timemachine' is enabled in a buffer, so instead of ;; showing revision details in the minibuffer, show them in From 4ca20438fb989dbf311ee73e5b138ac4e80d9cf2 Mon Sep 17 00:00:00 2001 From: Alexander Graul Date: Sun, 8 Dec 2019 23:42:46 +0100 Subject: [PATCH 197/983] Use featurep! in mu4e/autoload/email.el featurep works a bit different from featurep!, which is required in this case. --- modules/email/mu4e/autoload/email.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/email/mu4e/autoload/email.el b/modules/email/mu4e/autoload/email.el index b5cef3f8c..27d9a10db 100644 --- a/modules/email/mu4e/autoload/email.el +++ b/modules/email/mu4e/autoload/email.el @@ -53,7 +53,7 @@ default/fallback account." "Start email client." (interactive) (require 'mu4e) - (if (featurep :ui 'workspaces) + (if (featurep! :ui workspaces) (+workspace-switch +mu4e-workspace-name t) (setq +mu4e--old-wconf (current-window-configuration)) (delete-other-windows) @@ -80,7 +80,7 @@ default/fallback account." (defun +mu4e-kill-mu4e-h () ;; (prolusion-mail-hide) (cond - ((and (featurep :ui 'workspaces) (+workspace-exists-p +mu4e-workspace-name)) + ((and (featurep! :ui workspaces) (+workspace-exists-p +mu4e-workspace-name)) (+workspace/delete +mu4e-workspace-name)) (+mu4e--old-wconf From f251eb5ba9c90aac553c56ce13c4573291685b50 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 8 Dec 2019 16:10:52 -0500 Subject: [PATCH 198/983] Remove recentf-exclude setting We don't need to be so judicious about what files are included in the MRU list. If you open a file, any file, it'll be considered a recently opened file. --- core/core-editor.el | 7 +------ modules/lang/org/config.el | 6 +----- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index cd4d539ff..5893ad30c 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -199,12 +199,7 @@ possible." (setq recentf-save-file (concat doom-cache-dir "recentf") recentf-auto-cleanup 'never recentf-max-menu-items 0 - recentf-max-saved-items 200 - recentf-exclude - (list "\\.\\(?:gz\\|gif\\|svg\\|png\\|jpe?g\\)$" "^/tmp/" "^/ssh:" - "\\.?ido\\.last$" "\\.revive$" "/TAGS$" "^/var/folders/.+$" - ;; ignore private DOOM temp files - (concat "^" (recentf-apply-filename-handlers doom-local-dir)))) + recentf-max-saved-items 200) (add-hook! '(doom-switch-window-hook write-file-functions) (defun doom--recentf-touch-buffer-h () diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 307c0a2b6..4c2bac98e 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -376,11 +376,7 @@ Some commands of interest: 'error))) (after! projectile - (add-to-list 'projectile-globally-ignored-directories org-attach-id-dir)) - - (after! recentf - (add-to-list 'recentf-exclude - (lambda (file) (file-in-directory-p file org-attach-id-dir))))) + (add-to-list 'projectile-globally-ignored-directories org-attach-id-dir))) (defun +org-init-centralized-exports-h () From 4bcc9e1a94dd336c9bc978eb0c904f82b27cbfa3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 8 Dec 2019 16:11:29 -0500 Subject: [PATCH 199/983] Add letenv! macro for lexical envvars --- core/core-lib.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/core-lib.el b/core/core-lib.el index caed77b53..265b58874 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -164,6 +164,13 @@ If FETCHER is a function, ELT is used as the key in LIST (an alist)." elt) ,list))) +(defmacro letenv! (envvars &rest body) + "Lexically bind ENVVARS in BODY, like `let' but for `process-environment'." + `(let ((process-environment (copy-sequence process-environment))) + (dolist (var ',envvars) + (setenv (car var) (cadr var))) + ,@body)) + (defmacro add-load-path! (&rest dirs) "Add DIRS to `load-path', relative to the current file. The current file is the file from which `add-to-load-path!' is used." From ae3316f0ae52bd4a58720c6165061d716ba6c65b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 8 Dec 2019 16:11:54 -0500 Subject: [PATCH 200/983] bidi-paragraph-direction = 'left-to-right A minor performance boost. --- core/core.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core.el b/core/core.el index ad8256de3..b66bf2581 100644 --- a/core/core.el +++ b/core/core.el @@ -228,7 +228,8 @@ users).") ;; Disable bidirectional text rendering for a modest performance boost. Of ;; course, this renders Emacs unable to detect/display right-to-left languages ;; (sorry!), but for us left-to-right language speakers/writers, it's a boon. -(setq-default bidi-display-reordering 'left-to-right) +(setq-default bidi-display-reordering 'left-to-right + bidi-paragraph-direction 'left-to-right) ;; Reduce rendering/line scan work for Emacs by not rendering cursors or regions ;; in non-focused windows. From a4494800b86522f81d27ca8aa6d28fe5d130d75e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 8 Dec 2019 16:13:12 -0500 Subject: [PATCH 201/983] lang/haskell: mark intero as deprecated #2121 --- modules/lang/haskell/config.el | 3 ++- modules/lang/haskell/doctor.el | 2 -- modules/lang/haskell/packages.el | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/lang/haskell/config.el b/modules/lang/haskell/config.el index 07898eaf1..515a7c00b 100644 --- a/modules/lang/haskell/config.el +++ b/modules/lang/haskell/config.el @@ -3,7 +3,8 @@ (after! projectile (add-to-list 'projectile-project-root-files "stack.yaml")) -(cond ((featurep! +intero) (load! "+intero")) +;; TODO ghcide? +(cond ((featurep! +intero) (load! "+intero")) ; DEPRECATED ((featurep! +dante) (load! "+dante")) ((featurep! +lsp) (load! "+lsp"))) diff --git a/modules/lang/haskell/doctor.el b/modules/lang/haskell/doctor.el index 9dcb7fc7d..30e023631 100644 --- a/modules/lang/haskell/doctor.el +++ b/modules/lang/haskell/doctor.el @@ -16,5 +16,3 @@ (when (or (featurep! +dante) (featurep! +intero)) (unless (executable-find "hlint") (warn! "Couldn't find hlint. Flycheck may have issues in haskell-mode"))) - - diff --git a/modules/lang/haskell/packages.el b/modules/lang/haskell/packages.el index b2fd48e5e..2a5329c89 100644 --- a/modules/lang/haskell/packages.el +++ b/modules/lang/haskell/packages.el @@ -6,7 +6,7 @@ (cond ((featurep! +dante) (package! dante) (package! attrap)) - ((featurep! +intero) - (package! intero)) ((featurep! +lsp) - (package! lsp-haskell))) + (package! lsp-haskell)) + ((featurep! +intero) ; DEPRECATED + (package! intero))) From 7733bfa97c2eddb91fdaa5b7f22e1d3ab1edc42c Mon Sep 17 00:00:00 2001 From: AxelBohm Date: Mon, 9 Dec 2019 10:54:27 +0100 Subject: [PATCH 202/983] mu4e is only available from the AUR --- modules/email/mu4e/README.org | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/email/mu4e/README.org b/modules/email/mu4e/README.org index 102135795..51c495a9c 100644 --- a/modules/email/mu4e/README.org +++ b/modules/email/mu4e/README.org @@ -50,12 +50,20 @@ brew install offlineimap #+END_SRC ** Arch Linux +Run one of the following commands. + #+BEGIN_SRC sh -sudo pacman --noconfirm --needed -S mu -# And one of the following sudo pacman -S isync # mbsync sudo pacman -S offlineimap #+END_SRC + +Install ~mu~, which is not available in the main repositories but in the AUR, by +using for example the AUR helper ~yay~. + +#+BEGIN_SRC sh +yay -S mu +#+END_SRC + ** NixOS #+BEGIN_SRC nix environment.systemPackages = with pkgs; [ From ec08acba1ed4fc6b4da078b98760d4f619ed891e Mon Sep 17 00:00:00 2001 From: Alan Brown Date: Mon, 9 Dec 2019 11:45:57 +0000 Subject: [PATCH 203/983] Changed to correct default location https://git-scm.com/docs/git-credential-cache --- modules/tools/magit/config.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index 73a8508b3..e8deb640e 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -27,13 +27,13 @@ (projectile-invalidate-cache nil)) ;; The default location for git-credential-cache is in - ;; ~/.config/git/credential. However, if ~/.git-credential-cache/ exists, then + ;; ~/.cache/git/credential. However, if ~/.git-credential-cache/ exists, then ;; it is used instead. Magit seems to be hardcoded to use the latter, so here ;; we override it to have more correct behavior. (unless (file-exists-p "~/.git-credential-cache/") (setq magit-credential-cache-daemon-socket - (doom-glob (or (getenv "XDG_CONFIG_HOME") - "~/.config/") + (doom-glob (or (getenv "XDG_CACHE_HOME") + "~/.cache/") "git/credential/socket"))) ;; Magit uses `magit-display-buffer-traditional' to display windows, by From 146e9a1acf4078a81cb0b3c0325ed22482a71217 Mon Sep 17 00:00:00 2001 From: Sean Farley Date: Mon, 9 Dec 2019 14:50:28 -0800 Subject: [PATCH 204/983] vterm: adapt to new function signature emacs-libvterm@376db7cf416 had a breaking change for `vterm-exit-functions` which sends the event as the second argument. --- modules/term/vterm/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/term/vterm/config.el b/modules/term/vterm/config.el index 046ae33d9..4d7ec4923 100644 --- a/modules/term/vterm/config.el +++ b/modules/term/vterm/config.el @@ -10,7 +10,7 @@ (add-hook 'vterm-mode-hook #'doom-mark-buffer-as-real-h) ;; Automatically kill buffer when vterm exits. (add-hook! 'vterm-exit-functions - (defun +vterm-kill-buffer-on-quit-fn (buffer) + (defun +vterm-kill-buffer-on-quit-fn (buffer event) (if buffer (kill-buffer buffer)))) ;; Modeline serves no purpose in vterm (add-hook 'vterm-mode-hook #'hide-mode-line-mode) From 019e6e530b3be955bfb5de74cd6adb90dc90e002 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 9 Dec 2019 18:14:20 -0500 Subject: [PATCH 205/983] Add text-mode to so-long-target-modes --- core/core-editor.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/core-editor.el b/core/core-editor.el index 5893ad30c..8e8806dcc 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -486,6 +486,8 @@ files, so we replace calls to `pp' with the much faster `prin1'." (delq! 'buffer-read-only so-long-variable-overrides 'assq) ;; ...but at least reduce the level of syntax highlighting (add-to-list 'so-long-variable-overrides '(font-lock-maximum-decoration . 1)) + ;; Text files could possibly be too long too + (add-to-list 'so-long-target-modes 'text-mode) ;; But disable everything else that may be unnecessary/expensive for large ;; or wide buffers. (appendq! so-long-minor-modes From 04f95c65e74b7f376706b543cfd64b15b1b41958 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 9 Dec 2019 18:17:58 -0500 Subject: [PATCH 206/983] editor/evil: evil-respect-visual-line-mode = t evil 0 motion was fixed in emacs-evil/evil#12bee185bb7b1a6012e2ae424f60055ad9eedf56 --- modules/editor/evil/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index ba8064eba..296f5c577 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -39,6 +39,7 @@ directives. By default, this only recognizes C directives.") evil-ex-visual-char-range t ; column range for ex commands evil-insert-skip-empty-lines t evil-mode-line-format 'nil + evil-respect-visual-line-mode t ;; more vim-like behavior evil-symbol-word-search t ;; cursor appearance From 6ff31408ece2d983d99214e70af7ddc214d75b7d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 10 Dec 2019 14:49:35 -0500 Subject: [PATCH 207/983] tools/docker: remove :ensure t in readme --- modules/tools/docker/README.org | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/tools/docker/README.org b/modules/tools/docker/README.org index b3153322c..afa890255 100644 --- a/modules/tools/docker/README.org +++ b/modules/tools/docker/README.org @@ -95,7 +95,6 @@ or inside a =use-package= declaration: #+BEGIN_SRC emacs-lisp (use-package! docker - :ensure t :bind ("C-c d" . docker) :custom (docker-image-run-arguments '("-i" "-t" "--rm"))) #+END_SRC From 8e844eada1f244e437ff995172eff89710e42c03 Mon Sep 17 00:00:00 2001 From: Rakan Alhneiti Date: Wed, 11 Dec 2019 11:27:50 +0100 Subject: [PATCH 208/983] Add py-isort feature to the python module --- modules/lang/python/config.el | 10 ++++++++++ modules/lang/python/packages.el | 3 +++ 2 files changed, 13 insertions(+) diff --git a/modules/lang/python/config.el b/modules/lang/python/config.el index 66450c698..410e8bee6 100644 --- a/modules/lang/python/config.el +++ b/modules/lang/python/config.el @@ -143,6 +143,16 @@ called.") :desc "Optimize imports" "o" #'+python/optimize-imports))) +(use-package! py-isort + :defer t + :init + (map! :after python + :map python-mode-map + :localleader + (:prefix ("i" . "imports") + :desc "Sort imports" "s" #'py-isort-buffer + :desc "Sort region" "r" #'py-isort-region))) + (use-package! nose :commands nose-mode :preface (defvar nose-mode-map (make-sparse-keymap)) diff --git a/modules/lang/python/packages.el b/modules/lang/python/packages.el index 600af8529..98819857f 100644 --- a/modules/lang/python/packages.el +++ b/modules/lang/python/packages.el @@ -32,3 +32,6 @@ ;; Import managements (package! pyimport) (package! pyimpsort) + +(when (featurep! +isort) + (package! py-isort)) From 0b11184e2d7cde98c20f6edb6eeea46791df1e71 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 12 Dec 2019 01:26:14 -0500 Subject: [PATCH 209/983] Update issue/PR templates --- .github/ISSUE_TEMPLATE/bug_report.md | 30 ++++++++++++++--------- .github/ISSUE_TEMPLATE/feature_request.md | 18 +++++--------- .github/ISSUE_TEMPLATE/how_to.md | 18 +++++++++----- .github/PULL_REQUEST_TEMPLATE.md | 6 ++--- 4 files changed, 39 insertions(+), 33 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 247844e6b..2285f116b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -6,32 +6,38 @@ title: "[BUG] " assignees: '' --- -**Describe the issue** -- What did you expect to happen? -- What actually happened? -- Do you have screenshots/casts of your issue? -- What commands are bound to any keys you've referenced? (use `SPC h k` to - inspect keys) -- Can you include a link to your private config? -- Were any warnings or errors logged to \*Messages\* (`SPC h e` or `M-x - view-echo-area-messages` will open it). +**What did you expect to happen?** +... + + +**What actually happened?** +... + + +**Additional details:** +- Include a link to your private config +- Include screenshots/casts of your issue +- If you mention key sequences, include what commands they're bound to (use `SPC + h k KEY` or `C-h h k KEY` to inspect keys). +- Include any warnings or errors logged to \*Messages\* (use `M-x + view-echo-area-messages` to see it).
-Include a backtrace of the error.
+If an error message is involved include a backtrace of it.
 
 How to acquire a backtrace:
 https://github.com/hlissner/doom-emacs/blob/develop/docs/getting_started.org#how-to-extract-a-backtrace-from-an-error
 
-**Steps to reproduce** +**Steps to reproduce:** 1. Select these example steps, 2. Delete them, 3. And replace them with precise steps to reproduce your issue. 4. Fill in "system information" below. -**System information** +**System information:**
 Place the output of `M-x doom/info` or `~/.emacs.d/bin/doom info` here.
 
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 7148f9f30..4ba9dc351 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,28 +1,22 @@ --- name: Feature request about: It'd be cool if Doom did/had/would... -labels: is:request +labels: is:new title: "[REQUEST] " assignees: '' --- **Describe the feature** -- What is your request? -- How is it helpful? -- How is it used? - If the feature involves new plugins, include links to them - If the feature involves replacement of current functionality, how the new functionality is better? -- If the feature is implemented in another editor or Emacs distro: - - Include screenshots or screencasts of it - - Include links to its implementation - - Include names of commands (and not just the keybinds to invoke them) +- If the feature is implemented in another editor or Emacs distro, include: + - Screenshots or screencasts of it + - Links to its implementation + - Names of relevant commands (and not only the keybinds to invoke them) **System information**
-Include the output of `M-x doom/info` or `~/.emacs.d/bin/doom info` here.
-
-It's possible Doom already has the feature you're requesting. This will tell me
-why you aren't seeing it.
+Place the output of `M-x doom/info` or `~/.emacs.d/bin/doom info` here.
 
diff --git a/.github/ISSUE_TEMPLATE/how_to.md b/.github/ISSUE_TEMPLATE/how_to.md index 7336a60a5..ceedfaacf 100644 --- a/.github/ISSUE_TEMPLATE/how_to.md +++ b/.github/ISSUE_TEMPLATE/how_to.md @@ -6,14 +6,20 @@ title: "[HOWTO] " assignees: '' --- -**What I want to achieve** -- What are you trying to achieve? -- What have you tried? +**What are you trying to achieve?** +... + + +**What have you tried?** +... + + +**Additional information** - Do you have screenshots/casts of this workflow in another editor or Emacs distro? (If possible, include names of specific commands or functions from - other editors/kemacs distros) -- Do you have extra material or links to resources that could help clarify what - you are trying to do? + other editors/emacs distros) +- Do you have additional material or links to resources that could help clarify + what you are trying to do? **System information** diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index eb8c16d71..6a69c8e63 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@ -> To ensure that this PR is processed as quickly as possible, please ensure the -> following steps have been taken: -> - [ ] This PR targets the develop branch and not master +> Please follow these steps before submitting your PR: +> +> - [ ] This PR targets the `develop` branch and not `master` > - [ ] If your PR is a work in progress, include [WIP] in its title > - [ ] Its commits' summaries are reasonably descriptive > - [ ] You've described what this PR addresses below From 62aa60825485f3e7a463366caf10f49675d23c07 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 12 Dec 2019 03:39:34 -0500 Subject: [PATCH 210/983] ui/doom: only load solaire-mode in daemon or gui sessions Why daemon? Because we can't be sure if the user will open graphical or tty frames. Detecting this is a messy affair, so I leave it to the user to deal with. This'll have to be documented somewhere... --- modules/ui/doom/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index bced52b36..5d0b89b00 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -44,6 +44,7 @@ (use-package! solaire-mode + :when (or (daemonp) (display-graphic-p)) :defer t :init (add-hook! 'doom-load-theme-hook :append From bdbae1024eec531b54aeb9d59db3b17ef4085afe Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 12 Dec 2019 03:46:39 -0500 Subject: [PATCH 211/983] ui/doom: update README --- modules/ui/doom/README.org | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/modules/ui/doom/README.org b/modules/ui/doom/README.org index 27fd15624..fead47300 100644 --- a/modules/ui/doom/README.org +++ b/modules/ui/doom/README.org @@ -6,26 +6,32 @@ * Table of Contents :TOC_3:noexport: - [[#description][Description]] - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] - [[#prerequisites][Prerequisites]] - [[#configuration][Configuration]] - [[#changing-theme][Changing theme]] - [[#changing-fonts][Changing fonts]] - [[#troubleshooting][Troubleshooting]] - [[#strange-font-symbols][Strange font symbols]] + - [[#ugly-background-colors-in-tty-emacs-for-daemon-users][Ugly background colors in tty Emacs for daemon users]] * Description -This module modifies Emacs' user interface. +This module gives Doom its signature look: powered by the =doom-one= theme +(inspired by Atom's One Dark theme) and =solaire-mode=. -Doom's look is loosely inspired by Atom's One Dark theme, and is largely contained in the] plugin. - -+ A colorscheme inspired by Atom's One Dark theme (now available in a separate plugin: [[https://github.com/hlissner/emacs-doom-theme/][doom-themes]]) ++ A colorscheme inspired by Atom's One Dark theme (now available in a separate + plugin: [[https://github.com/hlissner/emacs-doom-theme/][doom-themes]]) + A custom folded-region indicator for ~hideshow~ + "Thin bar" fringe bitmaps for ~git-gutter-fringe~ -+ File-visiting buffers are slightly brighter (powered by solaire-mode) ++ File-visiting buffers are slightly brighter (thanks to solaire-mode) ** Module Flags This module provides no flags. +** Plugins ++ [[https://github.com/hlissner/emacs-doom-themes][doom-themes]] ++ [[https://github.com/hlissner/emacs-solaire-mode][solaire-mode]] + * Prerequisites This module has no prereqisites. @@ -64,4 +70,24 @@ core/core-ui.el has four relevant variables: * Troubleshooting ** Strange font symbols -If you're seeing strange unicode symbols, this is likely because you don't have ~all-the-icons~'s font icon installed. You can install them with ~M-x all-the-icons-install-fonts~. +If you're seeing strange unicode symbols, this is likely because you don't have +~all-the-icons~'s font icon installed. You can install them with ~M-x +all-the-icons-install-fonts~. + +** Ugly background colors in tty Emacs for daemon users +=solaire-mode= is an aesthetic plugin that makes file-visiting buffers brighter +than the rest of the Emacs' frame (to visually differentiate temporary windows +or sidebars from editing windows). This looks great in GUI Emacs, but can look +questionable in the terminal. + +It disables itself if you start tty Emacs with ~emacs -nw~, but if you create a +tty frame from a daemon (which solaire-mode cannot anticipate), you'll get an +ugly background instead. + +If you only use Emacs in the terminal, your best bet is to disable the +solaire-mode package: + +#+BEGIN_SRC elisp +;; in ~/.doom.d/packages.el +(package! solaire-mode :disable t) +#+END_SRC From 5f2e708cd73fb5a562d770b6c7f1394414287ca5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 12 Dec 2019 03:48:25 -0500 Subject: [PATCH 212/983] Minor refactors and reformatting --- modules/lang/javascript/config.el | 24 +++++++++++++----------- modules/lang/org/contrib/present.el | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/modules/lang/javascript/config.el b/modules/lang/javascript/config.el index 45168fddf..93c839fae 100644 --- a/modules/lang/javascript/config.el +++ b/modules/lang/javascript/config.el @@ -188,7 +188,7 @@ to tide." :map tide-mode-map "R" #'tide-restart-server "f" #'tide-format - "rrs" #'tide-rename-symbol + "rrs" #'tide-rename-symbol "roi" #'tide-organize-imports)) @@ -206,7 +206,8 @@ to tide." (when (featurep! :editor evil +everywhere) (let ((js2-refactor-mode-map (evil-get-auxiliary-keymap js2-refactor-mode-map 'normal t t))) (js2r-add-keybindings-with-prefix (format "%s r" doom-localleader-key)))) - (map! :map js2-mode-map + (map! :after js2-mode + :map js2-mode-map :localleader (:prefix ("r" . "refactor") (:prefix ("a" . "add/arguments")) @@ -235,6 +236,9 @@ to tide." ;;;###package skewer-mode (map! :localleader + (:after js2-mode + :map js2-mode-map + :prefix ("s" . "skewer")) :prefix "s" (:after skewer-mode :map skewer-mode-map @@ -252,21 +256,19 @@ to tide." (:after skewer-html :map skewer-html-mode-map "e" #'skewer-html-eval-tag)) -(map! :map js2-mode-map - :localleader - (:prefix ("s" . "skewer"))) ;;;###package npm-mode (use-package! npm-mode :hook ((js-mode typescript-mode) . npm-mode) :config - (map! :localleader - :map npm-mode-keymap - "n" npm-mode-command-keymap) - (map! :map js2-mode-map - :localleader - (:prefix ("n" . "npm")))) + (map! (:localleader + :map npm-mode-keymap + "n" npm-mode-command-keymap) + (:after js2-mode + :map js2-mode-map + :localleader + (:prefix ("n" . "npm"))))) ;; diff --git a/modules/lang/org/contrib/present.el b/modules/lang/org/contrib/present.el index 22f2d17fb..c882c4435 100644 --- a/modules/lang/org/contrib/present.el +++ b/modules/lang/org/contrib/present.el @@ -13,7 +13,7 @@ (use-package! org-re-reveal :after ox - :config + :init (setq org-re-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js@3/")) From e4477f02e3e89003c24976b2e5e187f3217c4a94 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 12 Dec 2019 15:11:24 -0500 Subject: [PATCH 213/983] completion/ivy: remove directory in buffer name When switching buffers. --- modules/completion/ivy/autoload/ivy.el | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index c596e4168..86e8de660 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -21,16 +21,7 @@ Buffers that are considered unreal (see `doom-real-buffer-p') are dimmed with `+ivy-buffer-unreal-face'." (let ((b (get-buffer candidate))) (when (null uniquify-buffer-name-style) - (when-let* ((file-path (buffer-file-name b)) - (uniquify-buffer-name-style 'forward)) - (setq candidate - (uniquify-get-proposed-name - (replace-regexp-in-string "<[0-9]+>$" "" (buffer-name b)) - (directory-file-name - (if file-path - (file-name-directory file-path) - default-directory)) - 1)))) + (setq candidate (replace-regexp-in-string "<[0-9]+>$" "" candidate))) (cond ((ignore-errors (file-remote-p (buffer-local-value 'default-directory b))) From 10ccf27d2068be5156a05744c53e63da34cd5f0d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 14:21:01 -0500 Subject: [PATCH 214/983] docs/getting_started: revise Chemacs install guide --- docs/getting_started.org | 44 +++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/docs/getting_started.org b/docs/getting_started.org index a400edad1..c5fa9add8 100644 --- a/docs/getting_started.org +++ b/docs/getting_started.org @@ -16,7 +16,7 @@ - [[#wsl2][WSL2]] - [[#doom-emacs][Doom Emacs]] - [[#install-doom-manually][Install Doom Manually]] - - [[#alongside-other-emacs-configs-with-chemacs][Alongside other Emacs configs (with Chemacs)]] + - [[#install-doom-alongside-other-configs-with-chemacs][Install Doom alongside other configs (with Chemacs)]] - [[#externalsystem-dependencies][External/system dependencies]] - [[#update][Update]] - [[#doom][Doom]] @@ -316,31 +316,37 @@ emacs --batch -f all-the-icons-install-fonts To understand the purpose of the =~/.doom.d= directory and =~/.doom.d/init.el= file, see the [[#customize][Customize]] section further below. -*** Alongside other Emacs configs (with Chemacs) -[[https://github.com/plexus/chemacs][Chemacs]] is a bootloader for Emacs. It makes it easy to switch between multiple +*** Install Doom alongside other configs (with Chemacs) +[[https://github.com/plexus/chemacs][Chemacs]] is a bootloader for Emacs; it makes it easy to switch between multiple Emacs configurations. Here is a quick guide for setting it up with Doom Emacs as the default config. -After you've followed the installation instructions for Doom and Emacs, outlined -above, deploy [[https://raw.githubusercontent.com/plexus/chemacs/master/.emacs][the Chemacs' startup script]] to =~/.emacs=: +1. First, install Doom somewhere: -#+BEGIN_SRC bash -wget -O ~/.emacs https://raw.githubusercontent.com/plexus/chemacs/master/.emacs -#+END_SRC + #+BEGIN_SRC sh + git clone https://github.com/hlissner/doom-emacs ~/doom-emacs + ~/doom-emacs/bin/doom install + #+END_SRC -#+begin_quote -*Warning: the =~/.emacs.d= directory must not exist for this to work.* -#+end_quote +2. Download [[https://raw.githubusercontent.com/plexus/chemacs/master/.emacs][the Chemacs' startup script]] to =~/.emacs=: -Then create =~/.emacs-profiles.el= with a list of your Emacs profiles. This file -is structured like a =.dir-locals.el= file. Here is an example with Doom (as the -default), Spacemacs, and Prelude: + #+BEGIN_SRC bash + wget -O ~/.emacs https://raw.githubusercontent.com/plexus/chemacs/master/.emacs + #+END_SRC -#+BEGIN_SRC emacs-lisp -(("default" . ((user-emacs-directory . "~/doom-emacs"))) - ("spacemacs" . ((user-emacs-directory . "~/spacemacs"))) - ("prelude" . ((user-emacs-directory . "~/prelude")))) -#+END_SRC + #+begin_quote + *WARNING:* the =~/.emacs.d= directory must not exist for this to work. + #+end_quote + +3. Create =~/.emacs-profiles.el= with a list of your Emacs profiles. This file + is structured like a =.dir-locals.el= file. Here is an example with Doom (as + the default), Spacemacs, and Prelude: + + #+BEGIN_SRC emacs-lisp + (("default" . ((user-emacs-directory . "~/doom-emacs"))) + ("spacemacs" . ((user-emacs-directory . "~/spacemacs"))) + ("prelude" . ((user-emacs-directory . "~/prelude")))) + #+END_SRC To start Emacs with a specific config, use the =--with-profile= option: From 0cb62657b77333b3d17e7efd82289e3b8be35cb1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 14:23:44 -0500 Subject: [PATCH 215/983] emacs/dired: replace advice w/ remap for fd-dired --- modules/emacs/dired/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index 70e4e3471..b6ca86255 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -171,7 +171,7 @@ we have to clean it up ourselves." :when (executable-find doom-projectile-fd-binary) :defer t :init - (advice-add #'find-dired :override #'fd-dired) + (global-set-key [remap find-dired] #'fd-dired) (set-popup-rule! "^\\*F\\(?:d\\|ind\\)\\*$" :ignore t)) From 967390fe6c5bd9e1e99f4e0f1cd362fe36a0de89 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 14:24:17 -0500 Subject: [PATCH 216/983] lang/cc: add system libs to default ccls init options on mac --- modules/lang/cc/config.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/lang/cc/config.el b/modules/lang/cc/config.el index 4f30e5395..4708676c5 100644 --- a/modules/lang/cc/config.el +++ b/modules/lang/cc/config.el @@ -253,4 +253,11 @@ This is ignored by ccls.") (after! projectile (add-to-list 'projectile-globally-ignored-directories ".ccls-cache") (add-to-list 'projectile-project-root-files-bottom-up ".ccls-root") - (add-to-list 'projectile-project-root-files-top-down-recurring "compile_commands.json"))) + (add-to-list 'projectile-project-root-files-top-down-recurring "compile_commands.json")) + :config + (when IS-MAC + (setq ccls-initialization-options + `(:clang ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1" + "-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include" + "-isystem/usr/local/include"] + :resourceDir (string-trim (shell-command-to-string "clang -print-resource-dir"))))))) From 0ec0ff5ecbdfc978638b8696a89403d862519468 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 14:25:30 -0500 Subject: [PATCH 217/983] Minor refactors; unbind F1 from company active map --- modules/config/default/+evil-bindings.el | 3 ++- modules/lang/java/+lsp.el | 5 +++-- modules/ui/neotree/config.el | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index e278284d3..793f995f5 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -141,7 +141,8 @@ "C-SPC" #'company-complete-common "TAB" #'company-complete-common-or-cycle [tab] #'company-complete-common-or-cycle - [backtab] #'company-select-previous) + [backtab] #'company-select-previous + [f1] nil) (:map company-search-map ; applies to `company-filter-map' too "C-n" #'company-select-next-or-abort "C-p" #'company-select-previous-or-abort diff --git a/modules/lang/java/+lsp.el b/modules/lang/java/+lsp.el index dc917a6c7..03937e5c1 100644 --- a/modules/lang/java/+lsp.el +++ b/modules/lang/java/+lsp.el @@ -3,9 +3,10 @@ (use-package! lsp-java :after-call java-mode - :init (add-hook 'java-mode-local-vars-hook #'lsp!) - :config + :init + (add-hook 'java-mode-local-vars-hook #'lsp!) (setq lsp-java-server-install-dir (concat doom-etc-dir "eclipse.jdt.ls/server/")) + :config ;; TODO keybinds ;; TODO treemacs integration (?) ) diff --git a/modules/ui/neotree/config.el b/modules/ui/neotree/config.el index 705b61979..4a474c998 100644 --- a/modules/ui/neotree/config.el +++ b/modules/ui/neotree/config.el @@ -15,7 +15,7 @@ neo-mode-line-type 'none neo-window-width 24 neo-show-updir-line nil - neo-theme 'nerd ; fallback + neo-theme 'icons neo-banner-message nil neo-confirm-create-file #'off-p neo-confirm-create-directory #'off-p From 008c14640b1aa872b522163c2e12a9c140a515a3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 14:30:42 -0500 Subject: [PATCH 218/983] docs/api: add lambda!! demos --- docs/api.org | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/api.org b/docs/api.org index c7a72541a..370b3c9e8 100644 --- a/docs/api.org +++ b/docs/api.org @@ -215,7 +215,30 @@ It is integrated into Helpful, in Doom. : /home/hlissner/.emacs.d/LICENSE *** TODO lambda! -*** TODO lambda!! +*** lambda!! +When ~newline~ is passed a numerical prefix argument (=C-u 5 M-x newline=), it +inserts N newlines. We can use ~lambda!!~ to easily create a keybinds that bakes +in the prefix arg into the command call: + +#+BEGIN_SRC elisp +(map! "C-j" (lambda!! #'newline 5)) + +;; The `λ!!' short-form alias exists. If you have the snippets module enabled +;; and Doom's default snippets, a 'lam' snippet is available to expand into +;; 'λ!'. Otherwise, you can use `lambda!!'. +(map! "C-j" (λ!! #'newline 5)) + +#+END_SRC + +Or to create aliases for functions that behave differently: + +#+BEGIN_SRC elisp +(fset 'insert-5-newlines (lambda!! #'newline 5)) + +;; The equivalent of C-u M-x org-global-cycle, which resets the org document to +;; its startup visibility settings. +(fset 'org-reset-global-visibility (lambda!! #'org-global-cycle '(4)) +#+END_SRC *** load! #+BEGIN_SRC elisp :eval no ;;; Lets say we're in ~/.doom.d/config.el From 33dfe85c6606a00fd80778de7209a9bb91b6ee2b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 14:35:15 -0500 Subject: [PATCH 219/983] docs/api: add lambda! demos --- docs/api.org | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/api.org b/docs/api.org index 370b3c9e8..9deb95584 100644 --- a/docs/api.org +++ b/docs/api.org @@ -214,7 +214,15 @@ It is integrated into Helpful, in Doom. #+RESULTS: : /home/hlissner/.emacs.d/LICENSE -*** TODO lambda! +*** lambda! +#+BEGIN_SRC elisp +(map! "C-j" (lambda! (newline) (indent-according-to-mode))) + +;; The `λ!' short-form alias exists. If you have the snippets module enabled and +;; Doom's default snippets, the 'lam' snippet will expand into 'λ!'. Otherwise, +;; you can use `lambda!'. +(map! "C-j" (λ! (newline) (indent-according-to-mode))) +#+END_SRC *** lambda!! When ~newline~ is passed a numerical prefix argument (=C-u 5 M-x newline=), it inserts N newlines. We can use ~lambda!!~ to easily create a keybinds that bakes From 8224f14d9289ada2747cfd73f132ae2295f2e4ae Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 14:35:28 -0500 Subject: [PATCH 220/983] Expand on lambda!/lambda!!'s docstrings --- core/core-lib.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index 265b58874..f2dfa9546 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -101,13 +101,17 @@ at the values with which this function was called." ;;; Sugars (defmacro λ! (&rest body) - "Expands to (lambda () (interactive) ,@body)." + "Expands to (lambda () (interactive) ,@body). +A factory for quickly producing interaction commands, particularly for keybinds +or aliases." (declare (doc-string 1)) `(lambda () (interactive) ,@body)) (defalias 'lambda! 'λ!) (defun λ!! (command &optional arg) - "Expands to a command that interactively calls COMMAND with prefix ARG." + "Expands to a command that interactively calls COMMAND with prefix ARG. +A factory for quickly producing interactive, prefixed commands for keybinds or +aliases." (declare (doc-string 1)) (lambda () (interactive) (let ((current-prefix-arg arg)) From 7e0c093bcfa84cf5928f6112fe77f8fb0e0791a2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 14:53:52 -0500 Subject: [PATCH 221/983] cli/upgrade: fix dirty worktree detection --- core/cli/upgrade.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/cli/upgrade.el b/core/cli/upgrade.el index cfdf2d6ee..54ccb660b 100644 --- a/core/cli/upgrade.el +++ b/core/cli/upgrade.el @@ -36,7 +36,7 @@ following shell commands: (cl-destructuring-bind (success . stdout) (doom-call-process "git" "status" "--porcelain" "-uno") (if (= 0 success) - (string-match-p "[^ \t\n]" (buffer-string)) + (split-string stdout "\n" t) (error "Failed to check working tree in %s" dir)))) @@ -55,11 +55,12 @@ following shell commands: "Couldn't detect what branch you're on. Is Doom detached?"))) ;; We assume that a dirty .emacs.d is intentional and abort - (when (doom--working-tree-dirty-p default-directory) + (when-let (dirty (doom--working-tree-dirty-p default-directory)) (if (not force-p) - (user-error! "%s\n\n%s" + (user-error! "%s\n\n%s\n\n %s" (format "Refusing to upgrade because %S has been modified." (path doom-emacs-dir)) - "Either stash/undo your changes or run 'doom upgrade -f' to discard local changes.") + "Either stash/undo your changes or run 'doom upgrade -f' to discard local changes." + (string-join dirty "\n")) (print! (info "You have local modifications in Doom's source. Discarding them...")) (doom-call-process "git" "reset" "--hard" (format "origin/%s" branch)) (doom-call-process "git" "clean" "-ffd"))) From c0116d1447e5ba2c2a1fedb14ab18f665726d231 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 14:55:50 -0500 Subject: [PATCH 222/983] Fix #2183: suppress so-long when no comment syntax Hopefully a better solution can be found. --- core/core-editor.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/core-editor.el b/core/core-editor.el index 8e8806dcc..a641245c8 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -501,7 +501,14 @@ files, so we replace calls to `pp' with the much faster `prin1'." auto-composition-mode undo-tree-mode highlight-indent-guides-mode - hl-fill-column-mode))) + hl-fill-column-mode)) + ;; HACK Fix #2183: `so-long-detected-long-line-p' tries to parse comment + ;; syntax, but in some buffers comment state isn't initialized, leading + ;; to a wrong-type-argument: stringp error. + (defun doom-buffer-has-long-lines-p () + (when (bound-and-true-p comment-use-syntax) + (so-long-detected-long-line-p))) + (setq so-long-predicate #'doom-buffer-has-long-lines-p)) (use-package! undo-tree From 3524f4a314cd6c0179599d7d364cc065217fe2af Mon Sep 17 00:00:00 2001 From: Egidijus Z Date: Fri, 13 Dec 2019 22:53:19 +0200 Subject: [PATCH 223/983] Fix typo in elixir-mode link. --- modules/lang/elixir/README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/elixir/README.org b/modules/lang/elixir/README.org index 6756eacc6..2fbbac114 100644 --- a/modules/lang/elixir/README.org +++ b/modules/lang/elixir/README.org @@ -22,7 +22,7 @@ or [[https://github.com/JakeBecker/elixir-ls/][elixir-ls]]. + ~+lsp~ Enable LSP support. Requires [[https://github.com/JakeBecker/elixir-ls/][elixir-ls]]. ** Plugins -+ [[https://github.com/rust-lang/rust-mode][elixir-mode]] ++ [[https://github.com/elixir-editors/emacs-elixir][elixir-mode]] + [[https://github.com/tonini/alchemist.el][alchemist.el]] + [[https://github.com/aaronjensen/flycheck-credo][flycheck-credo]] From 1e6ef4d6e4ec168235988d574f7043d13bc329a6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 15:23:23 -0500 Subject: [PATCH 224/983] Rewrite interactive CLI commands - Replace doom//upgrade with doom/upgrade - Replace doom//autoloads with doom/reload-autoloads - Replace doom//refresh with doom/reload - Remove doom//install; there should be no workflow for this command - Remove doom//autoremove; autoremove was replaced with purge. Maybe I'll write a doom//purge analogue. Not sure yet. - Use compile instead of hacky wrapper around core-cli API Rewrite interactive CLI commands - Rewrite doom//upgrade & doom//autoloads - Remove doom//install; there really should be no use-case for it - Remove doom//autoremove; autoremove was replaced with purge. I'll get around to writing a doom//purge eventually. fixup! Rewrite interactive CLI commands --- bin/doom | 6 +-- core/autoload/cli.el | 81 ----------------------------------------- core/autoload/config.el | 81 +++++++++++++++++++++++++++-------------- 3 files changed, 57 insertions(+), 111 deletions(-) diff --git a/bin/doom b/bin/doom index ddb82518f..47dc9b7cd 100755 --- a/bin/doom +++ b/bin/doom @@ -75,7 +75,8 @@ with a different private module." start-time))))) (user-error (print! (error "%s\n") (error-message-string e)) - (print! (yellow "See 'doom help %s' for documentation on this command.") (car args))) + (print! (yellow "See 'doom help %s' for documentation on this command.") (car args)) + (error "")) ; Ensure non-zero exit code ((debug error) (print! (error "There was an unexpected error:")) (print-group! @@ -99,8 +100,7 @@ with a different private module." (string-join (append (list (file-name-nondirectory load-file-name) "-d" command) args) " ")) - ;; Ensure the process returns non-zero - (error ""))))))) + (error ""))))))) ; Ensure non-zero exit code (doom-cli-execute :main (cdr (member "--" argv))) (setq argv nil)) diff --git a/core/autoload/cli.el b/core/autoload/cli.el index e7f45c810..f0582ef1c 100644 --- a/core/autoload/cli.el +++ b/core/autoload/cli.el @@ -1,86 +1,5 @@ ;;; core/autoload/cli.el -*- lexical-binding: t; -*- -;; Externs -(defvar evil-collection-mode-list) - -;;;###autoload -(defun doom--cli-run (command &rest _args) - (require 'core-cli) - (require 'core-packages) - (require 'straight) - (when (featurep 'general) - (general-auto-unbind-keys)) - (let* ((evil-collection-mode-list nil) - (default-directory doom-emacs-dir) - (buf (get-buffer-create " *bin/doom*")) - (doom-format-backend 'ansi) - (ignore-window-parameters t) - (noninteractive t) - (standard-output - (lambda (char) - (with-current-buffer buf - (insert char) - (when (memq char '(?\n ?\r)) - (ansi-color-apply-on-region (line-beginning-position -1) (line-end-position)) - (redisplay)))))) - (setq doom-modules (doom-modules)) - (with-current-buffer (switch-to-buffer buf) - (erase-buffer) - (require 'package) - (redisplay) - (doom-cli-execute command nil) - (print! (green "\nDone!")))) - (when (featurep 'general) - (general-auto-unbind-keys 'undo)) - (message (format! (green "Done!")))) - - -;;;###autoload -(defun doom//autoloads (&optional yes) - "TODO" - (interactive "P") - (let ((doom-auto-accept yes)) - (doom--cli-run "autoloads"))) - -;;;###autoload -(defun doom//update (&optional yes) - "TODO" - (interactive "P") - (let ((doom-auto-accept yes)) - (doom--cli-run "update"))) - -;;;###autoload -(defun doom//upgrade (&optional yes) - "TODO" - (interactive "P") - (let ((doom-auto-accept yes)) - (doom--cli-run "upgrade")) - (when (y-or-n-p "You must restart Emacs for the upgrade to take effect. Restart?") - (doom/restart-and-restore))) - -;;;###autoload -(defun doom//install (&optional yes) - "TODO" - (interactive "P") - (let ((doom-auto-accept yes)) - (doom--cli-run "install"))) - -;;;###autoload -(defun doom//autoremove (&optional yes) - "TODO" - (interactive "P") - (let ((doom-auto-accept yes)) - (doom--cli-run "autoremove"))) - -;;;###autoload -(defun doom//refresh (&optional yes) - "TODO" - (interactive "P") - (let ((doom-auto-accept yes)) - (doom--cli-run "refresh"))) - - - ;; ;;; Library diff --git a/core/autoload/config.el b/core/autoload/config.el index 579d0f447..4159a48b0 100644 --- a/core/autoload/config.el +++ b/core/autoload/config.el @@ -1,5 +1,8 @@ ;;; core/autoload/config.el -*- lexical-binding: t; -*- +(defvar doom-bin-dir (concat doom-emacs-dir "bin/")) +(defvar doom-bin (concat doom-bin-dir "doom")) + ;;;###autoload (defvar doom-reload-hook nil "A list of hooks to run when `doom/reload' is called.") @@ -45,6 +48,21 @@ (interactive) (find-file (expand-file-name "packages.el" doom-private-dir))) + +;; +;;; Managements + +(cl-defmacro doom--compile (command &key on-success on-failure) + (declare (indent defun)) + `(with-current-buffer (compile ,command) + (add-hook + 'compilation-finish-functions + (lambda (_buf status) + (if (equal status "finished\n") + ,on-success + ,on-failure)) + nil 'local))) + ;;;###autoload (defun doom/reload () "Reloads your private config. @@ -55,25 +73,20 @@ reloads your package list, and lastly, reloads your private config.el. Runs `doom-reload-hook' afterwards." (interactive) - (or (y-or-n-p - (concat "You are about to reload your Doom config from within Emacs. This " - "is highly experimental and may cause issues. It is recommended you " - "use 'bin/doom refresh' on the command line instead.\n\n" - "Reload anyway?")) - (user-error "Aborted")) (require 'core-cli) - (let ((doom-reloading-p t)) - (compile (format "%s/bin/doom refresh" doom-emacs-dir)) - (while compilation-in-progress - (sit-for 1)) - (doom-initialize 'force) - (with-demoted-errors "PRIVATE CONFIG ERROR: %s" - (general-auto-unbind-keys) - (unwind-protect - (doom-initialize-modules 'force) - (general-auto-unbind-keys t))) - (run-hook-wrapped 'doom-reload-hook #'doom-try-run-hook)) - (message "Finished!")) + (doom--compile (format "%s refresh" doom-bin) + :on-success + (let ((doom-reloading-p t)) + (doom-initialize 'force) + (with-demoted-errors "PRIVATE CONFIG ERROR: %s" + (general-auto-unbind-keys) + (unwind-protect + (doom-initialize-modules 'force) + (general-auto-unbind-keys t))) + (run-hook-wrapped 'doom-reload-hook #'doom-try-run-hook) + (print! (success "Config successfully reloaded!"))) + :on-failure + (user-error "Failed to reload your config"))) ;;;###autoload (defun doom/reload-autoloads () @@ -92,14 +105,28 @@ line." (doom-cli-reload-autoloads nil 'force)) ;;;###autoload -(defun doom/reload-env () - "Regenerates and reloads your shell environment. +(defun doom/reload-env (&optional arg) + "Regenerates and/or reloads your envvar file. -Uses the same mechanism as 'bin/doom env reload'." +If passed the prefix ARG, clear the envvar file. Uses the same mechanism as +'bin/doom env'. + +An envvar file contains a snapshot of your shell environment, which can be +imported into Emacs." + (interactive "P") + (doom--compile (format "%s env%s" doom-bin (if arg " -c" "")) + :on-success + (let ((doom-reloading-p t)) + (unless arg + (doom-load-envvars-file doom-env-file))) + :on-failure + (error "Failed to generate env file"))) + +;;;###autoload +(defun doom/upgrade () + "Run 'doom upgrade' then prompt to restart Emacs." (interactive) - (compile (format "%s env" (expand-file-name "bin/doom" doom-emacs-dir))) - (while compilation-in-progress - (sit-for 1)) - (unless (file-readable-p doom-env-file) - (error "Failed to generate env file")) - (doom-load-envvars-file doom-env-file)) + (doom--compile (format "%s upgrade" doom-bin) + :on-success + (when (y-or-n-p "You must restart Emacs for the upgrade to take effect.\n\nRestart Emacs?") + (doom/restart-and-restore)))) From 663d3aaba914e7549c830512f8016710f8fb6592 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 15:40:17 -0500 Subject: [PATCH 225/983] term/eshell: move eshell-aliases-file to aliases Rather than "alias" --- modules/term/eshell/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/term/eshell/config.el b/modules/term/eshell/config.el index 5b05e0810..89deb3f1e 100644 --- a/modules/term/eshell/config.el +++ b/modules/term/eshell/config.el @@ -39,7 +39,7 @@ You should use `set-eshell-alias!' to change this.") (defvar eshell-directory-name (concat doom-etc-dir "eshell")) ;; These files are exceptions, because they may contain configuration -(defvar eshell-aliases-file (concat +eshell-config-dir "alias")) +(defvar eshell-aliases-file (concat +eshell-config-dir "aliases")) (defvar eshell-rc-script (concat +eshell-config-dir "profile")) (defvar eshell-login-script (concat +eshell-config-dir "login")) From acdd16f2b17858cbe378ef40af7c2448a0b1c757 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 16:22:14 -0500 Subject: [PATCH 226/983] ui/treemacs: treemacs-sorting = 'alphabetic-case-insensitive-asc Since sorting was reversed upstream: Alexander-Miller/treemacs@af757e6 --- modules/ui/treemacs/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/treemacs/config.el b/modules/ui/treemacs/config.el index 7ca592ff6..fe1535440 100644 --- a/modules/ui/treemacs/config.el +++ b/modules/ui/treemacs/config.el @@ -2,7 +2,7 @@ (setq treemacs-follow-after-init t treemacs-is-never-other-window t - treemacs-sorting 'alphabetic-case-insensitive-desc + treemacs-sorting 'alphabetic-case-insensitive-asc treemacs-persist-file (concat doom-cache-dir "treemacs-persist") treemacs-last-error-persist-file (concat doom-cache-dir "treemacs-last-error-persist")) From 078e563355143d2ad0d6fb97bd2140dd29b2314b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 17:28:33 -0500 Subject: [PATCH 227/983] Prevent duplicates in projectile file lists Projectile has `projectile-git-command` and `projectile-git-submodule-command`. By default, these use `git ls-files` and `git submodule foreach 'echo $path'`, respectively. It uses them together to index a full list of project files. Since we've changed `projectile-git-command` to use `fd` or `ripgrep`, which indexes submodules just fine (unlike git ls-files), you get duplicates when projectile does a second pass with `projectile-git-submodule-command`, so we unset it completely. --- core/core-projects.el | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/core/core-projects.el b/core/core-projects.el index fad112f82..c24e587e4 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -123,10 +123,11 @@ c) are not valid projectile projects." ;; that is significantly faster than git ls-files or find, and it respects ;; .gitignore. This is recommended in the projectile docs. ((executable-find doom-projectile-fd-binary) - (setq projectile-git-command (concat - doom-projectile-fd-binary - " . --color=never --type f -0 -H -E .git") - projectile-generic-command projectile-git-command + (setq projectile-generic-command + (format "%s . --color=never --type f -0 -H -E .git" + doom-projectile-fd-binary) + projectile-git-command projectile-generic-command + projectile-git-submodule-command nil ;; ensure Windows users get fd's benefits projectile-indexing-method 'alien)) @@ -136,12 +137,13 @@ c) are not valid projectile projects." (concat "rg -0 --files --color=never --hidden" (cl-loop for dir in projectile-globally-ignored-directories concat (format " --glob '!%s'" dir))) + projectile-git-command projectile-generic-command + projectile-git-submodule-command nil ;; ensure Windows users get rg's benefits - projectile-indexing-method 'alien) - ;; fix breakage on windows in git projects - (unless (executable-find "tr") - (setq projectile-git-submodule-command nil))) + projectile-indexing-method 'alien)) + ;; Fix breakage on windows in git projects with submodules, since Windows + ;; doesn't have tr ((not (executable-find "tr")) (setq projectile-git-submodule-command nil))) From fecf68bb2a52827df992a080d483d28dde717994 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 17:31:11 -0500 Subject: [PATCH 228/983] Bind 'SPC s L' to ffap-menu --- modules/config/default/+evil-bindings.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 793f995f5..27d1f1277 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -582,7 +582,8 @@ :desc "Search other directory" "D" #'+default/search-other-cwd :desc "Locate file" "f" #'locate :desc "Jump to symbol" "i" #'imenu - :desc "Jump to link" "l" #'ace-link + :desc "Jump to visible link" "l" #'ace-link + :desc "Jump to link" "L" #'ffap-menu :desc "Jump list" "j" #'evil-show-jumps :desc "Jump to mark" "m" #'evil-show-marks :desc "Look up online" "o" #'+lookup/online From fbe8d9d8acf3e8fb3f01fba036809a3057077761 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 19:52:52 -0500 Subject: [PATCH 229/983] ui/modeline: remove dangling advice `doom-modeline-icon-material` was removed upstream and replaced with `doom-modeline-icon`. This breaks the saved icon, again. PRs welcome. --- modules/ui/modeline/config.el | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/modules/ui/modeline/config.el b/modules/ui/modeline/config.el index d26458f56..9c40d1fdc 100644 --- a/modules/ui/modeline/config.el +++ b/modules/ui/modeline/config.el @@ -37,17 +37,6 @@ (add-hook '+doom-dashboard-mode-hook #'doom-modeline-set-project-modeline) - (when (or (featurep! :ui pretty-code +fira) - (featurep! :ui pretty-code +iosevka)) - ;; Fix #1216 and seagle0128/doom-modeline#69: wrong icon displayed for - ;; 'save' icon in modeline. - (defadvice! +modeline-fix-font-conflict-with-ligatures-a (&rest args) - :override #'doom-modeline-icon-material - (when doom-modeline-icon - (pcase (car args) - ("save" (apply 'all-the-icons-faicon (cons "floppy-o" (plist-put (cdr args) :v-adjust -0.0575)))) - (other (apply 'all-the-icons-material args)))))) - (add-hook! 'magit-mode-hook (defun +modeline-hide-in-non-status-buffer-h () "Show minimal modeline in magit-status buffer, no modeline elsewhere." From f236d27d51af60d8ea694feca46cfbc0a384c87d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 19:54:30 -0500 Subject: [PATCH 230/983] ui/modeline: add +light feature This will one day replace the module. --- modules/ui/modeline/+light.el | 476 ++++++++++++++++++++++++++++++++ modules/ui/modeline/config.el | 22 +- modules/ui/modeline/packages.el | 3 +- 3 files changed, 491 insertions(+), 10 deletions(-) create mode 100644 modules/ui/modeline/+light.el diff --git a/modules/ui/modeline/+light.el b/modules/ui/modeline/+light.el new file mode 100644 index 000000000..c4ecbc15c --- /dev/null +++ b/modules/ui/modeline/+light.el @@ -0,0 +1,476 @@ +;;; ui/modeline/+default.el -*- lexical-binding: t; -*- + +(defvar +modeline-height 33) +(defvar +modeline-bar-width 3) + +;; This is a slimmed down version of `doom-modeline' that manipulates +;; `mode-line-format' directly. Its purpose is to be a *significantly* lighter +;; modeline for doom. Upstream has generalized and grown too much so I've +;; returned to the roots. +;; +;; TODO Refactor me + +(defface +modeline-success-highlight '((t (:inherit mode-line-highlight))) + "TODO") + +(defvar +modeline--redisplayed-p nil) +(defadvice! modeline-recalculate-height-a (&optional _force &rest _ignored) + :before '(fit-window-to-buffer resize-temp-buffer-window) + (unless +modeline--redisplayed-p + (setq-local +modeline--redisplayed-p t) + (redisplay t))) + +;;; `active' +(defvar selected-window (selected-window)) +(defun active () (eq (selected-window) selected-window)) +(add-hook! 'pre-redisplay-functions + (defun set-selected-window (&rest _) + "Set the variable `selected-window' appropriately." + (let ((win (selected-window))) + (unless (minibuffer-window-active-p win) + (setq selected-window (frame-selected-window)))))) + +;;; Helpers +(defun +modeline--make-xpm (color width height) + "Create an XPM bitmap via COLOR, WIDTH and HEIGHT. Inspired by `powerline''s `pl/+modeline--make-xpm'." + (propertize + " " 'display + (let ((data (make-list height (make-list width 1))) + (color (or color "None"))) + (ignore-errors + (create-image + (concat + (format "/* XPM */\nstatic char * percent[] = {\n\"%i %i 2 1\",\n\". c %s\",\n\" c %s\"," + (length (car data)) + (length data) + color + color) + (apply #'concat + (cl-loop with idx = 0 + with len = (length data) + for dl in data + do (cl-incf idx) + collect + (concat "\"" + (cl-loop for d in dl + if (= d 0) collect (string-to-char " ") + else collect (string-to-char ".")) + (if (eq idx len) "\"};" "\",\n"))))) + 'xpm t :ascent 'center))))) + +(defun +modeline-format-icon (icon label &optional face help-echo voffset) + (propertize (concat (all-the-icons-material + icon + :face face + :height 1.1 + :v-adjust (or voffset -0.225)) + (propertize label 'face face)) + 'help-echo help-echo)) + + +;; +;;; Segments + +;;; `+modeline-bar' +(defvar +modeline-bar "") +(defvar +modeline-inactive-bar "") +(put '+modeline-bar 'risky-local-variable t) +(put '+modeline-inactive-bar 'risky-local-variable t) + +(defface +modeline-bar '((t (:inherit highlight))) + "The face used for the left-most bar on the mode-line of an active window.") + +(defface +modeline-bar-inactive '((t (:inherit mode-line-inactive))) + "The face used for the left-most bar on the mode-line of an inactive window.") + +(add-hook! 'doom-load-theme-hook + (defun +modeline-refresh-bars-h () + (let ((width (or +modeline-bar-width 1))) + (setq +modeline-bar + (+modeline--make-xpm (if +modeline-bar-width (face-background '+modeline-bar nil 'inherit)) + width (max +modeline-height (frame-char-height))) + +modeline-inactive-bar + (+modeline--make-xpm (if +modeline-bar-width (face-background '+modeline-bar-inactive nil 'inherit)) + width (max +modeline-height (frame-char-height))))))) + +(defvar +modeline--old-height nil) +(defun +modeline-adjust-height-h () + (unless +modeline--old-height + (setq +modeline--old-height +modeline-height)) + (let ((default-height +modeline--old-height) + (scale (or (frame-parameter nil 'font-scale) 0))) + (if (> scale 0) + (let* ((font-size (string-to-number + (aref (doom--font-name (frame-parameter nil 'font) + (selected-frame)) + xlfd-regexp-pixelsize-subnum))) + (scale (frame-parameter nil 'font-scale))) + (setq +modeline-height (+ default-height (* scale doom-font-increment)))) + (setq +modeline-height default-height)) + (setq +modeline-bar (+modeline--make-xpm nil 1 +modeline-height)))) +(add-hook 'doom-change-font-size-hook #'+modeline-adjust-height-h) + + +;;; `+modeline-matches' +(progn + (use-package! anzu + :after-call isearch-mode + :config + ;; anzu and evil-anzu expose current/total state that can be displayed in the + ;; mode-line. + (defun doom-modeline-fix-anzu-count (positions here) + "Calulate anzu counts via POSITIONS and HERE." + (cl-loop for (start . end) in positions + collect t into before + when (and (>= here start) (<= here end)) + return (length before) + finally return 0)) + + (advice-add #'anzu--where-is-here :override #'doom-modeline-fix-anzu-count) + + (setq anzu-cons-mode-line-p nil) ; manage modeline segment ourselves + ;; Ensure anzu state is cleared when searches & iedit are done + (add-hook 'isearch-mode-end-hook #'anzu--reset-status t) + (add-hook 'iedit-mode-end-hook #'anzu--reset-status) + (advice-add #'evil-force-normal-state :before #'anzu--reset-status) + ;; Fix matches segment mirroring across all buffers + (mapc #'make-variable-buffer-local + '(anzu--total-matched anzu--current-position anzu--state + anzu--cached-count anzu--cached-positions anzu--last-command + anzu--last-isearch-string anzu--overflow-p))) + + (use-package! evil-anzu + :when (featurep! :editor evil) + :after-call (evil-ex-start-search evil-ex-start-word-search evil-ex-search-activate-highlight)) + + (defun +modeline--anzu () + "Show the match index and total number thereof. +Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with +`evil-search'." + (when (and (bound-and-true-p anzu--state) + (not (bound-and-true-p iedit-mode))) + (propertize + (let ((here anzu--current-position) + (total anzu--total-matched)) + (cond ((eq anzu--state 'replace-query) + (format " %d replace " anzu--cached-count)) + ((eq anzu--state 'replace) + (format " %d/%d " here total)) + (anzu--overflow-p + (format " %s+ " total)) + (t + (format " %s/%d " here total)))) + 'face (if (active) 'mode-line-highlight)))) + + (defun +modeline--evil-substitute () + "Show number of matches for evil-ex substitutions and highlights in real time." + (when (and (bound-and-true-p evil-local-mode) + (or (assq 'evil-ex-substitute evil-ex-active-highlights-alist) + (assq 'evil-ex-global-match evil-ex-active-highlights-alist) + (assq 'evil-ex-buffer-match evil-ex-active-highlights-alist))) + (propertize + (let ((range (if evil-ex-range + (cons (car evil-ex-range) (cadr evil-ex-range)) + (cons (line-beginning-position) (line-end-position)))) + (pattern (car-safe (evil-delimited-arguments evil-ex-argument 2)))) + (if pattern + (format " %s matches " (how-many pattern (car range) (cdr range))) + " - ")) + 'face (if (active) 'mode-line-highlight)))) + + (defun +mode-line--multiple-cursors () + "Show the number of multiple cursors." + (when (bound-and-true-p evil-mc-cursor-list) + (let ((count (length evil-mc-cursor-list))) + (when (> count 0) + (let ((face (cond ((not (active)) 'mode-line-inactive) + (evil-mc-frozen 'mode-line-highlight) + ('+modeline-success-highlight)))) + (concat (propertize " " 'face face) + (all-the-icons-faicon "i-cursor" :face face :v-adjust -0.0575) + (propertize " " 'face `(:inherit (variable-pitch ,face))) + (propertize (format "%d " count) + 'face face))))))) + + (defun mode-line--overlay< (a b) + "Sort overlay A and B." + (< (overlay-start a) (overlay-start b))) + + (defun +modeline--iedit () + "Show the number of iedit regions matches + what match you're on." + (when (and (bound-and-true-p iedit-mode) + (bound-and-true-p iedit-occurrences-overlays)) + (propertize + (let ((this-oc (or (let ((inhibit-message t)) + (iedit-find-current-occurrence-overlay)) + (save-excursion + (iedit-prev-occurrence) + (iedit-find-current-occurrence-overlay)))) + (length (length iedit-occurrences-overlays))) + (format " %s/%d " + (if this-oc + (- length + (length (memq this-oc (sort (append iedit-occurrences-overlays nil) + #'mode-line--overlay<))) + -1) + "-") + length)) + 'face (if (active) 'mode-line-highlight)))) + + (defun +modeline--macro-recording () + "Display current Emacs or evil macro being recorded." + (when (and (active) + (or defining-kbd-macro + executing-kbd-macro)) + (let ((sep (propertize " " 'face 'mode-line-highlight))) + (concat sep + (propertize (if (bound-and-true-p evil-this-macro) + (char-to-string evil-this-macro) + "Macro") + 'face 'mode-line-highlight) + sep + (all-the-icons-octicon "triangle-right" + :face 'mode-line-highlight + :v-adjust -0.05) + sep)))) + + (defvar +modeline-matches + '(:eval + (let ((meta (concat (+modeline--macro-recording) + (+modeline--anzu) + (+modeline--evil-substitute) + (+modeline--iedit) + (+mode-line--multiple-cursors)))) + (or (and (not (equal meta "")) meta) + " %I ")))) + (put '+modeline-matches 'risky-local-variable t)) + + +;;; `+modeline-modes' +(defvar +modeline-modes ; remove minor modes + '("" + (:propertize mode-name + face bold + mouse-face mode-line-highlight) + mode-line-process + "%n" + "%]" + " ")) + + +;;; `+modeline-buffer-identification' +(defconst +modeline-buffer-identification ; slightly more informative buffer id + '((:eval + (propertize + (let ((buffer-file-name (buffer-file-name (buffer-base-buffer)))) + (or (when buffer-file-name + (if-let (project (doom-project-root buffer-file-name)) + (let ((filename (or buffer-file-truename (file-truename buffer-file-name)))) + (file-relative-name filename (concat project ".."))))) + "%b")) + 'face (cond ((buffer-modified-p) + '(error bold mode-line-buffer-id)) + ((active) + 'mode-line-buffer-id)) + 'help-echo buffer-file-name)) + (buffer-read-only (:propertize " RO" face warning)))) + + +;;; `+modeline-position' +(defvar +modeline-position '(" %l:%C %p ")) + + +;;; `+modeline-checker' +(defvar-local +modeline-checker nil + "Displays color-coded error status in the current buffer with pretty +icons.") +(put '+modeline-checker 'risky-local-variable t) + +(defun +modeline-checker-update (&optional status) + "Update flycheck text via STATUS." + (setq +modeline-checker + (pcase status + (`finished + (if flycheck-current-errors + (let-alist (flycheck-count-errors flycheck-current-errors) + (let ((error (or .error 0)) + (warning (or .warning 0)) + (info (or .info 0))) + (+modeline-format-icon "do_not_disturb_alt" + (number-to-string (+ error warning info)) + (cond ((> error 0) 'error) + ((> warning 0) 'warning) + ('success)) + (format "Errors: %d, Warnings: %d, Debug: %d" + error + warning + info)))) + (+modeline-format-icon "check" "" 'success))) + (`running (+modeline-format-icon "access_time" "*" 'font-lock-comment-face "Running...")) + (`errored (+modeline-format-icon "sim_card_alert" "!" 'error "Errored!")) + (`interrupted (+modeline-format-icon "pause" "!" 'font-lock-comment-face "Interrupted")) + (`suspicious (+modeline-format-icon "priority_high" "!" 'error "Suspicious"))))) +(add-hook 'flycheck-status-changed-functions #'+modeline-checker-update) +(add-hook 'flycheck-mode-hook #'+modeline-checker-update) + + +;;; `+modeline-selection-info' +(defsubst doom-modeline-column (pos) + "Get the column of the position `POS'." + (save-excursion (goto-char pos) + (current-column))) + +(defun add-selection-segment () + (add-to-list '+modeline-format-left '+modeline-selection-info 'append)) +(defun remove-selection-segment () + (delq! '+modeline-selection-info +modeline-format-left)) + +(if (featurep 'evil) + (progn + (add-hook 'evil-visual-state-entry-hook #'add-selection-segment) + (add-hook 'evil-visual-state-exit-hook #'remove-selection-segment)) + (add-hook 'activate-mark-hook #'add-selection-segment) + (add-hook 'deactivate-mark-hook #'remove-selection-segment)) + +(defvar +modeline-selection-info + '(:eval + (when (or mark-active + (and (bound-and-true-p evil-local-mode) + (eq evil-state 'visual))) + (cl-destructuring-bind (beg . end) + (if (boundp 'evil-local-mode) + (cons evil-visual-beginning evil-visual-end) + (cons (region-beginning) (region-end))) + (propertize + (let ((lines (count-lines beg (min end (point-max))))) + (concat " " + (cond ((or (bound-and-true-p rectangle-mark-mode) + (and (bound-and-true-p evil-visual-selection) + (eq 'block evil-visual-selection))) + (let ((cols (abs (- (doom-modeline-column end) + (doom-modeline-column beg))))) + (format "%dx%dB" lines cols))) + ((and (bound-and-true-p evil-visual-selection) + (eq evil-visual-selection 'line)) + (format "%dL" lines)) + ((> lines 1) + (format "%dC %dL" (- end beg) lines)) + ((format "%dC" (- end beg)))) + (when (derived-mode-p 'text-mode) + (format " %dW" (count-words beg end))) + " ")) + 'face (if (active) 'success))))) + "Information about the current selection, such as how many characters and +lines are selected, or the NxM dimensions of a block selection.") +(put '+modeline-selection-info 'risky-local-variable t) + + +;;; `+modeline-encoding' +(defconst +modeline-encoding + '(:eval + (concat (pcase (coding-system-eol-type buffer-file-coding-system) + (0 " LF ") + (1 " RLF ") + (2 " CR ")) + (let ((sys (coding-system-plist buffer-file-coding-system))) + (if (memq (plist-get sys :category) + '(coding-category-undecided coding-category-utf-8)) + "UTF-8" + (upcase (symbol-name (plist-get sys :name))))) + " "))) +(put '+modeline-encoding 'risky-local-variable t) + + +;; +;;; Setup + +(defvar-local +modeline-format-left nil) +(put '+modeline-format-left 'risky-local-variable t) + + +(defvar-local +modeline-format-right nil) +(put '+modeline-format-right 'risky-local-variable t) + +(setq-default + +modeline-format-left + '("" + +modeline-matches + " " + +modeline-buffer-identification + +modeline-position) + + +modeline-format-right + `("" + mode-line-misc-info + +modeline-modes + (vc-mode (" " + ,(all-the-icons-octicon "git-branch" :v-adjust 0.0) + vc-mode " ")) + " " + +modeline-encoding + (+modeline-checker ("" +modeline-checker " "))) + + ;; + mode-line-format + '("" + +modeline-bar + +modeline-format-left + (:eval + (propertize + " " + 'display + `((space :align-to (- (+ right right-fringe right-margin) + ,(string-width + (format-mode-line '("" +modeline-format-right)))))))) + +modeline-format-right)) + +(with-current-buffer "*Messages*" + (setq mode-line-format (default-value 'mode-line-format))) + + +;; +;;; Other modelines + +(defun set-project-modeline () + (setq +modeline-format-left + `(" " + ,(all-the-icons-octicon + "file-directory" + :face 'bold + :v-adjust -0.05 + :height 1.25) + (:propertize (" " (:eval (abbreviate-file-name default-directory))) + face bold)) + +modeline-format-right + '("" +modeline-modes))) + +(defun set-special-modeline () + (setq +modeline-format-left + '("" + +modeline-matches + " " + +modeline-buffer-identification) + +modeline-format-right + '("" +modeline-modes))) + +(defun set-pdf-modeline ()) ; TODO `set-pdf-modeline' + + +;; +;;; Bootstrap + +(size-indication-mode +1) ; filesize in modeline +(add-hook '+doom-dashboard-mode-hook #'set-project-modeline) +(add-hook 'doom-load-theme-hook #'+modeline-refresh-bars-h) + +;; Other modes +(defun set-modeline-in-magit () + (if (eq major-mode 'magit-status-mode) + (set-project-modeline) + (hide-mode-line-mode))) +(add-hook 'magit-mode-hook #'set-modeline-in-magit) + +(add-hook 'special-mode-hook #'set-special-modeline) +(add-hook 'image-mode-hook #'set-special-modeline) +(add-hook 'circe-mode-hook #'set-special-modeline) +(add-hook 'pdf-tools-enabled-hook #'set-pdf-modeline) diff --git a/modules/ui/modeline/config.el b/modules/ui/modeline/config.el index 9c40d1fdc..54e09fff5 100644 --- a/modules/ui/modeline/config.el +++ b/modules/ui/modeline/config.el @@ -1,6 +1,11 @@ ;;; ui/modeline/config.el -*- lexical-binding: t; -*- +(when (featurep! +light) + (load! "+light")) + + (use-package! doom-modeline + :unless (featurep! +light) :hook (after-init . doom-modeline-mode) :init (unless after-init-time @@ -61,15 +66,14 @@ ;; modified state, so force them to behave. (defadvice! +modeline--inhibit-modification-hooks-a (orig-fn &rest args) :around #'ws-butler-after-save - (with-silent-modifications (apply orig-fn args)))) + (with-silent-modifications (apply orig-fn args))) -;; -;; Extensions + ;; + ;;; Extensions + (use-package! anzu + :after-call isearch-mode) -(use-package! anzu - :after-call isearch-mode) - -(use-package! evil-anzu - :when (featurep! :editor evil) - :after-call evil-ex-start-search evil-ex-start-word-search evil-ex-search-activate-highlight) + (use-package! evil-anzu + :when (featurep! :editor evil) + :after-call evil-ex-start-search evil-ex-start-word-search evil-ex-search-activate-highlight)) diff --git a/modules/ui/modeline/packages.el b/modules/ui/modeline/packages.el index f01d2c78a..bd2a2d55b 100644 --- a/modules/ui/modeline/packages.el +++ b/modules/ui/modeline/packages.el @@ -1,7 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/modeline/packages.el -(package! doom-modeline) +(unless (featurep! +light) + (package! doom-modeline)) (package! anzu) (when (featurep! :editor evil) (package! evil-anzu)) From b8d4fef93f50de028b55ec29bcd11e5f52ff408d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 19:55:45 -0500 Subject: [PATCH 231/983] email/wanderlust: add flim/apel packages See: raxod502/straight.el#445 wanderlust/wanderlust#172 --- modules/email/wanderlust/packages.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/email/wanderlust/packages.el b/modules/email/wanderlust/packages.el index b2d336172..c49dc6c54 100644 --- a/modules/email/wanderlust/packages.el +++ b/modules/email/wanderlust/packages.el @@ -1,4 +1,10 @@ ;; -*- no-byte-compile: t; -*- ;;; app/wanderlust/packages.el +;; HACK These are wanderlust's dependencies (wanderlust depends on semi, semi +;; depends on flim, flim on apel), but both flim and apel have non-standard +;; default branches, which straight cannot detect without our help. +(package! flim :recipe (:branch "flim-1_14-wl")) +(package! apel :recipe (:branch "semi-1_14-wl")) + (package! wanderlust) From cdf4604288f3780acf8a9c9518fc573bdb3f822c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 20:04:47 -0500 Subject: [PATCH 232/983] Reduce file cache timeout from 7 days to 1 Also: - Reorder projectile variables. - Remove unused projectile-sort-order (since ripgrep is a hard dependency of Doom now, there should be no situation where we projectile-sort-order is important to us as a default). --- core/core-projects.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/core-projects.el b/core/core-projects.el index c24e587e4..24e6ed33f 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -31,14 +31,12 @@ Emacs.") :init (setq projectile-cache-file (concat doom-cache-dir "projectile.cache") projectile-enable-caching doom-interactive-mode - projectile-known-projects-file (concat doom-cache-dir "projectile.projects") - projectile-require-project-root t + projectile-files-cache-expire 86400 ; expire after a day projectile-globally-ignored-files '(".DS_Store" "Icon " "TAGS") projectile-globally-ignored-file-suffixes '(".elc" ".pyc" ".o") - projectile-ignored-projects '("~/" "/tmp") projectile-kill-buffers-filter 'kill-only-files - projectile-files-cache-expire 604800 ; expire after a week - projectile-sort-order 'recentf) + projectile-known-projects-file (concat doom-cache-dir "projectile.projects") + projectile-ignored-projects '("~/" "/tmp")) (global-set-key [remap evil-jump-to-tag] #'projectile-find-tag) (global-set-key [remap find-tag] #'projectile-find-tag) From a24b750c6c90cea0fe70b149d4f0ac7f19b1f632 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 22:49:26 -0500 Subject: [PATCH 233/983] completion/ivy: fix ivy-re-builders-alist delegates --- modules/completion/ivy/autoload/ivy.el | 10 ++++++++++ modules/completion/ivy/config.el | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index 86e8de660..ec0c0770a 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -13,6 +13,16 @@ (and (not (eq buffer (current-buffer))) (+workspace-contains-buffer-p buffer)))) +;;;###autoload +(defun +ivy-standard-search (str) + "TODO" + (funcall +ivy-standard-search-fn str)) + +;;;###autoload +(defun +ivy-alternative-search (str) + "TODO" + (funcall +ivy-alternative-search-fn str)) + ;;;###autoload (defun +ivy-rich-buffer-name (candidate) "Display the buffer name. diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index a5f5f7125..12853e2b3 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -49,9 +49,9 @@ results buffer.") counsel-grep swiper swiper-isearch) - collect (cons cmd +ivy-standard-search-fn)) + collect (cons cmd #'+ivy-alternative-search)) ;; Ignore order for non-fuzzy searches by default - (t . ,+ivy-alternative-search-fn))) + (t . +ivy-standard-search))) (define-key! [remap switch-to-buffer] #'+ivy/switch-buffer From 87f6dab424601d66c1edc3310ec70df356fc6e09 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 23:00:01 -0500 Subject: [PATCH 234/983] completion/ivy: remove unused var; update config ...to reflect our dropping ag/grep support. --- modules/completion/ivy/config.el | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 12853e2b3..bdcf9b14b 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -7,16 +7,6 @@ When nil, don't preview anything. When non-nil, preview non-virtual buffers. When 'everything, also preview virtual buffers") -(defvar +ivy-project-search-engines '(rg ag) - "What search tools for `+ivy/project-search' (and `+ivy-file-search' when no -ENGINE is specified) to try, and in what order. - -To disable a particular tool, remove it from this list. To prioritize a tool -over others, move it to the front of the list. Later duplicates in this list are -silently ignored. - -If you want to already use git-grep or grep, set this to nil.") - (defvar +ivy-buffer-unreal-face 'font-lock-comment-face "The face for unreal buffers in `ivy-switch-to-buffer'.") @@ -44,9 +34,7 @@ results buffer.") :after-call pre-command-hook :init (setq ivy-re-builders-alist - `(,@(cl-loop for cmd in '(counsel-ag - counsel-rg - counsel-grep + `(,@(cl-loop for cmd in '(counsel-rg swiper swiper-isearch) collect (cons cmd #'+ivy-alternative-search)) @@ -75,7 +63,7 @@ results buffer.") ;; ...but if that ever changes, show their full path ivy-virtual-abbreviate 'full ;; don't quit minibuffer on delete-error - ivy-on-del-error-function nil + ivy-on-del-error-function #'ignore ;; enable ability to select prompt (alternative to `ivy-immediate-done') ivy-use-selectable-prompt t) From c088aaeb1b325bae92ab6977ef73ac46fac9b07a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 14 Dec 2019 01:15:59 -0500 Subject: [PATCH 235/983] tools/editorconfig: remove editorconfig-lisp-use-default-indent This is now its default value upstream. --- modules/tools/editorconfig/config.el | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/tools/editorconfig/config.el b/modules/tools/editorconfig/config.el index 3c4a6d643..abcac7512 100644 --- a/modules/tools/editorconfig/config.el +++ b/modules/tools/editorconfig/config.el @@ -51,10 +51,5 @@ specified by editorconfig." (gethash 'indent_size props)) (setq doom-inhibit-indent-detection 'editorconfig)))) - ;; Editorconfig makes indentation too rigid in Lisp modes, so tell - ;; editorconfig to ignore indentation there. The dynamic indentation support - ;; built into Emacs is superior. - (setq editorconfig-lisp-use-default-indent t) - ;; (editorconfig-mode +1)) From e623fde85a41cb2447e479289377cd971885bae9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 14 Dec 2019 18:23:30 -0500 Subject: [PATCH 236/983] Fix private & elpa package lists in doom/info And display errors if something went wrong. --- core/autoload/debug.el | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/core/autoload/debug.el b/core/autoload/debug.el index 43ea2444c..b6d70d421 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -78,24 +78,24 @@ ready to be pasted in a bug report on github." (cdr key)))) '("n/a"))) (packages - ,@(or (ignore-errors - (let ((doom-interactive-mode t) - doom-packages - doom-disabled-packages) - (doom--read-module-packages-file - (doom-path doom-private-dir "packages.el") - nil t) - (cl-loop for (name . plist) in (nreverse doom-packages) + ,@(or (condition-case e + (cl-loop for (name . plist) in (doom-package-list) + if (cl-find :private (plist-get plist :modules) + :key #'car) collect (if-let (splist (doom-plist-delete (copy-sequence plist) :modules)) (prin1-to-string (cons name splist)) - name)))) + name)) + (error (format "<%S>" e))) '("n/a"))) (elpa - ,@(or (ignore-errors - (cl-loop for (name . _) in package-alist - collect (format "%s" name))) + ,@(or (condition-case e + (progn + (package-initialize) + (cl-loop for (name . _) in package-alist + collect (format "%s" name))) + (error (format "<%S>" e))) '("n/a")))))))) From 7fa4e67e391b350f769f313d82da055ca7d7f836 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 14 Dec 2019 20:36:14 -0500 Subject: [PATCH 237/983] Minor refactors --- modules/completion/ivy/autoload/ivy.el | 4 ++-- modules/lang/org/config.el | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index ec0c0770a..5a55cd52f 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -166,10 +166,10 @@ If ARG (universal argument), open selection in other-window." (user-error "No completion session is active")) (require 'wgrep) (let ((caller (ivy-state-caller ivy-last))) - (if-let* ((occur-fn (plist-get +ivy-edit-functions caller))) + (if-let (occur-fn (plist-get +ivy-edit-functions caller)) (ivy-exit-with-action (lambda (_) (funcall occur-fn))) - (if-let* ((occur-fn (plist-get ivy--occurs-list caller))) + (if-let (occur-fn (plist-get ivy--occurs-list caller)) (let ((buffer (generate-new-buffer (format "*ivy-occur%s \"%s\"*" (if caller (concat " " (prin1-to-string caller)) "") diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 4c2bac98e..2d0da9abf 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -674,7 +674,7 @@ between the two." "v" #'+org/goto-visible "x" #'org-capture-goto-last-stored) (:prefix ("l" . "links") - "c" 'org-cliplink + "c" #'org-cliplink "l" #'org-insert-link "L" #'org-insert-all-links "s" #'org-store-link From 6cb13a0e8687263cb51b7da0e70d17d4815354f5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 14 Dec 2019 20:38:14 -0500 Subject: [PATCH 238/983] Make 'doom refresh -p' purge then regraft --- core/core-cli.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core-cli.el b/core/core-cli.el index a445468c6..596449918 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -223,7 +223,7 @@ BODY will be run when this dispatcher is called." "For managing your config and packages" (defcli! (refresh re sync) ((if-necessary-p ["-n" "--if-necessary"] "Only regenerate autoloads files if necessary") - (purge-p ["-p" "--purge"] "Also purge orphaned repos and ELPA packages")) + (prune-p ["-p" "--prune"] "Purge orphaned packages & regraft repos")) "Ensure Doom is properly set up. This is the equivalent of running autoremove, install, autoloads, then @@ -259,7 +259,7 @@ stale." (setq success t)) (and (doom-cli-packages-build) (setq success t)) - (and (doom-cli-packages-purge purge-p 'builds-p purge-p) + (and (doom-cli-packages-purge prune-p 'builds-p prune-p prune-p) (setq success t))) (doom-cli-reload-package-autoloads (or success (not if-necessary-p))) (doom-cli-byte-compile nil 'recompile)) From 7b709eed34f7cc3af08bca259842e333e975acee Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 14 Dec 2019 20:39:09 -0500 Subject: [PATCH 239/983] docs/faq: add TRAMP connection hangs to common issues --- docs/faq.org | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/faq.org b/docs/faq.org index 6c249615a..5a3a92c30 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -56,6 +56,7 @@ - [[#the-frame-goes-black-on-macos-while-in-full-screen-mode][The frame goes black on MacOS, while in full-screen mode]] - [[#doom-crashes-when][Doom crashes when...]] - [[#cant-load-my-theme-unable-to-find-theme-file-for-x-errors][Can't load my theme; ~unable to find theme file for X~ errors]] + - [[#tramp-connections-hang-forever-when-connecting][TRAMP connections hang forever when connecting]] - [[#contributing][Contributing]] * General @@ -1124,5 +1125,7 @@ Emacs will search for this file in ~custom-theme-load-path~ and suffix. 3. Did you run ~doom refresh~ after adding your third party theme plugin's ~package!~ declaration to =~/.doom.d/packages.el=? +** TRAMP connections hang forever when connecting +You'll find solutions [[https://www.emacswiki.org/emacs/TrampMode#toc7][on the emacswiki]]. * TODO Contributing From 8dd647b9bdc3d1bf2fb7d70890db1fb834a3071d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 14 Dec 2019 20:50:16 -0500 Subject: [PATCH 240/983] Make 'doom update' Skip local packages i.e. packages with a user-specified :local-repo --- core/cli/packages.el | 53 ++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 387b3b45e..0eec01bc1 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -136,7 +136,9 @@ declaration) or dependency thereof that hasn't already been." (defun doom-cli-packages-update () "Updates packages." (print! (start "Updating packages (this may take a while)...")) - (let ((straight--packages-to-rebuild (make-hash-table :test #'equal)) + ;; TODO Refactor me + (let ((straight--repos-dir (straight--repos-dir)) + (straight--packages-to-rebuild (make-hash-table :test #'equal)) (total (hash-table-count straight--repo-cache)) (i 1) errors) @@ -144,29 +146,32 @@ declaration) or dependency thereof that hasn't already been." (dolist (recipe (hash-table-values straight--repo-cache)) (straight--with-plist recipe (package type local-repo) (condition-case-unless-debug e - (let* ((default-directory (straight--repos-dir local-repo)) - (commit (straight-vc-get-commit type local-repo))) - (if (not (straight-vc-fetch-from-remote recipe)) - (print! (warn "\033[K(%d/%d) Failed to fetch %s" i total package)) - (let ((output (straight--process-get-output))) - (straight-merge-package package) - (let ((newcommit (straight-vc-get-commit type local-repo))) - (if (string= commit newcommit) - (print! (start "\033[K(%d/%d) %s is up-to-date\033[1A") i total package) - (ignore-errors - (delete-directory (straight--build-dir package) 'recursive)) - (puthash package t straight--packages-to-rebuild) - (print! (info "\033[K(%d/%d) Updating %s...") i total package) - (unless (string-empty-p output) - (print-group! - (print! (info "%s") output) - (when (eq type 'git) - (straight--call "git" "log" "--oneline" newcommit (concat "^" commit)) - (print-group! - (print! "%s" (straight--process-get-output)))))) - (print! (success "(%d/%d) %s updated (%s -> %s)") i total package - (substring commit 0 7) - (substring newcommit 0 7)))))) + (let ((default-directory (straight--repos-dir local-repo))) + (if (not (file-in-directory-p default-directory straight--repos-dir)) + (print! (warn "[%d/%d] Skipping %s because it is local") + i total package) + (let ((commit (straight-vc-get-commit type local-repo))) + (if (not (straight-vc-fetch-from-remote recipe)) + (print! (warn "\033[K(%d/%d) Failed to fetch %s" i total package)) + (let ((output (straight--process-get-output))) + (straight-merge-package package) + (let ((newcommit (straight-vc-get-commit type local-repo))) + (if (string= commit newcommit) + (print! (start "\033[K(%d/%d) %s is up-to-date\033[1A") i total package) + (ignore-errors + (delete-directory (straight--build-dir package) 'recursive)) + (puthash package t straight--packages-to-rebuild) + (print! (info "\033[K(%d/%d) Updating %s...") i total package) + (unless (string-empty-p output) + (print-group! + (print! (info "%s") output) + (when (eq type 'git) + (straight--call "git" "log" "--oneline" newcommit (concat "^" commit)) + (print-group! + (print! "%s" (straight--process-get-output)))))) + (print! (success "(%d/%d) %s updated (%s -> %s)") i total package + (substring commit 0 7) + (substring newcommit 0 7)))))))) (cl-incf i)) (user-error (signal 'user-error (error-message-string e))) From 20a733a86113059737502d782af1311eb4fbfddd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 01:16:22 -0500 Subject: [PATCH 241/983] ui/modeline: major refactor of +light modeline --- modules/ui/modeline/+light.el | 542 +++++++++++++++++++--------------- 1 file changed, 312 insertions(+), 230 deletions(-) diff --git a/modules/ui/modeline/+light.el b/modules/ui/modeline/+light.el index c4ecbc15c..e49f455e9 100644 --- a/modules/ui/modeline/+light.el +++ b/modules/ui/modeline/+light.el @@ -1,36 +1,95 @@ ;;; ui/modeline/+default.el -*- lexical-binding: t; -*- -(defvar +modeline-height 33) -(defvar +modeline-bar-width 3) - ;; This is a slimmed down version of `doom-modeline' that manipulates -;; `mode-line-format' directly. Its purpose is to be a *significantly* lighter -;; modeline for doom. Upstream has generalized and grown too much so I've -;; returned to the roots. +;; `mode-line-format' directly. Its purpose is to be truer to the original goal +;; of Doom's modeline: to be more performant and minimalistic alternative to +;; other modeline packages and to be abstraction-light. Too much abstraction is +;; too much magic. ;; -;; TODO Refactor me +;; Warning: this is still a WIP! -(defface +modeline-success-highlight '((t (:inherit mode-line-highlight))) - "TODO") +(defun +modeline--set-var-and-refresh-bars-fn (&optional symbol value) + (when symbol + (set-default symbol value)) + (when doom-init-time + (+modeline-refresh-bars-h))) + + +;; +;;; Variables + +(defcustom +modeline-height 31 + "The height of the modeline. + +This is enforced by the xpm bitmap bar in `+modeline-bar'. Without it (and in +the terminal), this variable does nothing. + +Use `setq!' to adjust this variable live, as it will trigger an refresh of the +bars in the modeline. `setq' will not." + :type 'integer + :set #'+modeline--set-var-and-refresh-bars-fn) + +(defcustom +modeline-bar-width 3 + "The width of the bar in the modeline. + +If nil, the bar will be made transparent and 1 pixel wide, as to be invisible, +but without sacrificing its ability to enforce `+modeline-height'. + +Use `setq!' to adjust this variable live, as it will trigger an refresh of the +bars in the modeline. `setq' will not." + :type 'integer + :set #'+modeline--set-var-and-refresh-bars-fn) + +(defvar +modeline-format-alist () + "An alist of modeline formats defined with `def-modeline!'. + +Each entry's CAR is the name and CDR is a cons cell whose CAR is the left-hand +side of the modeline, and whose CDR is the right-hand side.") + + +;; +;;; Faces + +(defface +modeline-bar '((t (:inherit highlight))) + "Face used for left-most bar on the mode-line of an active window.") + +(defface +modeline-bar-inactive '((t (:inherit mode-line-inactive))) + "Face used for left-most bar on the mode-line of an inactive window.") + +(defface +modeline-highlight + '((t (:inherit mode-line-highlight))) + "Face used for highlighted modeline panels (like search counts).") + +(defface +modeline-alternate-highlight + '((t (:inherit mode-line-highlight))) + "Alternative face used for highlighted modeline panels (like search counts).") + + +;; +;;; Helpers (defvar +modeline--redisplayed-p nil) (defadvice! modeline-recalculate-height-a (&optional _force &rest _ignored) + "Ensure that window resizing functions take modeline height into account." :before '(fit-window-to-buffer resize-temp-buffer-window) (unless +modeline--redisplayed-p (setq-local +modeline--redisplayed-p t) (redisplay t))) ;;; `active' -(defvar selected-window (selected-window)) -(defun active () (eq (selected-window) selected-window)) +(defvar +modeline--active-window (selected-window)) + +(defun +modeline-active () + "Return non-nil if the selected window has an active modeline." + (eq (selected-window) +modeline--active-window)) + (add-hook! 'pre-redisplay-functions - (defun set-selected-window (&rest _) - "Set the variable `selected-window' appropriately." + (defun +modeline-set-selected-window-h (&rest _) + "Track the active modeline's window in `+modeline--active-window'." (let ((win (selected-window))) (unless (minibuffer-window-active-p win) - (setq selected-window (frame-selected-window)))))) + (setq +modeline--active-window (frame-selected-window)))))) -;;; Helpers (defun +modeline--make-xpm (color width height) "Create an XPM bitmap via COLOR, WIDTH and HEIGHT. Inspired by `powerline''s `pl/+modeline--make-xpm'." (propertize @@ -67,48 +126,93 @@ (propertize label 'face face)) 'help-echo help-echo)) +(defun set-modeline! (name &optional default) + "Set the modeline to NAME. +If DEFAULT is non-nil, apply to all future buffers. Modelines are defined with +`def-modeline!'." + (if-let (format (assq name +modeline-format-alist)) + (cl-destructuring-bind (lhs . rhs) (cdr format) + (if default + (setq-default +modeline-format-left lhs + +modeline-format-right rhs) + (setq +modeline-format-left lhs + +modeline-format-right rhs))) + (error "Could not find %S modeline format" name))) + +(defun set-modeline-hook! (hooks name) + "Set the modeline to NAME on HOOKS. +See `def-modeline!' on how modelines are defined." + (let ((fn (intern (format "+modeline-set-%s-format-h" name)))) + (dolist (hook (doom-enlist hooks)) + (add-hook hook fn)))) + +(defmacro def-modeline! (name lhs rhs) + "Define a modeline format by NAME. +LHS and RHS are the formats representing the left and right hand side of the +mode-line, respectively. See the variable `format-mode-line' for details on what +LHS and RHS will accept." + `(progn + (setf (alist-get ',name +modeline-format-alist) + (cons ,lhs ,rhs)) + (defun ,(intern (format "+modeline-set-%s-format-h" name)) (&rest _) + "TODO" + (set-modeline! ',name)))) + +(defmacro def-modeline-var! (name body &optional docstring &rest plist) + "TODO" + (unless (stringp docstring) + (push docstring plist) + (setq docstring nil)) + `(progn + (,(if (plist-get plist :local) 'defvar-local 'defvar) + ,name ,body ,docstring) + (put ',name 'risky-local-variable t))) + ;; ;;; Segments +(def-modeline-var! +modeline-format-left nil + "The left-hand side of the modeline." + :local t) + +(def-modeline-var! +modeline-format-right nil + "The right-hand side of the modeline." + :local t) + + ;;; `+modeline-bar' -(defvar +modeline-bar "") -(defvar +modeline-inactive-bar "") -(put '+modeline-bar 'risky-local-variable t) -(put '+modeline-inactive-bar 'risky-local-variable t) +(progn + (def-modeline-var! +modeline-bar "") + (def-modeline-var! +modeline-inactive-bar "") -(defface +modeline-bar '((t (:inherit highlight))) - "The face used for the left-most bar on the mode-line of an active window.") + (add-hook! '(doom-init-ui-hook doom-load-theme-hook) :append + (defun +modeline-refresh-bars-h () + (let ((width (or +modeline-bar-width 1)) + (height (max +modeline-height 0))) + (setq +modeline-bar + (+modeline--make-xpm + (and +modeline-bar-width + (face-background '+modeline-bar nil 'inherit)) + width height) + +modeline-inactive-bar + (+modeline--make-xpm + (and +modeline-bar-width + (face-background '+modeline-bar-inactive nil 'inherit)) + width height))))) -(defface +modeline-bar-inactive '((t (:inherit mode-line-inactive))) - "The face used for the left-most bar on the mode-line of an inactive window.") - -(add-hook! 'doom-load-theme-hook - (defun +modeline-refresh-bars-h () - (let ((width (or +modeline-bar-width 1))) - (setq +modeline-bar - (+modeline--make-xpm (if +modeline-bar-width (face-background '+modeline-bar nil 'inherit)) - width (max +modeline-height (frame-char-height))) - +modeline-inactive-bar - (+modeline--make-xpm (if +modeline-bar-width (face-background '+modeline-bar-inactive nil 'inherit)) - width (max +modeline-height (frame-char-height))))))) - -(defvar +modeline--old-height nil) -(defun +modeline-adjust-height-h () - (unless +modeline--old-height - (setq +modeline--old-height +modeline-height)) - (let ((default-height +modeline--old-height) - (scale (or (frame-parameter nil 'font-scale) 0))) - (if (> scale 0) - (let* ((font-size (string-to-number - (aref (doom--font-name (frame-parameter nil 'font) - (selected-frame)) - xlfd-regexp-pixelsize-subnum))) - (scale (frame-parameter nil 'font-scale))) - (setq +modeline-height (+ default-height (* scale doom-font-increment)))) - (setq +modeline-height default-height)) - (setq +modeline-bar (+modeline--make-xpm nil 1 +modeline-height)))) -(add-hook 'doom-change-font-size-hook #'+modeline-adjust-height-h) + (add-hook! 'doom-change-font-size-hook + (defun +modeline-adjust-height-h () + (defvar +modeline--old-height +modeline-height) + (let ((default-height +modeline--old-height) + (scale (or (frame-parameter nil 'font-scale) 0))) + (setq +modeline-height + (if (> scale 0) + (+ default-height (* (or (frame-parameter nil 'font-scale) 1) + doom-font-increment)) + default-height)) + (when doom-init-time + (+modeline-refresh-bars-h)))))) ;;; `+modeline-matches' @@ -118,19 +222,18 @@ :config ;; anzu and evil-anzu expose current/total state that can be displayed in the ;; mode-line. - (defun doom-modeline-fix-anzu-count (positions here) + (defadvice! +modeline-fix-anzu-count-a (positions here) "Calulate anzu counts via POSITIONS and HERE." + :override #'anzu--where-is-here (cl-loop for (start . end) in positions collect t into before when (and (>= here start) (<= here end)) return (length before) finally return 0)) - (advice-add #'anzu--where-is-here :override #'doom-modeline-fix-anzu-count) - (setq anzu-cons-mode-line-p nil) ; manage modeline segment ourselves ;; Ensure anzu state is cleared when searches & iedit are done - (add-hook 'isearch-mode-end-hook #'anzu--reset-status t) + (add-hook 'isearch-mode-end-hook #'anzu--reset-status 'append) (add-hook 'iedit-mode-end-hook #'anzu--reset-status) (advice-add #'evil-force-normal-state :before #'anzu--reset-status) ;; Fix matches segment mirroring across all buffers @@ -160,7 +263,7 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with (format " %s+ " total)) (t (format " %s/%d " here total)))) - 'face (if (active) 'mode-line-highlight)))) + 'face (if (+modeline-active) '+modeline-highlight)))) (defun +modeline--evil-substitute () "Show number of matches for evil-ex substitutions and highlights in real time." @@ -176,23 +279,23 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with (if pattern (format " %s matches " (how-many pattern (car range) (cdr range))) " - ")) - 'face (if (active) 'mode-line-highlight)))) + 'face (if (+modeline-active) '+modeline-highlight)))) - (defun +mode-line--multiple-cursors () + (defun +modeline--multiple-cursors () "Show the number of multiple cursors." (when (bound-and-true-p evil-mc-cursor-list) (let ((count (length evil-mc-cursor-list))) (when (> count 0) - (let ((face (cond ((not (active)) 'mode-line-inactive) - (evil-mc-frozen 'mode-line-highlight) - ('+modeline-success-highlight)))) + (let ((face (cond ((not (+modeline-active)) 'mode-line-inactive) + (evil-mc-frozen '+modeline-highlight) + ('+modeline-alternate-highlight)))) (concat (propertize " " 'face face) (all-the-icons-faicon "i-cursor" :face face :v-adjust -0.0575) (propertize " " 'face `(:inherit (variable-pitch ,face))) (propertize (format "%d " count) 'face face))))))) - (defun mode-line--overlay< (a b) + (defun +modeline--overlay< (a b) "Sort overlay A and B." (< (overlay-start a) (overlay-start b))) @@ -211,55 +314,53 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with (if this-oc (- length (length (memq this-oc (sort (append iedit-occurrences-overlays nil) - #'mode-line--overlay<))) + #'+modeline--overlay<))) -1) "-") length)) - 'face (if (active) 'mode-line-highlight)))) + 'face (if (+modeline-active) '+modeline-highlight)))) (defun +modeline--macro-recording () "Display current Emacs or evil macro being recorded." - (when (and (active) + (when (and (+modeline-active) (or defining-kbd-macro executing-kbd-macro)) - (let ((sep (propertize " " 'face 'mode-line-highlight))) + (let ((sep (propertize " " 'face '+modeline-highlight))) (concat sep (propertize (if (bound-and-true-p evil-this-macro) (char-to-string evil-this-macro) "Macro") - 'face 'mode-line-highlight) + 'face '+modeline-highlight) sep (all-the-icons-octicon "triangle-right" - :face 'mode-line-highlight + :face '+modeline-highlight :v-adjust -0.05) sep)))) - (defvar +modeline-matches + (def-modeline-var! +modeline-matches '(:eval (let ((meta (concat (+modeline--macro-recording) (+modeline--anzu) (+modeline--evil-substitute) (+modeline--iedit) - (+mode-line--multiple-cursors)))) + (+modeline--multiple-cursors)))) (or (and (not (equal meta "")) meta) - " %I ")))) - (put '+modeline-matches 'risky-local-variable t)) + " %I "))))) ;;; `+modeline-modes' -(defvar +modeline-modes ; remove minor modes - '("" - (:propertize mode-name - face bold - mouse-face mode-line-highlight) - mode-line-process - "%n" - "%]" - " ")) +(def-modeline-var! +modeline-modes ; remove minor modes + '("" + (:propertize mode-name + face bold + mouse-face +modeline-highlight) + mode-line-process + "%n" + " ")) ;;; `+modeline-buffer-identification' -(defconst +modeline-buffer-identification ; slightly more informative buffer id +(def-modeline-var! +modeline-buffer-identification ; slightly more informative buffer id '((:eval (propertize (let ((buffer-file-name (buffer-file-name (buffer-base-buffer)))) @@ -270,103 +371,103 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with "%b")) 'face (cond ((buffer-modified-p) '(error bold mode-line-buffer-id)) - ((active) + ((+modeline-active) 'mode-line-buffer-id)) 'help-echo buffer-file-name)) (buffer-read-only (:propertize " RO" face warning)))) ;;; `+modeline-position' -(defvar +modeline-position '(" %l:%C %p ")) +(def-modeline-var! +modeline-position '(" %l:%C %p ")) ;;; `+modeline-checker' -(defvar-local +modeline-checker nil - "Displays color-coded error status in the current buffer with pretty -icons.") -(put '+modeline-checker 'risky-local-variable t) +(progn + (def-modeline-var! +modeline-checker nil + "Displays color-coded error status & icon for the current buffer." + :local t) -(defun +modeline-checker-update (&optional status) - "Update flycheck text via STATUS." - (setq +modeline-checker - (pcase status - (`finished - (if flycheck-current-errors - (let-alist (flycheck-count-errors flycheck-current-errors) - (let ((error (or .error 0)) - (warning (or .warning 0)) - (info (or .info 0))) - (+modeline-format-icon "do_not_disturb_alt" - (number-to-string (+ error warning info)) - (cond ((> error 0) 'error) - ((> warning 0) 'warning) - ('success)) - (format "Errors: %d, Warnings: %d, Debug: %d" - error - warning - info)))) - (+modeline-format-icon "check" "" 'success))) - (`running (+modeline-format-icon "access_time" "*" 'font-lock-comment-face "Running...")) - (`errored (+modeline-format-icon "sim_card_alert" "!" 'error "Errored!")) - (`interrupted (+modeline-format-icon "pause" "!" 'font-lock-comment-face "Interrupted")) - (`suspicious (+modeline-format-icon "priority_high" "!" 'error "Suspicious"))))) -(add-hook 'flycheck-status-changed-functions #'+modeline-checker-update) -(add-hook 'flycheck-mode-hook #'+modeline-checker-update) + (add-hook! '(flycheck-status-changed-functions + flycheck-mode-hook) + (defun +modeline-checker-update (&optional status) + "Update flycheck text via STATUS." + (setq +modeline-checker + (pcase status + (`finished + (if flycheck-current-errors + (let-alist (flycheck-count-errors flycheck-current-errors) + (let ((error (or .error 0)) + (warning (or .warning 0)) + (info (or .info 0))) + (+modeline-format-icon "do_not_disturb_alt" + (number-to-string (+ error warning info)) + (cond ((> error 0) 'error) + ((> warning 0) 'warning) + ('success)) + (format "Errors: %d, Warnings: %d, Debug: %d" + error + warning + info)))) + (+modeline-format-icon "check" "" 'success))) + (`running (+modeline-format-icon "access_time" "*" 'font-lock-comment-face "Running...")) + (`errored (+modeline-format-icon "sim_card_alert" "!" 'error "Errored!")) + (`interrupted (+modeline-format-icon "pause" "!" 'font-lock-comment-face "Interrupted")) + (`suspicious (+modeline-format-icon "priority_high" "!" 'error "Suspicious"))))))) ;;; `+modeline-selection-info' -(defsubst doom-modeline-column (pos) - "Get the column of the position `POS'." - (save-excursion (goto-char pos) - (current-column))) +(progn + (defsubst +modeline--column (pos) + "Get the column of the position `POS'." + (save-excursion (goto-char pos) + (current-column))) -(defun add-selection-segment () - (add-to-list '+modeline-format-left '+modeline-selection-info 'append)) -(defun remove-selection-segment () - (delq! '+modeline-selection-info +modeline-format-left)) - -(if (featurep 'evil) - (progn - (add-hook 'evil-visual-state-entry-hook #'add-selection-segment) - (add-hook 'evil-visual-state-exit-hook #'remove-selection-segment)) - (add-hook 'activate-mark-hook #'add-selection-segment) - (add-hook 'deactivate-mark-hook #'remove-selection-segment)) - -(defvar +modeline-selection-info - '(:eval - (when (or mark-active - (and (bound-and-true-p evil-local-mode) - (eq evil-state 'visual))) - (cl-destructuring-bind (beg . end) - (if (boundp 'evil-local-mode) - (cons evil-visual-beginning evil-visual-end) - (cons (region-beginning) (region-end))) - (propertize - (let ((lines (count-lines beg (min end (point-max))))) - (concat " " - (cond ((or (bound-and-true-p rectangle-mark-mode) - (and (bound-and-true-p evil-visual-selection) - (eq 'block evil-visual-selection))) - (let ((cols (abs (- (doom-modeline-column end) - (doom-modeline-column beg))))) - (format "%dx%dB" lines cols))) - ((and (bound-and-true-p evil-visual-selection) - (eq evil-visual-selection 'line)) - (format "%dL" lines)) - ((> lines 1) - (format "%dC %dL" (- end beg) lines)) - ((format "%dC" (- end beg)))) - (when (derived-mode-p 'text-mode) - (format " %dW" (count-words beg end))) - " ")) - 'face (if (active) 'success))))) - "Information about the current selection, such as how many characters and + (def-modeline-var! +modeline-selection-info + '(:eval + (when (or mark-active + (and (bound-and-true-p evil-local-mode) + (eq evil-state 'visual))) + (cl-destructuring-bind (beg . end) + (if (boundp 'evil-local-mode) + (cons evil-visual-beginning evil-visual-end) + (cons (region-beginning) (region-end))) + (propertize + (let ((lines (count-lines beg (min end (point-max))))) + (concat " " + (cond ((or (bound-and-true-p rectangle-mark-mode) + (and (bound-and-true-p evil-visual-selection) + (eq 'block evil-visual-selection))) + (let ((cols (abs (- (+modeline--column end) + (+modeline--column beg))))) + (format "%dx%dB" lines cols))) + ((and (bound-and-true-p evil-visual-selection) + (eq evil-visual-selection 'line)) + (format "%dL" lines)) + ((> lines 1) + (format "%dC %dL" (- end beg) lines)) + ((format "%dC" (- end beg)))) + (when (derived-mode-p 'text-mode) + (format " %dW" (count-words beg end))) + " ")) + 'face (if (+modeline-active) 'success))))) + "Information about the current selection, such as how many characters and lines are selected, or the NxM dimensions of a block selection.") -(put '+modeline-selection-info 'risky-local-variable t) + + (defun +modeline-add-selection-segment-h () + (add-to-list '+modeline-format-left '+modeline-selection-info 'append)) + (defun +modeline-remove-selection-segment-h () + (delq! '+modeline-selection-info +modeline-format-left)) + + (if (featurep 'evil) + (progn + (add-hook 'evil-visual-state-entry-hook #'+modeline-add-selection-segment-h) + (add-hook 'evil-visual-state-exit-hook #'+modeline-remove-selection-segment-h)) + (add-hook 'activate-mark-hook #'+modeline-add-selection-segment-h) + (add-hook 'deactivate-mark-hook #'+modeline-remove-selection-segment-h))) ;;; `+modeline-encoding' -(defconst +modeline-encoding +(def-modeline-var! +modeline-encoding '(:eval (concat (pcase (coding-system-eol-type buffer-file-coding-system) (0 " LF ") @@ -378,39 +479,53 @@ lines are selected, or the NxM dimensions of a block selection.") "UTF-8" (upcase (symbol-name (plist-get sys :name))))) " "))) -(put '+modeline-encoding 'risky-local-variable t) ;; -;;; Setup +;;; Default modeline -(defvar-local +modeline-format-left nil) -(put '+modeline-format-left 'risky-local-variable t) +(def-modeline! :main + '("" + +modeline-matches + " " + +modeline-buffer-identification + +modeline-position) + '("" + mode-line-misc-info + +modeline-modes + (vc-mode (" " + ,(all-the-icons-octicon "git-branch" :v-adjust 0.0) + vc-mode " ")) + " " + +modeline-encoding + (+modeline-checker ("" +modeline-checker " ")))) + +(def-modeline! project + `(" " + ,(all-the-icons-octicon + "file-directory" + :face 'bold + :v-adjust -0.05 + :height 1.25) + (:propertize (" " (:eval (abbreviate-file-name default-directory))) + face bold)) + '("" +modeline-modes)) + +(def-modeline! special + '("" +modeline-matches + " " +modeline-buffer-identification) + '("" +modeline-modes)) + +;; TODO (def-modeline! pdf ...) +;; TODO (def-modeline! helm ...) -(defvar-local +modeline-format-right nil) -(put '+modeline-format-right 'risky-local-variable t) +;; +;;; Bootstrap + +(size-indication-mode +1) ; filesize in modeline (setq-default - +modeline-format-left - '("" - +modeline-matches - " " - +modeline-buffer-identification - +modeline-position) - - +modeline-format-right - `("" - mode-line-misc-info - +modeline-modes - (vc-mode (" " - ,(all-the-icons-octicon "git-branch" :v-adjust 0.0) - vc-mode " ")) - " " - +modeline-encoding - (+modeline-checker ("" +modeline-checker " "))) - - ;; mode-line-format '("" +modeline-bar @@ -423,54 +538,21 @@ lines are selected, or the NxM dimensions of a block selection.") ,(string-width (format-mode-line '("" +modeline-format-right)))))))) +modeline-format-right)) - (with-current-buffer "*Messages*" (setq mode-line-format (default-value 'mode-line-format))) -;; -;;; Other modelines - -(defun set-project-modeline () - (setq +modeline-format-left - `(" " - ,(all-the-icons-octicon - "file-directory" - :face 'bold - :v-adjust -0.05 - :height 1.25) - (:propertize (" " (:eval (abbreviate-file-name default-directory))) - face bold)) - +modeline-format-right - '("" +modeline-modes))) - -(defun set-special-modeline () - (setq +modeline-format-left - '("" - +modeline-matches - " " - +modeline-buffer-identification) - +modeline-format-right - '("" +modeline-modes))) - -(defun set-pdf-modeline ()) ; TODO `set-pdf-modeline' - - -;; -;;; Bootstrap - -(size-indication-mode +1) ; filesize in modeline -(add-hook '+doom-dashboard-mode-hook #'set-project-modeline) -(add-hook 'doom-load-theme-hook #'+modeline-refresh-bars-h) - ;; Other modes -(defun set-modeline-in-magit () - (if (eq major-mode 'magit-status-mode) - (set-project-modeline) - (hide-mode-line-mode))) -(add-hook 'magit-mode-hook #'set-modeline-in-magit) +(set-modeline! :main 'default) +(set-modeline-hook! '+doom-dashboard-mode-hook 'project) +(set-modeline-hook! 'pdf-tools-enabled-hook 'pdf) +(set-modeline-hook! '(special-mode-hook + image-mode-hook + circe-mode-hook) + 'special) -(add-hook 'special-mode-hook #'set-special-modeline) -(add-hook 'image-mode-hook #'set-special-modeline) -(add-hook 'circe-mode-hook #'set-special-modeline) -(add-hook 'pdf-tools-enabled-hook #'set-pdf-modeline) +(add-hook! 'magit-mode-hook + (defun +modeline-init-project-or-hide-h () + (if (eq major-mode 'magit-status-mode) + (set-modeline! 'project) + (hide-mode-line-mode +1)))) From bb702acfd06bd55f7726678f0a24d7242fff1c2d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 01:55:02 -0500 Subject: [PATCH 242/983] emacs/vc: replace git-link w/ browse-at-remote git-link is no longer maintained and browse-at-remote has support for more remotes. - Bind ' g o h' to open homepage in browser - Rebind ' g o o' to open file or region (omits the #L suffix if no selection is active). --- modules/config/default/+emacs-bindings.el | 5 +- modules/config/default/+evil-bindings.el | 7 ++- modules/emacs/vc/autoload/vc.el | 75 +++++++++++------------ modules/emacs/vc/packages.el | 2 +- 4 files changed, 44 insertions(+), 45 deletions(-) diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index 5f41a0883..ee5bde218 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -121,6 +121,8 @@ ;;; v --- versioning (:prefix-map ("v" . "versioning") :desc "Git revert file" "R" #'vc-revert + :desc "Kill link to remote" "y" #'+vc/browse-at-remote-kill-file-or-region + :desc "Kill link to homepage" "Y" #'+vc/browse-at-remote-kill-homepage (:when (featurep! :ui vc-gutter) :desc "Git revert hunk" "r" #'git-gutter:revert-hunk :desc "Git stage hunk" "s" #'git-gutter:stage-hunk @@ -145,7 +147,8 @@ :desc "Find issue" "i" #'forge-visit-issue :desc "Find pull request" "p" #'forge-visit-pullreq) (:prefix ("o" . "open in browser") - :desc "Browse region or line" "." #'+vc/git-browse-region-or-line + :desc "Browse file or region" "." #'+vc/browse-at-remote-file-or-region + :desc "Browse homepage" "h" #'+vc/browse-at-remote-homepage :desc "Browse remote" "r" #'forge-browse-remote :desc "Browse commit" "c" #'forge-browse-commit :desc "Browse an issue" "i" #'forge-browse-issue diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 27d1f1277..009833c54 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -396,8 +396,8 @@ ;;; g --- git (:prefix-map ("g" . "git") :desc "Git revert file" "R" #'vc-revert - :desc "Copy git link" "y" #'git-link - :desc "Copy git link to homepage" "Y" #'git-link-homepage + :desc "Copy link to remote" "y" #'+vc/browse-at-remote-kill-file-or-region + :desc "Copy link to homepage" "Y" #'+vc/browse-at-remote-kill-homepage (:when (featurep! :ui vc-gutter) :desc "Git revert hunk" "r" #'git-gutter:revert-hunk :desc "Git stage hunk" "s" #'git-gutter:stage-hunk @@ -423,7 +423,8 @@ :desc "Find issue" "i" #'forge-visit-issue :desc "Find pull request" "p" #'forge-visit-pullreq) (:prefix ("o" . "open in browser") - :desc "Browse region or line" "o" #'+vc/git-browse-region-or-line + :desc "Browse file or region" "o" #'+vc/browse-at-remote-file-or-region + :desc "Browse homepage" "h" #'+vc/browse-at-remote-homepage :desc "Browse remote" "r" #'forge-browse-remote :desc "Browse commit" "c" #'forge-browse-commit :desc "Browse an issue" "i" #'forge-browse-issue diff --git a/modules/emacs/vc/autoload/vc.el b/modules/emacs/vc/autoload/vc.el index c91328d6c..c4909587a 100644 --- a/modules/emacs/vc/autoload/vc.el +++ b/modules/emacs/vc/autoload/vc.el @@ -1,46 +1,41 @@ ;;; emacs/vc/autoload/vc.el -*- lexical-binding: t; -*- ;;;###autoload -(defun +vc-git-root-url () - "Return the root git repo URL for the current file." - (require 'git-link) - (let* ((remote (git-link--select-remote)) - (remote-url (git-link--remote-url remote)) - (remote-info (if remote-url (git-link--parse-remote remote-url)))) - (if remote-info - (format "https://%s/%s" (car remote-info) (cadr remote-info)) - (error "Remote `%s' is unknown or contains an unsupported URL" remote)))) - -(defvar git-link-default-branch) -(defvar git-link-open-in-browser) -(defvar git-link-use-commit) -;;;###autoload -(defun +vc/git-browse-region-or-line (&optional arg) - "Open the website for the current line of this version controlled file. -Uses the currently checked out branch. If prefix ARG, then use 'master' branch. -If an url can't be ascertained, opens the repository's root." - (interactive "P") - (require 'git-link) - (let ((git-link-default-branch (if arg "master" git-link-default-branch)) - current-prefix-arg ; don't propagate to `git-link' - git-link-use-commit) - (cl-destructuring-bind (beg end) - (if buffer-file-name (git-link--get-region)) - (let ((git-link-open-in-browser t)) - (git-link (git-link--select-remote) beg end))))) +(defun +vc/browse-at-remote-file-or-region () + "Open the current file at remote in your browser. +If a selection is active, highlight them. Otherwise omits the #L suffix in +the URL." + (interactive) + (if (or (use-region-p) + (ignore-errors (evil-visual-state-p))) + (browse-at-remote) + (browse-url (browse-at-remote--file-url (buffer-file-name))))) ;;;###autoload -(defun +vc-update-header-line-a (revision) - "Show revision details in the header-line, instead of the minibuffer. +(defun +vc/browse-at-remote-kill-file-or-region () + "Copy the current file's remote URL to your clipboard. +If a selection is active, highlight them. Otherwise omits the #L suffix in +the URL." + (interactive) + (if (or (use-region-p) + (ignore-errors (evil-visual-state-p))) + (browse-at-remote-kill) + (kill-new (browse-at-remote--file-url (buffer-file-name))))) -Sometimes I forget `git-timemachine' is enabled in a buffer. Putting revision -info in the `header-line-format' is a good indication." - (let* ((date-relative (nth 3 revision)) - (date-full (nth 4 revision)) - (author (if git-timemachine-show-author (concat (nth 6 revision) ": ") "")) - (sha-or-subject (if (eq git-timemachine-minibuffer-detail 'commit) (car revision) (nth 5 revision)))) - (setq header-line-format - (format "%s%s [%s (%s)]" - (propertize author 'face 'git-timemachine-minibuffer-author-face) - (propertize sha-or-subject 'face 'git-timemachine-minibuffer-detail-face) - date-full date-relative)))) + +(defun +vc--remote-homepage () + (or (let ((url (browse-at-remote--remote-ref))) + (cdr (browse-at-remote--get-url-from-remote (car url)))) + (user-error "Can't find homepage for current project"))) + +;;;###autoload +(defun +vc/browse-at-remote-homepage () + "Open homepage for current project in browser." + (interactive) + (browse-url (+vc--remote-homepage))) + +;;;###autoload +(defun +vc/browse-at-remote-kill-homepage () + "Copy homepage URL of current project to clipboard." + (interactive) + (kill-new (+vc--remote-homepage))) diff --git a/modules/emacs/vc/packages.el b/modules/emacs/vc/packages.el index 8a5c76dad..a8a174152 100644 --- a/modules/emacs/vc/packages.el +++ b/modules/emacs/vc/packages.el @@ -5,7 +5,7 @@ (package! vc-annotate :built-in t) (package! smerge-mode :built-in t) -(package! git-link) +(package! browse-at-remote) (package! git-timemachine) (package! gitconfig-mode) (package! gitignore-mode) From 721b63547607f6ea6bbc769059b3255a8d5eb9bd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 02:17:40 -0500 Subject: [PATCH 243/983] emacs/vc: refactor git-timemachine header-line advice The function was removed in bb702acfd --- modules/emacs/vc/config.el | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/modules/emacs/vc/config.el b/modules/emacs/vc/config.el index 9c16d9cca..7a47d76c5 100644 --- a/modules/emacs/vc/config.el +++ b/modules/emacs/vc/config.el @@ -21,8 +21,22 @@ ;; showing revision details in the minibuffer, show them in ;; `header-line-format', which has better visibility. (setq git-timemachine-show-minibuffer-details t) - (advice-add #'git-timemachine--show-minibuffer-details - :override #'+vc-update-header-line-a) + + (defadvice! +vc-update-header-line-a (revision) + "Show revision details in the header-line, instead of the minibuffer. + +Sometimes I forget `git-timemachine' is enabled in a buffer. Putting revision +info in the `header-line-format' is a good indication." + :override #'git-timemachine--show-minibuffer-details + (let* ((date-relative (nth 3 revision)) + (date-full (nth 4 revision)) + (author (if git-timemachine-show-author (concat (nth 6 revision) ": ") "")) + (sha-or-subject (if (eq git-timemachine-minibuffer-detail 'commit) (car revision) (nth 5 revision)))) + (setq header-line-format + (format "%s%s [%s (%s)]" + (propertize author 'face 'git-timemachine-minibuffer-author-face) + (propertize sha-or-subject 'face 'git-timemachine-minibuffer-detail-face) + date-full date-relative)))) (after! evil ;; rehash evil keybindings so they are recognized From 0088872c20671ade6fb4144eb22c99ee3ccbb39c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 02:26:36 -0500 Subject: [PATCH 244/983] emacs/vc: remove extraneous next/prev keys Also, 'q' is already bound upstream in evil-collection-git-timemachine --- modules/emacs/vc/config.el | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/emacs/vc/config.el b/modules/emacs/vc/config.el index 7a47d76c5..2a177c9c2 100644 --- a/modules/emacs/vc/config.el +++ b/modules/emacs/vc/config.el @@ -48,9 +48,6 @@ info in the `header-line-format' is a good indication." (map! :map git-timemachine-mode-map :n "C-p" #'git-timemachine-show-previous-revision :n "C-n" #'git-timemachine-show-next-revision - :n "[[" #'git-timemachine-show-previous-revision - :n "]]" #'git-timemachine-show-next-revision - :n "q" #'git-timemachine-quit :n "gb" #'git-timemachine-blame :n "gtc" #'git-timemachine-show-commit)) From 37cb3739f5eba3a7f5312bcdc88b5c1cac698e2f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 04:49:51 -0500 Subject: [PATCH 245/983] docs/api: add appendq!, prependq! & pushnew! demos --- docs/api.org | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/api.org b/docs/api.org index 9deb95584..c0bd470e2 100644 --- a/docs/api.org +++ b/docs/api.org @@ -10,6 +10,7 @@ It is integrated into Helpful, in Doom. - [[#add-hook][add-hook!]] - [[#add-transient-hook][add-transient-hook!]] - [[#after][after!]] + - [[#appendq][appendq!]] - [[#custom-set-faces][custom-set-faces!]] - [[#custom-theme-set-faces][custom-theme-set-faces!]] - [[#defer-feature][defer-feature!]] @@ -23,6 +24,7 @@ It is integrated into Helpful, in Doom. - [[#map][map!]] - [[#package][package!]] - [[#pushnew][pushnew!]] + - [[#prependq][prependq!]] - [[#quiet][quiet!]] - [[#remove-hook][remove-hook!]] - [[#setq-hook][setq-hook!]] @@ -90,6 +92,12 @@ It is integrated into Helpful, in Doom. (after! rustic ...) (after! python ...) #+END_SRC +*** appendq! +#+BEGIN_SRC elisp +(let ((x '(a b c))) + (appendq! x '(c d e)) + x) +#+END_SRC *** custom-set-faces! #+BEGIN_SRC elisp :eval no @@ -388,7 +396,26 @@ These are side-by-side comparisons, showing how to bind keys with and without (package! evil :ignore (not (equal system-name "my-desktop"))) #+END_SRC -*** TODO pushnew! +*** pushnew! +#+BEGIN_SRC elisp +(let ((list '(a b c))) + (pushnew! list 'c 'd 'e) + list) +#+END_SRC +*** prependq! +#+BEGIN_SRC elisp +(let ((x '(a b c))) + (prependq! x '(c d e)) + x) +#+END_SRC + +#+BEGIN_SRC elisp +(let ((x '(a b c)) + (y '(c d e)) + (z '(f g))) + (prependq! x y z '(h)) + x) +#+END_SRC *** quiet! #+BEGIN_SRC elisp :eval no ;; Enters recentf-mode without extra output From 7d09921a29b178a254c128ea3305e7cfa0356ed7 Mon Sep 17 00:00:00 2001 From: Rakan Alhneiti Date: Wed, 11 Dec 2019 12:00:29 +0100 Subject: [PATCH 246/983] Add isort feature to readme --- modules/lang/python/README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/python/README.org b/modules/lang/python/README.org index 57e555f8f..8cf568435 100644 --- a/modules/lang/python/README.org +++ b/modules/lang/python/README.org @@ -31,7 +31,7 @@ Adds Python support to Doom Emacs. ** Plugins + [[https://github.com/pythonic-emacs/anaconda-mode][anaconda-mode]]* + [[https://github.com/Wilfred/pyimport][pyimport]]* -+ [[https://github.com/emacs-pe/pyimpsort.el][pyimpsort]]* ++ [[https://github.com/paetzke/py-isort.el][py-isort]]* + [[https://melpa.org/#/nose][nose]]* + [[https://github.com/wbolster/emacs-python-pytest][python-pytest]]* + [[https://github.com/Wilfred/pip-requirements.el][pip-requirements]]* From eeafec2df0cd84152d1bba8efc3d6c1957d21bef Mon Sep 17 00:00:00 2001 From: Rakan Alhneiti Date: Sun, 15 Dec 2019 16:25:27 +0100 Subject: [PATCH 247/983] Make isort default python import sorting package --- modules/lang/python/config.el | 1 - modules/lang/python/packages.el | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/lang/python/config.el b/modules/lang/python/config.el index 410e8bee6..d8d72f6a7 100644 --- a/modules/lang/python/config.el +++ b/modules/lang/python/config.el @@ -139,7 +139,6 @@ called.") (:prefix ("i" . "imports") :desc "Insert missing imports" "i" #'pyimport-insert-missing :desc "Remove unused imports" "r" #'pyimport-remove-unused - :desc "Sort imports" "s" #'pyimpsort-buffer :desc "Optimize imports" "o" #'+python/optimize-imports))) diff --git a/modules/lang/python/packages.el b/modules/lang/python/packages.el index 98819857f..053f1fb94 100644 --- a/modules/lang/python/packages.el +++ b/modules/lang/python/packages.el @@ -31,7 +31,4 @@ ;; Import managements (package! pyimport) -(package! pyimpsort) - -(when (featurep! +isort) - (package! py-isort)) +(package! py-isort) From a64b3bdceb8b55071ff8330fcea999b839009d67 Mon Sep 17 00:00:00 2001 From: Rakan Alhneiti Date: Sun, 15 Dec 2019 16:25:59 +0100 Subject: [PATCH 248/983] Add an entry in the readme for the isort prequisite --- modules/lang/python/README.org | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/lang/python/README.org b/modules/lang/python/README.org index 8cf568435..b0eff6697 100644 --- a/modules/lang/python/README.org +++ b/modules/lang/python/README.org @@ -67,6 +67,9 @@ This module has no direct prerequisites. Here are some of its soft dependencies. + ~pyimport~ requires Python's module ~pyflakes~: + ~pip install pyflakes~ ++ ~py-isort~ requires [[https://github.com/timothycrosley/isort][isort]] to be installed: + + ~pip install isort~ + + Python virtual environments install instructions at: + [[https://github.com/pyenv/pyenv][pyenv]] + [[https://conda.io/en/latest/][Conda]] From 304af70000f917342b0f893fc3628546e74aa2bb Mon Sep 17 00:00:00 2001 From: Rakan Alhneiti Date: Sun, 15 Dec 2019 16:48:27 +0100 Subject: [PATCH 249/983] Update optimize import to use py-isort --- modules/lang/python/autoload/python.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/python/autoload/python.el b/modules/lang/python/autoload/python.el index 6cfd0429b..4f6ef7f3b 100644 --- a/modules/lang/python/autoload/python.el +++ b/modules/lang/python/autoload/python.el @@ -59,4 +59,4 @@ "organize imports" (interactive) (pyimport-remove-unused) - (pyimpsort-buffer)) + (py-isort-buffer)) From 77a68006d4552e4ad1ec5024877eab0d4fa49b6e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 14:58:01 -0500 Subject: [PATCH 250/983] emacs/vc: fix void-function browse-at-remote--file-url error --- modules/emacs/vc/autoload/vc.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/emacs/vc/autoload/vc.el b/modules/emacs/vc/autoload/vc.el index c4909587a..b381bc545 100644 --- a/modules/emacs/vc/autoload/vc.el +++ b/modules/emacs/vc/autoload/vc.el @@ -1,5 +1,7 @@ ;;; emacs/vc/autoload/vc.el -*- lexical-binding: t; -*- +(autoload 'browse-at-remote--file-url "browse-at-remote") + ;;;###autoload (defun +vc/browse-at-remote-file-or-region () "Open the current file at remote in your browser. From 9eaa6ce19462b2598f8f3442e347281e0eb779ef Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 15:52:28 -0500 Subject: [PATCH 251/983] display-line-numbers-widen = t --- core/core-ui.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/core-ui.el b/core/core-ui.el index 9f667d7aa..d5dcfd01a 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -494,9 +494,13 @@ treat Emacs as a non-application window." ;; ;;; Line numbers +;; Explicitly define a width to reduce computation (setq-default display-line-numbers-width 3) -;; line numbers in most modes +;; Show absolute line numbers for narrowed regions +(setq-default display-line-numbers-widen t) + +;; Enable line numbers in most text-editing modes (add-hook! '(prog-mode-hook text-mode-hook conf-mode-hook) #'display-line-numbers-mode) From c522ca4fc03a5d42ea66273726766c1c68ebf8cd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 15:53:28 -0500 Subject: [PATCH 252/983] Minor refactors & cleanup --- core/core-ui.el | 4 +--- modules/emacs/vc/config.el | 2 +- modules/lang/rust/config.el | 9 ++++----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index d5dcfd01a..616c1889d 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -462,9 +462,7 @@ treat Emacs as a non-application window." :init (defadvice! doom--disable-all-the-icons-in-tty-a (orig-fn &rest args) "Return a blank string in tty Emacs, which doesn't support multiple fonts." - :around '(all-the-icons-octicon all-the-icons-material - all-the-icons-faicon all-the-icons-fileicon - all-the-icons-wicon all-the-icons-alltheicon) + :around #'all-the-icons-insert (if (display-multi-font-p) (apply orig-fn args) ""))) diff --git a/modules/emacs/vc/config.el b/modules/emacs/vc/config.el index 2a177c9c2..348bc3ebe 100644 --- a/modules/emacs/vc/config.el +++ b/modules/emacs/vc/config.el @@ -65,7 +65,7 @@ info in the `header-line-format' is a good indication." (setq-hook! 'git-commit-mode-hook fill-column 72) (add-hook! 'git-commit-setup-hook - (defun +vc-start-in-insert-state-maybe () + (defun +vc-start-in-insert-state-maybe-h () "Start git-commit-mode in insert state if in a blank commit message, otherwise in default state." (when (and (bound-and-true-p evil-mode) diff --git a/modules/lang/rust/config.el b/modules/lang/rust/config.el index 5f69dcb3d..adc3c3f4b 100644 --- a/modules/lang/rust/config.el +++ b/modules/lang/rust/config.el @@ -10,10 +10,6 @@ (use-package! rustic :mode ("\\.rs$" . rustic-mode) :commands rustic-run-cargo-command rustic-cargo-outdated - :preface - ;; We use the superior default client provided by `lsp-mode', not the one - ;; rustic-mode sets up for us. - (setq rustic-lsp-client nil) :config (set-docsets! 'rustic-mode "Rust") @@ -25,7 +21,10 @@ ;; buffers, so we disable it, but only for evil users, because it ;; affects `forward-sexp' and its ilk. See ;; https://github.com/rust-lang/rust-mode/issues/288. - rustic-match-angle-brackets (not (featurep! :editor evil))) + rustic-match-angle-brackets (not (featurep! :editor evil)) + ;; We use the superior default client provided by `lsp-mode', not the + ;; one rustic-mode sets up for us. + rustic-lsp-client nil) (add-hook 'rustic-mode-hook #'rainbow-delimiters-mode) From dfb5a0cc5406faabf32a912186e716479a977e5a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 17:59:20 -0500 Subject: [PATCH 253/983] tools/lookup: add autocompletion for google/duckduckgo providers For +lookup/online, on `SPC s o` - Change the signature of `+lookup/online` - Change format of +lookup-provider-url-alist. --- modules/tools/lookup/autoload/online.el | 50 ++++++++++++------------- modules/tools/lookup/config.el | 33 +++++++++------- modules/tools/lookup/packages.el | 4 +- 3 files changed, 47 insertions(+), 40 deletions(-) diff --git a/modules/tools/lookup/autoload/online.el b/modules/tools/lookup/autoload/online.el index 89f49e1e4..b1d8a1925 100644 --- a/modules/tools/lookup/autoload/online.el +++ b/modules/tools/lookup/autoload/online.el @@ -25,8 +25,8 @@ argument is non-nil)." (+lookup--online-provider (not current-prefix-arg)))) ;;;###autoload -(defun +lookup/online (search &optional provider) - "Looks up SEARCH (a string) in you browser using PROVIDER. +(defun +lookup/online (arg &optional query provider) + "Looks up QUERY (a string) in you browser using PROVIDER. PROVIDER should be a key of `+lookup-provider-url-alist'. @@ -34,29 +34,29 @@ When used interactively, it will prompt for a query and, for the first time, the provider from `+lookup-provider-url-alist'. On consecutive uses, the last provider will be reused. If the universal argument is supplied, always prompt for the provider." - (interactive - (let ((provider (+lookup--online-provider current-prefix-arg))) - (list (or (and (use-region-p) - (buffer-substring-no-properties (region-beginning) - (region-end))) - (read-string (format "Search for (on %s): " provider) - (thing-at-point 'symbol t))) - provider))) - (condition-case-unless-debug e - (let ((url (cdr (assoc provider +lookup-provider-url-alist)))) - (unless url - (user-error "'%s' is an invalid search engine" provider)) - (when (or (functionp url) (symbolp url)) - (setq url (funcall url))) - (cl-assert (stringp url)) - (when (string-empty-p search) - (user-error "The search query is empty")) - (funcall +lookup-open-url-fn (format url (url-encode-url search)))) - (error - (setq +lookup--last-provider - (delq (assq major-mode +lookup--last-provider) - +lookup--last-provider)) - (signal (car e) (cdr e))))) + (interactive "P") + (let* ((provider (or provider (+lookup--online-provider arg))) + (query (or query (+lookup-symbol-or-region))) + (backend (cl-find-if (lambda (x) (or (stringp x) (fboundp x))) + (cdr (assoc provider +lookup-provider-url-alist))))) + (if (commandp backend) + (call-interactively backend) + (unless backend + (user-error "%S is an invalid query engine backend for %S provider" + backend provider)) + (cl-check-type backend (or string function)) + (condition-case-unless-debug e + (progn + (when (or (functionp backend) (symbolp backend)) + (setq backend (funcall backend))) + (when (string-empty-p query) + (user-error "The query query is empty")) + (funcall +lookup-open-url-fn (format url (url-encode-url query)))) + (error + (setq +lookup--last-provider + (delq (assq major-mode +lookup--last-provider) + +lookup--last-provider)) + (signal (car e) (cdr e))))))) ;;;###autoload (defun +lookup/online-select () diff --git a/modules/tools/lookup/config.el b/modules/tools/lookup/config.el index 6dc5adada..f6337ee85 100644 --- a/modules/tools/lookup/config.el +++ b/modules/tools/lookup/config.el @@ -13,21 +13,26 @@ ;; `dumb-jump' to find what you want. (defvar +lookup-provider-url-alist - (append '(("Google" . "https://google.com/search?q=%s") - ("Google images" . "https://www.google.com/images?q=%s") - ("Google maps" . "https://maps.google.com/maps?q=%s") - ("Project Gutenberg" . "http://www.gutenberg.org/ebooks/search/?query=%s") - ("DuckDuckGo" . "https://duckduckgo.com/?q=%s") - ("DevDocs.io" . "https://devdocs.io/#q=%s") - ("StackOverflow" . "https://stackoverflow.com/search?q=%s") - ("Github" . "https://github.com/search?ref=simplesearch&q=%s") - ("Youtube" . "https://youtube.com/results?aq=f&oq=&search_query=%s") - ("Wolfram alpha" . "https://wolframalpha.com/input/?i=%s") - ("Wikipedia" . "https://wikipedia.org/search-redirect.php?language=en&go=Go&search=%s")) + (append '(("Google" counsel-search helm-google "https://google.com/search?q=%s") + ("Google images" "https://www.google.com/images?q=%s") + ("Google maps" "https://maps.google.com/maps?q=%s") + ("Project Gutenberg" "http://www.gutenberg.org/ebooks/search/?query=%s") + ("DuckDuckGo" counsel-search "https://duckduckgo.com/?q=%s") + ("DevDocs.io" "https://devdocs.io/#q=%s") + ("StackOverflow" "https://stackoverflow.com/search?q=%s") + ("Github" "https://github.com/search?ref=simplesearch&q=%s") + ("Youtube" "https://youtube.com/results?aq=f&oq=&search_query=%s") + ("Wolfram alpha" "https://wolframalpha.com/input/?i=%s") + ("Wikipedia" "https://wikipedia.org/search-redirect.php?language=en&go=Go&search=%s")) (when (featurep! :lang rust) - '(("Rust Docs" . "https://doc.rust-lang.org/edition-guide/?search=%s")))) - "An alist that maps online resources to their search url or a function that -produces an url. Used by `+lookup/online'.") + '(("Rust Docs" "https://doc.rust-lang.org/edition-guide/?search=%s")))) + "An alist that maps online resources to either: + + 1. A search url (needs on '%s' to substitute with an url encoded query), + 2. A non-interactive function that returns the search url in #1, + 3. An interactive command that does its own search for that provider. + +Used by `+lookup/online'.") (defvar +lookup-open-url-fn #'browse-url "Function to use to open search urls.") diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index 1b25d51c0..f2740f716 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -10,7 +10,9 @@ ;; (package! dumb-jump) (when (featurep! :completion ivy) - (package! ivy-xref)) + (package! ivy-xref) + ;; Need for Google/DuckDuckGo auto-completion on `+lookup/online' + (package! request)) (when (featurep! :completion helm) (package! helm-xref)) From 48a943b09f33155a5ee05e0994b188c106f417ff Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 18:03:43 -0500 Subject: [PATCH 254/983] tools/lookup: fix helm-google integration for +lookup/online --- modules/tools/lookup/config.el | 2 +- modules/tools/lookup/packages.el | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/tools/lookup/config.el b/modules/tools/lookup/config.el index f6337ee85..a34773187 100644 --- a/modules/tools/lookup/config.el +++ b/modules/tools/lookup/config.el @@ -13,7 +13,7 @@ ;; `dumb-jump' to find what you want. (defvar +lookup-provider-url-alist - (append '(("Google" counsel-search helm-google "https://google.com/search?q=%s") + (append '(("Google" counsel-search helm-google-suggest "https://google.com/search?q=%s") ("Google images" "https://www.google.com/images?q=%s") ("Google maps" "https://maps.google.com/maps?q=%s") ("Project Gutenberg" "http://www.gutenberg.org/ebooks/search/?query=%s") diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index f2740f716..fdc7a1416 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -14,6 +14,7 @@ ;; Need for Google/DuckDuckGo auto-completion on `+lookup/online' (package! request)) (when (featurep! :completion helm) + (package! helm-google) (package! helm-xref)) (when (featurep! +docsets) From 7095bdb7cee7596a4ace71e97be1c91a574dc118 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 18:49:42 -0500 Subject: [PATCH 255/983] completion/ivy: remove redundant counsel-find-file actions Many of these are already upstream, but some of them are on different keys (e.g. j instead of f for other-window). See https://github.com/abo-abo/swiper/blob/master/counsel.el#L1864-L1875 --- modules/completion/ivy/config.el | 35 ++++++++------------------------ 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index bdcf9b14b..9826545b2 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -245,37 +245,18 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." ;; Record in jumplist when opening files via counsel-{ag,rg,pt,git-grep} (add-hook 'counsel-grep-post-action-hook #'better-jumper-set-jump) - ;; Factories - (defun +ivy-action-reloading (cmd) - (lambda (x) - (funcall cmd x) - (ivy--reset-state ivy-last))) - - (defun +ivy-action-given-file (cmd prompt) - (lambda (source) - (let* ((enable-recursive-minibuffers t) - (target (read-file-name (format "%s %s to:" prompt source)))) - (funcall cmd source target 1)))) - ;; Configure `counsel-find-file' (setq counsel-find-file-ignore-regexp "\\(?:^[#.]\\)\\|\\(?:[#~]$\\)\\|\\(?:^Icon?\\)") (ivy-add-actions 'counsel-find-file - `(("b" counsel-find-file-cd-bookmark-action "cd bookmark") - ("s" counsel-find-file-as-root "open as root") - ("m" counsel-find-file-mkdir-action "mkdir") - ("c" ,(+ivy-action-given-file #'copy-file "Copy file") "copy file") - ("d" ,(+ivy-action-reloading #'+ivy-confirm-delete-file) "delete") - ("r" (lambda (path) (rename-file path (read-string "New name: "))) "rename") - ("R" ,(+ivy-action-reloading (+ivy-action-given-file #'rename-file "Move")) "move") - ("f" find-file-other-window "other window") - ("F" find-file-other-frame "other frame") - ("p" (lambda (path) (with-ivy-window (insert (file-relative-name path default-directory)))) "insert relative path") - ("P" (lambda (path) (with-ivy-window (insert path))) "insert absolute path") - ("l" (lambda (path) "Insert org-link with relative path" - (with-ivy-window (insert (format "[[./%s]]" (file-relative-name path default-directory))))) "insert org-link (rel. path)") - ("L" (lambda (path) "Insert org-link with absolute path" - (with-ivy-window (insert (format "[[%s]]" path)))) "insert org-link (abs. path)"))) + '(("p" (lambda (path) (with-ivy-window (insert (file-relative-name path default-directory)))) + "insert relative path") + ("P" (lambda (path) (with-ivy-window (insert path))) + "insert absolute path") + ("l" (lambda (path) (with-ivy-window (insert (format "[[./%s]]" (file-relative-name path default-directory))))) + "insert relative org-link") + ("L" (lambda (path) (with-ivy-window (insert (format "[[%s]]" path)))) + "Insert absolute org-link"))) (ivy-add-actions 'counsel-ag ; also applies to `counsel-rg' From cccaa4f9f3fadfad1bbb6a059343dba197680725 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 21:42:56 -0500 Subject: [PATCH 256/983] Make doom/reload-env run 'doom env' through user's SHELL --- core/autoload/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/autoload/config.el b/core/autoload/config.el index 4159a48b0..05637ad1e 100644 --- a/core/autoload/config.el +++ b/core/autoload/config.el @@ -114,7 +114,8 @@ If passed the prefix ARG, clear the envvar file. Uses the same mechanism as An envvar file contains a snapshot of your shell environment, which can be imported into Emacs." (interactive "P") - (doom--compile (format "%s env%s" doom-bin (if arg " -c" "")) + (doom--compile + (format "%s -c '%s env%s'" shell-file-name doom-bin (if arg " -c" "")) :on-success (let ((doom-reloading-p t)) (unless arg From 0001947401c3a87b082a3c33cce2412d905775ee Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 21:45:40 -0500 Subject: [PATCH 257/983] completion/company: mention +tng/+childframe incompatibility in readme --- modules/completion/company/README.org | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/completion/company/README.org b/modules/completion/company/README.org index 595a8bf88..1ca8d72d8 100644 --- a/modules/completion/company/README.org +++ b/modules/completion/company/README.org @@ -26,9 +26,10 @@ https://assets.doomemacs.org/completion/company/overlay.png ** Module Flags + =+childframe= Enables displaying completion candidates in a child frame, rather than an overlay or tooltip (among with other UI enhancements). *This - requires GUI Emacs 26.1+.* + requires GUI Emacs 26.1+ and is incompatible with the =+tng= flag* + =+tng= Enables completion using only ~TAB~. Pressing ~TAB~ will select the - next completion suggestion, while ~S-TAB~ will select the previous one. + next completion suggestion, while ~S-TAB~ will select the previous one. *This + is incompatible with the =+childframe= flag* ** Plugins + [[https://github.com/company-mode/company-mode][company-mode]] From 760dcbb8eadf973d1d3cebdd76f4421b3bbd4223 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 21:53:26 -0500 Subject: [PATCH 258/983] Warn about reloading env from within Emacs on Windows --- core/autoload/config.el | 6 +++++- core/core-cli.el | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/core/autoload/config.el b/core/autoload/config.el index 05637ad1e..6cb41fb0f 100644 --- a/core/autoload/config.el +++ b/core/autoload/config.el @@ -74,7 +74,9 @@ reloads your package list, and lastly, reloads your private config.el. Runs `doom-reload-hook' afterwards." (interactive) (require 'core-cli) - (doom--compile (format "%s refresh" doom-bin) + (when (and IS-WINDOWS (file-exists-p doom-env-file)) + (warn "Can't regenerate envvar file from within Emacs. Run 'doom env' from the console")) + (doom--compile (format "%s refresh -e" doom-bin) :on-success (let ((doom-reloading-p t)) (doom-initialize 'force) @@ -114,6 +116,8 @@ If passed the prefix ARG, clear the envvar file. Uses the same mechanism as An envvar file contains a snapshot of your shell environment, which can be imported into Emacs." (interactive "P") + (when IS-WINDOWS + (user-error "Cannot reload envvar file from within Emacs on Windows, run it from cmd.exe")) (doom--compile (format "%s -c '%s env%s'" shell-file-name doom-bin (if arg " -c" "")) :on-success diff --git a/core/core-cli.el b/core/core-cli.el index 596449918..6e1aac662 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -222,8 +222,9 @@ BODY will be run when this dispatcher is called." (defcligroup! "Maintenance" "For managing your config and packages" (defcli! (refresh re sync) - ((if-necessary-p ["-n" "--if-necessary"] "Only regenerate autoloads files if necessary") - (prune-p ["-p" "--prune"] "Purge orphaned packages & regraft repos")) + ((if-necessary-p ["-n" "--if-necessary"] "Only regenerate autoloads files if necessary") + (inhibit-envvar-p ["-e"] "Don't regenerate the envvar file") + (prune-p ["-p" "--prune"] "Purge orphaned packages & regraft repos")) "Ensure Doom is properly set up. This is the equivalent of running autoremove, install, autoloads, then @@ -241,7 +242,8 @@ stale." (print! (start "Initiating a refresh of Doom Emacs...")) (print-group! (let (success) - (when (file-exists-p doom-env-file) + (when (and (not inhibit-envvar-p) + (file-exists-p doom-env-file)) (doom-cli-reload-env-file 'force)) ;; Ensures that no pre-existing state pollutes the generation of the new From c9e9ef528d00a2ea81eec35460fdc76f7be285fe Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 21:54:01 -0500 Subject: [PATCH 259/983] Fix doom/reload-env on first-time generation --- core/autoload/config.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/autoload/config.el b/core/autoload/config.el index 6cb41fb0f..df4e71622 100644 --- a/core/autoload/config.el +++ b/core/autoload/config.el @@ -119,7 +119,12 @@ imported into Emacs." (when IS-WINDOWS (user-error "Cannot reload envvar file from within Emacs on Windows, run it from cmd.exe")) (doom--compile - (format "%s -c '%s env%s'" shell-file-name doom-bin (if arg " -c" "")) + (format "%s -ic '%s env%s'" + (string-trim + (shell-command-to-string + (format "getent passwd %S | cut -d: -f7" + (user-login-name)))) + doom-bin (if arg " -c" "")) :on-success (let ((doom-reloading-p t)) (unless arg From 84252d8962608c7a1d14993986dd4fbfbd8b5e9f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 21:56:16 -0500 Subject: [PATCH 260/983] Fix #2186: irreversible modeline resizing When adjusting fonts with doom-big-font-mode, or doom/increase-font-size and doom/decrease-font-size. --- core/autoload/fonts.el | 49 ++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/core/autoload/fonts.el b/core/autoload/fonts.el index d84a81b1c..f7e5f1105 100644 --- a/core/autoload/fonts.el +++ b/core/autoload/fonts.el @@ -16,11 +16,6 @@ acceptable values for this variable.") "How many steps to increase the font size (with `doom-font' as the base) when `doom-big-font-mode' is enabled and `doom-big-font' is nil.") -;;;###autoload -(defvar doom-change-font-size-hook nil - "A hook run after adjusting the font size with `doom/increase-font-size', -`doom/decrease-font-size', or `doom/reset-font-size'.") - ;; ;;; Library @@ -44,14 +39,14 @@ acceptable values for this variable.") (defun doom-adjust-font-size (increment &optional frame) "Increase size of font in FRAME by INCREMENT. FRAME parameter defaults to current frame." - (let (success) - (if (null increment) - (let ((frames (doom--frame-list frame))) - (dolist (frame frames) - (when (frame-parameter frame 'font-scale) - (set-frame-parameter frame 'font-scale nil))) - (set-frame-font doom-font 'keep-size frames) - (setq success (and frames t))) + (if (null increment) + (let ((frames (doom--frame-list frame))) + (dolist (frame frames) + (when (frame-parameter frame 'font-scale) + (set-frame-parameter frame 'font-scale nil))) + (set-frame-font doom-font 'keep-size frames) + (and frames t)) + (let (success) (dolist (frame (doom--frame-list frame)) (let* ((font (frame-parameter frame 'font)) (font (doom--font-name font frame)) @@ -70,10 +65,11 @@ FRAME parameter defaults to current frame." (error "Cannot change font size")) (set-frame-parameter frame 'font font) (set-frame-parameter frame 'font-scale (+ zoom-factor increment)) - (setq success t)))) - (when success - (run-hooks 'doom-change-font-size-hook) - t))) + (setq success t))) + (when success + ;; Unlike `set-frame-font', `set-frame-parameter' won't trigger this + (run-hooks 'after-setting-font-hook) + t)))) ;; @@ -130,14 +126,11 @@ This uses `doom/increase-font-size' under the hood, and enlargens the font by :global t (unless doom-font (user-error "`doom-font' must be set to a valid font")) - (let ((frame (selected-frame))) - (if doom-big-font - (progn - (set-frame-font (if doom-big-font-mode doom-big-font doom-font) - t (doom--frame-list frame)) - (run-hooks 'doom-change-font-size-hook)) - (set-frame-font doom-font t (doom--frame-list frame)) - (when (and doom-big-font-mode - (integerp doom-big-font-increment) - (/= doom-big-font-increment 0)) - (doom-adjust-font-size doom-big-font-increment))))) + (if doom-big-font + (set-frame-font (if doom-big-font-mode doom-big-font doom-font) + 'keep-size (doom--frame-list)) + (doom-adjust-font-size + (and doom-big-font-mode + (integerp doom-big-font-increment) + (/= doom-big-font-increment 0) + doom-big-font-increment)))) From ea632fc530ab5e07d3bf85ff28dd38da9316aa35 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 22:48:52 -0500 Subject: [PATCH 261/983] lang/rust: use lsp-rust instead of rustic-lsp lsp-rust is supposedly superior, and doesn't assume anything about our package management system like rustic does. Relevant to #2195 --- modules/lang/rust/README.org | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/lang/rust/README.org b/modules/lang/rust/README.org index 5203e9e40..fea5cd5c0 100644 --- a/modules/lang/rust/README.org +++ b/modules/lang/rust/README.org @@ -34,6 +34,8 @@ e.g. ~cargo~. ** Hacks + rustic has been modified /not/ to automatically install lsp-mode or elgot if they're missing. Doom expects you to enable the =:tools lsp= module yourself. ++ rustic's LSP integration has been disabled in favor of the rls/rust-analyzer + support provider by the lsp-mode package. * Prerequisites This module only requires ~rust~, which can be acquired through =rustup=: @@ -71,11 +73,12 @@ and the ~+lsp~ flag on this module. * TODO Configuration ** Enable rust-analyzer -You'll need [[https://github.com/rust-analyzer/rust-analyzer][rust-analyzer]] installed on your system, then: +You'll need [[https://github.com/rust-analyzer/rust-analyzer][rust-analyzer]] installed on your system, then add the following to +=$DOOMDIR/config.el=: #+BEGIN_SRC elisp -(after! rustic - (setq rustic-lsp-server 'rust-analyzer)) +(after! lsp-rust + (setq lsp-rust-server 'rust-analyzer)) #+END_SRC * TODO Troubleshooting From da25027dc3276f0008d7b7cf5ce2f14ee5a64911 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 22:54:24 -0500 Subject: [PATCH 262/983] docs/api: clean up; add results; add :eval header args --- docs/api.org | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/docs/api.org b/docs/api.org index c0bd470e2..8f3ad5868 100644 --- a/docs/api.org +++ b/docs/api.org @@ -5,7 +5,7 @@ This appendix serves as a reference on how to use Doom Emacs' standard library. It is integrated into Helpful, in Doom. * Table of Contents :TOC_3: -- [[#examples-for-dooms-core-library][Examples for Doom's core library]] +- [[#examples-for-dooms-library][Examples for Doom's library]] - [[#core-lib][core-lib]] - [[#add-hook][add-hook!]] - [[#add-transient-hook][add-transient-hook!]] @@ -35,7 +35,7 @@ It is integrated into Helpful, in Doom. - [[#persist-emacs-initial-frame-position-dimensions-andor-full-screen-state-across-sessions][Persist Emacs' initial frame position, dimensions and/or full-screen state across sessions]] - [[#update-cursor-shape-under-terminal-emacs][Update cursor shape under terminal Emacs]] -* Examples for Doom's core library +* Examples for Doom's library ** core-lib *** add-hook! #+BEGIN_SRC elisp :eval no @@ -99,6 +99,20 @@ It is integrated into Helpful, in Doom. x) #+END_SRC +#+RESULTS: +: (a b c c d e) + +#+BEGIN_SRC elisp +(let ((x '(a b c)) + (y '(c d e)) + (z '(f g))) + (appendq! x y z '(h)) + x) +#+END_SRC + +#+RESULTS: +: (a b c c d e f g h) + *** custom-set-faces! #+BEGIN_SRC elisp :eval no (custom-set-faces! @@ -223,7 +237,7 @@ It is integrated into Helpful, in Doom. : /home/hlissner/.emacs.d/LICENSE *** lambda! -#+BEGIN_SRC elisp +#+BEGIN_SRC elisp :eval no (map! "C-j" (lambda! (newline) (indent-according-to-mode))) ;; The `λ!' short-form alias exists. If you have the snippets module enabled and @@ -236,19 +250,18 @@ When ~newline~ is passed a numerical prefix argument (=C-u 5 M-x newline=), it inserts N newlines. We can use ~lambda!!~ to easily create a keybinds that bakes in the prefix arg into the command call: -#+BEGIN_SRC elisp +#+BEGIN_SRC elisp :eval no (map! "C-j" (lambda!! #'newline 5)) ;; The `λ!!' short-form alias exists. If you have the snippets module enabled ;; and Doom's default snippets, a 'lam' snippet is available to expand into ;; 'λ!'. Otherwise, you can use `lambda!!'. (map! "C-j" (λ!! #'newline 5)) - #+END_SRC Or to create aliases for functions that behave differently: -#+BEGIN_SRC elisp +#+BEGIN_SRC elisp :eval no (fset 'insert-5-newlines (lambda!! #'newline 5)) ;; The equivalent of C-u M-x org-global-cycle, which resets the org document to @@ -402,6 +415,10 @@ These are side-by-side comparisons, showing how to bind keys with and without (pushnew! list 'c 'd 'e) list) #+END_SRC + +#+RESULTS: +: (e d a b c) + *** prependq! #+BEGIN_SRC elisp (let ((x '(a b c))) @@ -409,6 +426,9 @@ These are side-by-side comparisons, showing how to bind keys with and without x) #+END_SRC +#+RESULTS: +: (c d e a b c) + #+BEGIN_SRC elisp (let ((x '(a b c)) (y '(c d e)) @@ -416,6 +436,10 @@ These are side-by-side comparisons, showing how to bind keys with and without (prependq! x y z '(h)) x) #+END_SRC + +#+RESULTS: +: (c d e f g h a b c) + *** quiet! #+BEGIN_SRC elisp :eval no ;; Enters recentf-mode without extra output From 58df554090007872e9fde6a768f2e8cfd709c7ea Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 22:54:47 -0500 Subject: [PATCH 263/983] docs/api: add letenv! demo --- docs/api.org | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/api.org b/docs/api.org index 8f3ad5868..7a31a7ee5 100644 --- a/docs/api.org +++ b/docs/api.org @@ -20,6 +20,7 @@ It is integrated into Helpful, in Doom. - [[#file-exists-p][file-exists-p!]] - [[#lambda][lambda!]] - [[#lambda-1][lambda!!]] + - [[#letenv][letenv!]] - [[#load][load!]] - [[#map][map!]] - [[#package][package!]] @@ -268,6 +269,15 @@ Or to create aliases for functions that behave differently: ;; its startup visibility settings. (fset 'org-reset-global-visibility (lambda!! #'org-global-cycle '(4)) #+END_SRC +*** letenv! +#+BEGIN_SRC elisp +(letenv! (("SHELL" "/bin/sh")) + (shell-command-to-string "echo $SHELL")) +#+END_SRC + +#+RESULTS: +: "/bin/sh\n" + *** load! #+BEGIN_SRC elisp :eval no ;;; Lets say we're in ~/.doom.d/config.el From 160462d33d933b905d245318a75e005df9e0df03 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 23:22:10 -0500 Subject: [PATCH 264/983] Refactor doom--switch-to-fallback-buffer-maybe-a Reduce technical debt by future proofing the advice. --- core/core-ui.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index 616c1889d..fd80d6000 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -216,19 +216,21 @@ read-only or not file-visiting." (setq confirm-nonexistent-file-or-buffer t) -(defadvice! doom--switch-to-fallback-buffer-maybe-a (orig-fn) +(defadvice! doom--switch-to-fallback-buffer-maybe-a (&rest _) "Switch to `doom-fallback-buffer' if on last real buffer. Advice for `kill-current-buffer'. If in a dedicated window, delete it. If there are no real buffers left OR if all remaining buffers are visible in other windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original `kill-current-buffer'." - :around #'kill-current-buffer + :before-until #'kill-current-buffer (let ((buf (current-buffer))) (cond ((window-dedicated-p) - (delete-window)) + (delete-window) + t) ((eq buf (doom-fallback-buffer)) - (message "Can't kill the fallback buffer.")) + (message "Can't kill the fallback buffer.") + t) ((doom-real-buffer-p buf) (if (and buffer-file-name (buffer-modified-p buf) @@ -247,8 +249,8 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (switch-to-buffer (doom-fallback-buffer))) (unless (delq (selected-window) (get-buffer-window-list buf nil t)) (kill-buffer buf))) - (run-hooks 'buffer-list-update-hook))) - ((funcall orig-fn))))) + (run-hooks 'buffer-list-update-hook)) + t)))) ;; From 48cd3e0ad03faa903ca6e175857a054aec494097 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 23:40:48 -0500 Subject: [PATCH 265/983] tools/magit: prevent 'cannot determine magit's version' warnings By ensuring the advice runs twice. --- modules/tools/magit/autoload.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/tools/magit/autoload.el b/modules/tools/magit/autoload.el index 2cd1bda2e..ee21b7d42 100644 --- a/modules/tools/magit/autoload.el +++ b/modules/tools/magit/autoload.el @@ -3,7 +3,8 @@ ;; HACK Magit complains loudly when it can't determine its own version, which is ;; the case when magit is built through straight. The warning is harmless, ;; however, so we just need it to shut up. -;;;###autoload (advice-add #'magit-version :override #'ignore) +;;;###autoload +(advice-add #'magit-version :override #'ignore) ;;;###autoload (defun +magit-display-buffer-fn (buffer) From eaa5621b36472f1f9f80ef1d09b0e120a7761961 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 23:51:59 -0500 Subject: [PATCH 266/983] Update comments --- core/core.el | 4 +++- modules/completion/ivy/config.el | 3 ++- modules/tools/lookup/packages.el | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/core/core.el b/core/core.el index b66bf2581..20babb950 100644 --- a/core/core.el +++ b/core/core.el @@ -481,7 +481,9 @@ to least)." load-path doom--initial-load-path process-environment doom--initial-process-environment) - ;; Load shell environment, optionally generated from 'doom env' + ;; Load shell environment, optionally generated from 'doom env'. No need to + ;; do so if we're in terminal Emacs, because Emacs will correctly inherit + ;; your shell environment there. (when (and (or (display-graphic-p) (daemonp)) (file-exists-p doom-env-file)) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 9826545b2..1d2777d0e 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -235,7 +235,8 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." ;; Persist `counsel-compile' history (add-to-list 'savehist-additional-variables 'counsel-compile-history)) - ;; Use spotlight on mac for `counsel-locate' by default + ;; Use spotlight on mac for `counsel-locate' by default, since it doesn't need + ;; any additional setup. (when IS-MAC (setq counsel-locate-cmd #'counsel-locate-cmd-mdfind)) diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index fdc7a1416..6c0b50565 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/lookup/packages.el -;; `dumb-jump' uses the `helm-build-sync-source' macro, but this requires helm -;; be loaded before `dumb-jump' is byte-compiled during installation. To ensure -;; this, we declare helm before dumb-jump. +;; HACK `dumb-jump' uses the `helm-build-sync-source' macro, but this requires +;; helm be loaded before `dumb-jump' is byte-compiled during installation. +;; To ensure this, we declare helm before dumb-jump. (when (featurep! :completion helm) (package! helm)) From 287ea46133578c8acc290893d2e5c138cd8315f4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 15 Dec 2019 23:52:17 -0500 Subject: [PATCH 267/983] evil-ex-interactive-search-highlight = 'selected-window --- modules/editor/evil/config.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 296f5c577..63a5e8fa3 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -49,7 +49,10 @@ directives. By default, this only recognizes C directives.") evil-insert-state-cursor 'bar evil-visual-state-cursor 'hollow ;; must be set before evil/evil-collection is loaded - evil-want-keybinding (not (featurep! +everywhere))) + evil-want-keybinding (not (featurep! +everywhere)) + ;; Only do highlighting in selected window so that Emacs has less work + ;; to do highlighting them all. + evil-ex-interactive-search-highlight 'selected-window) :config (evil-select-search-module 'evil-search-module 'evil-search) From dd7af506e3d2dd06e81584c2b90dcc107934fde0 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 15 Dec 2019 00:13:09 +0700 Subject: [PATCH 268/983] Fix regex for detecting compilation buffer *Compilation* and *compilation* are both allowed Signed-off-by: Rudi Grinberg --- modules/ui/popup/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/popup/config.el b/modules/ui/popup/config.el index 4a6796d89..5111a7311 100644 --- a/modules/ui/popup/config.el +++ b/modules/ui/popup/config.el @@ -131,7 +131,7 @@ prevent the popup(s) from messing up the UI (or vice versa)." ("^ \\*" :slot 1 :vslot -1 :size +popup-shrink-to-fit))) (when (featurep! +defaults) '(("^\\*Completions" :ignore t) - ("^\\*\\(?:Compil\\(?:ation\\|e-Log\\)\\|Messages\\)" + ("^\\*\\(?:[Cc]ompil\\(?:ation\\|e-Log\\)\\|Messages\\)" :vslot -2 :size 0.3 :autosave t :quit t :ttl nil) ("^\\*\\(?:doom \\|Pp E\\)" ; transient buffers (no interaction required) :vslot -3 :size +popup-shrink-to-fit :autosave t :select ignore :quit t :ttl 0) From 2f79fab99f523a6aaf761b36657762ffd8ef792b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 16 Dec 2019 00:46:56 -0500 Subject: [PATCH 269/983] case-fold-search = nil --- core/core.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/core.el b/core/core.el index 20babb950..17330e53c 100644 --- a/core/core.el +++ b/core/core.el @@ -162,6 +162,12 @@ users).") ;; to, it's our (the user's) failure. One case for all! (setq auto-mode-case-fold nil) +;; Make all regexps case-sensitive by default. This favors correctness for +;; programmatical regexp searches and provides a slight performance benefit to +;; font-locking where the keywords don't let-bind `case-fold-search' themselves +;; and are already case-correct. This could break poorly written packages! +(setq-default case-fold-search nil) + ;; Display the bare minimum at startup. We don't need all that noise. The ;; dashboard/empty scratch buffer is good enough. (setq inhibit-startup-message t From 2b2156c4f54b7f2393c9f6fb772a90e010cdea71 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 16 Dec 2019 03:54:15 -0500 Subject: [PATCH 270/983] email/notmuch: minor reformatting --- modules/email/notmuch/config.el | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/modules/email/notmuch/config.el b/modules/email/notmuch/config.el index 1bf57da94..931f58b1d 100644 --- a/modules/email/notmuch/config.el +++ b/modules/email/notmuch/config.el @@ -11,6 +11,10 @@ (defvar +notmuch-mail-folder "~/.mail/account.gmail" "Where your email folder is located (for use with gmailieer).") + +;; +;;; Packages + (after! notmuch (set-company-backend! 'notmuch-message-mode '(notmuch-company :with company-ispell company-yasnippet)) @@ -58,18 +62,17 @@ notmuch-search-mode-hook) #'hide-mode-line-mode) - (map! - :localleader - :map (notmuch-search-mode-map notmuch-tree-mode-map notmuch-show-mode-map) - :desc "compose email" "c" #'+notmuch/compose - :desc "fetch new email" "u" #'+notmuch/update - :desc "quit notmuch" "q" #'+notmuch/quit - :map notmuch-search-mode-map - :desc "mark as deleted" "d" #'+notmuch/search-delete - :desc "mark as spam" "s" #'+notmuch/search-spam - :map notmuch-tree-mode-map - :desc "mark as deleted" "d" #'+notmuch/tree-delete - :desc "mark as spam" "s" #'+notmuch/tree-spam)) + (map! :localleader + :map (notmuch-search-mode-map notmuch-tree-mode-map notmuch-show-mode-map) + :desc "Compose email" "c" #'+notmuch/compose + :desc "Fetch new email" "u" #'+notmuch/update + :desc "Quit notmuch" "q" #'+notmuch/quit + :map notmuch-search-mode-map + :desc "Mark as deleted" "d" #'+notmuch/search-delete + :desc "Mark as spam" "s" #'+notmuch/search-spam + :map notmuch-tree-mode-map + :desc "Mark as deleted" "d" #'+notmuch/tree-delete + :desc "Mark as spam" "s" #'+notmuch/tree-spam)) (use-package! org-mime @@ -82,6 +85,7 @@ :commands counsel-notmuch :after notmuch) + (use-package! helm-notmuch :when (featurep! :completion helm) :commands helm-notmuch From 08fb9c544d6bde238f6ad0befcf209d853dbe321 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 16 Dec 2019 05:13:42 -0500 Subject: [PATCH 271/983] ui/popup: :transient -> :ttl in readme --- modules/ui/popup/README.org | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ui/popup/README.org b/modules/ui/popup/README.org index 21e7d6a50..38efc7ccc 100644 --- a/modules/ui/popup/README.org +++ b/modules/ui/popup/README.org @@ -61,11 +61,11 @@ Multiple popup rules can be defined with ~set-popup-rules!~: (set-popup-rules! '(("^ \\*" :slot -1) ; fallback rule for special buffers ("^\\*" :select t) - ("^\\*Completions" :slot -1 :transient 0) - ("^\\*\\(?:scratch\\|Messages\\)" :transient t) + ("^\\*Completions" :slot -1 :ttl 0) + ("^\\*\\(?:scratch\\|Messages\\)" :ttl t) ("^\\*Help" :slot -1 :size 0.2 :select t) ("^\\*doom:" - :size 0.35 :select t :modeline t :quit t :transient t))) + :size 0.35 :select t :modeline t :quit t :ttl t))) #+END_SRC Omitted parameters in a ~set-popup-rules!~ will use the defaults set in From 207ce02a3371e0bcd67c90d1d7b00aa72c8eccf2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 16 Dec 2019 05:42:40 -0500 Subject: [PATCH 272/983] ui/popup: fix quit-window sometimes breaking popups By burying the buffer and switching to a buffer that doesn't belong in a popup. --- modules/ui/popup/+hacks.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index 1a82e2ffe..66309c9de 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -29,6 +29,18 @@ ;; Don't try to resize popup windows (advice-add #'balance-windows :around #'+popup-save-a) +(defun +popup/quit-window () + "The regular `quit-window' sometimes kills the popup buffer and switches to a +buffer that shouldn't be in a popup. We prevent that by remapping `quit-window' +to this commmand." + (interactive) + (let ((orig-buffer (current-buffer))) + (quit-window) + (when (and (eq orig-buffer (current-buffer)) + (+popup-window-p)) + (+popup/close)))) +(global-set-key [remap quit-window] #'+popup/quit-window) + ;; ;;; External functions From 9e7cdd04daa7fc89f99557eb1238cfc3a0701d16 Mon Sep 17 00:00:00 2001 From: chrunchyjesus Date: Mon, 16 Dec 2019 18:32:09 +0100 Subject: [PATCH 273/983] fix doc for enabling rust analyzer --- modules/lang/rust/README.org | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/lang/rust/README.org b/modules/lang/rust/README.org index fea5cd5c0..6d8f26132 100644 --- a/modules/lang/rust/README.org +++ b/modules/lang/rust/README.org @@ -77,8 +77,7 @@ You'll need [[https://github.com/rust-analyzer/rust-analyzer][rust-analyzer]] in =$DOOMDIR/config.el=: #+BEGIN_SRC elisp -(after! lsp-rust - (setq lsp-rust-server 'rust-analyzer)) +(setq lsp-rust-server 'rust-analyzer) #+END_SRC * TODO Troubleshooting From 3b2a37d9a1d5e4887b1a8004d1c6e11b49d45786 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 16 Dec 2019 16:48:02 -0500 Subject: [PATCH 274/983] lang/org: noop org-babel-do-load-languages It's redundant with Doom's lazy loader. Remove +org-init-babel-lazy-loader-h from org-load-hook if you want to use it. --- modules/lang/org/config.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 2d0da9abf..6710f5b96 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -238,7 +238,13 @@ background (and foreground) match the current theme." ;; child process), so we only need to make sure it's loaded. (require 'ob-async nil t)) (add-to-list 'org-babel-load-languages (cons lang t))) - t))) + t)) + + (defadvice! +org--noop-org-babel-do-load-languages-a (&rest _) + :override #'org-babel-do-load-languages + (message + (concat "`org-babel-do-load-languages' is redundant with Doom's lazy loading mechanism for babel " + "packages. There is no need to use it, so it has been disabled")))) (defun +org-init-capture-defaults-h () From 6f7bdc801a0b4d1a50f25b3c6d7d74858789a540 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 16 Dec 2019 16:49:34 -0500 Subject: [PATCH 275/983] Make print! et co always respect standard-output --- core/autoload/format.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/autoload/format.el b/core/autoload/format.el index c95440f49..4f87aaaa3 100644 --- a/core/autoload/format.el +++ b/core/autoload/format.el @@ -106,9 +106,8 @@ Accepts 'ansi and 'text-properties. nil means don't render colors.") ;;;###autoload (defun doom--format-print (output) (unless (string-empty-p output) - (if (not noninteractive) - (message "%s" output) - (princ output) + (princ output) + (when (or noninteractive (not (eq standard-output t))) (terpri)) ; newline t)) From 3cefe161fa38c219d0044bc0c6988e8d0286ed08 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 16 Dec 2019 17:03:56 -0500 Subject: [PATCH 276/983] tools/lookup: fix +lookup/online --- modules/tools/lookup/autoload/online.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/tools/lookup/autoload/online.el b/modules/tools/lookup/autoload/online.el index b1d8a1925..f5de9b1a0 100644 --- a/modules/tools/lookup/autoload/online.el +++ b/modules/tools/lookup/autoload/online.el @@ -39,7 +39,8 @@ for the provider." (query (or query (+lookup-symbol-or-region))) (backend (cl-find-if (lambda (x) (or (stringp x) (fboundp x))) (cdr (assoc provider +lookup-provider-url-alist))))) - (if (commandp backend) + (if (and (functionp backend) + (commandp backend)) (call-interactively backend) (unless backend (user-error "%S is an invalid query engine backend for %S provider" @@ -47,11 +48,15 @@ for the provider." (cl-check-type backend (or string function)) (condition-case-unless-debug e (progn + (unless query + (setq query + (read-string (format "Search for (on %s): " provider) + (thing-at-point 'symbol t)))) (when (or (functionp backend) (symbolp backend)) (setq backend (funcall backend))) (when (string-empty-p query) (user-error "The query query is empty")) - (funcall +lookup-open-url-fn (format url (url-encode-url query)))) + (funcall +lookup-open-url-fn (format backend (url-encode-url query)))) (error (setq +lookup--last-provider (delq (assq major-mode +lookup--last-provider) From cdfef48b64761eb01489a438fa5e01cbccd35a72 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 16 Dec 2019 17:46:47 -0500 Subject: [PATCH 277/983] completion/ivy: fix +fuzzy --- modules/completion/ivy/config.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 1d2777d0e..5c9e85652 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -18,13 +18,16 @@ results buffer.") (if (featurep! +prescient) #'+ivy-prescient-non-fuzzy #'ivy--regex-plus) - "Function to use for non-fuzzy search commands.") + "Function to use for non-fuzzy search commands. +This uses the standard search algorithm ivy uses (or a variant of it).") (defvar +ivy-alternative-search-fn (cond ((featurep! +prescient) #'ivy-prescient-re-builder) ((featurep! +fuzzy) #'ivy--regex-fuzzy) + ;; Ignore order for non-fuzzy searches by default (#'ivy--regex-ignore-order)) - "Function to use for fuzzy search commands.") + "Function to use for fuzzy search commands. +This uses a search algorithm other than ivy's default.") ;; @@ -34,12 +37,10 @@ results buffer.") :after-call pre-command-hook :init (setq ivy-re-builders-alist - `(,@(cl-loop for cmd in '(counsel-rg - swiper - swiper-isearch) - collect (cons cmd #'+ivy-alternative-search)) - ;; Ignore order for non-fuzzy searches by default - (t . +ivy-standard-search))) + `((counsel-rg . +ivy-standard-search) + (swiper . +ivy-standard-search) + (swiper-isearch . +ivy-standard-search) + (t . +ivy-alternative-search))) (define-key! [remap switch-to-buffer] #'+ivy/switch-buffer From 11acc30400d2066bc173a3bfaafb883c843c3169 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 16 Dec 2019 19:01:11 -0500 Subject: [PATCH 278/983] Half-revert c522ca4fc Closes #2200 --- core/core-ui.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/core-ui.el b/core/core-ui.el index fd80d6000..b8081ec24 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -464,7 +464,9 @@ treat Emacs as a non-application window." :init (defadvice! doom--disable-all-the-icons-in-tty-a (orig-fn &rest args) "Return a blank string in tty Emacs, which doesn't support multiple fonts." - :around #'all-the-icons-insert + :around '(all-the-icons-octicon all-the-icons-material + all-the-icons-faicon all-the-icons-fileicon + all-the-icons-wicon all-the-icons-alltheicon) (if (display-multi-font-p) (apply orig-fn args) ""))) From e782ef1d977adaf5317bca5f41db30b8699052a3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 16 Dec 2019 19:23:08 -0500 Subject: [PATCH 279/983] lang/org: add +jupyter feature, deprecate +ipython And disable +pandoc by default Relevant to #2198 --- init.example.el | 4 ++-- modules/lang/org/README.org | 9 ++++++--- modules/lang/org/contrib/jupyter.el | 13 +++++++++++++ modules/lang/org/packages.el | 2 ++ 4 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 modules/lang/org/contrib/jupyter.el diff --git a/init.example.el b/init.example.el index 52398c67f..f1210d1a8 100644 --- a/init.example.el +++ b/init.example.el @@ -131,8 +131,8 @@ (org ; organize your plain life in plain text +dragndrop ; drag & drop files/images into org buffers ;;+hugo ; use Emacs for hugo blogging - +ipython ; ipython/jupyter support for babel - +pandoc ; export-with-pandoc support + ;;+jupyter ; ipython/jupyter support for babel + ;;+pandoc ; export-with-pandoc support ;;+pomodoro ; be fruitful with the tomato technique +present) ; using org-mode for presentations ;;perl ; write code no one else can comprehend diff --git a/modules/lang/org/README.org b/modules/lang/org/README.org index 34c06010e..1111cd477 100644 --- a/modules/lang/org/README.org +++ b/modules/lang/org/README.org @@ -35,8 +35,8 @@ intuitive out of the box: org files to reveal.js slideshows. + Drag-and-drop support for images (with inline preview) and media files (drops a file icon and a short link) (requires =+dragndrop= flag). -+ Integration with pandoc, ipython, reveal.js, beamer, and others (requires - flags). ++ Integration with pandoc, ipython, jupyter, reveal.js, beamer, and others + (requires flags). + Export-to-clipboard functionality, for copying text into formatted html, markdown or rich text to the clipboard (see ~+org/export-to-clipboard~ and ~+org/export-to-clipboard-as-rich-text~). @@ -57,7 +57,8 @@ https://www.mfoot.com/blog/2015/11/22/literate-emacs-configuration-with-org-mode + =+gnuplot= Installs gnuplot & gnuplot-mode, which enables rendering images from gnuplot src blocks or plotting tables with ~org-plot/gnuplot~ (bound to =SPC m b p=, by default). -+ =+ipython= Enables ipython+babel integration. ++ =+ipython= (**DEPRECATED**) Enables ipython integration for babel. ++ =+jupyter= Enables Jupyter integration for babel. + =+pandoc= Enables pandoc integration into the Org exporter. + =+pomodoro= Enables a pomodoro timer for clocking time on tasks. + =+present= Enables integration with reveal.js, beamer and org-tree-slide, so @@ -96,6 +97,8 @@ https://www.mfoot.com/blog/2015/11/22/literate-emacs-configuration-with-org-mode + [[https://github.com/bruceravel/gnuplot-mode][gnuplot-mode]] + =+ipython= + [[https://github.com/gregsexton/ob-ipython][ob-ipython]] ++ =+jupyter= + + [[https://github.com/dzop/emacs-jupyter][jupyter]] + =+pandoc= + [[https://github.com/kawabata/ox-pandoc][ox-pandoc]] + =+pomodoro= diff --git a/modules/lang/org/contrib/jupyter.el b/modules/lang/org/contrib/jupyter.el new file mode 100644 index 000000000..d744d02c3 --- /dev/null +++ b/modules/lang/org/contrib/jupyter.el @@ -0,0 +1,13 @@ +;;; lang/org/contrib/jupyter.el -*- lexical-binding: t; -*- +;;;###if (featurep! +jupyter) + +(use-package! ob-jupyter + :defer t + :init + (after! ob-async + (pushnew! ob-async-no-async-languages-alist "jupyter-python" "jupyter-julia")) + + (add-hook! '+org-babel-load-functions + (defun +org-babel-load-jupyter-h (lang) + (and (string-prefix-p "jupyter-" (symbol-name lang)) + (require 'ob-jupyter nil t))))) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index 43899dba1..5213640f1 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -46,6 +46,8 @@ (package! gnuplot-mode)) (when (featurep! +ipython) (package! ob-ipython)) +(when (featurep! +jupyter) + (package! jupyter)) (when (featurep! +pomodoro) (package! org-pomodoro)) (when (featurep! +present) From 7f06644490ddd606b534be2c38953d8d1fcc4807 Mon Sep 17 00:00:00 2001 From: Ralf Beckmann Date: Tue, 17 Dec 2019 21:14:35 +0100 Subject: [PATCH 280/983] Make +pop/raise return the current window --- modules/ui/popup/autoload/popup.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/ui/popup/autoload/popup.el b/modules/ui/popup/autoload/popup.el index f658454c3..e4391cae6 100644 --- a/modules/ui/popup/autoload/popup.el +++ b/modules/ui/popup/autoload/popup.el @@ -415,8 +415,9 @@ the message buffer in a popup window." ;;;###autoload (defun +popup/raise (window &optional arg) - "Raise the current popup window into a regular window. -If prefix ARG, raise the current popup into a new window." + "Raise the current popup window into a regular window and +return it. If prefix ARG, raise the current popup into a new +window and return that window." (interactive (list (selected-window) current-prefix-arg)) (cl-check-type window window) @@ -428,7 +429,8 @@ If prefix ARG, raise the current popup into a new window." (+popup/close window 'force) (if arg (pop-to-buffer buffer) - (switch-to-buffer buffer)))) + (switch-to-buffer buffer)) + (selected-window))) ;;;###autoload (defun +popup/diagnose () From c29c1b907723dfb087f5cc8a96643cb16ce2abbc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 16 Dec 2019 19:37:57 -0500 Subject: [PATCH 281/983] Update vestigial reference to function in comment --- init.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/init.el b/init.el index ce908b1b2..c1b8d7674 100644 --- a/init.el +++ b/init.el @@ -28,9 +28,8 @@ ;;; License: MIT ;; A big contributor to startup times is garbage collection. We up the gc -;; threshold to temporarily prevent it from running, then reset it later with -;; `doom-restore-garbage-collection-h'. Not resetting it will cause -;; stuttering/freezes. +;; threshold to temporarily prevent it from running, then reset it later by +;; enabling `gcmh-mode'. Not resetting it will cause stuttering/freezes. (setq gc-cons-threshold most-positive-fixnum) ;; In noninteractive sessions, prioritize non-byte-compiled source files to From c306b2e9690f89b9ffa50c55d972b80ef1bcf4d6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 17 Dec 2019 13:40:37 -0500 Subject: [PATCH 282/983] editor/evil: fix :gbr ex command --- modules/editor/evil/+commands.el | 2 +- modules/emacs/vc/autoload/evil.el | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 modules/emacs/vc/autoload/evil.el diff --git a/modules/editor/evil/+commands.el b/modules/editor/evil/+commands.el index 18124a446..704d04acd 100644 --- a/modules/editor/evil/+commands.el +++ b/modules/editor/evil/+commands.el @@ -35,7 +35,7 @@ ;;; GIT (evil-ex-define-cmd "gist" #'+gist:send) ; send current buffer/region to gist (evil-ex-define-cmd "gistl" #'+gist:list) ; list gists by user -(evil-ex-define-cmd "gbrowse" #'+vc:git-browse) ; show file/region in github/gitlab +(evil-ex-define-cmd "gbrowse" #'+vc/browse-at-remote-file-or-region) ; show file/region in github/gitlab (evil-ex-define-cmd "gissues" #'forge-browse-issues) ; show github issues (evil-ex-define-cmd "git" #'magit-status) ; open magit status window (evil-ex-define-cmd "gstage" #'magit-stage) diff --git a/modules/emacs/vc/autoload/evil.el b/modules/emacs/vc/autoload/evil.el deleted file mode 100644 index 085fc2ed1..000000000 --- a/modules/emacs/vc/autoload/evil.el +++ /dev/null @@ -1,8 +0,0 @@ -;;; emacs/vc/autoload/evil.el -*- lexical-binding: t; -*- -;;;###if (featurep! :editor evil) - -;;;###autoload (autoload '+vc:git-browse "emacs/vc/autoload/evil" nil t) -(evil-define-command +vc:git-browse (bang) - "Ex interface to `+vc/git-browse-region-or-line'." - (interactive "") - (+vc/git-browse-region-or-line bang)) From 17d0833af1f8852af11e12bd218c9f9cda9bd85e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 17 Dec 2019 14:22:06 -0500 Subject: [PATCH 283/983] lang/org: fix jupyter babel loader #2198 --- modules/lang/org/contrib/jupyter.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/org/contrib/jupyter.el b/modules/lang/org/contrib/jupyter.el index d744d02c3..6fce999de 100644 --- a/modules/lang/org/contrib/jupyter.el +++ b/modules/lang/org/contrib/jupyter.el @@ -1,7 +1,7 @@ ;;; lang/org/contrib/jupyter.el -*- lexical-binding: t; -*- ;;;###if (featurep! +jupyter) -(use-package! ob-jupyter +(use-package! jupyter :defer t :init (after! ob-async @@ -10,4 +10,4 @@ (add-hook! '+org-babel-load-functions (defun +org-babel-load-jupyter-h (lang) (and (string-prefix-p "jupyter-" (symbol-name lang)) - (require 'ob-jupyter nil t))))) + (require lang nil t))))) From f95ab472398eb977510f8bd2333b258653305ac9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 17 Dec 2019 14:25:05 -0500 Subject: [PATCH 284/983] lang/agda: add +local flag & :nonrecursive to recipes Relevant to #2203 --- modules/lang/agda/config.el | 6 ++++++ modules/lang/agda/packages.el | 21 ++++++++++----------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/modules/lang/agda/config.el b/modules/lang/agda/config.el index 0fa2bdbc7..876279f1d 100644 --- a/modules/lang/agda/config.el +++ b/modules/lang/agda/config.el @@ -1,5 +1,11 @@ ;;; lang/agda/config.el -*- lexical-binding: t; -*- +(when (and (featurep! +local) + (executable-find "agda-mode")) + (add-load-path! + (file-name-directory (shell-command-to-string "agda-mode locate")))) + + (map! :after agda2-mode :map agda2-mode-map :localleader diff --git a/modules/lang/agda/packages.el b/modules/lang/agda/packages.el index 35bead2a1..49278f745 100644 --- a/modules/lang/agda/packages.el +++ b/modules/lang/agda/packages.el @@ -1,15 +1,14 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/agda/packages.el +(unless (featurep! +local) + (package! agda-input + :recipe (:host github :repo "agda/agda" + :files ("src/data/emacs-mode/agda-input.el") + :nonrecursive t)) -(package! agda-input - :recipe - (:host github :repo "agda/agda" - :files ("src/data/emacs-mode/agda-input.el"))) - -(package! agda2-mode - :recipe - (:host github :repo "agda/agda" - :files - ("src/data/emacs-mode/*.el" - (:exclude "agda-input.el")))) + (package! agda2-mode + :recipe (:host github :repo "agda/agda" + :files ("src/data/emacs-mode/*.el" + (:exclude "agda-input.el")) + :nonrecursive t))) From c0302e79aa4bfe4c8a13420fa4c8f55571855075 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 17 Dec 2019 15:15:23 -0500 Subject: [PATCH 285/983] ui/modeline: disable pdf modeline for +light users Temporarily. Until a pdf modeline has been defined. --- modules/ui/modeline/+light.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/modeline/+light.el b/modules/ui/modeline/+light.el index e49f455e9..f30c50a5e 100644 --- a/modules/ui/modeline/+light.el +++ b/modules/ui/modeline/+light.el @@ -545,7 +545,7 @@ lines are selected, or the NxM dimensions of a block selection.") ;; Other modes (set-modeline! :main 'default) (set-modeline-hook! '+doom-dashboard-mode-hook 'project) -(set-modeline-hook! 'pdf-tools-enabled-hook 'pdf) +;; (set-modeline-hook! 'pdf-tools-enabled-hook 'pdf) (set-modeline-hook! '(special-mode-hook image-mode-hook circe-mode-hook) From 980fa746306ab2c7f48cbdf353fb052e1ea91baf Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 17 Dec 2019 15:20:08 -0500 Subject: [PATCH 286/983] ui/modeline: make set-modeline-hook! append to hook So later invokations override earlier ones. --- modules/ui/modeline/+light.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/modeline/+light.el b/modules/ui/modeline/+light.el index f30c50a5e..7dd81b8df 100644 --- a/modules/ui/modeline/+light.el +++ b/modules/ui/modeline/+light.el @@ -144,7 +144,7 @@ If DEFAULT is non-nil, apply to all future buffers. Modelines are defined with See `def-modeline!' on how modelines are defined." (let ((fn (intern (format "+modeline-set-%s-format-h" name)))) (dolist (hook (doom-enlist hooks)) - (add-hook hook fn)))) + (add-hook hook fn 'append)))) (defmacro def-modeline! (name lhs rhs) "Define a modeline format by NAME. From 9c73bff4f0ef454b228be42b1fcec8f5967f8045 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 17 Dec 2019 15:37:33 -0500 Subject: [PATCH 287/983] ui/modeline: unset other format hooks If set-modeline-hook! is used after init. --- modules/ui/modeline/+light.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ui/modeline/+light.el b/modules/ui/modeline/+light.el index 7dd81b8df..006688286 100644 --- a/modules/ui/modeline/+light.el +++ b/modules/ui/modeline/+light.el @@ -144,7 +144,10 @@ If DEFAULT is non-nil, apply to all future buffers. Modelines are defined with See `def-modeline!' on how modelines are defined." (let ((fn (intern (format "+modeline-set-%s-format-h" name)))) (dolist (hook (doom-enlist hooks)) - (add-hook hook fn 'append)))) + (when after-init-time + (dolist (name (mapcar #'car +modeline-format-alist)) + (remove-hook hook (intern (format "+modeline-set-%s-format-h" name))))) + (add-hook hook fn)))) (defmacro def-modeline! (name lhs rhs) "Define a modeline format by NAME. From e56cc98ae96ebd386b44ed58b2181b3fa21c5890 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 17 Dec 2019 18:09:39 -0500 Subject: [PATCH 288/983] Move multi-term-buffer-name to :term term --- modules/term/term/config.el | 3 ++- modules/ui/popup/+hacks.el | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/term/term/config.el b/modules/term/term/config.el index ad9086cc3..c1efbdb5b 100644 --- a/modules/term/term/config.el +++ b/modules/term/term/config.el @@ -7,4 +7,5 @@ ;;;###package multi-term (setq multi-term-dedicated-window-height 20 - multi-term-switch-after-close 'PREVIOUS) + multi-term-switch-after-close 'PREVIOUS + multi-term-buffer-name "doom terminal") diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index 66309c9de..08b58cb7b 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -220,10 +220,6 @@ the command buffer." (select-window win)))) -;;;###package multi-term -(setq multi-term-buffer-name "doom terminal") - - ;;;###package neotree (after! neotree (advice-add #'neo-util--set-window-width :override #'ignore) From 9664f68c5fabc4e3198314fce983aedc8ad5834a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 17 Dec 2019 18:10:16 -0500 Subject: [PATCH 289/983] tools/pdf: minor refactor & reformat --- modules/tools/pdf/config.el | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/modules/tools/pdf/config.el b/modules/tools/pdf/config.el index b04753da2..91f600e0e 100644 --- a/modules/tools/pdf/config.el +++ b/modules/tools/pdf/config.el @@ -3,9 +3,7 @@ (use-package! pdf-tools :mode ("\\.[pP][dD][fF]\\'" . pdf-view-mode) :magic ("%PDF" . pdf-view-mode) - :config - (map! :map pdf-view-mode-map :gn "q" #'kill-current-buffer) - + :init (after! pdf-annot (defun +pdf-cleanup-windows-h () "Kill left-over annotation buffers when the document is killed." @@ -19,6 +17,9 @@ (add-hook! 'pdf-view-mode-hook (add-hook 'kill-buffer-hook #'+pdf-cleanup-windows-h nil t))) + :config + (map! :map pdf-view-mode-map :gn "q" #'kill-current-buffer) + (setq-default pdf-view-display-size 'fit-page pdf-view-use-scaling t pdf-view-use-imagemagick nil) @@ -41,11 +42,16 @@ ;; Turn off cua so copy works (add-hook! 'pdf-view-mode-hook (cua-mode 0)) + ;; Handle PDF-tools related popups better - (set-popup-rule! "^\\*Outline*" :side 'right :size 40 :select nil) - (set-popup-rule! "\\(?:^\\*Contents\\|'s annots\\*$\\)" :ignore t) + (set-popup-rules! + '(("^\\*Outline*" :side 'right :size 40 :select nil) + ("\\(?:^\\*Contents\\|'s annots\\*$\\)" :ignore t))) + + ;; The mode-line does serve any useful purpose is annotation windows (add-hook 'pdf-annot-list-mode-hook #'hide-mode-line-mode) - ;; Fix #1107: flickering pdfs when evil-mode is enabled + + ;; HACK Fix #1107: flickering pdfs when evil-mode is enabled (setq-hook! 'pdf-view-mode-hook evil-normal-state-cursor (list nil)) ;; Install epdfinfo binary if needed, blocking until it is finished @@ -54,18 +60,19 @@ (pdf-tools-install) (message "Building epdfinfo, this will take a moment...") ;; HACK We reset all `pdf-view-mode' buffers to fundamental mode so that - ;; `pdf-tools-install' has a chance to reinitialize them as - ;; `pdf-view-mode' buffers. This is necessary because `pdf-tools-install' - ;; won't do this to buffers that are already in pdf-view-mode. + ;; `pdf-tools-install' has a chance to reinitialize them as + ;; `pdf-view-mode' buffers. This is necessary because + ;; `pdf-tools-install' won't do this to buffers that are already in + ;; pdf-view-mode. (dolist (buffer (doom-buffers-in-mode 'pdf-view-mode)) (with-current-buffer buffer (fundamental-mode))) (while compilation-in-progress ;; Block until `pdf-tools-install' is done (sleep-for 1)) ;; HACK If pdf-tools was loaded by you opening a pdf file, once - ;; `pdf-tools-install' completes, `pdf-view-mode' will throw an error - ;; because the compilation buffer is focused, not the pdf buffer. - ;; Therefore, it is imperative that the window config is restored. + ;; `pdf-tools-install' completes, `pdf-view-mode' will throw an error + ;; because the compilation buffer is focused, not the pdf buffer. + ;; Therefore, it is imperative that the window config is restored. (when (file-executable-p pdf-info-epdfinfo-program) (set-window-configuration wconf)))) From 5999dc6af905e0b3cc3ece4e806720d09761d4b5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 17 Dec 2019 19:17:59 -0500 Subject: [PATCH 290/983] editor/multiple-cursors: refactor :mc ex command --- .../multiple-cursors/autoload/evil-mc.el | 62 ++++++++++--------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/modules/editor/multiple-cursors/autoload/evil-mc.el b/modules/editor/multiple-cursors/autoload/evil-mc.el index f6511e96f..886ca9c0d 100644 --- a/modules/editor/multiple-cursors/autoload/evil-mc.el +++ b/modules/editor/multiple-cursors/autoload/evil-mc.el @@ -51,39 +51,41 @@ pauses cursors." (evil-define-command +multiple-cursors:evil-mc (beg end type pattern &optional flags bang) "Create mc cursors at each match of PATTERN within BEG and END. -This leaves the cursor at the final match. If BANG, then treat PATTERN as -literal. PATTERN is a delimited regexp (the same that :g or :s uses)." - :move-point nil +This leaves the cursor where the final cursor would be. If BANG, then treat +PATTERN as literal. PATTERN is a delimited regexp (the same that :g or :s uses). +FLAGS can be g and/or i; which mean the same thing they do in +`evil-ex-substitute'." :evil-mc t (interactive "") (unless (and (stringp pattern) (not (string-empty-p pattern))) (user-error "A regexp pattern is required")) (require 'evil-mc) - (setq evil-mc-pattern - (cons (evil-ex-make-search-pattern - (if bang (regexp-quote pattern) pattern)) - (list beg end type))) - (evil-with-restriction beg end - (let ((point (point))) - (save-excursion - (goto-char (point-min)) - (while (eq (evil-ex-find-next (evil-mc-get-pattern) 'forward t) t) - (goto-char (1- (point))) - (when (/= point (point)) - (evil-mc-run-cursors-before) - (evil-mc-make-cursor-at-pos (point))) - (goto-char - (if (memq ?g flags) - (line-beginning-position 2) - (1+ (point)))))))) - (evil-exit-visual-state) - (evil-mc-goto-cursor - (if (= (evil-visual-direction) 1) - (evil-mc-find-last-cursor) - (evil-mc-find-first-cursor)) - nil) - (evil-mc-undo-cursor-at-pos (point)) - (if (evil-mc-has-cursors-p) - (evil-mc-print-cursors-info "Created") - (evil-mc-message "No cursors were created"))) + (let ((m (evil-ex-make-pattern + (if bang (regexp-quote pattern) pattern) + (cond ((memq ?i flags) 'insensitive) + ((memq ?I flags) 'sensitive) + ((not +multiple-cursors-evil-mc-ex-case) + evil-ex-search-case) + (t +multiple-cursors-evil-mc-ex-case)) + (or (and +multiple-cursors-evil-mc-ex-global + (not (memq ?g flags))) + (and (not +multiple-cursors-evil-mc-ex-global) + (memq ?g flags)))))) + (evil-mc-run-cursors-before) + (setq evil-mc-pattern (cons m (list beg end type))) + (evil-with-restriction beg end + (goto-char beg) + (while (eq (evil-ex-find-next m 'forward t) t) + (evil-mc-make-cursor-at-pos (1- (point))) + (unless (evil-ex-pattern-whole-line m) + (goto-char (line-beginning-position 2))))) + (evil-mc-goto-cursor + (if (= (evil-visual-direction) 1) + (evil-mc-find-last-cursor) + (evil-mc-find-first-cursor)) + nil) + (evil-mc-undo-cursor-at-pos (1- (point))) + (if (evil-mc-has-cursors-p) + (evil-mc-print-cursors-info "Created") + (evil-mc-message "No cursors were created")))) From defbed9ac199f9aaa4f6b19225f67bcdd35190b6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 17 Dec 2019 23:15:07 -0500 Subject: [PATCH 291/983] completion/ivy: fix directory in project search prompt It unhelpfully always displayed "./" --- modules/completion/ivy/autoload/ivy.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index 5a55cd52f..0a0056008 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -255,7 +255,6 @@ The point of this is to avoid Emacs locking up indexing massive file trees." (let* ((ivy-more-chars-alist '((t . 1))) (project-root (or (doom-project-root) default-directory)) (directory (or in project-root)) - (default-directory directory) (args (concat (if all-files " -uu") (unless recursive " --maxdepth 1")))) (counsel-rg @@ -275,7 +274,7 @@ The point of this is to avoid Emacs locking up indexing massive file trees." ((concat "\\\\" substr)))) (rxt-quote-pcre query))))))) directory args - (format "rg%s %s" + (format "rg%s [%s]: " args (cond ((equal directory default-directory) "./") From e6de13b4c9918103bca48e27aab62d30da6a50eb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 17 Dec 2019 23:31:10 -0500 Subject: [PATCH 292/983] Treat +ivy/project-search & +default/project-search as counsel-rg This gives the former commands access to any actions (on C-o) or counsel configuration meant for counsel-rg. --- modules/completion/helm/autoload/helm.el | 3 ++- modules/completion/ivy/autoload/ivy.el | 2 +- modules/completion/ivy/config.el | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/completion/helm/autoload/helm.el b/modules/completion/helm/autoload/helm.el index ec741c093..44c7ddd44 100644 --- a/modules/completion/helm/autoload/helm.el +++ b/modules/completion/helm/autoload/helm.el @@ -52,7 +52,8 @@ workspace." (unless (executable-find "rg") (user-error "Couldn't find ripgrep in your PATH")) (require 'helm-rg) - (let ((helm-rg-default-directory (or in (doom-project-root) default-directory)) + (let ((this-command 'helm-rg) + (helm-rg-default-directory (or in (doom-project-root) default-directory)) (helm-rg-default-extra-args (delq nil (list (when all-files "-z -uu") (unless recursive "--maxdepth 1"))))) diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index 0a0056008..3bbb1818e 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -252,7 +252,7 @@ The point of this is to avoid Emacs locking up indexing massive file trees." (unless (executable-find "rg") (user-error "Couldn't find ripgrep in your PATH")) (require 'counsel) - (let* ((ivy-more-chars-alist '((t . 1))) + (let* ((this-command 'counsel-rg) (project-root (or (doom-project-root) default-directory)) (directory (or in project-root)) (args (concat (if all-files " -uu") diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 5c9e85652..562d9a6db 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -40,7 +40,10 @@ This uses a search algorithm other than ivy's default.") `((counsel-rg . +ivy-standard-search) (swiper . +ivy-standard-search) (swiper-isearch . +ivy-standard-search) - (t . +ivy-alternative-search))) + (t . +ivy-alternative-search)) + ivy-more-chars-alist + '((counsel-rg . 1) + (t . 3))) (define-key! [remap switch-to-buffer] #'+ivy/switch-buffer From 74d4e120c11da3003157190b10a67529307418cb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 18 Dec 2019 09:23:21 -0500 Subject: [PATCH 293/983] lang/org: fix & alphabetize flags in readme & module list --- docs/index.org | 2 +- modules/lang/org/README.org | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/index.org b/docs/index.org index 190483268..aec556773 100644 --- a/docs/index.org +++ b/docs/index.org @@ -197,7 +197,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/nim/README.org][nim]] - TODO + nix - TODO + [[file:../modules/lang/ocaml/README.org][ocaml]] =+lsp= - TODO -+ [[file:../modules/lang/org/README.org][org]] =+dragndrop +gnuplot +hugo +ipython +pandoc +pomodoro +present= - TODO ++ [[file:../modules/lang/org/README.org][org]] =+dragndrop +gnuplot +hugo +ipython +journal +jupyter +pandoc +pomodoro +present= - TODO + [[file:../modules/lang/perl/README.org][perl]] - TODO + [[file:../modules/lang/php/README.org][php]] =+lsp= - TODO + plantuml - TODO diff --git a/modules/lang/org/README.org b/modules/lang/org/README.org index 1111cd477..66104eb1d 100644 --- a/modules/lang/org/README.org +++ b/modules/lang/org/README.org @@ -57,14 +57,15 @@ https://www.mfoot.com/blog/2015/11/22/literate-emacs-configuration-with-org-mode + =+gnuplot= Installs gnuplot & gnuplot-mode, which enables rendering images from gnuplot src blocks or plotting tables with ~org-plot/gnuplot~ (bound to =SPC m b p=, by default). ++ =+hugo= Enables integration with [[https://gohugo.io][hugo]] to export from Emacs well-formed + ([[https://github.com/russross/blackfriday][blackfriday]]) markdown. + =+ipython= (**DEPRECATED**) Enables ipython integration for babel. ++ =+journal= Enables [[https://github.com/bastibe/org-journal][org-journal]] integration. + =+jupyter= Enables Jupyter integration for babel. + =+pandoc= Enables pandoc integration into the Org exporter. + =+pomodoro= Enables a pomodoro timer for clocking time on tasks. + =+present= Enables integration with reveal.js, beamer and org-tree-slide, so Emacs can be used for presentations. -+ =+hugo= Enables integration with [[https://gohugo.io][hugo]] to export from Emacs well-formed - ([[https://github.com/russross/blackfriday][blackfriday]]) markdown. ** Plugins + [[https://orgmode.org/][org-plus-contrib]] From bad4dfcd61a2d56005243e0a2c327534940ebe2d Mon Sep 17 00:00:00 2001 From: Niklas Carlsson Date: Wed, 18 Dec 2019 15:33:26 +0100 Subject: [PATCH 294/983] Update plantuml doctor prescription This patch changes the recommendation from +plantuml/install to plantuml-dowload-jar, when the plantuml.jar can't be found. The command +plantuml/install has been removed in a previous patch. --- modules/lang/plantuml/doctor.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/plantuml/doctor.el b/modules/lang/plantuml/doctor.el index 3d3174e25..4e07331ea 100644 --- a/modules/lang/plantuml/doctor.el +++ b/modules/lang/plantuml/doctor.el @@ -7,4 +7,4 @@ (warn! "Couldn't find java. PlantUML preview or syntax checking won't work")) ;; plantuml.jar (unless (file-exists-p plantuml-jar-path) - (warn! "Couldn't find plantuml.jar. Install it with-x +plantuml/install"))) + (warn! "Couldn't find plantuml.jar. Install it with M-x plantuml-download-jar"))) From c483a7f7bd7e4ce3e53fc92db58de824fdc196d5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 18 Dec 2019 10:12:41 -0500 Subject: [PATCH 295/983] lang/agda: load agda2 if +local #2203 --- modules/lang/agda/config.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/lang/agda/config.el b/modules/lang/agda/config.el index 876279f1d..d54bddc3b 100644 --- a/modules/lang/agda/config.el +++ b/modules/lang/agda/config.el @@ -3,7 +3,9 @@ (when (and (featurep! +local) (executable-find "agda-mode")) (add-load-path! - (file-name-directory (shell-command-to-string "agda-mode locate")))) + (file-name-directory (shell-command-to-string "agda-mode locate"))) + (unless (require 'agda2 nil t) + (message "Failed to find the `agda2' package"))) (map! :after agda2-mode From d8bd262fcc063af7af5887b2f170a45ddf780a0d Mon Sep 17 00:00:00 2001 From: Alex Ragone Date: Wed, 18 Dec 2019 16:47:42 +0100 Subject: [PATCH 296/983] fix: gruvbox theme with solaire-mode --- modules/ui/doom/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index 5d0b89b00..f13019e76 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -5,6 +5,7 @@ (doom-city-lights . t) (doom-dracula . t) (doom-molokai) + (doom-gruvbox . t) (doom-nord . t) (doom-nord-light . t) (doom-nova) From f7acdc43f4df5f79ccd4a09810e75e304542feba Mon Sep 17 00:00:00 2001 From: J Hacksworth Date: Wed, 18 Dec 2019 15:25:35 -0500 Subject: [PATCH 297/983] lang/clojure: Update to cider-clojuredocs CIDER removed `cider-grimoire-web` as Grimoire is no longer available, and now uses ClojureDocs: - https://metaredux.com/posts/2019/06/29/farewell-grimoire.html - https://github.com/clojure-emacs/cider/issues/2663 --- modules/lang/clojure/config.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/lang/clojure/config.el b/modules/lang/clojure/config.el index 1cc35c480..ebeadf06c 100644 --- a/modules/lang/clojure/config.el +++ b/modules/lang/clojure/config.el @@ -94,9 +94,10 @@ (:prefix ("h" . "help") "n" #'cider-find-ns "a" #'cider-apropos + "c" #'cider-clojuredocs "d" #'cider-doc - "g" #'cider-grimoire-web - "j" #'cider-javadoc) + "j" #'cider-javadoc + "w" #'cider-clojuredocs-web) (:prefix ("i" . "inspect") "e" #'cider-enlighten-mode "i" #'cider-inspect From af948ca390c757f5f821eda9614cf106f07ef09c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 18 Dec 2019 10:18:58 -0500 Subject: [PATCH 298/983] lang/org: refactor babel loaders & fix jupyter loader #2198 --- modules/lang/org/config.el | 13 +++++++++---- modules/lang/org/contrib/jupyter.el | 11 ++++++++--- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 6710f5b96..2a9e02d0c 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -214,12 +214,17 @@ background (and foreground) match the current theme." (defun +org-init-babel-lazy-loader-h () "Load babel libraries lazily when babel blocks are executed." + (defun +org--babel-lazy-load (lang) + (cl-check-type lang symbol) + (or (run-hook-with-args-until-success '+org-babel-load-functions lang) + (require (intern-soft (format "ob-%s" lang)) nil t) + (require lang nil t))) + (defadvice! +org--src-lazy-load-library-a (lang) "Lazy load a babel package to ensure syntax highlighting." :before #'org-src--get-lang-mode (or (cdr (assoc lang org-src-lang-modes)) - (fboundp (intern-soft (format "%s-mode" lang))) - (require (intern-soft (format "ob-%s" lang)) nil t))) + (+org--babel-lazy-load lang))) (defadvice! +org--babel-lazy-load-library-a (info) "Load babel libraries lazily when babel blocks are executed." @@ -231,8 +236,7 @@ background (and foreground) match the current theme." lang))) (when (and lang (not (cdr (assq lang org-babel-load-languages))) - (or (run-hook-with-args-until-success '+org-babel-load-functions lang) - (require (intern (format "ob-%s" lang)) nil t))) + (+org--babel-lazy-load lang)) (when (assq :async (nth 2 info)) ;; ob-async has its own agenda for lazy loading packages (in the ;; child process), so we only need to make sure it's loaded. @@ -988,6 +992,7 @@ compelling reason, so..." (if (featurep! +dragndrop) (load! "contrib/dragndrop")) (if (featurep! +ipython) (load! "contrib/ipython")) (if (featurep! +journal) (load! "contrib/journal")) + (if (featurep! +jupyter) (load! "contrib/jupyter")) (if (featurep! +pomodoro) (load! "contrib/pomodoro")) (if (featurep! +present) (load! "contrib/present")) diff --git a/modules/lang/org/contrib/jupyter.el b/modules/lang/org/contrib/jupyter.el index 6fce999de..a64df8e0e 100644 --- a/modules/lang/org/contrib/jupyter.el +++ b/modules/lang/org/contrib/jupyter.el @@ -1,7 +1,7 @@ ;;; lang/org/contrib/jupyter.el -*- lexical-binding: t; -*- ;;;###if (featurep! +jupyter) -(use-package! jupyter +(use-package! ob-jupyter :defer t :init (after! ob-async @@ -9,5 +9,10 @@ (add-hook! '+org-babel-load-functions (defun +org-babel-load-jupyter-h (lang) - (and (string-prefix-p "jupyter-" (symbol-name lang)) - (require lang nil t))))) + (when (string-prefix-p "jupyter-" (symbol-name lang)) + (let ((lang (string-remove-prefix "jupyter-" (symbol-name lang)))) + (unless (assoc lang org-src-lang-modes) + (require (intern (format "ob-%s" lang)) + nil t))) + (with-demoted-errors "Jupyter: %s" + (require 'ob-jupyter nil t)))))) From fd3f5b5b77f33674686bc14c686b6236e08b4623 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 18 Dec 2019 21:13:36 -0500 Subject: [PATCH 299/983] Revert 2f79fab99 #2211 This breaks too many packages. --- core/core.el | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/core.el b/core/core.el index 17330e53c..20babb950 100644 --- a/core/core.el +++ b/core/core.el @@ -162,12 +162,6 @@ users).") ;; to, it's our (the user's) failure. One case for all! (setq auto-mode-case-fold nil) -;; Make all regexps case-sensitive by default. This favors correctness for -;; programmatical regexp searches and provides a slight performance benefit to -;; font-locking where the keywords don't let-bind `case-fold-search' themselves -;; and are already case-correct. This could break poorly written packages! -(setq-default case-fold-search nil) - ;; Display the bare minimum at startup. We don't need all that noise. The ;; dashboard/empty scratch buffer is good enough. (setq inhibit-startup-message t From bc44ae0beb12b946458596dcb1a204635c13d496 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 19 Dec 2019 13:19:53 -0500 Subject: [PATCH 300/983] lang/org: add ob-ammonite --- modules/lang/org/config.el | 8 +++++++- modules/lang/org/packages.el | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 2a9e02d0c..2e7a8f526 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -248,7 +248,13 @@ background (and foreground) match the current theme." :override #'org-babel-do-load-languages (message (concat "`org-babel-do-load-languages' is redundant with Doom's lazy loading mechanism for babel " - "packages. There is no need to use it, so it has been disabled")))) + "packages. There is no need to use it, so it has been disabled"))) + + (when (featurep! :lang scala) + (add-hook! '+org-babel-load-functions + (defun +org-babel-load-ammonite-h (lang) + (and (eq lang 'scala) + (require 'ob-ammonite nil t)))))) (defun +org-init-capture-defaults-h () diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index 5213640f1..dfeb897c0 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -72,6 +72,8 @@ (package! ob-restclient)) (when (featurep! :lang rust) (package! ob-rust)) +(when (featurep! :lang scala) + (package! ob-ammonite)) ;;; Export (when (featurep! +pandoc) From e3a1b0bbe3569d919cfef3745b40ec1381d0f9cc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 19 Dec 2019 14:09:55 -0500 Subject: [PATCH 301/983] Update evil-collection-mode-list; unset evil-collection--supported-modes --- modules/editor/evil/+everywhere.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/editor/evil/+everywhere.el b/modules/editor/evil/+everywhere.el index c5e1312eb..8ed0a7acd 100644 --- a/modules/editor/evil/+everywhere.el +++ b/modules/editor/evil/+everywhere.el @@ -45,6 +45,9 @@ variable for an explanation of the defaults (in comments). See ;; We do this ourselves, and better. (defvar evil-collection-want-unimpaired-p nil) +;; We handle loading evil-collection ourselves +(defvar evil-collection--supported-modes nil) + ;; This has to be defined here since evil-collection doesn't autoload its own. ;; It must be updated whenever evil-collection updates theirs. Here's an easy ;; way to update it: @@ -83,6 +86,7 @@ variable for an explanation of the defaults (in comments). See debug diff-mode dired + dired-sidebar disk-usage doc-view docker @@ -108,6 +112,7 @@ variable for an explanation of the defaults (in comments). See geiser ggtags git-timemachine + gnus go-mode grep guix @@ -127,6 +132,7 @@ variable for an explanation of the defaults (in comments). See ivy js2-mode leetcode + lispy log-edit log-view lsp-ui-imenu @@ -169,6 +175,7 @@ variable for an explanation of the defaults (in comments). See slime sly tablist + tar-mode (term term ansi-term multi-term) tetris tide From a999a0ddd69ff4e427c2fb424bed6112c5884d44 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 19 Dec 2019 14:49:17 -0500 Subject: [PATCH 302/983] General refactors & comment revision --- core/core-lib.el | 12 +++++------ core/core-projects.el | 15 ++++++++++++++ core/core-ui.el | 3 ++- modules/config/default/autoload/default.el | 24 ++++++++++++---------- modules/ui/popup/+hacks.el | 10 ++++----- 5 files changed, 41 insertions(+), 23 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index f2dfa9546..95e8f618c 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -93,6 +93,7 @@ Accepts the same arguments as `message'." ARGS is a list of the last N arguments to pass to FUN. The result is a new function which does the same as FUN, except that the last N arguments are fixed at the values with which this function was called." + (declare (pure t) (side-effect-free t)) (lambda (&rest pre-args) (apply fn (append pre-args args)))) @@ -104,7 +105,7 @@ at the values with which this function was called." "Expands to (lambda () (interactive) ,@body). A factory for quickly producing interaction commands, particularly for keybinds or aliases." - (declare (doc-string 1)) + (declare (doc-string 1) (pure t) (side-effect-free t)) `(lambda () (interactive) ,@body)) (defalias 'lambda! 'λ!) @@ -112,7 +113,7 @@ or aliases." "Expands to a command that interactively calls COMMAND with prefix ARG. A factory for quickly producing interactive, prefixed commands for keybinds or aliases." - (declare (doc-string 1)) + (declare (doc-string 1) (pure t) (side-effect-free t)) (lambda () (interactive) (let ((current-prefix-arg arg)) (call-interactively command)))) @@ -419,10 +420,9 @@ DOCSTRING and BODY are as in `defun'. where-alist)) `(progn (defun ,symbol ,arglist ,docstring ,@body) - ,(when where-alist - `(dolist (targets (list ,@(nreverse where-alist))) - (dolist (target (cdr targets)) - (advice-add target (car targets) #',symbol))))))) + (dolist (targets (list ,@(nreverse where-alist))) + (dolist (target (cdr targets)) + (advice-add target (car targets) #',symbol)))))) (provide 'core-lib) ;;; core-lib.el ends here diff --git a/core/core-projects.el b/core/core-projects.el index 24e6ed33f..bdcb2cffa 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -44,6 +44,21 @@ Emacs.") :config (projectile-mode +1) + ;; Projectile runs four functions to determine the root (in this order): + ;; + ;; + `projectile-root-local' -> consults the `projectile-project-root' + ;; variable for an explicit path. + ;; + `projectile-root-bottom-up' -> consults + ;; `projectile-project-root-files-bottom-up'; searches from / to your + ;; current directory for certain files (including .project and .git) + ;; + `projectile-root-top-down' -> consults `projectile-project-root-files'; + ;; searches from the current directory down to / for certain project + ;; markers, like package.json, setup.py, or Cargo.toml + ;; + `projectile-root-top-down-recurring' -> consults + ;; `projectile-project-root-files-top-down-recurring'; searches from the + ;; current directory down to / for a directory that has .svn or Makefile but + ;; doesn't have a parent with one of those files. + ;; ;; In the interest of performance, we reduce the number of project root marker ;; files/directories projectile searches for when resolving the project root. (setq projectile-project-root-files-bottom-up diff --git a/core/core-ui.el b/core/core-ui.el index b8081ec24..af27e4deb 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -320,7 +320,8 @@ treat Emacs as a non-application window." ;; always avoid GUI (setq use-dialog-box nil) ;; Don't display floating tooltips; display their contents in the echo-area. -(if (bound-and-true-p tooltip-mode) (tooltip-mode -1)) +(when (bound-and-true-p tooltip-mode) + (tooltip-mode -1)) ;; native linux tooltips are ugly (when IS-LINUX (setq x-gtk-use-system-tooltips nil)) diff --git a/modules/config/default/autoload/default.el b/modules/config/default/autoload/default.el index 28d2caed1..e7a40b750 100644 --- a/modules/config/default/autoload/default.el +++ b/modules/config/default/autoload/default.el @@ -238,17 +238,19 @@ If prefix ARG is set, prompt for a directory to search from." "Conduct a text search in the current project root. If prefix ARG is set, prompt for a known project to search from." (interactive "P") - (let ((default-directory - (if arg - (if-let (projects (projectile-relevant-known-projects)) - (completing-read "Search project: " projects - nil t nil nil (doom-project-root)) - (user-error "There are no known projects")) - default-directory))) - (call-interactively - (cond ((featurep! :completion ivy) #'+ivy/project-search) - ((featurep! :completion helm) #'+helm/project-search) - (#'projectile-grep))))) + (let* ((disabled-command-function nil) + (default-directory + (if arg + (if-let (projects (projectile-relevant-known-projects)) + (completing-read "Search project: " projects + nil t nil nil (doom-project-root)) + (user-error "There are no known projects")) + default-directory)) + (this-command + (cond ((featurep! :completion ivy) #'+ivy/project-search) + ((featurep! :completion helm) #'+helm/project-search) + (#'projectile-ripgrep)))) + (call-interactively this-command))) ;;;###autoload (defun +default/search-other-project () diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index 08b58cb7b..1418e8dc5 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -9,7 +9,7 @@ ;; other windows just to pop up one tiny window). ;; 2. Forcing plugins to use `display-buffer' and `pop-to-buffer' instead of ;; `switch-to-buffer' (which is unaffected by `display-buffer-alist', which -;; this module heavily relies on). +;; we must rely on, heavily). ;; 3. Closing popups (temporarily) before functions that are highly destructive ;; to the illusion of popup control get run (with the use of the ;; `save-popups!' macro). @@ -206,10 +206,10 @@ the command buffer." (defadvice! +popup--helm-elisp--persistent-help-a (candidate _fun &optional _name) :before #'helm-elisp--persistent-help (let (win) - (when (and (helm-attr 'help-running-p) - (string= candidate (helm-attr 'help-current-symbol)) - (setq win (get-buffer-window (get-buffer (help-buffer))))) - (delete-window win))))) + (and (helm-attr 'help-running-p) + (string= candidate (helm-attr 'help-current-symbol)) + (setq win (get-buffer-window (get-buffer (help-buffer)))) + (delete-window win))))) ;;;###package Info From c81b8445c4278cb9f4efdc9ec30181fa6be0eb3a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 19 Dec 2019 15:03:40 -0500 Subject: [PATCH 303/983] lang/org: activate ob-ammonite on amm blocks Instead of scala blocks. --- modules/lang/org/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 2e7a8f526..d8eba297c 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -253,7 +253,7 @@ background (and foreground) match the current theme." (when (featurep! :lang scala) (add-hook! '+org-babel-load-functions (defun +org-babel-load-ammonite-h (lang) - (and (eq lang 'scala) + (and (eq lang 'amm) (require 'ob-ammonite nil t)))))) From 95e80b00dad197afcbe0bc659fcf129fc536418a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 19 Dec 2019 15:25:29 -0500 Subject: [PATCH 304/983] lang/org: also require jupyter-* libs w/ ob-jupyter Relevant to #2198 --- modules/lang/org/contrib/jupyter.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/lang/org/contrib/jupyter.el b/modules/lang/org/contrib/jupyter.el index a64df8e0e..f382060b7 100644 --- a/modules/lang/org/contrib/jupyter.el +++ b/modules/lang/org/contrib/jupyter.el @@ -15,4 +15,5 @@ (require (intern (format "ob-%s" lang)) nil t))) (with-demoted-errors "Jupyter: %s" + (require lang nil t) (require 'ob-jupyter nil t)))))) From 995031f66f56405053e950aa6278c2f216115d84 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 19 Dec 2019 15:31:01 -0500 Subject: [PATCH 305/983] emacs/dired: re-comment dired settings Closes #2212 --- modules/emacs/dired/config.el | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index b6ca86255..d8a6d5a19 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -3,18 +3,13 @@ (use-package! dired :commands dired-jump :init - (setq ;; Always copy/delete recursively + (setq dired-auto-revert-buffer t ; don't prompt to revert; just do it + dired-dwim-target t ; suggest a target for moving/copying intelligently + dired-hide-details-hide-symlink-targets nil + ;; Always copy/delete recursively dired-recursive-copies 'always dired-recursive-deletes 'top - ;; Instantly revert Dired buffers on re-visiting them, with no message. - ;; (A message is shown if insta-revert is either disabled or determined - ;; dynamically by setting this variable to a function.) - dired-auto-revert-buffer t - ;; Auto refresh dired, but be quiet about it - dired-hide-details-hide-symlink-targets nil - ;; make dired suggest a target for moving/copying intelligently - dired-dwim-target t - ;; files + ;; Where to store image caches image-dired-dir (concat doom-cache-dir "image-dired/") image-dired-db-file (concat image-dired-dir "db.el") image-dired-gallery-dir (concat image-dired-dir "gallery/") From 9647cb0a496600dd9a318471c94ae8b0210cf143 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 19 Dec 2019 17:29:36 -0500 Subject: [PATCH 306/983] lang/org: add +brain feature No keybinding yet. --- docs/index.org | 2 +- modules/lang/org/README.org | 1 + modules/lang/org/config.el | 1 + modules/lang/org/contrib/brain.el | 21 +++++++++++++++++++++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 modules/lang/org/contrib/brain.el diff --git a/docs/index.org b/docs/index.org index aec556773..a623084de 100644 --- a/docs/index.org +++ b/docs/index.org @@ -197,7 +197,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/nim/README.org][nim]] - TODO + nix - TODO + [[file:../modules/lang/ocaml/README.org][ocaml]] =+lsp= - TODO -+ [[file:../modules/lang/org/README.org][org]] =+dragndrop +gnuplot +hugo +ipython +journal +jupyter +pandoc +pomodoro +present= - TODO ++ [[file:../modules/lang/org/README.org][org]] =+brain +dragndrop +gnuplot +hugo +ipython +journal +jupyter +pandoc +pomodoro +present= - TODO + [[file:../modules/lang/perl/README.org][perl]] - TODO + [[file:../modules/lang/php/README.org][php]] =+lsp= - TODO + plantuml - TODO diff --git a/modules/lang/org/README.org b/modules/lang/org/README.org index 66104eb1d..4ae9b5682 100644 --- a/modules/lang/org/README.org +++ b/modules/lang/org/README.org @@ -52,6 +52,7 @@ https://www.mfoot.com/blog/2015/11/22/literate-emacs-configuration-with-org-mode #+end_quote ** Module Flags ++ =+brain= Enables [[https://github.com/Kungsgeten/org-brain][org-brain]] integration. + =+dragndrop= Enables drag-and-drop support for images and files; inserts inline previews for images and an icon+link for other media types. + =+gnuplot= Installs gnuplot & gnuplot-mode, which enables rendering images diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index d8eba297c..78fb0e538 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -995,6 +995,7 @@ compelling reason, so..." #'+org-init-smartparens-h) ;;; Custom org modules + (if (featurep! +brain) (load! "contrib/brain")) (if (featurep! +dragndrop) (load! "contrib/dragndrop")) (if (featurep! +ipython) (load! "contrib/ipython")) (if (featurep! +journal) (load! "contrib/journal")) diff --git a/modules/lang/org/contrib/brain.el b/modules/lang/org/contrib/brain.el new file mode 100644 index 000000000..019310284 --- /dev/null +++ b/modules/lang/org/contrib/brain.el @@ -0,0 +1,21 @@ +;;; lang/org/contrib/brain.el -*- lexical-binding: t; -*- +;;;###if (featurep! +brain) + +(use-package! org-brain + :defer t + :init + (setq org-id-track-globally t + org-id-locations-file (concat doom-etc-dir "org-id-locations") + org-brain-visualize-default-choices 'all + org-brain-title-max-length 24 + org-brain-include-file-entries nil + org-brain-file-entries-use-title nil) + + :config + (set-evil-initial-state! 'org-brain-visualize-mode 'emacs) + (set-popup-rule! "^\\*org-brain" :side 'right :size 1.00 :select t :ttl nil) + + (cl-pushnew '("b" "Brain" plain (function org-brain-goto-end) + "* %i%?" :empty-lines 1) + org-capture-templates + :key #'car :test #'equal)) From f5d1081cdec759940fea7702aca609e9c80a36d6 Mon Sep 17 00:00:00 2001 From: Gerry Agbobada <10496163+gagbo@users.noreply.github.com> Date: Fri, 20 Dec 2019 00:49:27 +0100 Subject: [PATCH 307/983] Add lsp-ivy and helm-lsp when :tools lsp (#2162) * Add lsp-ivy and helm-lsp when :tools lsp * Review - Move the packages to :tools lsp - Add bindings to config/+evil-bindings.el (no change to +emacs since there was no 'code' prefix) - Move README section - Move the packages to :tools lsp - Add bindings to config/+evil-bindings.el (no change to +emacs since there was no 'code' prefix) * FUp filechange noise --- modules/config/default/+evil-bindings.el | 38 ++++++++++++++---------- modules/tools/lsp/README.org | 8 +++++ modules/tools/lsp/config.el | 8 +++++ modules/tools/lsp/packages.el | 4 +++ 4 files changed, 42 insertions(+), 16 deletions(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 009833c54..50f80b369 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -354,23 +354,29 @@ ;;; c --- code (:prefix-map ("c" . "code") - :desc "Compile" "c" #'compile - :desc "Recompile" "C" #'recompile - :desc "Jump to definition" "d" #'+lookup/definition - :desc "Jump to references" "D" #'+lookup/references - :desc "Evaluate buffer/region" "e" #'+eval/buffer-or-region - :desc "Evaluate & replace region" "E" #'+eval:replace-region - :desc "Format buffer/region" "f" #'+format/region-or-buffer - :desc "LSP Format buffer/region" "F" #'+default/lsp-format-region-or-buffer - :desc "LSP Organize imports" "i" #'lsp-organize-imports - :desc "Jump to documentation" "k" #'+lookup/documentation - :desc "LSP Rename" "r" #'lsp-rename - :desc "Send to repl" "s" #'+eval/send-region-to-repl - :desc "Delete trailing whitespace" "w" #'delete-trailing-whitespace - :desc "Delete trailing newlines" "W" #'doom/delete-trailing-newlines - :desc "List errors" "x" #'flymake-show-diagnostics-buffer + :desc "Compile" "c" #'compile + :desc "Recompile" "C" #'recompile + :desc "Jump to definition" "d" #'+lookup/definition + :desc "Jump to references" "D" #'+lookup/references + :desc "Evaluate buffer/region" "e" #'+eval/buffer-or-region + :desc "Evaluate & replace region" "E" #'+eval:replace-region + :desc "Format buffer/region" "f" #'+format/region-or-buffer + :desc "LSP Format buffer/region" "F" #'+default/lsp-format-region-or-buffer + :desc "LSP Organize imports" "i" #'lsp-organize-imports + (:when (featurep! :completion ivy) + :desc "Jump to symbol in current workspace" "j" #'lsp-ivy-workspace-symbol + :desc "Jump to symbol in any workspace" "J" #'lsp-ivy-global-workspace-symbol) + (:when (featurep! :completion helm) + :desc "Jump to symbol in current workspace" "j" #'helm-lsp-workspace-symbol + :desc "Jump to symbol in any workspace" "J" #'helm-lsp-global-workspace-symbol) + :desc "Jump to documentation" "k" #'+lookup/documentation + :desc "LSP Rename" "r" #'lsp-rename + :desc "Send to repl" "s" #'+eval/send-region-to-repl + :desc "Delete trailing whitespace" "w" #'delete-trailing-whitespace + :desc "Delete trailing newlines" "W" #'doom/delete-trailing-newlines + :desc "List errors" "x" #'flymake-show-diagnostics-buffer (:when (featurep! :tools flycheck) - :desc "List errors" "x" #'flycheck-list-errors)) + :desc "List errors" "x" #'flycheck-list-errors)) ;;; f --- file (:prefix-map ("f" . "file") diff --git a/modules/tools/lsp/README.org b/modules/tools/lsp/README.org index e5faee106..8abbbd92e 100644 --- a/modules/tools/lsp/README.org +++ b/modules/tools/lsp/README.org @@ -9,6 +9,7 @@ - [[#plugins][Plugins]] - [[#prerequisites][Prerequisites]] - [[#features][Features]] + - [[#lsp-powered-project-search][LSP-powered project search]] - [[#configuration][Configuration]] - [[#troubleshooting][Troubleshooting]] @@ -67,6 +68,13 @@ them [[https://github.com/emacs-lsp/lsp-mode#supported-languages][in the lsp-mod targeted language will contain brief instructions as well. * TODO Features +** LSP-powered project search +When =:completion ivy= or =:completion helm= is active, LSP is used to search a +symbol indexed by the LSP server : +| Keybind | Description | +|-----------+-------------------------------------| +| =SPC c j= | Jump to symbol in current workspace | +| =SPC c J= | Jump to symbol in any workspace | * TODO Configuration diff --git a/modules/tools/lsp/config.el b/modules/tools/lsp/config.el index 8c323994f..fb43788a1 100644 --- a/modules/tools/lsp/config.el +++ b/modules/tools/lsp/config.el @@ -148,3 +148,11 @@ Also logs the resolved project root, if found." (remove-hook 'company-mode-hook #'+lsp-init-company-h t)))) :config (setq company-lsp-cache-candidates 'auto)) ;; cache candidates for better performance + +(use-package! helm-lsp + :when (featurep! :completion helm) + :commands helm-lsp-workspace-symbol helm-lsp-global-workspace-symbol) + +(use-package! lsp-ivy + :when (featurep! :completion ivy) + :commands lsp-ivy-workspace-symbol lsp-ivy-global-workspace-symbol) diff --git a/modules/tools/lsp/packages.el b/modules/tools/lsp/packages.el index efcc53bd1..cd4f9e790 100644 --- a/modules/tools/lsp/packages.el +++ b/modules/tools/lsp/packages.el @@ -5,3 +5,7 @@ (package! lsp-ui) (when (featurep! :completion company) (package! company-lsp)) +(when (featurep! :completion ivy) + (package! lsp-ivy)) +(when (featurep! :completion helm) + (package! helm-lsp)) From 2afbbe392c620721a2a6404e5f434a1ac9574a85 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 19 Dec 2019 22:05:55 -0500 Subject: [PATCH 308/983] Remove dotenv-mode package Pruning packages that aren't strictly necessary. --- core/cli/env.el | 2 +- core/packages.el | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/core/cli/env.el b/core/cli/env.el index 9b28a6804..866d82c48 100644 --- a/core/cli/env.el +++ b/core/cli/env.el @@ -102,7 +102,7 @@ default, on Linux, this is '$SHELL -ic /usr/bin/env'. Variables in (goto-char (point-min)) (insert (concat - "# -*- mode: dotenv -*-\n" + "# -*- mode: sh -*-\n" (format "# Generated from a %s shell environent\n" shell-file-name) "# ---------------------------------------------------------------------------\n" "# This file was auto-generated by `doom env'. It contains a list of environment\n" diff --git a/core/packages.el b/core/packages.el index ff2ee9115..7976cbdb5 100644 --- a/core/packages.el +++ b/core/packages.el @@ -2,7 +2,6 @@ ;;; core/packages.el ;; core.el -(package! dotenv-mode) (package! auto-minor-mode) ;; core-ui.el From 11046d7f829c773adc17894db7f1381e6a055420 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 19 Dec 2019 22:07:06 -0500 Subject: [PATCH 309/983] Move gcmh from doom-core-packages to core/packages.el It doesn't need to be present outside of interactive sessions. --- core/core-packages.el | 2 +- core/packages.el | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core-packages.el b/core/core-packages.el index 726510784..168ab6fca 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -43,7 +43,7 @@ package's name as a symbol, and whose CDR is the plist supplied to its `package!' declaration. Set by `doom-initialize-packages'.") -(defvar doom-core-packages '(straight use-package async gcmh) +(defvar doom-core-packages '(straight use-package async) "A list of packages that must be installed (and will be auto-installed if missing) and shouldn't be deleted.") diff --git a/core/packages.el b/core/packages.el index 7976cbdb5..8535a023a 100644 --- a/core/packages.el +++ b/core/packages.el @@ -3,6 +3,7 @@ ;; core.el (package! auto-minor-mode) +(package! gcmh) ;; core-ui.el (package! all-the-icons) From 18d8ea22f6c81e6b46c87448476d62c9be6685f2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 19 Dec 2019 23:32:58 -0500 Subject: [PATCH 310/983] cli/install: add templates for {config,packages}.el --- core/cli/install.el | 16 +++++------- core/templates/config.el | 52 ++++++++++++++++++++++++++++++++++++++ core/templates/packages.el | 43 +++++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 10 deletions(-) create mode 100644 core/templates/config.el create mode 100644 core/templates/packages.el diff --git a/core/cli/install.el b/core/cli/install.el index bb21dacc1..12e3e60d3 100644 --- a/core/cli/install.el +++ b/core/cli/install.el @@ -46,20 +46,16 @@ DOOMDIR environment variable. e.g. (print! (success "Done!"))))) '(("init.el" . (lambda () - (insert-file-contents (doom-path doom-emacs-dir "init.example.el")))) + (insert-file-contents + (doom-path doom-emacs-dir "init.example.el")))) ("config.el" . (lambda () - (insert! ";;; %sconfig.el -*- lexical-binding: t; -*-\n\n" - ";; Place your private configuration here\n" - ((relpath doom-private-dir))))) + (insert-file-contents + (doom-path doom-core-dir "templates/config.el")))) ("packages.el" . (lambda () - (insert! ";; -*- no-byte-compile: t; -*-\n;;; %spackages.el\n\n" - ";;; Examples:\n" - ";; (package! some-package)\n" - ";; (package! another-package :recipe (:host github :repo \"username/repo\"))\n" - ";; (package! builtin-package :disable t)\n" - ((relpath doom-private-dir)))))))) + (insert-file-contents + (doom-path doom-core-dir "templates/packages.el"))))))) ;; In case no init.el was present the first time `doom-initialize-modules' was ;; called in core.el (e.g. on first install) diff --git a/core/templates/config.el b/core/templates/config.el new file mode 100644 index 000000000..cd548901a --- /dev/null +++ b/core/templates/config.el @@ -0,0 +1,52 @@ +;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- + +;; Place your private configuration here! Remember, you do not need to run 'doom +;; refresh' after modifying this file! + + +;; These are used for a number of things, particularly for GPG configuration, +;; some email clients, file templates and snippets. +(setq user-full-name "John Doe" + user-mail-address "john@doe.com") + +;; Doom exposes five (optional) variables for controlling fonts in Doom. Here +;; are the three important ones: +;; +;; + `doom-font' +;; + `doom-variable-pitch-font' +;; + `doom-big-font' -- used for `doom-big-font-mode' +;; +;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd +;; font string. You generally only need these two: +;; test +(setq doom-font (font-spec "monospace" :size 14) + doom-variable-pitch-font (font-spec "sans")) + +;; There are two ways to load a theme. Both assume the theme is installed and +;; available. You can either set `doom-theme' or manually load a theme with the +;; `load-theme' function. These are the defaults. +(setq doom-theme 'doom-one) + +;; If you intend to use org, it is recommended you change this! +(setq org-directory "~/org/") + +;; If you want to change the style of line numbers, change this to `relative' or +;; `nil' to disable it: +(setq display-line-numbers-type t) + + +;; Here are some additional functions/macros that could help you configure Doom: +;; +;; - `load!' for loading external *.el files relative to this one +;; - `use-package' for configuring packages +;; - `after!' for running code after a package has loaded +;; - `add-load-path!' for adding directories to the `load-path', where Emacs +;; looks when you load packages with `require' or `use-package'. +;; - `map!' for binding new keys +;; +;; To get information about any of these functions/macros, move the cursor over +;; the highlighted symbol at press 'K' (non-evil users must press 'C-c g k'). +;; This will open documentation for it, including demos of how they are used. +;; +;; You can also try 'gd' (or 'C-c g d') to jump to their definition and see how +;; they are implemented. diff --git a/core/templates/packages.el b/core/templates/packages.el new file mode 100644 index 000000000..2d69479cb --- /dev/null +++ b/core/templates/packages.el @@ -0,0 +1,43 @@ +;; -*- no-byte-compile: t; -*- +;;; $DOOMDIR/packages.el + +;; This is where you install packages, by declaring them with the `package!' +;; macro, then running 'doom refresh' on the command line. You'll need to +;; restart Emacs for your changes to take effect! Or at least, run M-x +;; `doom/reload'. +;; +;; WARNING: Don't disable core packages listed in ~/.emacs.d/core/packages.el. +;; Doom requires these, and disabling them may have terrible side effects. +;; +;; Here are a couple examples: + +;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: +;(package! some-package) + +;; To install a package directly from a particular repo, you'll need to specify +;; a `:recipe'. You'll find documentation on what `:recipe' accepts here: +;; https://github.com/raxod502/straight.el#the-recipe-format +;(package! another-package +; :recipe (:host github :repo "username/repo")) + +;; If the package you are trying to install does not contain a PACKAGENAME.el +;; file, or is located in a subdirectory of the repo, you'll need to specify +;; `:files' in the `:recipe': +;(package! this-package +; :recipe (:host github :repo "username/repo" +; :files ("some-file.el" "src/lisp/*.el"))) + +;; If you'd like to disable a package included with Doom, for whatever reason, +;; you can do so here with the `:disable' property: +;(package! builtin-package :disable t) + +;; You can override the recipe of a built in package without having to specify +;; all the properties for `:recipe'. These will inherit the rest of its recipe +;; from Doom or MELPA/ELPA/Emacsmirror: +;(package! builtin-package :recipe (:nonrecursive t)) +;(package! builtin-package-2 :recipe (:repo "myfork/package")) + +;; Specify a `:branch' to install a package from a particular branch or tag. +;; This is required for some packages whose default branch isn't 'master' (which +;; our package manager can't deal with; see raxod502/straight.el#279) +;(package! builtin-package :recipe (:branch "develop")) From 7742813a060843dea12bb4aa9c3eb83525b13a7e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 00:43:36 -0500 Subject: [PATCH 311/983] tools/lookup: add +dictionary feature For looking up words in dictionaries and thesauruses. Requires internet connection (for now). --- docs/index.org | 3 +- modules/tools/lookup/README.org | 2 ++ modules/tools/lookup/autoload/lookup.el | 44 +++++++++++++++++++++++++ modules/tools/lookup/config.el | 30 +++++++++++++++++ modules/tools/lookup/packages.el | 6 ++++ 5 files changed, 84 insertions(+), 1 deletion(-) diff --git a/docs/index.org b/docs/index.org index a623084de..eff52c0cd 100644 --- a/docs/index.org +++ b/docs/index.org @@ -237,7 +237,8 @@ Small modules that give Emacs access to external tools & services. + flycheck - Live error/warning highlights + flyspell - Spell checking + gist - TODO -+ [[file:../modules/tools/lookup/README.org][lookup]] =+docsets= - Universal jump-to & documentation lookup backend ++ [[file:../modules/tools/lookup/README.org][lookup]] =+dictionary +docsets= - Universal jump-to & documentation lookup + backend + [[file:../modules/tools/lsp/README.org][lsp]] - TODO + macos - TODO + magit - TODO diff --git a/modules/tools/lookup/README.org b/modules/tools/lookup/README.org index 53d7feb4b..c541cba8b 100644 --- a/modules/tools/lookup/README.org +++ b/modules/tools/lookup/README.org @@ -32,8 +32,10 @@ up definitions, references and documentation. + Documentation lookup for a variety of online sources (like devdocs.io, stackoverflow or youtube). + Integration with Dash.app docsets. ++ Support for online dictionaries and thesauruses. ** Module Flags ++ ~+dictionary~ Enable word definition and thesaurus lookup functionality. + ~+docsets~ Enable integration with Dash.app docsets. ** Plugins diff --git a/modules/tools/lookup/autoload/lookup.el b/modules/tools/lookup/autoload/lookup.el index 46726eca0..a2ba7a534 100644 --- a/modules/tools/lookup/autoload/lookup.el +++ b/modules/tools/lookup/autoload/lookup.el @@ -320,3 +320,47 @@ Otherwise, falls back on `find-file-at-point'." (run-hooks 'projectile-find-file-hook)))) (#'doom-project-browse)))) (find-file-at-point path)))))) + + +;; +;;; Dictionary + +;;;###autoload +(defun +lookup/word-definition (identifier &optional arg) + "Look up the definition of the word at point (or selection)." + (interactive + (list (+lookup-symbol-or-region) + current-prefix-arg)) + (unless (featurep! +dictionary) + (user-error "The +dictionary feature hasn't be enabled on :tools lookup module")) + (cond (IS-MAC + (osx-dictionary-search-input identifier)) + (+lookup-dictionary-enable-online + (define-word identifier nil arg)) + ;; TODO Implement offline dictionary backend + ((user-error "No offline dictionary defined yet")))) + +;;;###autoload +(defun +lookup/word-synonyms (identifier &optional arg) + "Look up and insert a synonym for the word at point (or selection)." + (interactive + (list (+lookup-symbol-or-region) + current-prefix-arg)) + (unless (featurep! +dictionary) + (user-error "The +dictionary feature hasn't be enabled on :tools lookup module")) + (if +lookup-dictionary-enable-online + (request + (powerthesaurus-compose-url identifier) + :parser (lambda () (libxml-parse-html-region (point) (point-max))) + :headers '(("User-Agent" . "Chrome/74.0.3729.169")) + :success (cl-function + (lambda (&key data &allow-other-keys) + ;; in order to allow users to quit powerthesaurus prompt + ;; with C-g, we need to wrap callback with this + (with-local-quit + (funcall (powerthesaurus-choose-callback + (region-beginning) (region-end)) + (powerthesaurus-pick-synonym data) + identifier))))) + ;; TODO Implement offline synonyms backend + (user-error "No offline dictionary implemented yet"))) diff --git a/modules/tools/lookup/config.el b/modules/tools/lookup/config.el index a34773187..c80e09c52 100644 --- a/modules/tools/lookup/config.el +++ b/modules/tools/lookup/config.el @@ -84,6 +84,17 @@ If the argument is interactive (satisfies `commandp'), it is called with argument: the identifier at point. See `set-lookup-handlers!' about adding to this list.") +(defvar +lookup-dictionary-enable-online t + "If non-nil, look up dictionaries online. + +Setting this to nil will force it to use offline backends, which may be less +than perfect, but available without an internet connection. + +Used by `+lookup/word-definition' and `+lookup/word-synonyms'. + +For `+lookup/word-definition', this is ignored on Mac, where Emacs users +Dictionary.app behind the scenes to get definitions.") + ;; ;;; dumb-jump @@ -165,3 +176,22 @@ See https://github.com/magit/ghub/issues/81" (use-package! counsel-dash :when (featurep! :completion ivy))) + + +;; +;;; Dictionary integration + +(use-package! define-word + :when (featurep! +dictionary) + :unless IS-MAC + :defer t + :config + (setq define-word-displayfn-alist + (cl-loop for (service . _) in define-word-services + collect (cons service #'+eval-display-results-in-popup)))) + + +(when (featurep! +dictionary) + (define-key! text-mode-map + [remap +lookup/definition] #'+lookup/word-definition + [remap +lookup/references] #'+lookup/word-synonyms)) diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index 6c0b50565..92113d696 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -23,3 +23,9 @@ (package! helm-dash)) (when (featurep! :completion ivy) (package! counsel-dash))) + +(when (featurep! +dictionary) + (if IS-MAC + (package! osx-dictionary) + (package! define-word)) + (package! powerthesaurus)) From de63dd50ef0ec00ffab387e37a24f7928cb4bb7e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 00:44:58 -0500 Subject: [PATCH 312/983] Add :ui zen module This, combined with the new ':tools (lookup +dictionary)' feature will eventually replace the ':app write' module. --- docs/index.org | 1 + init.example.el | 1 + modules/ui/zen/config.el | 42 ++++++++++++++++++++++++++++++++++++++ modules/ui/zen/packages.el | 5 +++++ 4 files changed, 49 insertions(+) create mode 100644 modules/ui/zen/config.el create mode 100644 modules/ui/zen/packages.el diff --git a/docs/index.org b/docs/index.org index eff52c0cd..43173982b 100644 --- a/docs/index.org +++ b/docs/index.org @@ -275,3 +275,4 @@ Aesthetic modules that affect the Emacs interface or user experience. + vi-tilde-fringe - TODO + [[file:../modules/ui/window-select/README.org][window-select]] =+switch-window +numbers= - TODO + [[file:../modules/ui/workspaces/README.org][workspaces]] - Isolated workspaces ++ [[file:../modules/ui/zen/README.org][zen]] - Distraction-free coding (or writing) diff --git a/init.example.el b/init.example.el index f1210d1a8..6bf9c773c 100644 --- a/init.example.el +++ b/init.example.el @@ -42,6 +42,7 @@ vi-tilde-fringe ; fringe tildes to mark beyond EOB window-select ; visually switch windows workspaces ; tab emulation, persistence & separate workspaces + ;;zen ; distraction-free coding or writing :editor (evil +everywhere); come to the dark side, we have cookies diff --git a/modules/ui/zen/config.el b/modules/ui/zen/config.el new file mode 100644 index 000000000..41db5ea5b --- /dev/null +++ b/modules/ui/zen/config.el @@ -0,0 +1,42 @@ +;;; ui/zen/config.el -*- lexical-binding: t; -*- + +(defvar +zen-mixed-pitch-modes '(markdown-mode org-mode) + "What major-modes to enable `mixed-pitch-mode' in with `writeroom-mode'.") + + +;; +;;; Packages + +(after! writeroom-mode + (setq writeroom-fullscreen-effect nil + writeroom-maximize-window nil) + + ;; Adjust margins when text size is changed + (advice-add #'text-scale-adjust :after #'visual-fill-column-adjust)) + + +(use-package! mixed-pitch + :hook (writeroom-mode . +zen-enable-mixed-pitch-mode-h) + :config + (defun +zen-enable-mixed-pitch-mode-h () + "Enable `mixed-pitch-mode' when in `+zen-mixed-pitch-modes'." + (when (apply #'derived-mode-p +zen-mixed-pitch-modes) + (mixed-pitch-mode (if writeroom-mode +1 -1)))) + + (pushnew! mixed-pitch-fixed-pitch-faces + 'org-date + 'org-special-keyword + 'org-property-value + 'org-ref-cite-face + 'org-tag + 'org-todo-keyword-todo + 'org-todo-keyword-habt + 'org-todo-keyword-done + 'org-todo-keyword-wait + 'org-todo-keyword-kill + 'org-todo-keyword-outd + 'org-todo + 'org-indent + 'font-lock-comment-face + 'line-number + 'line-number-current-line)) diff --git a/modules/ui/zen/packages.el b/modules/ui/zen/packages.el new file mode 100644 index 000000000..5088eac0a --- /dev/null +++ b/modules/ui/zen/packages.el @@ -0,0 +1,5 @@ +;; -*- no-byte-compile: t; -*- +;;; ui/zen/packages.el + +(package! writeroom-mode) +(package! mixed-pitch) From 322bca710a2ac8c1555a980715bb8d3952df9312 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 00:47:04 -0500 Subject: [PATCH 313/983] General refactors & reformatting --- core/core-editor.el | 5 +++-- core/core-modules.el | 4 ++-- modules/config/default/autoload/default.el | 11 +++++------ modules/lang/clojure/config.el | 2 +- modules/lang/emacs-lisp/config.el | 6 +++--- modules/lang/org/packages.el | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index a641245c8..3fb9252fe 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -146,6 +146,7 @@ possible." (push '("/LICENSE\\'" . text-mode) auto-mode-alist) (push '("\\.log\\'" . text-mode) auto-mode-alist) +(push '("\\.env\\'" . sh-mode) auto-mode-alist) ;; @@ -418,7 +419,7 @@ files, so we replace calls to `pp' with the much faster `prin1'." (require 'smartparens-config) ;; Overlays are too distracting and not terribly helpful. show-parens does - ;; this for us already, so... + ;; this for us already (and is faster), so... (setq sp-highlight-pair-overlay nil sp-highlight-wrap-overlay nil sp-highlight-wrap-tag-overlay nil) @@ -442,7 +443,7 @@ files, so we replace calls to `pp' with the much faster `prin1'." ;; Silence some harmless but annoying echo-area spam (dolist (key '(:unmatched-expression :no-matching-tag)) - (setf (cdr (assq key sp-message-alist)) nil)) + (setf (alist-get key sp-message-alist) nil)) (add-hook! 'minibuffer-setup-hook (defun doom-init-smartparens-in-minibuffer-maybe-h () diff --git a/core/core-modules.el b/core/core-modules.el index dec2c65c5..f58d9da4c 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -590,14 +590,14 @@ This is a wrapper around `eval-after-load' that: ;; DEPRECATED (defmacro def-package! (&rest args) - (make-obsolete 'def-package! 'use-package! "2.0.9") (message "`def-package!' was renamed to `use-package!'; use that instead.") `(use-package! ,@args)) +(make-obsolete 'def-package! 'use-package! "2.0.9") (defmacro def-package-hook! (&rest args) - (make-obsolete 'def-package-hook! 'use-package-hook! "2.0.9") (message "`def-package-hook!' was renamed to `use-package-hook!'; use that instead.") `(use-package-hook! ,@args)) +(make-obsolete 'def-package-hook! 'use-package-hook! "2.0.9") (provide 'core-modules) ;;; core-modules.el ends here diff --git a/modules/config/default/autoload/default.el b/modules/config/default/autoload/default.el index e7a40b750..dbe8726d3 100644 --- a/modules/config/default/autoload/default.el +++ b/modules/config/default/autoload/default.el @@ -245,12 +245,11 @@ If prefix ARG is set, prompt for a known project to search from." (completing-read "Search project: " projects nil t nil nil (doom-project-root)) (user-error "There are no known projects")) - default-directory)) - (this-command - (cond ((featurep! :completion ivy) #'+ivy/project-search) - ((featurep! :completion helm) #'+helm/project-search) - (#'projectile-ripgrep)))) - (call-interactively this-command))) + default-directory))) + (call-interactively + (cond ((featurep! :completion ivy) #'+ivy/project-search) + ((featurep! :completion helm) #'+helm/project-search) + (#'projectile-ripgrep))))) ;;;###autoload (defun +default/search-other-project () diff --git a/modules/lang/clojure/config.el b/modules/lang/clojure/config.el index ebeadf06c..6c4887dcb 100644 --- a/modules/lang/clojure/config.el +++ b/modules/lang/clojure/config.el @@ -26,7 +26,7 @@ (set-eval-handler! '(clojure-mode clojurescript-mode) #'cider-eval-region)) :config (add-hook 'cider-mode-hook #'eldoc-mode) - (set-lookup-handlers! 'cider-mode + (set-lookup-handlers! '(cider-mode cider-repl-mode) :definition #'+clojure-cider-lookup-definition :documentation #'cider-doc) (set-popup-rules! diff --git a/modules/lang/emacs-lisp/config.el b/modules/lang/emacs-lisp/config.el index 3d22d6c57..d525392ee 100644 --- a/modules/lang/emacs-lisp/config.el +++ b/modules/lang/emacs-lisp/config.el @@ -19,12 +19,12 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.") (use-package! elisp-mode :mode ("\\.Cask\\'" . emacs-lisp-mode) :config - (set-repl-handler! 'emacs-lisp-mode #'+emacs-lisp/open-repl) - (set-eval-handler! 'emacs-lisp-mode #'+emacs-lisp-eval) + (set-repl-handler! '(emacs-lisp-mode lisp-interaction-mode) #'+emacs-lisp/open-repl) + (set-eval-handler! '(emacs-lisp-mode lisp-interaction-mode) #'+emacs-lisp-eval) (set-lookup-handlers! 'emacs-lisp-mode :definition #'elisp-def :documentation #'+emacs-lisp-lookup-documentation) - (set-docsets! 'emacs-lisp-mode "Emacs Lisp") + (set-docsets! '(emacs-lisp-mode lisp-interaction-mode) "Emacs Lisp") (set-pretty-symbols! 'emacs-lisp-mode :lambda "lambda") (set-rotate-patterns! 'emacs-lisp-mode :symbols '(("t" "nil") diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index dfeb897c0..d318165a8 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -44,7 +44,7 @@ (when (featurep! +gnuplot) (package! gnuplot) (package! gnuplot-mode)) -(when (featurep! +ipython) +(when (featurep! +ipython) ; DEPRECATED (package! ob-ipython)) (when (featurep! +jupyter) (package! jupyter)) From d8ecb1396bf38fe36959d28807b00aeca44c2764 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 00:47:21 -0500 Subject: [PATCH 314/983] editor/multiple-cursors: fix :mc ex command Due to missing variables --- modules/editor/multiple-cursors/config.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/editor/multiple-cursors/config.el b/modules/editor/multiple-cursors/config.el index 128dff885..3e85d7430 100644 --- a/modules/editor/multiple-cursors/config.el +++ b/modules/editor/multiple-cursors/config.el @@ -1,5 +1,15 @@ ;;; editor/multiple-cursors/config.el -*- lexical-binding: t; -*- +(defvar +multiple-cursors-evil-mc-ex-global t + "TODO") + +(defvar +multiple-cursors-evil-mc-ex-case nil + "TODO") + + +;; +;;; Packages + (use-package! evil-multiedit :when (featurep! :editor evil) :defer t From ea9126a883d221b1ebb3d5186c29ee5bcab6c901 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 01:09:59 -0500 Subject: [PATCH 315/983] ui/zen: add README.org & 'SPC t z' keybind --- modules/config/default/+evil-bindings.el | 3 +- modules/ui/zen/README.org | 44 ++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 modules/ui/zen/README.org diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 50f80b369..27d556271 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -621,7 +621,8 @@ :desc "Flyspell" "s" #'flyspell-mode) (:when (featurep! :lang org +pomodoro) :desc "Pomodoro timer" "t" #'org-pomodoro) - :desc "Word-wrap mode" "w" #'+word-wrap-mode)) + :desc "Word-wrap mode" "w" #'+word-wrap-mode + :desc "Zen mode" "z" #'writeroom-mode)) (after! which-key (let ((prefix-re (regexp-opt (list doom-leader-key doom-leader-alt-key)))) diff --git a/modules/ui/zen/README.org b/modules/ui/zen/README.org new file mode 100644 index 000000000..8ad06abce --- /dev/null +++ b/modules/ui/zen/README.org @@ -0,0 +1,44 @@ +#+TITLE: ui/zen +#+DATE: December 20, 2019 +#+SINCE: v3.0.0 +#+STARTUP: inlineimages + +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] +- [[#prerequisites][Prerequisites]] +- [[#features][Features]] + - [[#distractions-free-mode][Distractions-free mode]] +- [[#configuration][Configuration]] + - [[#enable-fullscreen-on-activation][Enable fullscreen on activation]] + +* Description +This module provides a distraction-free mode that: + ++ Centers the buffer ++ Enables variable pitch for text (but keeps certain elements fixed-pitch). ++ Reduces UI clutter (e.g. the modeline; fullscreens the frame -- off by default) + +** Module Flags +This module provides no flags. + +** Plugins ++ [[https://github.com/joostkremers/writeroom-mode][writeroom-mode]] ++ [[https://gitlab.com/jabranham/mixed-pitch][mixed-pitch]] + +* Prerequisites +This module has no prereqisites. + +* Features +** Distractions-free mode +This can be activated with =SPC t z= for evil users. There is no keybinding for +non-evil users yet, so use 'M-x writeroom-mode'. + +* Configuration +** Enable fullscreen on activation +#+BEGIN_SRC elisp +(setq writeroom-fullscreen-effect t) +#+END_SRC + +Or fullscreen manually with =SPC t F= (or =F11= for non-evil users). From 73d975de6c44b60c2b603837cc4e7d362dff5148 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 02:13:11 -0500 Subject: [PATCH 316/983] lang/org: make C-RET create headings instead of error --- modules/lang/org/autoload/org.el | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/modules/lang/org/autoload/org.el b/modules/lang/org/autoload/org.el index 44107a1ca..14ea6d959 100644 --- a/modules/lang/org/autoload/org.el +++ b/modules/lang/org/autoload/org.el @@ -62,10 +62,7 @@ ('above (save-excursion (org-shiftmetadown)) (+org/table-previous-row)))) - ((memq type '(headline inlinetask)) - (let ((level (if (eq (org-element-type context) 'headline) - (org-element-property :level context) - 1))) + ((let ((level (or (org-current-level) 1))) (pcase direction (`below (let (org-insert-heading-respect-content) @@ -81,9 +78,7 @@ (org-todo (cond ((eq todo-type 'done) (car (+org-get-todo-keywords-for todo-keyword))) (todo-keyword) - ('todo)))))) - - ((user-error "Not a valid list, heading or table"))) + ('todo))))))) (when (org-invisible-p) (org-show-hidden-entry)) From 2da7c7b16881439d9f39116f2793a5308bc7a887 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 02:34:29 -0500 Subject: [PATCH 317/983] tools/eval: make set-eval-handler! accept a list of modes Fixes inline evaluation for emacs-lisp-mode due to 322bca7. --- modules/tools/eval/autoload/settings.el | 35 ++++++++++++++----------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/modules/tools/eval/autoload/settings.el b/modules/tools/eval/autoload/settings.el index e6cbf0814..90116eaba 100644 --- a/modules/tools/eval/autoload/settings.el +++ b/modules/tools/eval/autoload/settings.el @@ -37,8 +37,10 @@ recognized: "Alist mapping major modes to interactive runner functions.") ;;;###autodef -(defun set-eval-handler! (mode command) - "Define a code evaluator for major mode MODE with `quickrun'. +(defun set-eval-handler! (modes command) + "Define a code evaluator for major mode MODES with `quickrun'. + +MODES can be list of major mode symbols, or a single one. 1. If MODE is a string and COMMAND is the string, MODE is a file regexp and COMMAND is a string key for an entry in `quickrun-file-alist'. @@ -50,17 +52,18 @@ recognized: 4. If MODE is not a string and COMMANd is a symbol, add it to `+eval-runners', which is used by `+eval/region'." (declare (indent defun)) - (cond ((symbolp command) - (push (cons mode command) +eval-runners)) - ((stringp command) - (after! quickrun - (push (cons mode command) - (if (stringp mode) - quickrun-file-alist - quickrun--major-mode-alist)))) - ((listp command) - (after! quickrun - (quickrun-add-command - (or (cdr (assq mode quickrun--major-mode-alist)) - (string-remove-suffix "-mode" (symbol-name mode))) - command :mode mode))))) + (dolist (mode (doom-enlist modes)) + (cond ((symbolp command) + (push (cons mode command) +eval-runners)) + ((stringp command) + (after! quickrun + (push (cons mode command) + (if (stringp mode) + quickrun-file-alist + quickrun--major-mode-alist)))) + ((listp command) + (after! quickrun + (quickrun-add-command + (or (cdr (assq mode quickrun--major-mode-alist)) + (string-remove-suffix "-mode" (symbol-name mode))) + command :mode mode)))))) From 494e431f0463264a2a238e3bbd1ccba18d86ac55 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 02:44:20 -0500 Subject: [PATCH 318/983] lang/org: install org-brain Whoops! --- modules/lang/org/packages.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index d318165a8..dd7fad90b 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -39,6 +39,8 @@ (package! org-pdfview)) (when (featurep! :tools magit) (package! orgit)) +(when (featurep! +brain) + (package! org-brain)) (when (featurep! +dragndrop) (package! org-download)) (when (featurep! +gnuplot) From e0bd046339fb53e8c893467a10d4217072a12f54 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 04:16:52 -0500 Subject: [PATCH 319/983] tools/debugger: fix dap-mode not loading after lsp-mode --- modules/tools/debugger/config.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/tools/debugger/config.el b/modules/tools/debugger/config.el index 8c62c94b1..1efc7162c 100644 --- a/modules/tools/debugger/config.el +++ b/modules/tools/debugger/config.el @@ -22,10 +22,9 @@ (use-package! dap-mode :when (featurep! :tools lsp) - :hook (dap-mode . dap-ui-mode) :after lsp-mode - :init - (setq dap--breakpoints-file (concat doom-etc-dir "dap-breakpoints")) + :preface (setq dap--breakpoints-file (concat doom-etc-dir "dap-breakpoints")) + :init (add-hook 'dap-mode-hook #'dap-ui-mode) ; use a hook so users can remove it :config (dap-mode 1) (dolist (module '(((:lang . cc) ccls dap-lldb dap-gdb-lldb) From 6d40f30a0ae68e64dfca0ef33bcc5f8384b1cc2a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 05:01:44 -0500 Subject: [PATCH 320/983] Fix 'doom compile' error when compiling templates --- core/cli/byte-compile.el | 1 + core/cli/install.el | 4 ++-- core/templates/{config.el => config.example.el} | 0 core/templates/{packages.el => packages.example.el} | 0 4 files changed, 3 insertions(+), 2 deletions(-) rename core/templates/{config.el => config.example.el} (100%) rename core/templates/{packages.el => packages.example.el} (100%) diff --git a/core/cli/byte-compile.el b/core/cli/byte-compile.el index ab65a3ad5..49121e0ff 100644 --- a/core/cli/byte-compile.el +++ b/core/cli/byte-compile.el @@ -27,6 +27,7 @@ and your private config files, respectively. To recompile your packages, use (let ((filename (file-name-nondirectory path))) (or (string-prefix-p "." filename) (string-prefix-p "test-" filename) + (string-suffix-p ".example.el" filename) (not (equal (file-name-extension path) "el")) (member filename (list "packages.el" "doctor.el"))))) diff --git a/core/cli/install.el b/core/cli/install.el index 12e3e60d3..357487115 100644 --- a/core/cli/install.el +++ b/core/cli/install.el @@ -51,11 +51,11 @@ DOOMDIR environment variable. e.g. ("config.el" . (lambda () (insert-file-contents - (doom-path doom-core-dir "templates/config.el")))) + (doom-path doom-core-dir "templates/config.example.el")))) ("packages.el" . (lambda () (insert-file-contents - (doom-path doom-core-dir "templates/packages.el"))))))) + (doom-path doom-core-dir "templates/packages.example.el"))))))) ;; In case no init.el was present the first time `doom-initialize-modules' was ;; called in core.el (e.g. on first install) diff --git a/core/templates/config.el b/core/templates/config.example.el similarity index 100% rename from core/templates/config.el rename to core/templates/config.example.el diff --git a/core/templates/packages.el b/core/templates/packages.example.el similarity index 100% rename from core/templates/packages.el rename to core/templates/packages.example.el From bff04ed35c794f5392d09a680842a201afaa6f66 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 12:09:05 -0500 Subject: [PATCH 321/983] Fix font-spec in config.el template --- core/templates/config.example.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/templates/config.example.el b/core/templates/config.example.el index cd548901a..102881e80 100644 --- a/core/templates/config.example.el +++ b/core/templates/config.example.el @@ -19,8 +19,8 @@ ;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd ;; font string. You generally only need these two: ;; test -(setq doom-font (font-spec "monospace" :size 14) - doom-variable-pitch-font (font-spec "sans")) +(setq doom-font (font-spec :family "monospace" :size 14) + doom-variable-pitch-font (font-spec :family "sans")) ;; There are two ways to load a theme. Both assume the theme is installed and ;; available. You can either set `doom-theme' or manually load a theme with the From 27cabea6b6f2078c6d76cb0449473c5d7c023a5f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 13:40:06 -0500 Subject: [PATCH 322/983] Fix gs in org-mode #2218 Also makes +evil/easymotion generic; it can now be moved to any key, and new keys can be added to the event, rather than having to wait for evilem-map to become available. Also fixes +org/goto-visible if used before avy is loaded. Relevant to #1672 --- modules/config/default/+evil-bindings.el | 3 ++- modules/editor/evil/autoload/evil.el | 14 +++----------- modules/lang/org/autoload/org-avy.el | 1 + 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 27d556271..365e34aba 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -87,7 +87,8 @@ :m "gs" #'+evil/easymotion ; lazy-load `evil-easymotion' (:after org :map org-mode-map - :m "gsh" #'+org/goto-visible) + :prefix "" + "h" #'+org/goto-visible) (:when (featurep! :editor multiple-cursors) :prefix "gz" diff --git a/modules/editor/evil/autoload/evil.el b/modules/editor/evil/autoload/evil.el index ccbdebfdf..2575b4e05 100644 --- a/modules/editor/evil/autoload/evil.el +++ b/modules/editor/evil/autoload/evil.el @@ -88,17 +88,9 @@ the only window, use evil-window-move-* (e.g. `evil-window-move-far-left')." "Invoke and lazy-load `evil-easymotion' without compromising which-key integration." (interactive) - (let ((prefix (this-command-keys))) - (evil-define-key* 'motion 'global prefix nil) - (evilem-default-keybindings (key-description prefix)) - (setq prefix-arg current-prefix-arg - unread-command-events - (mapcar (lambda (e) (cons t e)) - (vconcat (when evil-this-operator - (where-is-internal evil-this-operator - evil-normal-state-map - t)) - prefix))))) + (evilem-default-keybindings "") + (setq prefix-arg current-prefix-arg) + (push '(t . easymotion) unread-command-events)) ;;;###autoload (autoload '+evil:apply-macro "editor/evil/autoload/evil" nil t) (evil-define-operator +evil:apply-macro (beg end) diff --git a/modules/lang/org/autoload/org-avy.el b/modules/lang/org/autoload/org-avy.el index 0e10663e7..6112e2392 100644 --- a/modules/lang/org/autoload/org-avy.el +++ b/modules/lang/org/autoload/org-avy.el @@ -3,6 +3,7 @@ ;;;###autoload (defun +org-headline-avy () "TODO" + (require 'avy) (save-excursion (when-let* ((org-reverse-note-order t) (pos (avy-with avy-goto-line (avy-jump (rx bol (1+ "*") (1+ blank)))))) From 52bf238b2f51490c18e434b928dc8ca7e6bae8f3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 13:53:54 -0500 Subject: [PATCH 323/983] completion/ivy: make counsel-search use standard url --- modules/completion/ivy/config.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 562d9a6db..99d8950f8 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -265,7 +265,11 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." (ivy-add-actions 'counsel-ag ; also applies to `counsel-rg' - '(("O" +ivy-git-grep-other-window-action "open in other window")))) + '(("O" +ivy-git-grep-other-window-action "open in other window"))) + + ;; `counsel-search' + (setf (nth 1 (alist-get 'ddg counsel-search-engines-alist)) + "https://duckduckgo.com/?q=")) (use-package! counsel-projectile From 8a080e037c58eefebd8415984c026e6c8deff936 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 14:03:35 -0500 Subject: [PATCH 324/983] completion/ivy: general refactor --- modules/completion/ivy/autoload/ivy.el | 26 ++++---- modules/completion/ivy/config.el | 88 +++++++++++++------------- 2 files changed, 59 insertions(+), 55 deletions(-) diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index 3bbb1818e..81f9b923e 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -223,19 +223,23 @@ non-project, `projectile-find-file' if in a big project (more than The point of this is to avoid Emacs locking up indexing massive file trees." (interactive) - (call-interactively - (cond ((or (file-equal-p default-directory "~") - (when-let (proot (doom-project-root)) - (file-equal-p proot "~"))) - #'counsel-find-file) + ;; Spoof the command so that ivy/counsel will display the (well fleshed-out) + ;; actions list for `counsel-find-file' on C-o. The actions list for the other + ;; commands aren't as well configured or are empty. + (let ((this-command 'counsel-find-file)) + (call-interactively + (cond ((or (file-equal-p default-directory "~") + (when-let (proot (doom-project-root)) + (file-equal-p proot "~"))) + #'counsel-find-file) - ((doom-project-p) - (let ((files (projectile-current-project-files))) - (if (<= (length files) ivy-sort-max-size) - #'counsel-projectile-find-file - #'projectile-find-file))) + ((doom-project-p) + (let ((files (projectile-current-project-files))) + (if (<= (length files) ivy-sort-max-size) + #'counsel-projectile-find-file + #'projectile-find-file))) - (#'counsel-file-jump)))) + (#'counsel-file-jump))))) ;;;###autoload (cl-defun +ivy-file-search (&key query in all-files (recursive t)) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 99d8950f8..0e49ae978 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -203,6 +203,49 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." ;; of its own, on top of the defaults. (setq ivy-initial-inputs-alist nil) + ;; Integrate with `helpful' + (setq counsel-describe-function-function #'helpful-callable + counsel-describe-variable-function #'helpful-variable) + + ;; Record in jumplist when opening files via counsel-{ag,rg,pt,git-grep} + (add-hook 'counsel-grep-post-action-hook #'better-jumper-set-jump) + (ivy-add-actions + 'counsel-ag ; also applies to `counsel-rg' + '(("O" +ivy-git-grep-other-window-action "open in other window"))) + + ;; Make `counsel-compile' projectile-aware (if you prefer it over + ;; `+ivy/compile' and `+ivy/project-compile') + (add-to-list 'counsel-compile-root-functions #'projectile-project-root) + (after! savehist + ;; Persist `counsel-compile' history + (add-to-list 'savehist-additional-variables 'counsel-compile-history)) + + ;; `counsel-locate' + (when IS-MAC + ;; Use spotlight on mac by default since it doesn't need any additional setup + (setq counsel-locate-cmd #'counsel-locate-cmd-mdfind)) + + ;; `swiper' + ;; Don't mess with font-locking on the dashboard; it causes breakages + (add-to-list 'swiper-font-lock-exclude #'+doom-dashboard-mode) + + ;; `counsel-find-file' + (setq counsel-find-file-ignore-regexp "\\(?:^[#.]\\)\\|\\(?:[#~]$\\)\\|\\(?:^Icon?\\)") + (ivy-add-actions + 'counsel-find-file + '(("p" (lambda (path) (with-ivy-window (insert (file-relative-name path default-directory)))) + "insert relative path") + ("P" (lambda (path) (with-ivy-window (insert path))) + "insert absolute path") + ("l" (lambda (path) (with-ivy-window (insert (format "[[./%s]]" (file-relative-name path default-directory))))) + "insert relative org-link") + ("L" (lambda (path) (with-ivy-window (insert (format "[[%s]]" path)))) + "Insert absolute org-link"))) + + ;; `counsel-search' + (setf (nth 1 (alist-get 'ddg counsel-search-engines-alist)) + "https://duckduckgo.com/?q=") + ;; REVIEW Move this somewhere else and perhaps generalize this so both ;; ivy/helm users can enjoy it. (defadvice! +ivy--counsel-file-jump-use-fd-rg-a (args) @@ -226,50 +269,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." (push (buffer-substring (+ offset (line-beginning-position)) (line-end-position)) files) (forward-line 1)) - (nreverse files)))))) - - ;; Integrate with `helpful' - (setq counsel-describe-function-function #'helpful-callable - counsel-describe-variable-function #'helpful-variable) - - ;; Make `counsel-compile' projectile-aware (if you prefer it over - ;; `+ivy/compile' and `+ivy/project-compile') - (add-to-list 'counsel-compile-root-functions #'projectile-project-root) - (after! savehist - ;; Persist `counsel-compile' history - (add-to-list 'savehist-additional-variables 'counsel-compile-history)) - - ;; Use spotlight on mac for `counsel-locate' by default, since it doesn't need - ;; any additional setup. - (when IS-MAC - (setq counsel-locate-cmd #'counsel-locate-cmd-mdfind)) - - ;; Don't mess with font-locking on the dashboard; it causes breakages - (add-to-list 'swiper-font-lock-exclude #'+doom-dashboard-mode) - - ;; Record in jumplist when opening files via counsel-{ag,rg,pt,git-grep} - (add-hook 'counsel-grep-post-action-hook #'better-jumper-set-jump) - - ;; Configure `counsel-find-file' - (setq counsel-find-file-ignore-regexp "\\(?:^[#.]\\)\\|\\(?:[#~]$\\)\\|\\(?:^Icon?\\)") - (ivy-add-actions - 'counsel-find-file - '(("p" (lambda (path) (with-ivy-window (insert (file-relative-name path default-directory)))) - "insert relative path") - ("P" (lambda (path) (with-ivy-window (insert path))) - "insert absolute path") - ("l" (lambda (path) (with-ivy-window (insert (format "[[./%s]]" (file-relative-name path default-directory))))) - "insert relative org-link") - ("L" (lambda (path) (with-ivy-window (insert (format "[[%s]]" path)))) - "Insert absolute org-link"))) - - (ivy-add-actions - 'counsel-ag ; also applies to `counsel-rg' - '(("O" +ivy-git-grep-other-window-action "open in other window"))) - - ;; `counsel-search' - (setf (nth 1 (alist-get 'ddg counsel-search-engines-alist)) - "https://duckduckgo.com/?q=")) + (nreverse files))))))) (use-package! counsel-projectile From ebf3739cf175b9598efc4dbca6f60a35bcda29b4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 14:03:45 -0500 Subject: [PATCH 325/983] Speed up evil-ex search in magit or long/large buffers --- modules/editor/evil/config.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 63a5e8fa3..3099e5ab4 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -54,6 +54,11 @@ directives. By default, this only recognizes C directives.") ;; to do highlighting them all. evil-ex-interactive-search-highlight 'selected-window) + ;; Slow this down from 0.02 to prevent blocking in large or folded buffers + ;; like magit while incrementally highlighting matches. + (setq-hook! 'magit-mode-hook evil-ex-hl-update-delay 0.2) + (setq-hook! 'so-long-minor-mode-hook evil-ex-hl-update-delay 0.25) + :config (evil-select-search-module 'evil-search-module 'evil-search) From 6c0d71eb65385a2f0d42ba93befdba3a918d9691 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 18:33:11 -0500 Subject: [PATCH 326/983] completion/ivy: reduce min-chars for counsel-search to 2 From default of 3 --- modules/completion/ivy/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 0e49ae978..bf34992c8 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -43,6 +43,7 @@ This uses a search algorithm other than ivy's default.") (t . +ivy-alternative-search)) ivy-more-chars-alist '((counsel-rg . 1) + (counsel-search . 2) (t . 3))) (define-key! From 0e4d25d533dc0d4fff29cb63cf99617bf875dc10 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 20:37:55 -0500 Subject: [PATCH 327/983] ui/modeline: prevent cut-off popups #2219 By forcing resized windows to take non-standard modeline height into account. --- modules/ui/modeline/+light.el | 8 -------- modules/ui/modeline/config.el | 9 +++++++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/ui/modeline/+light.el b/modules/ui/modeline/+light.el index 006688286..923774324 100644 --- a/modules/ui/modeline/+light.el +++ b/modules/ui/modeline/+light.el @@ -68,14 +68,6 @@ side of the modeline, and whose CDR is the right-hand side.") ;; ;;; Helpers -(defvar +modeline--redisplayed-p nil) -(defadvice! modeline-recalculate-height-a (&optional _force &rest _ignored) - "Ensure that window resizing functions take modeline height into account." - :before '(fit-window-to-buffer resize-temp-buffer-window) - (unless +modeline--redisplayed-p - (setq-local +modeline--redisplayed-p t) - (redisplay t))) - ;;; `active' (defvar +modeline--active-window (selected-window)) diff --git a/modules/ui/modeline/config.el b/modules/ui/modeline/config.el index 54e09fff5..337074c27 100644 --- a/modules/ui/modeline/config.el +++ b/modules/ui/modeline/config.el @@ -4,6 +4,15 @@ (load! "+light")) +(defvar +modeline--redisplayed-p nil) +(defadvice! modeline-recalculate-height-a (&optional _force &rest _ignored) + "Ensure that window resizing functions take modeline height into account." + :before '(fit-window-to-buffer resize-temp-buffer-window) + (unless +modeline--redisplayed-p + (setq-local +modeline--redisplayed-p t) + (redisplay t))) + + (use-package! doom-modeline :unless (featurep! +light) :hook (after-init . doom-modeline-mode) From 1cb8ec630271e87e7395577451828270b2d1b0c8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 20:46:09 -0500 Subject: [PATCH 328/983] Fix doom/kill-all-buffers triggering dashboard refresh too soon #2219 --- core/autoload/buffers.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/autoload/buffers.el b/core/autoload/buffers.el index 65c094eb2..c88f6cedb 100644 --- a/core/autoload/buffers.el +++ b/core/autoload/buffers.el @@ -286,10 +286,10 @@ belong to the current project." (if (null buffer-list) (message "No buffers to kill") (save-some-buffers) + (delete-other-windows) (when (memq (current-buffer) buffer-list) (switch-to-buffer (doom-fallback-buffer))) - (mapc #'doom-kill-buffer-and-windows buffer-list) - (delete-other-windows) + (mapc #'kill-buffer buffer-list) (when interactive (message "Killed %s buffers" (- (length buffer-list) From 2ed4e0d55cfbbfa2fe1b329b3176b663aa53b94d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 20:47:13 -0500 Subject: [PATCH 329/983] bin/doom: warn if run as root --- bin/doom | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/doom b/bin/doom index 47dc9b7cd..36bb10582 100755 --- a/bin/doom +++ b/bin/doom @@ -54,6 +54,14 @@ with a different private module." (push command args) (setq command "help")) + (when (equal (user-real-uid) 0) + (message + (concat "WARNING: This script is running as root. This isn't necessary and is likely\n" + "unintentional. It will cause file permissions errors later if you use this\n" + "Doom installation on a non-root account.\n")) + (unless (or doom-auto-accept (y-or-n-p "Continue anyway?")) + (user-error "Aborted"))) + ;; Reload core in case any of the directories were changed. (when (or emacsdir doomdir localdir) (load! "core/core.el" user-emacs-directory)) From a54098a0983555ad517b0e9542c4b7da8908643e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 20:58:52 -0500 Subject: [PATCH 330/983] Fix face-background calls in +modeline-refresh-bars-h Third argument should be a boolean; symbols are treated as references to faces to inherit from. --- modules/ui/modeline/+light.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui/modeline/+light.el b/modules/ui/modeline/+light.el index 923774324..6e1523737 100644 --- a/modules/ui/modeline/+light.el +++ b/modules/ui/modeline/+light.el @@ -188,12 +188,12 @@ LHS and RHS will accept." (setq +modeline-bar (+modeline--make-xpm (and +modeline-bar-width - (face-background '+modeline-bar nil 'inherit)) + (face-background '+modeline-bar nil t)) width height) +modeline-inactive-bar (+modeline--make-xpm (and +modeline-bar-width - (face-background '+modeline-bar-inactive nil 'inherit)) + (face-background '+modeline-bar-inactive nil t)) width height))))) (add-hook! 'doom-change-font-size-hook From 74e1143ac0a551ce3ba0a4386c56d8f55c28d1f6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 21:48:35 -0500 Subject: [PATCH 331/983] Don't disable all-the-icons in tty Emacs Too much hassle to police. I'll leave it to users to disable. --- core/core-ui.el | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index af27e4deb..d17844037 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -461,16 +461,7 @@ treat Emacs as a non-application window." all-the-icons-fileicon all-the-icons-wicon all-the-icons-material - all-the-icons-alltheicon) - :init - (defadvice! doom--disable-all-the-icons-in-tty-a (orig-fn &rest args) - "Return a blank string in tty Emacs, which doesn't support multiple fonts." - :around '(all-the-icons-octicon all-the-icons-material - all-the-icons-faicon all-the-icons-fileicon - all-the-icons-wicon all-the-icons-alltheicon) - (if (display-multi-font-p) - (apply orig-fn args) - ""))) + all-the-icons-alltheicon)) ;;;###package hide-mode-line-mode (add-hook! '(completion-list-mode-hook Man-mode-hook) From 7033b589cb06169dd4722cc2a64cb8966bb31791 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 23:00:54 -0500 Subject: [PATCH 332/983] Start server after brief idle delay --- core/core-editor.el | 1 + 1 file changed, 1 insertion(+) diff --git a/core/core-editor.el b/core/core-editor.el index 3fb9252fe..bae568c30 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -267,6 +267,7 @@ files, so we replace calls to `pp' with the much faster `prin1'." (use-package! server :when (display-graphic-p) :after-call pre-command-hook after-find-file focus-out-hook + :defer 1 :init (when-let (name (getenv "EMACS_SERVER_NAME")) (setq server-name name)) From a15ab4a3f2bbe4628ae2d54f2e9ab8b9c5d0aa3d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Dec 2019 23:04:07 -0500 Subject: [PATCH 333/983] lang/web: add bang to :enhtml & :dehtml BANG = copy result to clipboard instead of inserting into buffer. --- modules/lang/web/autoload/evil.el | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/modules/lang/web/autoload/evil.el b/modules/lang/web/autoload/evil.el index fcc563971..ebbd100fa 100644 --- a/modules/lang/web/autoload/evil.el +++ b/modules/lang/web/autoload/evil.el @@ -2,20 +2,25 @@ ;;;###if (featurep! :editor evil) ;;;###autoload (autoload '+web:encode-html-entities "lang/web/autoload/evil" nil t) -(evil-define-operator +web:encode-html-entities (beg end &optional input) +(evil-define-operator +web:encode-html-entities (beg end &optional bang input) "Encodes HTML entities in INPUT or the selected region." - (interactive "
") + (interactive "") (cond (input - (insert (+web-encode-entities input))) + (let ((result (+web-encode-entities input))) + (if bang + (kill-new result) + (insert result)))) ((and beg end) (+web/encode-entities-region beg end)))) ;;;###autoload (autoload '+web:decode-html-entities "lang/web/autoload/evil" nil t) -(evil-define-operator +web:decode-html-entities (beg end &optional input) +(evil-define-operator +web:decode-html-entities (beg end &optional bang input) "Decodes HTML entities in INPUT or the selected region." - (interactive "") + (interactive "") (cond (input - (insert (+web-decode-entities input))) + (let ((result (+web-decode-entities input))) + (if bang + (kill-new result) + (insert result)))) ((and beg end) (+web/decode-entities-region beg end)))) - From 95bea5b95b9695505bdd5e6692a8bca2e97e8f44 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 01:37:53 -0500 Subject: [PATCH 334/983] Disable hl-line when non-evil selection is active This was already the case for evil users, now it is the case for non-evil users. --- core/core-ui.el | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index d17844037..795f45c25 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -404,19 +404,20 @@ treat Emacs as a non-application window." (setq hl-line-sticky-flag nil global-hl-line-sticky-flag nil) - ;; Disable `hl-line' in evil-visual mode (temporarily). `hl-line' can make the - ;; selection region harder to see while in evil visual mode. - (after! evil - (defvar doom-buffer-hl-line-mode nil) - (add-hook! 'evil-visual-state-entry-hook - (defun doom-disable-hl-line-h () - (when hl-line-mode - (setq-local doom-buffer-hl-line-mode t) - (hl-line-mode -1)))) - (add-hook! 'evil-visual-state-exit-hook - (defun doom-enable-hl-line-maybe-h () - (when doom-buffer-hl-line-mode - (hl-line-mode +1)))))) + ;; Temporarily disable `hl-line' when selection is active, since it doesn't + ;; serve much purpose when the selection is so much more visible. + (defvar doom-buffer-hl-line-mode nil) + + (add-hook! '(evil-visual-state-entry-hook activate-mark-hook) + (defun doom-disable-hl-line-h () + (when hl-line-mode + (setq-local doom-buffer-hl-line-mode t) + (hl-line-mode -1)))) + + (add-hook! '(evil-visual-state-exit-hook deactivate-mark-hook) + (defun doom-enable-hl-line-maybe-h () + (when doom-buffer-hl-line-mode + (hl-line-mode +1))))) (use-package! winner From f075c3071060a8dcf091291628d323df8d8ee6f4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 01:38:43 -0500 Subject: [PATCH 335/983] ui/modeline: refactor encoding segment --- modules/ui/modeline/+light.el | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/modules/ui/modeline/+light.el b/modules/ui/modeline/+light.el index 6e1523737..ffca6f15c 100644 --- a/modules/ui/modeline/+light.el +++ b/modules/ui/modeline/+light.el @@ -464,16 +464,19 @@ lines are selected, or the NxM dimensions of a block selection.") ;;; `+modeline-encoding' (def-modeline-var! +modeline-encoding '(:eval - (concat (pcase (coding-system-eol-type buffer-file-coding-system) - (0 " LF ") - (1 " RLF ") - (2 " CR ")) + (concat (coding-system-eol-type-mnemonic buffer-file-coding-system) + " " (let ((sys (coding-system-plist buffer-file-coding-system))) (if (memq (plist-get sys :category) '(coding-category-undecided coding-category-utf-8)) "UTF-8" - (upcase (symbol-name (plist-get sys :name))))) - " "))) + (upcase (symbol-name (plist-get sys :name)))))))) + +;; Clearer mnemonic labels for EOL styles +(setq eol-mnemonic-dos "CRLF" + eol-mnemonic-mac "CR" + eol-mnemonic-unix "LF" + eol-mnemonic-undecided "??") ;; @@ -491,8 +494,9 @@ lines are selected, or the NxM dimensions of a block selection.") (vc-mode (" " ,(all-the-icons-octicon "git-branch" :v-adjust 0.0) vc-mode " ")) - " " + " " +modeline-encoding + " " (+modeline-checker ("" +modeline-checker " ")))) (def-modeline! project From 4741e322df30d3f556c14fa1b84b4cfc2f10488c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 01:39:10 -0500 Subject: [PATCH 336/983] ui/modeline: fix VC branch icon --- modules/ui/modeline/+light.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/modeline/+light.el b/modules/ui/modeline/+light.el index ffca6f15c..3f9870805 100644 --- a/modules/ui/modeline/+light.el +++ b/modules/ui/modeline/+light.el @@ -488,7 +488,7 @@ lines are selected, or the NxM dimensions of a block selection.") " " +modeline-buffer-identification +modeline-position) - '("" + `("" mode-line-misc-info +modeline-modes (vc-mode (" " From 960f403e2eb8e5f9db76ad01a0437022865cf814 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 01:49:10 -0500 Subject: [PATCH 337/983] Fix misaligned dashboard on workspace switch #2219 Only occurs in daemon GUI frames, for some reason. --- modules/ui/doom-dashboard/config.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index 7df29520c..b151f7fed 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -125,6 +125,10 @@ PLIST can have the following properties: ;; `persp-mode' integration: update `default-directory' when switching perspectives (add-hook 'persp-created-functions #'+doom-dashboard--persp-record-project-h) (add-hook 'persp-activated-functions #'+doom-dashboard--persp-detect-project-h) + ;; HACK Fix #2219 where, in GUI daemon frames, the dashboard loses center + ;; alignment after switching (or killing) workspaces. + (when (daemonp) + (add-hook 'persp-activated-functions #'+doom-dashboard-reload-maybe-h)) (add-hook 'persp-before-switch-functions #'+doom-dashboard--persp-record-project-h))) (add-hook 'doom-init-ui-hook #'+doom-dashboard-init-h) From 491e80a5683e6c96c09189228c739973c23fe1dc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 02:14:36 -0500 Subject: [PATCH 338/983] Fix cut-off which-key popups #2219 --- modules/ui/popup/+hacks.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index 1418e8dc5..c3a76e7a2 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -316,7 +316,8 @@ Ugh, such an ugly hack." (after! which-key (when (eq which-key-popup-type 'side-window) (setq which-key-popup-type 'custom - which-key-custom-popup-max-dimensions-function (lambda (_) (which-key--side-window-max-dimensions)) + which-key-custom-popup-max-dimensions-function + (lambda (_) (which-key--side-window-max-dimensions)) which-key-custom-hide-popup-function #'which-key--hide-buffer-side-window which-key-custom-show-popup-function (lambda (act-popup-dim) @@ -324,6 +325,8 @@ Ugh, such an ugly hack." (lambda (buffer alist) (+popup-display-buffer-stacked-side-window-fn buffer (append '((vslot . -9999)) alist))))) + ;; HACK Fix #2219 where the which-key popup would get cut off. + (setcar act-popup-dim (1+ (car act-popup-dim))) (which-key--show-buffer-side-window act-popup-dim)))))) From a49c0b669127389ac07645ad2cbb089f1f492237 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 02:24:11 -0500 Subject: [PATCH 339/983] Output feedback from buffer/session kill commands --- core/autoload/buffers.el | 42 +++++++++++--------- modules/ui/workspaces/autoload/workspaces.el | 19 ++++++--- 2 files changed, 37 insertions(+), 24 deletions(-) diff --git a/core/autoload/buffers.el b/core/autoload/buffers.el index c88f6cedb..f997f2d68 100644 --- a/core/autoload/buffers.el +++ b/core/autoload/buffers.el @@ -272,6 +272,12 @@ If DONT-SAVE, don't prompt to save modified buffers (discarding their changes)." (set-buffer-modified-p nil))) (doom-kill-buffer-fixup-windows buffer)) + +(defun doom--message-or-count (interactive message count) + (if interactive + (message message count) + count)) + ;;;###autoload (defun doom/kill-all-buffers (&optional buffer-list interactive) "Kill all buffers and closes their windows. @@ -290,10 +296,10 @@ belong to the current project." (when (memq (current-buffer) buffer-list) (switch-to-buffer (doom-fallback-buffer))) (mapc #'kill-buffer buffer-list) - (when interactive - (message "Killed %s buffers" - (- (length buffer-list) - (length (cl-remove-if-not #'buffer-live-p buffer-list))))))) + (doom--message-or-count + interactive "Killed %d buffers" + (- (length buffer-list) + (length (cl-remove-if-not #'buffer-live-p buffer-list)))))) ;;;###autoload (defun doom/kill-other-buffers (&optional buffer-list interactive) @@ -308,10 +314,10 @@ project." (doom-buffer-list))) t)) (mapc #'doom-kill-buffer-and-windows buffer-list) - (when interactive - (message "Killed %s buffers" - (- (length buffer-list) - (length (cl-remove-if-not #'buffer-live-p buffer-list)))))) + (doom--message-or-count + interactive "Killed %d other buffers" + (- (length buffer-list) + (length (cl-remove-if-not #'buffer-live-p buffer-list))))) ;;;###autoload (defun doom/kill-matching-buffers (pattern &optional buffer-list interactive) @@ -341,10 +347,10 @@ current project." (if current-prefix-arg (doom-project-buffer-list))) t)) (mapc #'kill-buffer buffer-list) - (when interactive - (message "Killed %s buried buffers" - (- (length buffer-list) - (length (cl-remove-if-not #'buffer-live-p buffer-list)))))) + (doom--message-or-count + interactive "Killed %d buried buffers" + (- (length buffer-list) + (length (cl-remove-if-not #'buffer-live-p buffer-list))))) ;;;###autoload (defun doom/kill-project-buffers (project &optional interactive) @@ -362,9 +368,9 @@ current project." nil) t)) (when project - (let ((buffers (doom-project-buffer-list project))) - (doom-kill-buffers-fixup-windows buffers) - (when interactive - (message "Killed %d buffer(s)" - (- (length buffers) - (length (cl-remove-if-not #'buffer-live-p buffers)))))))) + (let ((buffer-list (doom-project-buffer-list project))) + (doom-kill-buffers-fixup-windows buffer-list) + (doom--message-or-count + interactive "Killed %d project buffers" + (- (length buffer-list) + (length (cl-remove-if-not #'buffer-live-p buffer-list))))))) diff --git a/modules/ui/workspaces/autoload/workspaces.el b/modules/ui/workspaces/autoload/workspaces.el index 349c6ddfd..41099dab9 100644 --- a/modules/ui/workspaces/autoload/workspaces.el +++ b/modules/ui/workspaces/autoload/workspaces.el @@ -268,13 +268,20 @@ workspace to delete." ('error (+workspace-error ex t)))) ;;;###autoload -(defun +workspace/kill-session () +(defun +workspace/kill-session (&optional interactive) "Delete the current session, all workspaces, windows and their buffers." - (interactive) - (unless (cl-every #'+workspace-delete (+workspace-list-names)) - (+workspace-error "Could not clear session")) - (+workspace-switch +workspaces-main t) - (doom/kill-all-buffers (buffer-list))) + (interactive (list t)) + (let ((windows (length (window-list))) + (persps (length (+workspace-list-names))) + (buffers 0)) + (let ((persp-autokill-buffer-on-remove t)) + (unless (cl-every #'+workspace-delete (+workspace-list-names)) + (+workspace-error "Could not clear session"))) + (+workspace-switch +workspaces-main t) + (setq buffers (doom/kill-all-buffers (buffer-list))) + (when interactive + (message "Killed %d workspace(s), %d window(s) & %d buffer(s)" + persps windows buffers)))) ;;;###autoload (defun +workspace/kill-session-and-quit () From c1879945fdc2269aaeb91e6f650d1959a5bc7407 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 03:28:07 -0500 Subject: [PATCH 340/983] Replace doom/backward-kill-to-bol-and-indent WIth new evil-delete-back-to-indentation, with behaves exactly as C-u does in vim. --- core/autoload/text.el | 14 -------------- modules/config/default/+evil-bindings.el | 7 +++---- modules/config/default/config.el | 2 +- modules/editor/evil/config.el | 1 + modules/editor/multiple-cursors/config.el | 2 +- modules/term/eshell/config.el | 2 +- 6 files changed, 7 insertions(+), 21 deletions(-) diff --git a/core/autoload/text.el b/core/autoload/text.el index 8c08c5a67..f7f67f0d1 100644 --- a/core/autoload/text.el +++ b/core/autoload/text.el @@ -155,20 +155,6 @@ true end of the line. The opposite of `doom/backward-to-bol-or-indent'." tab-width (- tab-width movement))))))))) -;;;###autoload -(defun doom/backward-kill-to-bol-and-indent () - "Kill line to the first non-blank character. If invoked again -afterwards, kill line to beginning of line." - (interactive) - (let ((empty-line-p (save-excursion (beginning-of-line) - (looking-at-p "[ \t]*$")))) - (funcall (if (fboundp 'evil-delete) - #'evil-delete - #'delete-region) - (point-at-bol) (point)) - (unless empty-line-p - (indent-according-to-mode)))) - ;;;###autoload (defun doom/retab (arg &optional beg end) "Converts tabs-to-spaces or spaces-to-tabs within BEG and END (defaults to diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 365e34aba..00a8e025a 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -1,10 +1,9 @@ ;;; config/default/+bindings.el -*- lexical-binding: t; -*- (when (featurep! :editor evil +everywhere) - ;; Have C-u behave similarly to `doom/backward-to-bol-or-indent'. + ;; `evil' provides `C-u' (bound to `evil-delete-back-to-indentation') ;; NOTE SPC u replaces C-u as the universal argument. - (map! :i "C-u" #'doom/backward-kill-to-bol-and-indent - :i "C-w" #'backward-kill-word + (map! :i "C-w" #'backward-kill-word ;; Vimmish ex motion keys :i "C-b" #'backward-word :i "C-f" #'forward-word) @@ -23,7 +22,7 @@ "C-b" #'backward-word "C-f" #'forward-word "C-r" #'evil-paste-from-register - "C-u" #'doom/backward-kill-to-bol-and-indent + "C-u" #'evil-delete-back-to-indentation "C-v" #'yank "C-w" #'backward-kill-word "C-z" (λ! (ignore-errors (call-interactively #'undo))) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index f1112c064..788c7d326 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -262,7 +262,7 @@ "s-/" (λ! (save-excursion (comment-line 1))) :n "s-/" #'evilnc-comment-or-uncomment-lines :v "s-/" #'evilnc-comment-operator - :gi [s-backspace] #'doom/backward-kill-to-bol-and-indent + :gi [s-backspace] #'evil-delete-back-to-indentation :gi [s-left] #'doom/backward-to-bol-or-indent :gi [s-right] #'doom/forward-to-last-non-comment-or-eol :gi [M-backspace] #'backward-kill-word diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 3099e5ab4..c2a2dad43 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -22,6 +22,7 @@ directives. By default, this only recognizes C directives.") ;; to loading. (defvar evil-want-C-i-jump (or (daemonp) (display-graphic-p))) (defvar evil-want-C-u-scroll t) +(defvar evil-want-C-u-delete t) (defvar evil-want-C-w-scroll t) (defvar evil-want-Y-yank-to-eol t) (defvar evil-want-abbrev-expand-on-insert-exit nil) diff --git a/modules/editor/multiple-cursors/config.el b/modules/editor/multiple-cursors/config.el index 3e85d7430..a52ffea66 100644 --- a/modules/editor/multiple-cursors/config.el +++ b/modules/editor/multiple-cursors/config.el @@ -67,7 +67,7 @@ (company-complete-common . evil-mc-execute-default-complete) (doom/backward-to-bol-or-indent . evil-mc-execute-default-call) (doom/forward-to-last-non-comment-or-eol . evil-mc-execute-default-call) - (doom/backward-kill-to-bol-and-indent . evil-mc-execute-default-call) + (evil-delete-back-to-indentation . evil-mc-execute-default-call) ;; Have evil-mc work with explicit `evil-escape' (on C-g) (evil-escape . evil-mc-execute-default-evil-normal-state) ;; Add `evil-org' support diff --git a/modules/term/eshell/config.el b/modules/term/eshell/config.el index 89deb3f1e..eae619ba8 100644 --- a/modules/term/eshell/config.el +++ b/modules/term/eshell/config.el @@ -149,7 +149,7 @@ You should use `set-eshell-alias!' to change this.") [remap split-window-below] #'+eshell/split-below [remap split-window-right] #'+eshell/split-right [remap doom/backward-to-bol-or-indent] #'eshell-bol - [remap doom/backward-kill-to-bol-and-indent] #'eshell-kill-input + [remap evil-delete-back-to-indentation] #'eshell-kill-input [remap evil-window-split] #'+eshell/split-below [remap evil-window-vsplit] #'+eshell/split-right))) (add-hook! 'eshell-mode-hook From 8386c95fb17b7396d48588e6d8591f97267db72d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 03:29:34 -0500 Subject: [PATCH 341/983] ui/doom-dashboard: fix fix for #2219 What a fix --- modules/ui/doom-dashboard/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index b151f7fed..2659ecd64 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -206,7 +206,7 @@ PLIST can have the following properties: (goto-char (point-min)) (forward-button 1)))) -(defun +doom-dashboard-reload-maybe-h () +(defun +doom-dashboard-reload-maybe-h (&rest _) "Reload the dashboard or its state. If this isn't a dashboard buffer, move along, but record its `default-directory' From bbd02c8fcaab579b4a3460b20e62bc3e22eef6b1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 03:39:19 -0500 Subject: [PATCH 342/983] evil-want-C-w-delete = t & remove C-b/C-f keybinds M-b and M-f already exist for moving by word, so I'll leave C-b and C-f to their defaults. --- modules/config/default/+evil-bindings.el | 13 +++---------- modules/editor/evil/config.el | 1 + 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 00a8e025a..1ccc59f81 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -1,17 +1,12 @@ ;;; config/default/+bindings.el -*- lexical-binding: t; -*- (when (featurep! :editor evil +everywhere) - ;; `evil' provides `C-u' (bound to `evil-delete-back-to-indentation') ;; NOTE SPC u replaces C-u as the universal argument. - (map! :i "C-w" #'backward-kill-word - ;; Vimmish ex motion keys - :i "C-b" #'backward-word - :i "C-f" #'forward-word) ;; Minibuffer (define-key! evil-ex-completion-map - "C-a" #'move-beginning-of-line - "C-b" #'backward-word + "C-a" #'evil-beginning-of-line + "C-b" #'evil-backward-char "C-s" (if (featurep! :completion ivy) #'counsel-minibuffer-history #'helm-minibuffer-history)) @@ -19,12 +14,10 @@ (define-key! :keymaps +default-minibuffer-maps [escape] #'abort-recursive-edit "C-a" #'move-beginning-of-line - "C-b" #'backward-word - "C-f" #'forward-word "C-r" #'evil-paste-from-register "C-u" #'evil-delete-back-to-indentation "C-v" #'yank - "C-w" #'backward-kill-word + "C-w" #'evil-delete-backward-word "C-z" (λ! (ignore-errors (call-interactively #'undo))) ;; Scrolling lines "C-j" #'next-line diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index c2a2dad43..b526bb5f0 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -24,6 +24,7 @@ directives. By default, this only recognizes C directives.") (defvar evil-want-C-u-scroll t) (defvar evil-want-C-u-delete t) (defvar evil-want-C-w-scroll t) +(defvar evil-want-C-w-delete t) (defvar evil-want-Y-yank-to-eol t) (defvar evil-want-abbrev-expand-on-insert-exit nil) From 8562fc0aa3ef14768f253a5c5c615d5394a50a90 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 03:51:53 -0500 Subject: [PATCH 343/983] editor/evil: use event for custom keybinds --- modules/editor/evil/config.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index b526bb5f0..065dbd66d 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -557,8 +557,7 @@ To change these keys see `+evil-repeat-keys'." :textobj "x" #'evil-inner-xml-attr #'evil-outer-xml-attr ;; evil-easymotion - (:after evil-easymotion - :map evilem-map + (:prefix "" ; see `+evil/easymotion' "a" (evilem-create #'evil-forward-arg) "A" (evilem-create #'evil-backward-arg) "s" #'evil-avy-goto-char-2 From baae6b17116f34115dd0d70be4dffda7d9ca907c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 03:59:46 -0500 Subject: [PATCH 344/983] Rename +evil/paste-preserve-register => +evil/alt-paste Now does the invers of evil-kill-on-visual-paste --- modules/editor/evil/autoload/evil.el | 9 +++++---- modules/editor/evil/config.el | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/editor/evil/autoload/evil.el b/modules/editor/evil/autoload/evil.el index 2575b4e05..2393d5d93 100644 --- a/modules/editor/evil/autoload/evil.el +++ b/modules/editor/evil/autoload/evil.el @@ -31,11 +31,12 @@ (evil-visual-restore)) ;;;###autoload -(defun +evil/paste-preserve-register () - "Call `evil-paste-after' without overwriting the clipboard (by writing to the -0 register instead). This allows you to paste the same text again afterwards." +(defun +evil/alt-paste () + "Call `evil-paste-after' but invert `evil-kill-on-visual-paste'. +By default, this replaces the selection with what's in the clipboard without +replacing its contents." (interactive) - (let ((evil-this-register ?0)) + (let ((evil-kill-on-visual-paste (not evil-kill-on-visual-paste))) (call-interactively #'evil-paste-after))) (defun +evil--window-swap (direction) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 065dbd66d..16da1b377 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -475,7 +475,7 @@ To change these keys see `+evil-repeat-keys'." :n "[o" #'+evil/insert-newline-above :n "]o" #'+evil/insert-newline-below :n "gp" #'+evil/reselect-paste - :v "gp" #'+evil/paste-preserve-register + :v "gp" #'+evil/alt-paste :nv "g@" #'+evil:apply-macro :nv "gc" #'evilnc-comment-operator :nv "gx" #'evil-exchange From 18edebe9c659446ab353e144b3bf81d65387f2f9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 04:21:43 -0500 Subject: [PATCH 345/983] tools/editorconfig: remove :recipe #2216 Causes an elusive issue where editorconfig won't build at all, because our editorconfig :recipe doesn't merge into straihgt's cached recipe for the package. This isn't a fix, but a workaround until a better solution can be found. --- modules/tools/editorconfig/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/editorconfig/packages.el b/modules/tools/editorconfig/packages.el index 5fb9c477e..716c3b55e 100644 --- a/modules/tools/editorconfig/packages.el +++ b/modules/tools/editorconfig/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/editorconfig/packages.el -(package! editorconfig :recipe (:nonrecursive t)) +(package! editorconfig) From 969b047472b091e84b599f92e26b089386748cc5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 13:56:15 -0500 Subject: [PATCH 346/983] Add warning when disabling core packages #2223 --- core/core-packages.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/core-packages.el b/core/core-packages.el index 168ab6fca..fe3291dbd 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -315,6 +315,12 @@ elsewhere." (setf (alist-get name doom-packages) plist) (if (not (plist-get plist :disable)) t (doom-log "Disabling package %S" name) + (when (and (not (memq name doom-disabled-packages)) + (cl-find :core (plist-get plist :modules) :key #'car)) + (print! (warn "%s\n%s") + (format "You've disabled %S" name) + (indent 2 (concat "This is a core package. Disabling it will cause errors, as Doom assumes\n" + "core packages are always available. Disable their minor-modes or hooks instead.")))) (cl-pushnew name doom-disabled-packages) nil))) From a0425d0df782222cd3c30129057ab053c6ff0005 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 14:08:57 -0500 Subject: [PATCH 347/983] lang/rust: add eglot docs & inhibit package.el usage #2195 --- modules/lang/rust/README.org | 16 ++++++++++++++-- modules/lang/rust/config.el | 18 +++++++++++++++++- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/modules/lang/rust/README.org b/modules/lang/rust/README.org index 6d8f26132..0abdb7be1 100644 --- a/modules/lang/rust/README.org +++ b/modules/lang/rust/README.org @@ -13,6 +13,7 @@ - [[#keybinds][Keybinds]] - [[#configuration][Configuration]] - [[#enable-rust-analyzer][Enable rust-analyzer]] + - [[#enabling-elgot-support-for-rust][Enabling elgot support for Rust]] - [[#troubleshooting][Troubleshooting]] * Description @@ -73,11 +74,22 @@ and the ~+lsp~ flag on this module. * TODO Configuration ** Enable rust-analyzer -You'll need [[https://github.com/rust-analyzer/rust-analyzer][rust-analyzer]] installed on your system, then add the following to -=$DOOMDIR/config.el=: +You'll need [[https://github.com/rust-analyzer/rust-analyzer][rust-analyzer]] installed on your system, then use the following: #+BEGIN_SRC elisp +;; in $DOOMDIR/config.el (setq lsp-rust-server 'rust-analyzer) #+END_SRC +** Enabling elgot support for Rust +Doom doesn't have eglot support (yet), but if you've installed it yourself and +want rust to use eglot instead of LSP, use the following: + +#+BEGIN_SRC elisp +;; in $DOOMDIR/config.el +(after! rustic + (setq rustic-lsp-server 'rust-analyzer ; optional + rustic-lsp-client 'eglot)) +#+END_SRC + * TODO Troubleshooting diff --git a/modules/lang/rust/config.el b/modules/lang/rust/config.el index adc3c3f4b..3f4652b5f 100644 --- a/modules/lang/rust/config.el +++ b/modules/lang/rust/config.el @@ -46,7 +46,23 @@ :desc "cargo run" "r" #'rustic-cargo-run) (:prefix ("t" . "cargo test") :desc "all" "a" #'rustic-cargo-test - :desc "current test" "t" #'rustic-cargo-current-test))) + :desc "current test" "t" #'rustic-cargo-current-test)) + + (defadvice! +rust--dont-install-packages-p (orig-fn &rest args) + :around #'rustic-setup-lsp + (cl-letf (;; `rustic-setup-lsp' uses `package-installed-p' to determine if + ;; lsp-mode/elgot are available. This breaks because Doom doesn't + ;; use package.el to begin with (and lazy loads it). + ((symbol-function #'package-installed-p) + (lambda (pkg) + (require pkg nil t))) + ;; If lsp/elgot isn't available, it attempts to install lsp-mode + ;; via package.el. Doom manages its own dependencies so we disable + ;; that behavior. + ((symbol-function #'rustic-install-lsp-client-p) + (lambda (&rest _) + (message "No RLS server running")))) + (apply orig-fn args)))) (use-package! racer From 3583e1f2e0249cddc2d8709238230c181b4bb3ef Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 14:56:56 -0500 Subject: [PATCH 348/983] Re-enable menu-bar-lines for GUI frames on MacOS #2156 --- core/core-ui.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index 795f45c25..2918a1f88 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -300,10 +300,14 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (require 'ns-auto-titlebar nil t) (ns-auto-titlebar-mode +1)) - (add-hook! 'after-make-frame-functions + ;; HACK On MacOS, disabling the menu bar makes MacOS treat Emacs as a + ;; non-application window -- which means it doesn't automatically capture + ;; focus when it is started, among other things. We enable menu-bar-lines + ;; there, but we still want it disabled in terminal frames because there + ;; it activates an ugly menu bar. + (add-hook! '(window-setup-hook after-make-frame-functions) (defun doom-init-menu-bar-in-gui-frames-h (frame) - "On MacOS, the menu bar isn't part of the frame. Disabling it makes MacOS -treat Emacs as a non-application window." + "Re-enable menu-bar-lines in GUI frames." (when (display-graphic-p frame) (set-frame-parameter frame 'menu-bar-lines 1))))) From b53703d527579243711ea727b19c826ef11cb8a0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 14:58:40 -0500 Subject: [PATCH 349/983] General comment revision & reformatting --- core/cli/env.el | 6 +++--- core/cli/install.el | 2 +- core/core-editor.el | 2 +- core/core-ui.el | 26 ++++++++++++------------- modules/editor/evil/config.el | 2 +- modules/editor/evil/test/test-evil.el | 2 +- modules/tools/lookup/autoload/lookup.el | 26 +++++++++++++------------ 7 files changed, 34 insertions(+), 32 deletions(-) diff --git a/core/cli/env.el b/core/cli/env.el index 866d82c48..b32efefef 100644 --- a/core/cli/env.el +++ b/core/cli/env.el @@ -3,9 +3,9 @@ (defcli! env ((clear-p ["-c" "--clear"] "Clear and delete your envvar file") (outputfile ["-o" PATH] - "Generate the envvar file at PATH. Note that envvar files that aren't in -`doom-env-file' won't be loaded automatically at startup. You will need to -load them manually from your private config with the `doom-load-envvars-file' + "Generate the envvar file at PATH. Envvar files that aren't in +`doom-env-file' won't be loaded automatically at startup. You will need to load +them manually from your private config with the `doom-load-envvars-file' function.")) "Creates or regenerates your envvars file. diff --git a/core/cli/install.el b/core/cli/install.el index 357487115..ff4e7e6fe 100644 --- a/core/cli/install.el +++ b/core/cli/install.el @@ -68,7 +68,7 @@ DOOMDIR environment variable. e.g. (if (file-exists-p doom-env-file) (print! (info "Envvar file already exists, skipping")) (when (or doom-auto-accept - (y-or-n-p "Generate an env file? (see `doom help env` for details)")) + (y-or-n-p "Generate an envvar file? (see `doom help env` for details)")) (doom-cli-reload-env-file 'force-p)))) ;; Install Doom packages diff --git a/core/core-editor.el b/core/core-editor.el index bae568c30..49d1b6bc2 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -557,7 +557,7 @@ files, so we replace calls to `pp' with the much faster `prin1'." :config (appendq! ws-butler-global-exempt-modes '(special-mode comint-mode term-mode eshell-mode)) - (ws-butler-global-mode)) + (ws-butler-global-mode +1)) (provide 'core-editor) ;;; core-editor.el ends here diff --git a/core/core-ui.el b/core/core-ui.el index 2918a1f88..b2f557893 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -272,7 +272,8 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (setq frame-title-format '("%b – Doom Emacs") icon-title-format frame-title-format) -;; Don't resize emacs in steps, it looks weird. +;; Don't resize windows & frames in steps; it's prohibitive to prevent the user +;; from resizing it to exact dimensions, and looks weird. (setq window-resize-pixelwise t frame-resize-pixelwise t) @@ -283,18 +284,16 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (push '(tool-bar-lines . 0) default-frame-alist) (push '(vertical-scroll-bars) default-frame-alist)) -;; Sets `ns-appearance' and `ns-transparent-titlebar' on GUI frames (and fixes -;; mismatching text color in the frame title) (when IS-MAC ;; Curse Lion and its sudden but inevitable fullscreen mode! ;; NOTE Meaningless to railwaycat's emacs-mac build - (setq ns-use-native-fullscreen nil - ;; Visit files opened outside of Emacs in existing frame, rather than a - ;; new one - ns-pop-up-frames nil) + (setq ns-use-native-fullscreen nil) - ;; Sets ns-transparent-titlebar and ns-appearance frame parameters as is - ;; appropriate for the loaded theme. + ;; Visit files opened outside of Emacs in existing frame, not a new one + (setq ns-pop-up-frames nil) + + ;; Sets `ns-transparent-titlebar' and `ns-appearance' frame parameters so + ;; window borders will match the enabled theme. (and (or (daemonp) (display-graphic-p)) (require 'ns-auto-titlebar nil t) @@ -323,14 +322,15 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original ;; always avoid GUI (setq use-dialog-box nil) -;; Don't display floating tooltips; display their contents in the echo-area. +;; Don't display floating tooltips; display their contents in the echo-area, +;; because native tooltips are ugly. (when (bound-and-true-p tooltip-mode) (tooltip-mode -1)) -;; native linux tooltips are ugly +;; ...especially on linux (when IS-LINUX (setq x-gtk-use-system-tooltips nil)) - ;; Favor vertical splits over horizontal ones + ;; Favor vertical splits over horizontal ones. Screens are usually wide. (setq split-width-threshold 160 split-height-threshold nil) @@ -339,7 +339,7 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original ;;; Minibuffer ;; Allow for minibuffer-ception. Sometimes we need another minibuffer command -;; _while_ we're in the minibuffer. +;; while we're in the minibuffer. (setq enable-recursive-minibuffers t) ;; Show current key-sequence in minibuffer, like vim does. Any feedback after diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 16da1b377..0de2abd17 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -21,7 +21,7 @@ directives. By default, this only recognizes C directives.") ;; Set these defaults before `evil'; use `defvar' so they can be changed prior ;; to loading. (defvar evil-want-C-i-jump (or (daemonp) (display-graphic-p))) -(defvar evil-want-C-u-scroll t) +(defvar evil-want-C-u-scroll t) ; moved the universal arg to u (defvar evil-want-C-u-delete t) (defvar evil-want-C-w-scroll t) (defvar evil-want-C-w-delete t) diff --git a/modules/editor/evil/test/test-evil.el b/modules/editor/evil/test/test-evil.el index 99694f11e..dd77fd0f4 100644 --- a/modules/editor/evil/test/test-evil.el +++ b/modules/editor/evil/test/test-evil.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/evil/test/test-evil.el -(describe "feature/evil" +(describe "editor/evil" :var (resv project-root) (require! :editor evil) diff --git a/modules/tools/lookup/autoload/lookup.el b/modules/tools/lookup/autoload/lookup.el index a2ba7a534..fa4f51bf4 100644 --- a/modules/tools/lookup/autoload/lookup.el +++ b/modules/tools/lookup/autoload/lookup.el @@ -130,20 +130,22 @@ This can be passed nil as its second argument to unset handlers for MODES. e.g. (defun +lookup--jump-to (prop identifier &optional display-fn arg) (let* ((origin (point-marker)) - (handlers (plist-get (list :definition '+lookup-definition-functions - :references '+lookup-references-functions - :documentation '+lookup-documentation-functions - :file '+lookup-file-functions) - prop)) + (handlers + (plist-get (list :definition '+lookup-definition-functions + :references '+lookup-references-functions + :documentation '+lookup-documentation-functions + :file '+lookup-file-functions) + prop)) (result (if arg - (if-let* - ((handler (intern-soft - (completing-read "Select lookup handler: " - (delete-dups - (remq t (append (symbol-value handlers) - (default-value handlers)))) - nil t)))) + (if-let + (handler + (intern-soft + (completing-read "Select lookup handler: " + (delete-dups + (remq t (append (symbol-value handlers) + (default-value handlers)))) + nil t))) (+lookup--run-handlers handler identifier origin) (user-error "No lookup handler selected")) (run-hook-wrapped handlers #'+lookup--run-handlers identifier origin)))) From 7e75f569d946717f631944846cfda7759a7ad3b8 Mon Sep 17 00:00:00 2001 From: Sean Farley Date: Sat, 21 Dec 2019 14:34:44 -0800 Subject: [PATCH 350/983] bindings: add 'r' for remote functions `C-c r` isn't taken and makes sense to copy this from the evil bindings. --- modules/config/default/+emacs-bindings.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index ee5bde218..340893170 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -48,6 +48,16 @@ :desc "Open scratch buffer" "x" #'doom/open-scratch-buffer :desc "Open project scratch buffer" "X" #'doom/switch-to-scratch-buffer) + ;;; r --- remote + (:when (featurep! :tools upload) + (:prefix-map ("r" . "remote") + :desc "Upload local" "u" #'ssh-deploy-upload-handler + :desc "Upload local (force)" "U" #'ssh-deploy-upload-handler-forced + :desc "Download remote" "d" #'ssh-deploy-download-handler + :desc "Diff local & remote" "D" #'ssh-deploy-diff-handler + :desc "Browse remote files" "." #'ssh-deploy-browse-remote-handler + :desc "Detect remote changes" ">" #'ssh-deploy-remote-changes-handler)) + ;;; g --- lookup (:when (featurep! :tools lookup) (:prefix-map ("g" . "lookup") From 85d93511f7d3fd91d49c00122b4c51a04d44ef57 Mon Sep 17 00:00:00 2001 From: Sean Farley Date: Sat, 21 Dec 2019 14:35:36 -0800 Subject: [PATCH 351/983] bindings: add `org-pomodoro' to org key prefix --- modules/config/default/+emacs-bindings.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index 340893170..6bf8d215b 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -86,7 +86,9 @@ :desc "Capture" "c" #'org-capture :desc "Goto capture" "C" #'org-capture-goto-target :desc "Link store" "l" #'org-store-link - :desc "Sync org caldav" "S" #'org-caldav-sync) + :desc "Sync org caldav" "S" #'org-caldav-sync + (:when (featurep! :lang org +pomodoro) + :desc "Pomodoro timer" "t" #'org-pomodoro)) ;;; p --- project (:prefix ("p" . "project") From d3346fa32f1ece67fe0dd2a8a6a60541bb7a682f Mon Sep 17 00:00:00 2001 From: Sean Farley Date: Sat, 21 Dec 2019 15:32:24 -0800 Subject: [PATCH 352/983] bindings: add search section to vanilla keys --- modules/config/default/+emacs-bindings.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index 6bf8d215b..6ebca7a8d 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -58,6 +58,22 @@ :desc "Browse remote files" "." #'ssh-deploy-browse-remote-handler :desc "Detect remote changes" ">" #'ssh-deploy-remote-changes-handler)) + ;;; s --- search + (:prefix-map ("s" . "search") + :desc "Search buffer" "b" #'swiper + :desc "Search current directory" "d" #'+default/search-cwd + :desc "Search other directory" "D" #'+default/search-other-cwd + :desc "Locate file" "f" #'locate + :desc "Jump to symbol" "i" #'imenu + :desc "Jump to visible link" "l" #'ace-link + :desc "Jump to link" "L" #'ffap-menu + :desc "Jump list" "j" #'evil-show-jumps + :desc "Jump to mark" "m" #'evil-show-marks + :desc "Search project" "p" #'+default/search-project + :desc "Search other project" "P" #'+default/search-other-project + :desc "Search buffer" "s" #'swiper-isearch + :desc "Search buffer for thing at point" "S" #'swiper-isearch-thing-at-point) + ;;; g --- lookup (:when (featurep! :tools lookup) (:prefix-map ("g" . "lookup") From 4faa4e22f9f92b70c06b08ff0869f3277ace4830 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 23:30:04 -0500 Subject: [PATCH 353/983] Disable all-the-icons for tty users or tty frames #2200 --- core/core-ui.el | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/core/core-ui.el b/core/core-ui.el index b2f557893..3670c490d 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -466,7 +466,24 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original all-the-icons-fileicon all-the-icons-wicon all-the-icons-material - all-the-icons-alltheicon)) + all-the-icons-alltheicon) + :config + (cond ((daemonp) + (defadvice! doom--disable-all-the-icons-in-tty-a (orig-fn &rest args) + "Return a blank string in tty Emacs, which doesn't support multiple fonts." + :around '(all-the-icons-octicon all-the-icons-material + all-the-icons-faicon all-the-icons-fileicon + all-the-icons-wicon all-the-icons-alltheicon) + (if (or (not after-init-time) (display-multi-font-p)) + (apply orig-fn args) + ""))) + ((not (display-graphic-p)) + (defadvice! doom--disable-all-the-icons-in-tty-a (&rest _) + "Return a blank string for tty users." + :override '(all-the-icons-octicon all-the-icons-material + all-the-icons-faicon all-the-icons-fileicon + all-the-icons-wicon all-the-icons-alltheicon) + "")))) ;;;###package hide-mode-line-mode (add-hook! '(completion-list-mode-hook Man-mode-hook) From 56ccb0dbef437ab4f425d735e2ae51a37805e3ba Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 22 Dec 2019 00:02:26 -0500 Subject: [PATCH 354/983] lang/org: load jupyter.el & add jupyter-* to org-src-lang-modes #2198 --- modules/lang/org/contrib/jupyter.el | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/modules/lang/org/contrib/jupyter.el b/modules/lang/org/contrib/jupyter.el index f382060b7..c47494be2 100644 --- a/modules/lang/org/contrib/jupyter.el +++ b/modules/lang/org/contrib/jupyter.el @@ -7,13 +7,21 @@ (after! ob-async (pushnew! ob-async-no-async-languages-alist "jupyter-python" "jupyter-julia")) + (after! org-src + (dolist (lang '(python julia R)) + (cl-pushnew (cons (format "jupyter-%s" lang) lang) + org-src-lang-modes :key #'car))) + (add-hook! '+org-babel-load-functions (defun +org-babel-load-jupyter-h (lang) (when (string-prefix-p "jupyter-" (symbol-name lang)) - (let ((lang (string-remove-prefix "jupyter-" (symbol-name lang)))) - (unless (assoc lang org-src-lang-modes) - (require (intern (format "ob-%s" lang)) - nil t))) + (require 'jupyter) + (let* ((lang-name (symbol-name lang)) + (lang-tail (string-remove-prefix "jupyter-" lang-name))) + (and (not (assoc lang-tail org-src-lang-modes)) + (require (intern (format "ob-%s" lang-tail)) + nil t) + (add-to-list 'org-src-lang-modes (cons lang-name (intern lang-tail))))) (with-demoted-errors "Jupyter: %s" (require lang nil t) (require 'ob-jupyter nil t)))))) From 6e84ab0673aec1b175656c8611b760ffab46665c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 22 Dec 2019 00:37:19 -0500 Subject: [PATCH 355/983] Fix doom-init-menu-bar-in-gui-frames-h #2156 window-setup-hook doesn't pass an argument. --- core/core-ui.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index 3670c490d..ea9bcdbf5 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -305,10 +305,11 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original ;; there, but we still want it disabled in terminal frames because there ;; it activates an ugly menu bar. (add-hook! '(window-setup-hook after-make-frame-functions) - (defun doom-init-menu-bar-in-gui-frames-h (frame) + (defun doom-init-menu-bar-in-gui-frames-h (&optional frame) "Re-enable menu-bar-lines in GUI frames." - (when (display-graphic-p frame) - (set-frame-parameter frame 'menu-bar-lines 1))))) + (when-let (frame (or frame (selected-frame))) + (when (display-graphic-p frame) + (set-frame-parameter frame 'menu-bar-lines 1)))))) ;; The native border "consumes" a pixel of the fringe on righter-most splits, ;; `window-divider' does not. Available since Emacs 25.1. From d0188b827a16c70ed669a7e6d1e64c34aa92dfa8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 22 Dec 2019 12:26:50 -0500 Subject: [PATCH 356/983] editor/evil: set evil-respect-visual-line-mode sooner So users are able to change it in time in their init.el --- modules/editor/evil/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 0de2abd17..7f920a335 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -27,6 +27,7 @@ directives. By default, this only recognizes C directives.") (defvar evil-want-C-w-delete t) (defvar evil-want-Y-yank-to-eol t) (defvar evil-want-abbrev-expand-on-insert-exit nil) +(defvar evil-respect-visual-line-mode t) (use-package! evil :hook (doom-init-modules . evil-mode) @@ -41,7 +42,6 @@ directives. By default, this only recognizes C directives.") evil-ex-visual-char-range t ; column range for ex commands evil-insert-skip-empty-lines t evil-mode-line-format 'nil - evil-respect-visual-line-mode t ;; more vim-like behavior evil-symbol-word-search t ;; cursor appearance From 3b978542f13cebd7c0ae96ea0137ccfa8811ca21 Mon Sep 17 00:00:00 2001 From: Lorenzo Manacorda Date: Sun, 22 Dec 2019 19:30:48 +0100 Subject: [PATCH 357/983] docs/faq: add broken upstream pkg to common issues See #2213. --- docs/faq.org | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/faq.org b/docs/faq.org index 5a3a92c30..897fb7bc8 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -57,6 +57,7 @@ - [[#doom-crashes-when][Doom crashes when...]] - [[#cant-load-my-theme-unable-to-find-theme-file-for-x-errors][Can't load my theme; ~unable to find theme file for X~ errors]] - [[#tramp-connections-hang-forever-when-connecting][TRAMP connections hang forever when connecting]] + - [[#an-upstream-package-was-broken-and-i-cant-update-it][An upstream package was broken and I can't update it]] - [[#contributing][Contributing]] * General @@ -1127,5 +1128,18 @@ Emacs will search for this file in ~custom-theme-load-path~ and ~package!~ declaration to =~/.doom.d/packages.el=? ** TRAMP connections hang forever when connecting You'll find solutions [[https://www.emacswiki.org/emacs/TrampMode#toc7][on the emacswiki]]. +** An upstream package was broken and I can't update it +Sometimes, if you've installed a [[https://github.com/hlissner/doom-emacs/issues/2213][broken package]] which was subsequently fixed +upstream, you can't run ~doom update~ to get the latest fixes due to evaluation +errors. + +In those cases, you need to delete the broken local copy before you can install +the new one, which is achieved thus: + +1. Comment out the broken module/package. +2. Run ~doom refresh -p~. +3. Uncomment the module/package. +4. Run ~doom refresh~. + * TODO Contributing From 6ac04e5a6d7c47e9c81c60feaa5ed6947838069e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 22 Dec 2019 16:02:56 -0500 Subject: [PATCH 358/983] ui/popup: prevent infinite loop when killing popup buffers --- modules/ui/popup/autoload/popup.el | 37 +++++++++++++++--------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/modules/ui/popup/autoload/popup.el b/modules/ui/popup/autoload/popup.el index e4391cae6..3d030b92b 100644 --- a/modules/ui/popup/autoload/popup.el +++ b/modules/ui/popup/autoload/popup.el @@ -13,26 +13,27 @@ (defun +popup--kill-buffer (buffer ttl) "Tries to kill BUFFER, as was requested by a transient timer. If it fails, eg. the buffer is visible, then set another timer and try again later." - (when (buffer-live-p buffer) - (let ((inhibit-quit t) - (kill-buffer-hook (remq '+popup-kill-buffer-hook-h kill-buffer-hook))) - (cond ((get-buffer-window buffer t) + (let ((inhibit-quit t)) + (cond ((not (buffer-live-p buffer))) + ((not (get-buffer-window buffer t)) + (with-demoted-errors "Error killing transient buffer: %s" + (with-current-buffer buffer + (let ((kill-buffer-hook (remq '+popup-kill-buffer-hook-h kill-buffer-hook)) + confirm-kill-processes) + (when-let (process (get-buffer-process buffer)) + (kill-process process)) + (let (kill-buffer-query-functions) + ;; HACK The debugger backtrace buffer, when killed, called + ;; `top-level'. This causes jumpiness when the popup + ;; manager tries to clean it up. + (cl-letf (((symbol-function #'top-level) #'ignore)) + (kill-buffer buffer))))))) + ((let ((ttl (if (= ttl 0) + (or (plist-get +popup-defaults :ttl) 3) + ttl))) (with-current-buffer buffer (setq +popup--timer - (run-at-time ttl nil #'+popup--kill-buffer buffer ttl)))) - ((eq ttl 0) - (kill-buffer buffer)) - ((with-demoted-errors "Error killing transient buffer: %s" - (with-current-buffer buffer - (let (confirm-kill-processes) - (when-let (process (get-buffer-process buffer)) - (kill-process process)) - (let (kill-buffer-query-functions) - ;; HACK The debugger backtrace buffer, when killed, called - ;; `top-level'. This causes jumpiness when the popup - ;; manager tries to clean it up. - (cl-letf (((symbol-function #'top-level) #'ignore)) - (kill-buffer buffer))))))))))) + (run-at-time ttl nil #'+popup--kill-buffer buffer ttl)))))))) (defun +popup--delete-window (window) "Do housekeeping before destroying a popup window. From 458cdd5df467d5590f91638783b0b6013c225674 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 22 Dec 2019 19:59:22 -0500 Subject: [PATCH 359/983] ui/workspaces: remove extra workspaces when restoring sessions --- core/autoload/sessions.el | 6 +++++- modules/ui/workspaces/config.el | 36 +++++++++++++++++++-------------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/core/autoload/sessions.el b/core/autoload/sessions.el index 2e6ec18a6..3cdf2c09c 100644 --- a/core/autoload/sessions.el +++ b/core/autoload/sessions.el @@ -50,7 +50,11 @@ (cond ((require 'persp-mode nil t) (unless persp-mode (persp-mode +1)) - (persp-load-state-from-file file)) + (let ((allowed (persp-list-persp-names-in-file file))) + (cl-loop for name being the hash-keys of *persp-hash* + unless (member name allowed) + do (persp-kill name)) + (persp-load-state-from-file file))) ((and (require 'frameset nil t) (require 'restart-emacs nil t)) (restart-emacs--restore-frames-using-desktop file)) diff --git a/modules/ui/workspaces/config.el b/modules/ui/workspaces/config.el index cc5057665..c7581a44b 100644 --- a/modules/ui/workspaces/config.el +++ b/modules/ui/workspaces/config.el @@ -62,28 +62,34 @@ stored in `persp-save-dir'.") (advice-add #'persp-asave-on-exit :around #'+workspaces-autosave-real-buffers-a) (add-hook! '(persp-mode-hook persp-after-load-state-functions) - (defun +workspaces-ensure-main-workspace-h (&rest _) - "Ensure the main workspace exists and the nil workspace is never active." + (defun +workspaces-ensure-no-nil-workspaces-h (&rest _) + (when persp-mode + (dolist (frame (frame-list)) + (when (string= (safe-persp-name (get-current-persp frame)) persp-nil-name) + ;; Take extra steps to ensure no frame ends up in the nil perspective + (persp-frame-switch (or (cadr (hash-table-keys *persp-hash*)) + +workspaces-main) + frame)))))) + + (add-hook! 'persp-mode-hook + (defun +workspaces-init-first-workspace-h (&rest _) + "Ensure a main workspace exists." (when persp-mode (let (persp-before-switch-functions) ;; The default perspective persp-mode creates (`persp-nil-name') is ;; special and doesn't represent a real persp object, so buffers can't ;; really be assigned to it, among other quirks. We create a *real* main ;; workspace to fill this role. - (unless (persp-get-by-name +workspaces-main) + (unless (or (persp-get-by-name +workspaces-main) + ;; Start from 2 b/c persp-mode counts the nil workspace + (> (hash-table-count *persp-hash*) 2)) (persp-add-new +workspaces-main)) - ;; Switch to it if we're in the nil perspective - (dolist (frame (frame-list)) - (when (string= (safe-persp-name (get-current-persp frame)) persp-nil-name) - (persp-frame-switch +workspaces-main frame) - ;; Fix #319: the warnings buffer gets swallowed by creating - ;; `+workspaces-main', so we display it manually, if it exists. - (when-let (warnings (get-buffer "*Warnings*")) - (save-excursion - (display-buffer-in-side-window - warnings '((window-height . shrink-window-if-larger-than-buffer))))))))))) - - (add-hook! 'persp-mode-hook + ;; HACK Fix #319: the warnings buffer gets swallowed when creating + ;; `+workspaces-main', so display it ourselves, if it exists. + (when-let (warnings (get-buffer "*Warnings*")) + (save-excursion + (display-buffer-in-side-window + warnings '((window-height . shrink-window-if-larger-than-buffer)))))))) (defun +workspaces-init-persp-mode-h () (cond (persp-mode ;; `uniquify' breaks persp-mode. It renames old buffers, which causes From 327d359fd36d1711511e91adc97bc96c330596ca Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 22 Dec 2019 23:00:26 -0500 Subject: [PATCH 360/983] lang/python: silence errors when python isn't present --- modules/lang/python/config.el | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/modules/lang/python/config.el b/modules/lang/python/config.el index d8d72f6a7..461f3d8db 100644 --- a/modules/lang/python/config.el +++ b/modules/lang/python/config.el @@ -95,12 +95,13 @@ called.") (add-hook! 'python-mode-local-vars-hook (defun +python-init-anaconda-mode-maybe-h () - "Enable `anaconda-mode' if `lsp-mode' isn't." + "Enable `anaconda-mode' if `lsp-mode' is absent and +`python-shell-interpreter' is present." (unless (or (bound-and-true-p lsp-mode) - (bound-and-true-p lsp--buffer-deferred)) + (bound-and-true-p lsp--buffer-deferred) + (not (executable-find python-shell-interpreter))) (anaconda-mode +1)))) :config - (add-hook 'anaconda-mode-hook #'anaconda-eldoc-mode) (set-company-backend! 'anaconda-mode '(company-anaconda)) (set-lookup-handlers! 'anaconda-mode :definition #'anaconda-mode-find-definitions @@ -108,6 +109,8 @@ called.") :documentation #'anaconda-mode-show-doc) (set-popup-rule! "^\\*anaconda-mode" :select nil) + (add-hook 'anaconda-mode-hook #'anaconda-eldoc-mode) + (defun +python-auto-kill-anaconda-processes-h () "Kill anaconda processes if this buffer is the last python buffer." (when (and (eq major-mode 'python-mode) @@ -286,11 +289,20 @@ called.") (after! python (setq lsp-python-ms-python-executable-cmd python-shell-interpreter)) + ;; HACK If you don't have python installed, then opening python buffers with + ;; this on causes a "wrong number of arguments: nil 0" error, because of + ;; careless usage of `cl-destructuring-bind'. This silences that error, + ;; since we may still want to write some python on a system without + ;; python installed! + (defadvice! +python--silence-errors-a (orig-fn &rest args) + :around #'lsp-python-ms--extra-init-params + (ignore-errors (apply orig-fn args))) + ;; HACK lsp-python-ms shouldn't install itself if it isn't present. This - ;; circumvents LSP falling back to pyls when lsp-python-ms is absent. - ;; Installing the server should be a deliberate act; either 'M-x - ;; lsp-python-ms-setup' or setting `lsp-python-ms-executable' to an existing - ;; install will do. + ;; circumvents LSP falling back to pyls when lsp-python-ms is absent. + ;; Installing the server should be a deliberate act; either 'M-x + ;; lsp-python-ms-setup' or setting `lsp-python-ms-executable' to an + ;; existing install will do. (defadvice! +python--dont-auto-install-server-a () :override #'lsp-python-ms--command-string lsp-python-ms-executable)) From 213a6fda86a540ea07e372da38d5a8730fde8608 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 22 Dec 2019 23:02:54 -0500 Subject: [PATCH 361/983] General refactors & reformatting --- core/core-projects.el | 11 +++++------ modules/lang/emacs-lisp/config.el | 4 ++-- modules/lang/haskell/packages.el | 15 ++++++++------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/core/core-projects.el b/core/core-projects.el index bdcb2cffa..6be72c2cd 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -157,7 +157,7 @@ c) are not valid projectile projects." ;; Fix breakage on windows in git projects with submodules, since Windows ;; doesn't have tr - ((not (executable-find "tr")) + (IS-WINDOWS (setq projectile-git-submodule-command nil))) (defadvice! doom--projectile-cache-timers-a () @@ -184,12 +184,11 @@ the command instead." ;; Projectile root-searching functions can cause an infinite loop on TRAMP ;; connections, so disable them. ;; TODO Is this still necessary? - (defadvice! doom--projectile-locate-dominating-file-a (orig-fn file name) + (defadvice! doom--projectile-locate-dominating-file-a (file _name) "Don't traverse the file system if on a remote connection." - :around #'projectile-locate-dominating-file - (when (and (stringp file) - (not (file-remote-p file nil t))) - (funcall orig-fn file name)))) + :before-while #'projectile-locate-dominating-file + (and (stringp file) + (not (file-remote-p file nil t))))) ;; diff --git a/modules/lang/emacs-lisp/config.el b/modules/lang/emacs-lisp/config.el index d525392ee..ef11526b3 100644 --- a/modules/lang/emacs-lisp/config.el +++ b/modules/lang/emacs-lisp/config.el @@ -167,8 +167,8 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.") (set-yas-minor-mode! 'buttercup-minor-mode) (when (featurep 'evil) (add-hook 'buttercup-minor-mode-hook #'evil-normalize-keymaps)) - (map! :map buttercup-minor-mode-map - :localleader + (map! :localleader + :map buttercup-minor-mode-map :prefix "t" "t" #'+emacs-lisp/buttercup-run-file "a" #'+emacs-lisp/buttercup-run-project diff --git a/modules/lang/haskell/packages.el b/modules/lang/haskell/packages.el index 2a5329c89..a1b2f2c89 100644 --- a/modules/lang/haskell/packages.el +++ b/modules/lang/haskell/packages.el @@ -3,10 +3,11 @@ (package! haskell-mode) -(cond ((featurep! +dante) - (package! dante) - (package! attrap)) - ((featurep! +lsp) - (package! lsp-haskell)) - ((featurep! +intero) ; DEPRECATED - (package! intero))) +(when (featurep! +dante) + (package! dante) + (package! attrap)) +(when (featurep! +lsp) + (package! lsp-haskell)) +;; DEPRECATED +(when (featurep! +intero) + (package! intero)) From 68ffc3cf96a5bb293d3ed14abe68b1cb25d98680 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 22 Dec 2019 23:47:54 -0500 Subject: [PATCH 362/983] tools/eval: make +overlay display errors too --- modules/tools/eval/config.el | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/modules/tools/eval/config.el b/modules/tools/eval/config.el index 0ab3238aa..280bcd348 100644 --- a/modules/tools/eval/config.el +++ b/modules/tools/eval/config.el @@ -68,23 +68,32 @@ buffer rather than an overlay on the line at point or the minibuffer.") (with-selected-window win (goto-char (point-min)))))) - ;; Display evaluation results in an overlay next to the cursor. If the output - ;; is more than 4 lines long, it is displayed in a popup. + ;; Display evaluation results in an overlay at the end of the current line. If + ;; the output is more than `+eval-popup-min-lines' (4) lines long, it is + ;; displayed in a popup. (when (featurep! +overlay) + (defadvice! +eval--show-output-in-overlay-a (fn) + :filter-return #'quickrun--make-sentinel + (lambda (process event) + (funcall fn process event) + (with-current-buffer quickrun--buffer-name + (when (> (buffer-size) 0) + (+eval-display-results + (string-trim (buffer-string)) + quickrun--original-buffer))))) + + ;; Suppress quickrun's popup window because we're using an overlay instead. (defadvice! +eval--inhibit-quickrun-popup-a (buf cb) :override #'quickrun--pop-to-buffer (setq quickrun--original-buffer (current-buffer)) - (with-current-buffer buf - (setq quickrun-option-outputter #'ignore) - (funcall cb))) + (save-window-excursion + (with-current-buffer (pop-to-buffer buf) + (setq quickrun-option-outputter #'ignore) + (funcall cb)))) - (advice-add #'quickrun--recenter :override #'ignore) - (add-hook! 'quickrun-after-run-hook - (defun +eval-display-in-popup-overlay-h () - (+eval-display-results - (with-current-buffer quickrun--buffer-name - (string-trim (buffer-string))) - quickrun--original-buffer))))) + ;; HACK Without this, `+eval--inhibit-quickrun-popup-a' throws a + ;; window-live-p error because no window exists to be recentered! + (advice-add #'quickrun--recenter :override #'ignore))) (use-package! eros From 5ecf2066813ed94653bbde3e12117bda16b0c3df Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 22 Dec 2019 23:48:36 -0500 Subject: [PATCH 363/983] lang/org: remove select-frame-set-input-focus hack Thanks to 3583e1f2e, this is no longer necessary. --- modules/lang/org/autoload/org-capture.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/org/autoload/org-capture.el b/modules/lang/org/autoload/org-capture.el index f054ede13..5302b714a 100644 --- a/modules/lang/org/autoload/org-capture.el +++ b/modules/lang/org/autoload/org-capture.el @@ -12,7 +12,8 @@ (width . 70) (height . 25) (transient . t) - ,(if IS-LINUX '(display . ":0"))) + ,(if IS-LINUX '(display . ":0")) + ,(if IS-MAC '(menu-bar-lines . 1))) "TODO") ;;;###autoload @@ -41,7 +42,6 @@ you're done. This can be called from an external shell script." (frame (if (+org-capture-frame-p) (selected-frame) (make-frame +org-capture-frame-parameters)))) - (select-frame-set-input-focus frame) ; fix MacOS not focusing new frames (with-selected-frame frame (require 'org-capture) (condition-case ex From 29b383d9002243698df8de911c1fe093d0846112 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 22 Dec 2019 23:49:36 -0500 Subject: [PATCH 364/983] Disable tty-run-terminal-initialization This code *may* have side-effects, but it does reduce startup time for terminal users by a significant margin. In my case it reduced from 2.6s to 0.4s. --- core/core.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/core.el b/core/core.el index 20babb950..85a535ca8 100644 --- a/core/core.el +++ b/core/core.el @@ -273,6 +273,15 @@ users).") gcmh-verbose doom-debug-mode) (add-hook 'focus-out-hook #'gcmh-idle-garbage-collect))) +;; HACK `tty-run-terminal-initialization' is *tremendously* slow. Disabling it +;; completely could have side-effects, so we defer it until later. +(unless (display-graphic-p) + (advice-add #'tty-run-terminal-initialization :override #'ignore) + (add-transient-hook! 'pre-command-hook + (advice-remove #'tty-run-terminal-initialization #'ignore) + (dolist (frame (frame-list)) + (tty-run-terminal-initialization frame nil t)))) + ;; ;;; MODE-local-vars-hook From 86c2d7c10a59a3dd6560191772107a1b2ae671b3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 22 Dec 2019 23:50:55 -0500 Subject: [PATCH 365/983] No longer retain projectile cache across sessions It's unnecessary overhead. Rebuilding the index the first time it is used per session is acceptable, imo. --- core/core-projects.el | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/core/core-projects.el b/core/core-projects.el index 6be72c2cd..aa9b60046 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -31,7 +31,6 @@ Emacs.") :init (setq projectile-cache-file (concat doom-cache-dir "projectile.cache") projectile-enable-caching doom-interactive-mode - projectile-files-cache-expire 86400 ; expire after a day projectile-globally-ignored-files '(".DS_Store" "Icon " "TAGS") projectile-globally-ignored-file-suffixes '(".elc" ".pyc" ".o") projectile-kill-buffers-filter 'kill-only-files @@ -160,16 +159,6 @@ c) are not valid projectile projects." (IS-WINDOWS (setq projectile-git-submodule-command nil))) - (defadvice! doom--projectile-cache-timers-a () - "Persist `projectile-projects-cache-time' across sessions, so that -`projectile-files-cache-expire' checks won't reset when restarting Emacs." - :before #'projectile-serialize-cache - (projectile-serialize projectile-projects-cache-time doom-projectile-cache-timer-file)) - ;; Restore it - (when (file-readable-p doom-projectile-cache-timer-file) - (setq projectile-projects-cache-time - (projectile-unserialize doom-projectile-cache-timer-file))) - (defadvice! doom--projectile-default-generic-command-a (orig-fn &rest args) "If projectile can't tell what kind of project you're in, it issues an error when using many of projectile's command, e.g. `projectile-compile-command', From 5bff064ba8d186fbc4a15690a49462ffdd3a219e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 22 Dec 2019 23:51:45 -0500 Subject: [PATCH 366/983] Reduce number of projectile project root markers Reduce overall I/O needed to detect project roots, at the expense of losing detection for less popular version control systems. --- core/core-projects.el | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/core/core-projects.el b/core/core-projects.el index aa9b60046..9c08a0872 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -65,18 +65,13 @@ Emacs.") ".git") ; Git VCS root dir (when (executable-find "hg") '(".hg")) ; Mercurial VCS root dir - (when (executable-find "fossil") - '(".fslckout" ; Fossil VCS root dir - "_FOSSIL_")) ; Fossil VCS root DB on Windows (when (executable-find "bzr") - '(".bzr")) ; Bazaar VCS root dir - (when (executable-find "darcs") - '("_darcs"))) ; Darcs VCS root dir + '(".bzr"))) ; Bazaar VCS root dir ;; This will be filled by other modules. We build this list manually so ;; projectile doesn't perform so many file checks every time it resolves ;; a project's root -- particularly when a file has no project. - projectile-project-root-files '("TAGS") - projectile-project-root-files-top-down-recurring '(".svn" "Makefile")) + projectile-project-root-files '() + projectile-project-root-files-top-down-recurring '("Makefile")) (push (abbreviate-file-name doom-local-dir) projectile-globally-ignored-directories) From e8aa293bc0bfeb06d1d44a1f91778592d98ab409 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 23 Dec 2019 00:02:10 -0500 Subject: [PATCH 367/983] Defer tty-run-terminal-initialization to window-setup-hook This seems to work just as well, and ensures it runs in time for interactive use. --- core/core.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/core/core.el b/core/core.el index 85a535ca8..5f1b21899 100644 --- a/core/core.el +++ b/core/core.el @@ -273,14 +273,15 @@ users).") gcmh-verbose doom-debug-mode) (add-hook 'focus-out-hook #'gcmh-idle-garbage-collect))) -;; HACK `tty-run-terminal-initialization' is *tremendously* slow. Disabling it -;; completely could have side-effects, so we defer it until later. +;; HACK `tty-run-terminal-initialization' is *tremendously* slow for some +;; reason. Disabling it completely could have many side-effects, so we +;; defer it until later. (unless (display-graphic-p) (advice-add #'tty-run-terminal-initialization :override #'ignore) - (add-transient-hook! 'pre-command-hook - (advice-remove #'tty-run-terminal-initialization #'ignore) - (dolist (frame (frame-list)) - (tty-run-terminal-initialization frame nil t)))) + (add-hook! 'window-setup-hook + (defun doom-init-tty-h () + (advice-remove #'tty-run-terminal-initialization #'ignore) + (tty-run-terminal-initialization (selected-frame) nil t)))) ;; From b144a3862a34d676ab791765e047858ae2440525 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 23 Dec 2019 01:51:43 -0500 Subject: [PATCH 368/983] Bind 'SPC h d S' to text search; expand ivy/helm file-search API --- core/autoload/help.el | 21 ++++++++++++++++++++- modules/completion/helm/autoload/helm.el | 7 ++++--- modules/completion/ivy/autoload/ivy.el | 21 ++++++++++++--------- modules/config/default/config.el | 3 ++- 4 files changed, 38 insertions(+), 14 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index fa010b9e3..c3458376c 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -196,7 +196,7 @@ selection of all minor-modes, active or not." (find-file (expand-file-name "index.org" doom-docs-dir))) ;;;###autoload -(defun doom/help-search (&optional initial-input) +(defun doom/help-search-headings (&optional initial-input) "Search Doom's documentation and jump to a headline." (interactive) (doom-completing-read-org-headings @@ -212,6 +212,25 @@ selection of all minor-modes, active or not." x) (doom--help-modules-list)))) +;;;###autoload +(defun doom/help-search (&optional initial-input) + "Preform a text search on all of Doom's documentation." + (interactive) + (funcall (cond ((featurep! :completion ivy) + #'+ivy-file-search) + ((featurep! :completion helm) + #'+helm-file-search) + ((rgrep + (read-regexp + "Search for" (or initial-input 'grep-tag-default) + 'grep-regexp-history) + "*.org" doom-emacs-dir) + #'ignore)) + :query initial-input + :args '("-g" "*.org") + :in doom-emacs-dir + :prompt "Search documentation for: ")) + ;;;###autoload (defun doom/help-news-search (&optional initial-input) "Search headlines in Doom's newsletters." diff --git a/modules/completion/helm/autoload/helm.el b/modules/completion/helm/autoload/helm.el index 44c7ddd44..610abb75d 100644 --- a/modules/completion/helm/autoload/helm.el +++ b/modules/completion/helm/autoload/helm.el @@ -38,7 +38,7 @@ workspace." ;;; Project search ;;;###autoload -(cl-defun +helm-file-search (&key query in all-files (recursive t)) +(cl-defun +helm-file-search (&key query in all-files (recursive t) _prompt args) "Conduct a file search using ripgrep. :query STRING @@ -55,8 +55,9 @@ workspace." (let ((this-command 'helm-rg) (helm-rg-default-directory (or in (doom-project-root) default-directory)) (helm-rg-default-extra-args - (delq nil (list (when all-files "-z -uu") - (unless recursive "--maxdepth 1"))))) + (delq nil (append (list (when all-files "-z -uu") + (unless recursive "--maxdepth 1")) + args)))) (helm-rg (or query (when (use-region-p) (let ((beg (or (bound-and-true-p evil-visual-beginning) (region-beginning))) diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index 81f9b923e..b453c405a 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -242,7 +242,7 @@ The point of this is to avoid Emacs locking up indexing massive file trees." (#'counsel-file-jump))))) ;;;###autoload -(cl-defun +ivy-file-search (&key query in all-files (recursive t)) +(cl-defun +ivy-file-search (&key query in all-files (recursive t) prompt args) "Conduct a file search using ripgrep. :query STRING @@ -260,7 +260,9 @@ The point of this is to avoid Emacs locking up indexing massive file trees." (project-root (or (doom-project-root) default-directory)) (directory (or in project-root)) (args (concat (if all-files " -uu") - (unless recursive " --maxdepth 1")))) + (unless recursive " --maxdepth 1") + " " + (mapconcat #'shell-quote-argument args " ")))) (counsel-rg (or (if query query) (when (use-region-p) @@ -278,13 +280,14 @@ The point of this is to avoid Emacs locking up indexing massive file trees." ((concat "\\\\" substr)))) (rxt-quote-pcre query))))))) directory args - (format "rg%s [%s]: " - args - (cond ((equal directory default-directory) - "./") - ((equal directory project-root) - (projectile-project-name)) - ((file-relative-name directory project-root))))))) + (or prompt + (format "rg%s [%s]: " + args + (cond ((equal directory default-directory) + "./") + ((equal directory project-root) + (projectile-project-name)) + ((file-relative-name directory project-root)))))))) ;;;###autoload (defun +ivy/project-search (&optional arg initial-query directory) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index 788c7d326..2b51a68e0 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -328,7 +328,8 @@ "dP" #'doom/help-package-homepage "dc" #'doom/goto-config-file "dC" #'doom/help-package-config - "ds" #'doom/help-search + "ds" #'doom/help-search-headings + "dS" #'doom/help-search "dx" #'doom/sandbox "dt" #'doom/toggle-profiler "dv" #'doom/version From 59152248e646a0e81dbb08f1094b0823e4974274 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 23 Dec 2019 14:18:40 -0500 Subject: [PATCH 369/983] bin/doom: fix wrong-type-argument hash-table-p errors #2227 We can't be consulting the active doom state before it has be initialized. --- core/autoload/help.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index c3458376c..706f9406e 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -216,9 +216,9 @@ selection of all minor-modes, active or not." (defun doom/help-search (&optional initial-input) "Preform a text search on all of Doom's documentation." (interactive) - (funcall (cond ((featurep! :completion ivy) + (funcall (cond ((fboundp '+ivy-file-search) #'+ivy-file-search) - ((featurep! :completion helm) + ((fboundp '+helm-file-search) #'+helm-file-search) ((rgrep (read-regexp From da78751ce4d2ab3c10c79a0d23b28e2697f55f9b Mon Sep 17 00:00:00 2001 From: Sean Farley Date: Mon, 23 Dec 2019 12:08:13 -0800 Subject: [PATCH 370/983] irc: turn off smartparens mode for circe buffers Users probably don't want ":-(" to be autocompleted as ":-()" so let's turn of smartparens for chatting. --- modules/app/irc/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/app/irc/config.el b/modules/app/irc/config.el index eda3563ab..96c099aa9 100644 --- a/modules/app/irc/config.el +++ b/modules/app/irc/config.el @@ -93,6 +93,7 @@ playback.") (add-hook 'doom-real-buffer-functions #'+circe-buffer-p) (add-hook 'circe-channel-mode-hook #'turn-on-visual-line-mode) (add-hook 'circe-mode-hook #'+irc--add-circe-buffer-to-persp-h) + (add-hook 'circe-mode-hook #'turn-off-smartparens-mode) (defadvice! +irc--circe-run-disconnect-hook-a (&rest _) "Runs `+irc-disconnect-hook' after circe disconnects." From 29905c1496f08516f9db737a4140cb87cf8b24b9 Mon Sep 17 00:00:00 2001 From: Alexey Shiklomanov Date: Mon, 23 Dec 2019 16:32:45 -0500 Subject: [PATCH 371/983] Fix deprecated ESS variables - `ess-smart-S-assign-key` and `ess-expression-offset` are deprecated variables - `ess-default-style` has been replaced with `ess-style` --- modules/lang/ess/config.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/lang/ess/config.el b/modules/lang/ess/config.el index 6a9326adc..381a87bf5 100644 --- a/modules/lang/ess/config.el +++ b/modules/lang/ess/config.el @@ -10,15 +10,13 @@ (use-package! ess :commands stata SAS :init - (setq ess-smart-S-assign-key nil) (unless (featurep! :lang julia) (add-to-list 'auto-mode-alist '("\\.jl\\'" . ess-julia-mode))) :config (setq ess-offset-continued 'straight - ess-expression-offset 2 ess-use-flymake (not (featurep! :tools flycheck)) ess-nuke-trailing-whitespace-p t - ess-default-style 'DEFAULT + ess-style 'DEFAULT ess-history-directory (expand-file-name "ess-history/" doom-cache-dir)) (set-repl-handler! 'ess-r-mode #'+ess/open-r-repl) From d1becfce89a05a75715d78fe6d362c60cdb9e436 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 23 Dec 2019 17:20:19 -0500 Subject: [PATCH 372/983] config/default: reorganize autoloads --- modules/config/default/autoload/default.el | 291 --------------------- modules/config/default/autoload/files.el | 42 +++ modules/config/default/autoload/search.el | 96 +++++++ modules/config/default/autoload/text.el | 164 ++++++++++++ 4 files changed, 302 insertions(+), 291 deletions(-) create mode 100644 modules/config/default/autoload/files.el create mode 100644 modules/config/default/autoload/search.el create mode 100644 modules/config/default/autoload/text.el diff --git a/modules/config/default/autoload/default.el b/modules/config/default/autoload/default.el index dbe8726d3..6022a11a3 100644 --- a/modules/config/default/autoload/default.el +++ b/modules/config/default/autoload/default.el @@ -1,39 +1,5 @@ ;; config/default/autoload/default.el -*- lexical-binding: t; -*- -;;;###autoload -(defun +default/yank-buffer-filename () - "Copy the current buffer's path to the kill ring." - (interactive) - (if-let* ((filename (or buffer-file-name (bound-and-true-p list-buffers-directory)))) - (message (kill-new (abbreviate-file-name filename))) - (error "Couldn't find filename in current buffer"))) - -;;;###autoload -(defun +default/browse-project () - (interactive) (doom-project-browse (doom-project-root))) -;; NOTE No need for find-in-project, use `projectile-find-file' - -;;;###autoload -(defun +default/browse-templates () - (interactive) (doom-project-browse +file-templates-dir)) -;;;###autoload -(defun +default/find-in-templates () - (interactive) (doom-project-find-file +file-templates-dir)) - -;;;###autoload -(defun +default/browse-emacsd () - (interactive) (doom-project-browse doom-emacs-dir)) -;;;###autoload -(defun +default/find-in-emacsd () - (interactive) (doom-project-find-file doom-emacs-dir)) - -;;;###autoload -(defun +default/browse-notes () - (interactive) (doom-project-browse org-directory)) -;;;###autoload -(defun +default/find-in-notes () - (interactive) (doom-project-find-file org-directory)) - ;;;###autoload (defun +default/compile (arg) "Runs `compile' from the root of the current project. @@ -59,9 +25,6 @@ If ARG (universal argument), runs `compile' from the current directory." #'man #'woman))) -;;;###autoload -(defalias '+default/newline #'newline) - ;;;###autoload (defun +default/new-buffer () "TODO" @@ -73,241 +36,6 @@ If ARG (universal argument), runs `compile' from the current directory." (with-current-buffer buffer (funcall (default-value 'major-mode)))))) -;;;###autoload -(defun +default/newline-above () - "Insert an indented new line before the current one." - (interactive) - (if (featurep 'evil) - (call-interactively 'evil-open-above) - (beginning-of-line) - (save-excursion (newline)) - (indent-according-to-mode))) - -;;;###autoload -(defun +default/newline-below () - "Insert an indented new line after the current one." - (interactive) - (if (featurep 'evil) - (call-interactively 'evil-open-below) - (end-of-line) - (newline-and-indent))) - -;;;###autoload -(defun +default/yank-pop () - "Interactively select what text to insert from the kill ring." - (interactive) - (call-interactively - (cond ((fboundp 'counsel-yank-pop) #'counsel-yank-pop) - ((fboundp 'helm-show-kill-ring) #'helm-show-kill-ring) - ((error "No kill-ring search backend available. Enable ivy or helm!"))))) - -;;;###autoload -(defun +default--newline-indent-and-continue-comments-a () - "A replacement for `newline-and-indent'. - -Continues comments if executed from a commented line, with special support for -languages with weak native comment continuation support (like C-family -languages)." - (interactive) - (if (and (sp-point-in-comment) - comment-line-break-function) - (funcall comment-line-break-function nil) - (delete-horizontal-space t) - (newline nil t) - (indent-according-to-mode))) - -(defun doom--backward-delete-whitespace-to-column () - "Delete back to the previous column of whitespace, or as much whitespace as -possible, or just one char if that's not possible." - (interactive) - (let* ((context (ignore-errors (sp-get-thing))) - (op (plist-get context :op)) - (cl (plist-get context :cl)) - open-len close-len) - (cond ;; When in strings (sp acts weird with quotes; this is the fix) - ;; Also, skip closing delimiters - ((and op cl - (string= op cl) - (and (string= (char-to-string (or (char-before) 0)) op) - (setq open-len (length op))) - (and (string= (char-to-string (or (char-after) 0)) cl) - (setq close-len (length cl)))) - (delete-char (- open-len)) - (delete-char close-len)) - - ;; Delete up to the nearest tab column IF only whitespace between - ;; point and bol. - ((and (not indent-tabs-mode) - (not (bolp)) - (not (sp-point-in-string)) - (save-excursion (>= (- (skip-chars-backward " \t")) tab-width))) - (let ((movement (% (current-column) tab-width))) - (when (= movement 0) - (setq movement tab-width)) - (delete-char (- movement))) - (unless (memq (char-before) (list ?\n ?\ )) - (insert " "))) - - ;; Otherwise do a regular delete - ((delete-char -1))))) - -;;;###autoload -(defun +default--delete-backward-char-a (n &optional killflag) - "Same as `delete-backward-char', but preforms these additional checks: - -+ If point is surrounded by (balanced) whitespace and a brace delimiter ({} [] - ()), delete a space on either side of the cursor. -+ If point is at BOL and surrounded by braces on adjacent lines, collapse - newlines: - { - | - } => {|} -+ Otherwise, resort to `doom--backward-delete-whitespace-to-column'. -+ Resorts to `delete-char' if n > 1" - (interactive "p\nP") - (or (integerp n) - (signal 'wrong-type-argument (list 'integerp n))) - (cond ((and (use-region-p) - delete-active-region - (= n 1)) - ;; If a region is active, kill or delete it. - (if (eq delete-active-region 'kill) - (kill-region (region-beginning) (region-end) 'region) - (funcall region-extract-function 'delete-only))) - ;; In Overwrite mode, maybe untabify while deleting - ((null (or (null overwrite-mode) - (<= n 0) - (memq (char-before) '(?\t ?\n)) - (eobp) - (eq (char-after) ?\n))) - (let ((ocol (current-column))) - (delete-char (- n) killflag) - (save-excursion - (insert-char ?\s (- ocol (current-column)) nil)))) - ;; - ((and (= n 1) (bound-and-true-p smartparens-mode)) - (cond ((and (memq (char-before) (list ?\ ?\t)) - (save-excursion - (and (/= (skip-chars-backward " \t" (line-beginning-position)) 0) - (bolp)))) - (doom--backward-delete-whitespace-to-column)) - ((let* ((pair (ignore-errors (sp-get-thing))) - (op (plist-get pair :op)) - (cl (plist-get pair :cl)) - (beg (plist-get pair :beg)) - (end (plist-get pair :end))) - (cond ((and end beg (= end (+ beg (length op) (length cl)))) - (sp-backward-delete-char 1)) - ((doom-surrounded-p pair 'inline 'balanced) - (delete-char -1 killflag) - (delete-char 1) - (when (= (point) (+ (length cl) beg)) - (sp-backward-delete-char 1) - (sp-insert-pair op))) - ((and (bolp) (doom-surrounded-p pair nil 'balanced)) - (delete-region beg end) - (sp-insert-pair op) - t) - ((run-hook-with-args-until-success 'doom-delete-backward-functions)) - ((doom--backward-delete-whitespace-to-column))))))) - ;; Otherwise, do simple deletion. - ((delete-char (- n) killflag)))) - -;;;###autoload -(defun +default/search-cwd (&optional arg) - "Conduct a text search in files under the current folder. -If prefix ARG is set, prompt for a directory to search from." - (interactive "P") - (let ((default-directory - (if arg - (read-directory-name "Search directory: ") - default-directory))) - (call-interactively - (cond ((featurep! :completion ivy) #'+ivy/project-search-from-cwd) - ((featurep! :completion helm) #'+helm/project-search-from-cwd) - (#'rgrep))))) - -;;;###autoload -(defun +default/search-other-cwd () - "Conduct a text search in another directory." - (interactive) - (+default/search-cwd 'other)) - -;;;###autoload -(defun +default/search-project (&optional arg) - "Conduct a text search in the current project root. -If prefix ARG is set, prompt for a known project to search from." - (interactive "P") - (let* ((disabled-command-function nil) - (default-directory - (if arg - (if-let (projects (projectile-relevant-known-projects)) - (completing-read "Search project: " projects - nil t nil nil (doom-project-root)) - (user-error "There are no known projects")) - default-directory))) - (call-interactively - (cond ((featurep! :completion ivy) #'+ivy/project-search) - ((featurep! :completion helm) #'+helm/project-search) - (#'projectile-ripgrep))))) - -;;;###autoload -(defun +default/search-other-project () - "Conduct a text search in a known project." - (interactive) - (+default/search-project 'other)) - -;;;###autoload -(defun +default/search-project-for-symbol-at-point (&optional arg symbol) - "Conduct a text search in the current project for symbol at point. -If prefix ARG is set, prompt for a known project to search from." - (interactive - (list current-prefix-arg - (or (and (use-region-p) - (rxt-quote-pcre - (buffer-substring-no-properties (region-beginning) - (region-end)))) - (rxt-quote-pcre (thing-at-point 'symbol t)) - ""))) - (let ((default-directory - (if arg - (if-let (projects (projectile-relevant-known-projects)) - (completing-read "Switch to project: " projects - nil t nil nil (doom-project-root)) - (user-error "There are no known projects")) - default-directory))) - (cond ((featurep! :completion ivy) - (+ivy/project-search nil symbol)) - ((featurep! :completion helm) - (+helm/project-search nil symbol)) - ((rgrep (regexp-quote symbol)))))) - -;;;###autoload -(defun +default/search-notes-for-symbol-at-point (&optional symbol) - "Conduct a text search in the current project for symbol at point. If prefix -ARG is set, prompt for a known project to search from." - (interactive - (list (rxt-quote-pcre (or (thing-at-point 'symbol t) "")))) - (require 'org) - (let ((default-directory org-directory)) - (+default/search-project-for-symbol-at-point - nil symbol))) - -;;;###autoload -(defun +default/org-notes-search () - "Perform a text search on `org-directory'." - (interactive) - (require 'org) - (let ((default-directory org-directory)) - (+default/search-project-for-symbol-at-point nil ""))) - -;;;###autoload -(defun +default/org-notes-headlines () - "Jump to an Org headline in `org-agenda-files'." - (interactive) - (doom-completing-read-org-headings - "Jump to org headline: " org-agenda-files 3 t)) - ;;;###autoload (defun +default/lsp-format-region-or-buffer () "Format the buffer (or selection) with LSP." @@ -327,22 +55,3 @@ ARG is set, prompt for a known project to search from." (while (server-running-p) (sit-for 1)) (server-start)) - -;;;###autoload -(defun +default/find-file-under-here () - "Perform a recursive file search from the current directory." - (interactive) - (if (featurep! :completion ivy) - (call-interactively #'counsel-file-jump) - (λ! (doom-project-find-file default-directory)))) - -;;;###autoload -(defun +default/insert-file-path (arg) - "Insert the file name (absolute path if prefix ARG). -If `buffer-file-name' isn't set, uses `default-directory'." - (interactive "P") - (let ((path (or buffer-file-name default-directory))) - (insert - (if arg - (abbreviate-file-name path) - (file-name-nondirectory path))))) diff --git a/modules/config/default/autoload/files.el b/modules/config/default/autoload/files.el new file mode 100644 index 000000000..ee25f33a0 --- /dev/null +++ b/modules/config/default/autoload/files.el @@ -0,0 +1,42 @@ +;;; config/default/autoload/files.el -*- lexical-binding: t; -*- + +;;;###autoload +(defun +default/browse-project () + "Browse files from the current project's root." + (interactive) (doom-project-browse (doom-project-root))) +;; NOTE No need for find-in-project, use `projectile-find-file' + +;;;###autoload +(defun +default/browse-templates () + "Browse files from `+file-templates-dir'." + (interactive) (doom-project-browse +file-templates-dir)) +;;;###autoload +(defun +default/find-in-templates () + "Find a file under `+file-templates-dir', recursively." + (interactive) (doom-project-find-file +file-templates-dir)) + +;;;###autoload +(defun +default/browse-emacsd () + "Browse files from `doom-emacs-dir'." + (interactive) (doom-project-browse doom-emacs-dir)) +;;;###autoload +(defun +default/find-in-emacsd () + "Find a file under `doom-emacs-dir', recursively." + (interactive) (doom-project-find-file doom-emacs-dir)) + +;;;###autoload +(defun +default/browse-notes () + "Browse files from `org-directory'." + (interactive) (doom-project-browse org-directory)) +;;;###autoload +(defun +default/find-in-notes () + "Find a file under `org-directory', recursively." + (interactive) (doom-project-find-file org-directory)) + +;;;###autoload +(defun +default/find-file-under-here () + "Perform a recursive file search from the current directory." + (interactive) + (if (featurep! :completion ivy) + (call-interactively #'counsel-file-jump) + (λ! (doom-project-find-file default-directory)))) diff --git a/modules/config/default/autoload/search.el b/modules/config/default/autoload/search.el new file mode 100644 index 000000000..2d03c0696 --- /dev/null +++ b/modules/config/default/autoload/search.el @@ -0,0 +1,96 @@ +;;; config/default/autoload/search.el -*- lexical-binding: t; -*- + +;;;###autoload +(defun +default/search-cwd (&optional arg) + "Conduct a text search in files under the current folder. +If prefix ARG is set, prompt for a directory to search from." + (interactive "P") + (let ((default-directory + (if arg + (read-directory-name "Search directory: ") + default-directory))) + (call-interactively + (cond ((featurep! :completion ivy) #'+ivy/project-search-from-cwd) + ((featurep! :completion helm) #'+helm/project-search-from-cwd) + (#'rgrep))))) + +;;;###autoload +(defun +default/search-other-cwd () + "Conduct a text search in another directory." + (interactive) + (+default/search-cwd 'other)) + +;;;###autoload +(defun +default/search-project (&optional arg) + "Conduct a text search in the current project root. +If prefix ARG is set, prompt for a known project to search from." + (interactive "P") + (let* ((disabled-command-function nil) + (default-directory + (if arg + (if-let (projects (projectile-relevant-known-projects)) + (completing-read "Search project: " projects + nil t nil nil (doom-project-root)) + (user-error "There are no known projects")) + default-directory))) + (call-interactively + (cond ((featurep! :completion ivy) #'+ivy/project-search) + ((featurep! :completion helm) #'+helm/project-search) + (#'projectile-ripgrep))))) + +;;;###autoload +(defun +default/search-other-project () + "Conduct a text search in a known project." + (interactive) + (+default/search-project 'other)) + +;;;###autoload +(defun +default/search-project-for-symbol-at-point (&optional arg symbol) + "Conduct a text search in the current project for symbol at point. +If prefix ARG is set, prompt for a known project to search from." + (interactive + (list current-prefix-arg + (or (and (use-region-p) + (rxt-quote-pcre + (buffer-substring-no-properties (region-beginning) + (region-end)))) + (rxt-quote-pcre (thing-at-point 'symbol t)) + ""))) + (let ((default-directory + (if arg + (if-let (projects (projectile-relevant-known-projects)) + (completing-read "Switch to project: " projects + nil t nil nil (doom-project-root)) + (user-error "There are no known projects")) + default-directory))) + (cond ((featurep! :completion ivy) + (+ivy/project-search nil symbol)) + ((featurep! :completion helm) + (+helm/project-search nil symbol)) + ((rgrep (regexp-quote symbol)))))) + +;;;###autoload +(defun +default/search-notes-for-symbol-at-point (&optional symbol) + "Conduct a text search in the current project for symbol at point. If prefix +ARG is set, prompt for a known project to search from." + (interactive + (list (rxt-quote-pcre (or (thing-at-point 'symbol t) "")))) + (require 'org) + (let ((default-directory org-directory)) + (+default/search-project-for-symbol-at-point + nil symbol))) + +;;;###autoload +(defun +default/org-notes-search () + "Perform a text search on `org-directory'." + (interactive) + (require 'org) + (let ((default-directory org-directory)) + (+default/search-project-for-symbol-at-point nil ""))) + +;;;###autoload +(defun +default/org-notes-headlines () + "Jump to an Org headline in `org-agenda-files'." + (interactive) + (doom-completing-read-org-headings + "Jump to org headline: " org-agenda-files 3 t)) diff --git a/modules/config/default/autoload/text.el b/modules/config/default/autoload/text.el new file mode 100644 index 000000000..d8f8c0293 --- /dev/null +++ b/modules/config/default/autoload/text.el @@ -0,0 +1,164 @@ +;;; config/default/autoload/text.el -*- lexical-binding: t; -*- + +;;;###autoload +(defalias '+default/newline #'newline) + +;;;###autoload +(defun +default/newline-above () + "Insert an indented new line before the current one." + (interactive) + (if (featurep 'evil) + (call-interactively 'evil-open-above) + (beginning-of-line) + (save-excursion (newline)) + (indent-according-to-mode))) + +;;;###autoload +(defun +default/newline-below () + "Insert an indented new line after the current one." + (interactive) + (if (featurep 'evil) + (call-interactively 'evil-open-below) + (end-of-line) + (newline-and-indent))) + +;;;###autoload +(defun +default/yank-pop () + "Interactively select what text to insert from the kill ring." + (interactive) + (call-interactively + (cond ((fboundp 'counsel-yank-pop) #'counsel-yank-pop) + ((fboundp 'helm-show-kill-ring) #'helm-show-kill-ring) + ((error "No kill-ring search backend available. Enable ivy or helm!"))))) + +;;;###autoload +(defun +default/yank-buffer-filename () + "Copy the current buffer's path to the kill ring." + (interactive) + (if-let* ((filename (or buffer-file-name (bound-and-true-p list-buffers-directory)))) + (message (kill-new (abbreviate-file-name filename))) + (error "Couldn't find filename in current buffer"))) + +;;;###autoload +(defun +default/insert-file-path (arg) + "Insert the file name (absolute path if prefix ARG). +If `buffer-file-name' isn't set, uses `default-directory'." + (interactive "P") + (let ((path (or buffer-file-name default-directory))) + (insert + (if arg + (abbreviate-file-name path) + (file-name-nondirectory path))))) + +;;;###autoload +(defun +default--newline-indent-and-continue-comments-a () + "A replacement for `newline-and-indent'. + +Continues comments if executed from a commented line, with special support for +languages with weak native comment continuation support (like C-family +languages)." + (interactive) + (if (and (sp-point-in-comment) + comment-line-break-function) + (funcall comment-line-break-function nil) + (delete-horizontal-space t) + (newline nil t) + (indent-according-to-mode))) + + +(defun doom--backward-delete-whitespace-to-column () + "Delete back to the previous column of whitespace, or as much whitespace as +possible, or just one char if that's not possible." + (interactive) + (let* ((context (ignore-errors (sp-get-thing))) + (op (plist-get context :op)) + (cl (plist-get context :cl)) + open-len close-len) + (cond ;; When in strings (sp acts weird with quotes; this is the fix) + ;; Also, skip closing delimiters + ((and op cl + (string= op cl) + (and (string= (char-to-string (or (char-before) 0)) op) + (setq open-len (length op))) + (and (string= (char-to-string (or (char-after) 0)) cl) + (setq close-len (length cl)))) + (delete-char (- open-len)) + (delete-char close-len)) + + ;; Delete up to the nearest tab column IF only whitespace between + ;; point and bol. + ((and (not indent-tabs-mode) + (not (bolp)) + (not (sp-point-in-string)) + (save-excursion (>= (- (skip-chars-backward " \t")) tab-width))) + (let ((movement (% (current-column) tab-width))) + (when (= movement 0) + (setq movement tab-width)) + (delete-char (- movement))) + (unless (memq (char-before) (list ?\n ?\ )) + (insert " "))) + + ;; Otherwise do a regular delete + ((delete-char -1))))) + +;;;###autoload +(defun +default--delete-backward-char-a (n &optional killflag) + "Same as `delete-backward-char', but preforms these additional checks: + ++ If point is surrounded by (balanced) whitespace and a brace delimiter ({} [] + ()), delete a space on either side of the cursor. ++ If point is at BOL and surrounded by braces on adjacent lines, collapse + newlines: + { + | + } => {|} ++ Otherwise, resort to `doom--backward-delete-whitespace-to-column'. ++ Resorts to `delete-char' if n > 1" + (interactive "p\nP") + (or (integerp n) + (signal 'wrong-type-argument (list 'integerp n))) + (cond ((and (use-region-p) + delete-active-region + (= n 1)) + ;; If a region is active, kill or delete it. + (if (eq delete-active-region 'kill) + (kill-region (region-beginning) (region-end) 'region) + (funcall region-extract-function 'delete-only))) + ;; In Overwrite mode, maybe untabify while deleting + ((null (or (null overwrite-mode) + (<= n 0) + (memq (char-before) '(?\t ?\n)) + (eobp) + (eq (char-after) ?\n))) + (let ((ocol (current-column))) + (delete-char (- n) killflag) + (save-excursion + (insert-char ?\s (- ocol (current-column)) nil)))) + ;; + ((and (= n 1) (bound-and-true-p smartparens-mode)) + (cond ((and (memq (char-before) (list ?\ ?\t)) + (save-excursion + (and (/= (skip-chars-backward " \t" (line-beginning-position)) 0) + (bolp)))) + (doom--backward-delete-whitespace-to-column)) + ((let* ((pair (ignore-errors (sp-get-thing))) + (op (plist-get pair :op)) + (cl (plist-get pair :cl)) + (beg (plist-get pair :beg)) + (end (plist-get pair :end))) + (cond ((and end beg (= end (+ beg (length op) (length cl)))) + (sp-backward-delete-char 1)) + ((doom-surrounded-p pair 'inline 'balanced) + (delete-char -1 killflag) + (delete-char 1) + (when (= (point) (+ (length cl) beg)) + (sp-backward-delete-char 1) + (sp-insert-pair op))) + ((and (bolp) (doom-surrounded-p pair nil 'balanced)) + (delete-region beg end) + (sp-insert-pair op) + t) + ((run-hook-with-args-until-success 'doom-delete-backward-functions)) + ((doom--backward-delete-whitespace-to-column))))))) + ;; Otherwise, do simple deletion. + ((delete-char (- n) killflag)))) From b88ff2a5638da02838e3ebae3a83395cf13be183 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 23 Dec 2019 17:20:59 -0500 Subject: [PATCH 373/983] Fix s-backspace for non-evil users --- core/autoload/text.el | 14 ++++++++++++++ modules/config/default/config.el | 2 +- modules/term/eshell/config.el | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/core/autoload/text.el b/core/autoload/text.el index f7f67f0d1..44e4d695d 100644 --- a/core/autoload/text.el +++ b/core/autoload/text.el @@ -129,6 +129,20 @@ true end of the line. The opposite of `doom/backward-to-bol-or-indent'." (setq doom--last-forward-pt (point)) (goto-char eol)))))) +;;;###autoload +(defun doom/backward-kill-to-bol-and-indent () + "Kill line to the first non-blank character. If invoked again afterwards, kill +line to beginning of line. Same as `evil-delete-back-to-indentation'." + (interactive) + (let ((empty-line-p (save-excursion (beginning-of-line) + (looking-at-p "[ \t]*$")))) + (funcall (if (fboundp 'evil-delete) + #'evil-delete + #'delete-region) + (point-at-bol) (point)) + (unless empty-line-p + (indent-according-to-mode)))) + ;;;###autoload (defun doom/dumb-indent () "Inserts a tab character (or spaces x tab-width)." diff --git a/modules/config/default/config.el b/modules/config/default/config.el index 2b51a68e0..26c194e7d 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -262,7 +262,7 @@ "s-/" (λ! (save-excursion (comment-line 1))) :n "s-/" #'evilnc-comment-or-uncomment-lines :v "s-/" #'evilnc-comment-operator - :gi [s-backspace] #'evil-delete-back-to-indentation + :gi [s-backspace] #'doom/backward-kill-to-bol-and-indent :gi [s-left] #'doom/backward-to-bol-or-indent :gi [s-right] #'doom/forward-to-last-non-comment-or-eol :gi [M-backspace] #'backward-kill-word diff --git a/modules/term/eshell/config.el b/modules/term/eshell/config.el index eae619ba8..5e185b60a 100644 --- a/modules/term/eshell/config.el +++ b/modules/term/eshell/config.el @@ -149,6 +149,7 @@ You should use `set-eshell-alias!' to change this.") [remap split-window-below] #'+eshell/split-below [remap split-window-right] #'+eshell/split-right [remap doom/backward-to-bol-or-indent] #'eshell-bol + [remap doom/backward-kill-to-bol-and-indent] #'eshell-kill-input [remap evil-delete-back-to-indentation] #'eshell-kill-input [remap evil-window-split] #'+eshell/split-below [remap evil-window-vsplit] #'+eshell/split-right))) From ffcc24350c3600f1f60044781f89a29dfe425d79 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 23 Dec 2019 23:53:27 -0500 Subject: [PATCH 374/983] Add DOOMDIR to 'doom info' --- core/autoload/debug.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/autoload/debug.el b/core/autoload/debug.el index b6d70d421..c3a98f004 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -46,7 +46,8 @@ ready to be pasted in a bug report on github." 'server-running)))) (doom (version . ,doom-version) - (build . ,(sh "git" "log" "-1" "--format=%D %h %ci"))) + (build . ,(sh "git" "log" "-1" "--format=%D %h %ci")) + (dir . ,(abbreviate-file-name doom-private-dir))) (system (type . ,system-type) (config . ,system-configuration) From f49913fc9ec9953c30c271eb51fbd831a601d223 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 24 Dec 2019 00:00:40 -0500 Subject: [PATCH 375/983] define-key! -> global-set-key In case general hasn't been installed yet. --- core/core-editor.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 49d1b6bc2..b2452f88e 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -379,12 +379,11 @@ files, so we replace calls to `pp' with the much faster `prin1'." ;; a better *help* buffer :commands helpful--read-symbol :init - (define-key! - [remap describe-function] #'helpful-callable - [remap describe-command] #'helpful-command - [remap describe-variable] #'helpful-variable - [remap describe-key] #'helpful-key - [remap describe-symbol] #'doom/describe-symbol) + (global-set-key [remap describe-function] #'helpful-callable) + (global-set-key [remap describe-command] #'helpful-command) + (global-set-key [remap describe-variable] #'helpful-variable) + (global-set-key [remap describe-key] #'helpful-key) + (global-set-key [remap describe-symbol] #'doom/describe-symbol) (defun doom-use-helpful-a (orig-fn &rest args) "Force ORIG-FN to use helpful instead of the old describe-* commands." From 125561eb038f7bf1a097ec163fe40d5df0aeca65 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 24 Dec 2019 00:01:17 -0500 Subject: [PATCH 376/983] Refactor package! & package init system - Reduces `package!`'s side-effects and moves them to `doom-initialize-packages`. - Adds :pin to `package!` for commit pinning (but it hasn't been implemented just yet -- needs more testing)! - Adds `doom-pinned-packages` variable - Now overrides straight recipes using `straight-override-recipe` instead of in-house merging. --- core/autoload/packages.el | 3 +- core/core-packages.el | 81 ++++++++++++++++++++++++--------------- 2 files changed, 52 insertions(+), 32 deletions(-) diff --git a/core/autoload/packages.el b/core/autoload/packages.el index 7406dddc1..224009a2b 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -167,8 +167,7 @@ If ALL-P, gather packages unconditionally across all modules, including disabled ones." (let ((doom-interactive-mode t) (doom-modules (doom-modules)) - doom-packages - doom-disabled-packages) + doom-packages) (doom--read-module-packages-file (doom-path doom-core-dir "packages.el") all-p t) (let ((private-packages (doom-path doom-private-dir "packages.el"))) diff --git a/core/core-packages.el b/core/core-packages.el index fe3291dbd..8de167cb1 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -43,6 +43,14 @@ package's name as a symbol, and whose CDR is the plist supplied to its `package!' declaration. Set by `doom-initialize-packages'.") +(defvar doom-pinned-packages nil + "An alist mapping package names to commit hashes; both strings. + +We avoid straight's lockfiles because we want to pin packages straight from +their `package!' declarations, which is simpler than lockfiles, where version +management would be done in a whole new file that users shouldn't have to deal +with.") + (defvar doom-core-packages '(straight use-package async) "A list of packages that must be installed (and will be auto-installed if missing) and shouldn't be deleted.") @@ -190,7 +198,7 @@ This ensure `doom-packages' is populated, if isn't aren't already. Use this before any of straight's or Doom's package management's API to ensure all the necessary package metadata is initialized and available for them." (unless doom-init-packages-p - (setq force-p t)) + (setq force-p t)) (when (or force-p (not (bound-and-true-p package--initialized))) (doom-log "Initializing package.el") (require 'package) @@ -202,7 +210,8 @@ necessary package metadata is initialized and available for them." (doom-ensure-straight) (require 'straight)) (straight--reset-caches) - (setq straight-recipe-repositories nil) + (setq straight-recipe-repositories nil + straight-recipe-overrides nil) (mapc #'straight-use-recipes doom-core-package-sources) (straight-register-package `(straight :type git :host github @@ -213,16 +222,32 @@ necessary package metadata is initialized and available for them." (mapc #'straight-use-package doom-core-packages) (doom-log "Initializing doom-packages") (setq doom-disabled-packages nil + doom-pinned-packages nil doom-packages (doom-package-list)) - (cl-loop for (pkg . plist) in doom-packages - if (plist-get plist :disable) - do (cl-pushnew pkg doom-disabled-packages) - else if (not (plist-get plist :ignore)) - do (with-demoted-errors "Package error: %s" - (straight-register-package - (if-let (recipe (plist-get plist :recipe)) - (cons pkg recipe) - pkg)))) + (dolist (package doom-packages) + (let ((name (car package))) + (with-plist! (cdr package) (recipe module disable ignore pin) + (if ignore + (doom-log "Ignoring package %S" name) + (when disable + (doom-log "Disabling package %S" name) + (cl-pushnew name doom-disabled-packages)) + (when pin + (doom-log "Pinning package %S to %S" name pin) + (setf (alist-get (symbol-name name) doom-pinned-packages + nil nil #'equal) + pin)) + ;; Warn about disabled core packages + (when (and (not (memq name doom-disabled-packages)) + (cl-find :core module :key #'car)) + (print! (warn "%s\n%s") + (format "You've disabled %S" name) + (indent 2 (concat "This is a core package. Disabling it will cause errors, as Doom assumes\n" + "core packages are always available. Disable their minor-modes or hooks instead.")))) + (with-demoted-errors "Package error: %s" + (when recipe + (straight-override-recipe (cons name recipe))) + (straight-register-package name)))))) (unless doom-interactive-mode (add-hook 'kill-emacs-hook #'doom--finalize-straight)))) @@ -252,7 +277,7 @@ necessary package metadata is initialized and available for them." ;;; Module package macros (cl-defmacro package! - (name &rest plist &key built-in recipe ignore _disable _freeze) + (name &rest plist &key built-in recipe ignore _pin _disable) "Declares a package and how to install it (if applicable). This macro is declarative and does not load nor install packages. It is used to @@ -264,18 +289,23 @@ Only use this macro in a module's packages.el file. Accepts the following properties: :recipe RECIPE - Takes a MELPA-style recipe (see `quelpa-recipe' in `quelpa' for an example); - for packages to be installed from external sources. + Specifies a straight.el recipe to allow you to acquire packages from external + sources. See https://github.com/raxod502/straight.el#the-recipe-format for + details on this recipe. :disable BOOL Do not install or update this package AND disable all of its `use-package!' - blocks. + and `after!' blocks. :ignore FORM Do not install this package. - :freeze FORM - Do not update this package if FORM is non-nil. - :built-in BOOL - Same as :ignore if the package is a built-in Emacs package. If set to - 'prefer, will use built-in package if it is present. + :pin STR|nil + (NOT IMPLEMENTED YET) + Pin this package to commit hash STR. Setting this to nil will unpin this + package if previously pinned. + :built-in BOOL|'prefer + Same as :ignore if the package is a built-in Emacs package. This is more to + inform help commands like `doom/help-packages' that this is a built-in + package. If set to 'prefer, the package will not be installed if it is + already provided by Emacs. Returns t if package is successfully registered, and nil if it was disabled elsewhere." @@ -313,16 +343,7 @@ elsewhere." (error-message-string e))))) (setf (alist-get name doom-packages) plist) - (if (not (plist-get plist :disable)) t - (doom-log "Disabling package %S" name) - (when (and (not (memq name doom-disabled-packages)) - (cl-find :core (plist-get plist :modules) :key #'car)) - (print! (warn "%s\n%s") - (format "You've disabled %S" name) - (indent 2 (concat "This is a core package. Disabling it will cause errors, as Doom assumes\n" - "core packages are always available. Disable their minor-modes or hooks instead.")))) - (cl-pushnew name doom-disabled-packages) - nil))) + (not (plist-get plist :disable)))) (defmacro disable-packages! (&rest packages) "A convenience macro for disabling packages in bulk. From ebc30232a35af6f829585ac4880b53cdfa598df5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 24 Dec 2019 02:25:37 -0500 Subject: [PATCH 377/983] Fix package manager ignoring :disable --- core/core-packages.el | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index 8de167cb1..d62add145 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -229,25 +229,24 @@ necessary package metadata is initialized and available for them." (with-plist! (cdr package) (recipe module disable ignore pin) (if ignore (doom-log "Ignoring package %S" name) - (when disable - (doom-log "Disabling package %S" name) - (cl-pushnew name doom-disabled-packages)) (when pin (doom-log "Pinning package %S to %S" name pin) (setf (alist-get (symbol-name name) doom-pinned-packages nil nil #'equal) pin)) - ;; Warn about disabled core packages - (when (and (not (memq name doom-disabled-packages)) - (cl-find :core module :key #'car)) - (print! (warn "%s\n%s") - (format "You've disabled %S" name) - (indent 2 (concat "This is a core package. Disabling it will cause errors, as Doom assumes\n" - "core packages are always available. Disable their minor-modes or hooks instead.")))) - (with-demoted-errors "Package error: %s" - (when recipe - (straight-override-recipe (cons name recipe))) - (straight-register-package name)))))) + (if (not disable) + (with-demoted-errors "Package error: %s" + (when recipe + (straight-override-recipe (cons name recipe))) + (straight-register-package name)) + (doom-log "Disabling package %S" name) + (cl-pushnew name doom-disabled-packages) + ;; Warn about disabled core packages + (when (cl-find :core module :key #'car) + (print! (warn "%s\n%s") + (format "You've disabled %S" name) + (indent 2 (concat "This is a core package. Disabling it will cause errors, as Doom assumes\n" + "core packages are always available. Disable their minor-modes or hooks instead."))))))))) (unless doom-interactive-mode (add-hook 'kill-emacs-hook #'doom--finalize-straight)))) From 28e36222ed0bb5fdfb71e5cf14c13a636196c881 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 24 Dec 2019 02:35:07 -0500 Subject: [PATCH 378/983] Reformat package! macro --- core/core-packages.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index d62add145..f59f82a98 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -311,13 +311,16 @@ elsewhere." (declare (indent defun)) (when (and recipe (keywordp (car-safe recipe))) (plist-put! plist :recipe `(quote ,recipe))) + ;; :built-in t is basically an alias for :ignore (locate-library NAME) (when built-in - (when (and (not ignore) (equal built-in '(quote prefer))) + (when (and (not ignore) + (equal built-in '(quote prefer))) (setq built-in `(locate-library ,(symbol-name name) nil doom--initial-load-path))) (plist-delete! plist :built-in) (plist-put! plist :ignore built-in)) `(let* ((name ',name) (plist (cdr (assq name doom-packages)))) + ;; Record what module this declaration was found in (let ((module-list (plist-get plist :modules)) (module ',(doom-module-from-path))) (unless (member module module-list) @@ -325,11 +328,10 @@ elsewhere." (append module-list (list module) nil)))) - + ;; Merge given plist with pre-existing one (doplist! ((prop val) (list ,@plist) plist) (unless (null val) (plist-put! plist prop val))) - ;; Some basic key validation; error if you're not using a valid key (condition-case e (cl-destructuring-bind @@ -340,7 +342,7 @@ elsewhere." (signal 'doom-package-error (cons ,(symbol-name name) (error-message-string e))))) - + ;; This is the only side-effect of this macro! (setf (alist-get name doom-packages) plist) (not (plist-get plist :disable)))) From a28de332fc321881b74d0542e3ed86aaed3c88d1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 24 Dec 2019 12:55:13 -0500 Subject: [PATCH 379/983] lang/kotlin: add basic README #1166 --- modules/lang/kotlin/README.org | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 modules/lang/kotlin/README.org diff --git a/modules/lang/kotlin/README.org b/modules/lang/kotlin/README.org new file mode 100644 index 000000000..00f53296c --- /dev/null +++ b/modules/lang/kotlin/README.org @@ -0,0 +1,36 @@ +#+TITLE: lang/kotlin +#+DATE: March 28, @019 +#+SINCE: v3.0.0 +#+STARTUP: inlineimages + +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] +- [[#prerequisites][Prerequisites]] +- [[#features][Features]] +- [[#configuration][Configuration]] +- [[#troubleshooting][Troubleshooting]] + +* Description +This module adds Kotlin support to Emacs. + +** Module Flags ++ =+lsp= Enables integration with [[https://github.com/emacs-lsp/lsp-mode][kotlin-language-server]]. This requires the + =:tools lsp= module. + +** Plugins ++ kotlin-mode ++ flycheck-kotlin + +* Prerequisites +TODO + +* Features +TODO + +* Configuration +TODO + +* Troubleshooting +TODO From f04af0b8a285eff16a8504b6f64d5817fd0e8721 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 24 Dec 2019 14:25:08 -0500 Subject: [PATCH 380/983] Bind 'SPC b u' to save current file as root --- core/autoload/files.el | 12 ++++++++++++ modules/config/default/+evil-bindings.el | 1 + 2 files changed, 13 insertions(+) diff --git a/core/autoload/files.el b/core/autoload/files.el index f7cd34741..0014280db 100644 --- a/core/autoload/files.el +++ b/core/autoload/files.el @@ -341,3 +341,15 @@ file if it exists, without confirmation." "Open the current file as root." (interactive) (find-alternate-file (doom--sudo-file buffer-file-name))) + +;;;###autoload +(defun doom/sudo-save-buffer () + "Save this file as root." + (interactive) + (let ((origin (current-buffer)) + (buffer (doom--sudo-file buffer-file-name))) + (unwind-protect + (with-current-buffer buffer + (save-buffer)) + (unless (eq origin buffer) + (kill-buffer buffer))))) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 1ccc59f81..0070605f3 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -340,6 +340,7 @@ :desc "Revert buffer" "r" #'revert-buffer :desc "Save buffer" "s" #'basic-save-buffer :desc "Save all buffers" "S" #'evil-write-all + :desc "Save buffer as root" "u" #'doom/sudo-save-buffer :desc "Pop up scratch buffer" "x" #'doom/open-scratch-buffer :desc "Switch to scratch buffer" "X" #'doom/switch-to-scratch-buffer :desc "Bury buffer" "z" #'bury-buffer From 9bc0c226f4365670757fd75d8440f76f37c1e552 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 24 Dec 2019 14:28:41 -0500 Subject: [PATCH 381/983] docs/faq: add how-to-customize-faces question --- docs/faq.org | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/faq.org b/docs/faq.org index 897fb7bc8..924269368 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -758,6 +758,18 @@ rules. You'll find more comprehensive documentation on ~set-popup-rule!~ in its docstring (available through =SPC h f= -- or =C-h f= for non-evil users). +** How do I change the appearance a face (or faces)? +Doom provides the ~custom-set-faces!~ and ~custom-theme-set-faces!~ macros as a +convenience. + +#+begin_quote +*Do not use ~M-x customize~ or any of the built-in Emacs customize-* API.* Doom +does not support it and never will; those settings could break at any time. +#+end_quote + +See = f custom-set-faces\!= (or =M-x helpful-function custom-set-faces\!=) +for documentation and examples on how to use it. == is =SPC h= for evil +users and =C-h= for non-evil users. ** Can Doom be customized without restarting Emacs? Short answer: You can, but you shouldn't. From 9dc288da210dec73587f43061e5015b704c6a9af Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 24 Dec 2019 15:08:56 -0500 Subject: [PATCH 382/983] docs/faq: mention indent highlights under common issues --- docs/faq.org | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/faq.org b/docs/faq.org index 924269368..72c1daaca 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -1153,5 +1153,31 @@ the new one, which is achieved thus: 3. Uncomment the module/package. 4. Run ~doom refresh~. +** Why do I see ugly indentation highlights for tabs? +[[https://github.com/hlissner/doom-emacs/blob/develop/core/core-ui.el#L132-L150][Doom highlights non-standard indentation]]. i.e. Indentation that doesn't match +the indent style you've set for that file. Doom uses space indentation for most +languages by default (excluding languages where tabs are the norm, like Go). + +There are a couple ways to address this: + +1. Change ~indent-tabs-mode~ (nil = spaces, t = tabs). + + #+BEGIN_SRC elisp + ;; use tab indentation everywhere + (setq-default indent-tabs-mode t) + + ;; or only in certain modes + (setq-hook! 'sh-mode-hook indent-tabs-mode t) ; shell scripts + (setq-hook! '(c-mode-hook c++-mode-hook) indent-tabs-mode t) ; C/C++ + #+END_SRC + +2. Use [[https://editorconfig.org/][editorconfig]] to configure code style on a per-project basis. If you + enable Doom's =:tools editorconfig= module, Doom will recognize + =.editorconfigrc= files. + +3. Or trust in dtrt-indent; a plugin Doom uses to analyze and detect + indentation when you open a file (that isn't in a project with an + editorconfig file). This isn't foolproof, and won't work for files that have + no content in them, but it can help in one-off scenarios. * TODO Contributing From 4ccfb8cf498899f9602e59bffb0253b6cc2110c4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 24 Dec 2019 15:11:54 -0500 Subject: [PATCH 383/983] docs/faq: update TOC --- docs/faq.org | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/faq.org b/docs/faq.org index 72c1daaca..bc5169c94 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -32,6 +32,7 @@ - [[#how-do-i-change-the-leaderlocalleader-keys][How do I change the leader/localleader keys?]] - [[#how-do-i-change-the-style-of-line-numbers-or-disable-them-altogether][How do I change the style of line-numbers (or disable them altogether)?]] - [[#how-do-i-change-the-behavior-and-appearance-of-popup-windows][How do I change the behavior and appearance of popup windows?]] + - [[#how-do-i-change-the-appearance-a-face-or-faces][How do I change the appearance a face (or faces)?]] - [[#can-doom-be-customized-without-restarting-emacs][Can Doom be customized without restarting Emacs?]] - [[#can-vimevil-be-removed-for-a-more-vanilla-emacs-experience][Can Vim/Evil be removed for a more vanilla Emacs experience?]] - [[#should-i-use-make-or-bindoom][Should I use ~make~ or ~bin/doom~?]] @@ -58,6 +59,7 @@ - [[#cant-load-my-theme-unable-to-find-theme-file-for-x-errors][Can't load my theme; ~unable to find theme file for X~ errors]] - [[#tramp-connections-hang-forever-when-connecting][TRAMP connections hang forever when connecting]] - [[#an-upstream-package-was-broken-and-i-cant-update-it][An upstream package was broken and I can't update it]] + - [[#why-do-i-see-ugly-indentation-highlights-for-tabs][Why do I see ugly indentation highlights for tabs?]] - [[#contributing][Contributing]] * General From 14c87e69434f06b3d5738f71a343faefa9c473b0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 24 Dec 2019 16:37:26 -0500 Subject: [PATCH 384/983] lang/org: fix some ob packages not loading #2241 --- modules/lang/org/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 78fb0e538..83b75aa13 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -217,7 +217,7 @@ background (and foreground) match the current theme." (defun +org--babel-lazy-load (lang) (cl-check-type lang symbol) (or (run-hook-with-args-until-success '+org-babel-load-functions lang) - (require (intern-soft (format "ob-%s" lang)) nil t) + (require (intern (format "ob-%s" lang)) nil t) (require lang nil t))) (defadvice! +org--src-lazy-load-library-a (lang) From 684bdda4b2c278953c9cad2d6167aabd6f6295e6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 24 Dec 2019 16:43:30 -0500 Subject: [PATCH 385/983] tools/flyspell: add +everywhere feature --- docs/index.org | 2 +- modules/tools/flyspell/config.el | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/index.org b/docs/index.org index 43173982b..32a4b7737 100644 --- a/docs/index.org +++ b/docs/index.org @@ -235,7 +235,7 @@ Small modules that give Emacs access to external tools & services. + [[file:../modules/tools/ein/README.org][ein]] - TODO + [[file:../modules/tools/eval/README.org][eval]] =+overlay= - REPL & code evaluation support for a variety of languages + flycheck - Live error/warning highlights -+ flyspell - Spell checking ++ flyspell =+everywhere= - Spell checking + gist - TODO + [[file:../modules/tools/lookup/README.org][lookup]] =+dictionary +docsets= - Universal jump-to & documentation lookup backend diff --git a/modules/tools/flyspell/config.el b/modules/tools/flyspell/config.el index 61fcd75a3..be54fa426 100644 --- a/modules/tools/flyspell/config.el +++ b/modules/tools/flyspell/config.el @@ -50,8 +50,9 @@ flyspell-issue-message-flag nil) (add-hook 'text-mode-hook #'flyspell-mode) - (when (featurep! +prog) - (add-hook 'prog-mode-hook #'flyspell-prog-mode)) + (when (featurep! +everywhere) + (add-hook! '(conf-mode-hook prog-mode-hook) + #'flyspell-prog-mode)) (add-hook! 'flyspell-mode-hook (defun +flyspell-inhibit-duplicate-detection-maybe-h () From 914b9b0424a40656b156a166f5dc16238edb26d5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 24 Dec 2019 19:21:45 -0500 Subject: [PATCH 386/983] config/default: make ace-link fallback to avy-link-addr And present avy overlays even if there is only one candidate, as the alternative is jarringly unpredictable, unless you're expecting it. --- modules/config/default/config.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index 26c194e7d..fb6d8c2c7 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -23,7 +23,11 @@ ;;;###package avy (setq avy-all-windows nil avy-all-windows-alt t - avy-background t) + avy-background t + ;; the unpredictability of this makes it a poor default + avy-single-candidate-jump nil + ;; Since `goto-address-mode' is enabled everywhere... + ace-link-fallback-function #'ace-link-addr) (after! epa From b8948aa6efcbc84d332ebb73b3f5a25a44239f59 Mon Sep 17 00:00:00 2001 From: Sean Farley Date: Tue, 24 Dec 2019 13:45:34 -0800 Subject: [PATCH 387/983] dap-mode: set extensions variable to doom-cache Previously, this would put the .extension directory in `user-emacs-directory' which in doom's case will be in the root of the doom directory. So, we move the directory to doom's etc dir and also name it something descriptive instead of 'extension'. --- modules/tools/debugger/config.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/tools/debugger/config.el b/modules/tools/debugger/config.el index 1efc7162c..816a9923d 100644 --- a/modules/tools/debugger/config.el +++ b/modules/tools/debugger/config.el @@ -23,8 +23,10 @@ (use-package! dap-mode :when (featurep! :tools lsp) :after lsp-mode - :preface (setq dap--breakpoints-file (concat doom-etc-dir "dap-breakpoints")) - :init (add-hook 'dap-mode-hook #'dap-ui-mode) ; use a hook so users can remove it + :preface + (add-hook 'dap-mode-hook #'dap-ui-mode) ; use a hook so users can remove it + (setq dap--breakpoints-file (concat doom-etc-dir "dap-breakpoints") + dap-utils-extension-path (concat doom-etc-dir "dap-extension/")) :config (dap-mode 1) (dolist (module '(((:lang . cc) ccls dap-lldb dap-gdb-lldb) From 55f0be707423c7979db2380c6f03617e341ca855 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 24 Dec 2019 20:48:15 -0500 Subject: [PATCH 388/983] tools/lookup: fix definition (on mac) & synonym lookup --- modules/tools/lookup/autoload/lookup.el | 2 +- modules/tools/lookup/packages.el | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/tools/lookup/autoload/lookup.el b/modules/tools/lookup/autoload/lookup.el index fa4f51bf4..efa1267eb 100644 --- a/modules/tools/lookup/autoload/lookup.el +++ b/modules/tools/lookup/autoload/lookup.el @@ -336,7 +336,7 @@ Otherwise, falls back on `find-file-at-point'." (unless (featurep! +dictionary) (user-error "The +dictionary feature hasn't be enabled on :tools lookup module")) (cond (IS-MAC - (osx-dictionary-search-input identifier)) + (osx-dictionary--view-result identifier)) (+lookup-dictionary-enable-online (define-word identifier nil arg)) ;; TODO Implement offline dictionary backend diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index 92113d696..173350732 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -10,9 +10,7 @@ ;; (package! dumb-jump) (when (featurep! :completion ivy) - (package! ivy-xref) - ;; Need for Google/DuckDuckGo auto-completion on `+lookup/online' - (package! request)) + (package! ivy-xref)) (when (featurep! :completion helm) (package! helm-google) (package! helm-xref)) @@ -28,4 +26,6 @@ (if IS-MAC (package! osx-dictionary) (package! define-word)) - (package! powerthesaurus)) + ;; Need for Google/DuckDuckGo auto-completion on `+lookup/online' + (package! powerthesaurus) + (package! request)) From d00a0af925994b989e2e3dbc9d5813df20a95e1c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 24 Dec 2019 21:24:06 -0500 Subject: [PATCH 389/983] tools/lookup: fix missing libs for dictionary/thesaurus lookup --- modules/tools/lookup/autoload/lookup.el | 34 +++++++++++++------------ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/modules/tools/lookup/autoload/lookup.el b/modules/tools/lookup/autoload/lookup.el index efa1267eb..ceba1552b 100644 --- a/modules/tools/lookup/autoload/lookup.el +++ b/modules/tools/lookup/autoload/lookup.el @@ -335,7 +335,7 @@ Otherwise, falls back on `find-file-at-point'." current-prefix-arg)) (unless (featurep! +dictionary) (user-error "The +dictionary feature hasn't be enabled on :tools lookup module")) - (cond (IS-MAC + (cond ((and IS-MAC (require 'osx-dictionary nil t)) (osx-dictionary--view-result identifier)) (+lookup-dictionary-enable-online (define-word identifier nil arg)) @@ -350,19 +350,21 @@ Otherwise, falls back on `find-file-at-point'." current-prefix-arg)) (unless (featurep! +dictionary) (user-error "The +dictionary feature hasn't be enabled on :tools lookup module")) - (if +lookup-dictionary-enable-online - (request - (powerthesaurus-compose-url identifier) - :parser (lambda () (libxml-parse-html-region (point) (point-max))) - :headers '(("User-Agent" . "Chrome/74.0.3729.169")) - :success (cl-function - (lambda (&key data &allow-other-keys) - ;; in order to allow users to quit powerthesaurus prompt - ;; with C-g, we need to wrap callback with this - (with-local-quit - (funcall (powerthesaurus-choose-callback - (region-beginning) (region-end)) - (powerthesaurus-pick-synonym data) - identifier))))) + (unless +lookup-dictionary-enable-online ;; TODO Implement offline synonyms backend - (user-error "No offline dictionary implemented yet"))) + (user-error "No offline dictionary implemented yet")) + (require 'request) + (require 'powerthesaurus) + (request + (powerthesaurus-compose-url identifier) + :parser (lambda () (libxml-parse-html-region (point) (point-max))) + :headers '(("User-Agent" . "Chrome/74.0.3729.169")) + :success (cl-function + (lambda (&key data &allow-other-keys) + ;; in order to allow users to quit powerthesaurus prompt + ;; with C-g, we need to wrap callback with this + (with-local-quit + (funcall (powerthesaurus-choose-callback + (region-beginning) (region-end)) + (powerthesaurus-pick-synonym data) + identifier)))))) From 436d36fcd214abf763ac0a37ba701d5063b898fd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 24 Dec 2019 22:16:26 -0500 Subject: [PATCH 390/983] app/irc: fix workspace integration #2243 --- modules/app/irc/autoload/irc.el | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/modules/app/irc/autoload/irc.el b/modules/app/irc/autoload/irc.el index 8ff58ee24..038d36978 100644 --- a/modules/app/irc/autoload/irc.el +++ b/modules/app/irc/autoload/irc.el @@ -3,8 +3,10 @@ (defvar +irc--workspace-name "*IRC*") (defun +irc-setup-wconf (&optional inhibit-workspace) - (unless inhibit-workspace - (+workspace-switch +irc--workspace-name t)) + (when (and (featurep! :ui workspaces) + (+workspace-exists-p +irc--workspace-name) + (not inhibit-workspace)) + (+workspace-switch +irc--workspace-name 'auto-create)) (let ((buffers (doom-buffers-in-mode 'circe-mode nil t))) (if buffers (ignore (switch-to-buffer (car buffers))) @@ -20,17 +22,12 @@ If INHIBIT-WORKSPACE (the universal argument) is non-nil, don't spawn a new workspace for it." (interactive "P") - (cond ((and (featurep! :ui workspaces) - (+workspace-exists-p +irc--workspace-name)) - (+workspace-switch +irc--workspace-name)) - ((not (+irc-setup-wconf inhibit-workspace)) - (user-error "Couldn't start up a workspace for IRC"))) - (if (doom-buffers-in-mode 'circe-mode (buffer-list) t) - (message "Circe buffers are already open") - (if circe-network-options - (cl-loop for network in circe-network-options - collect (circe (car network))) - (call-interactively #'circe)))) + (+irc-setup-wconf inhibit-workspace) + (cond ((doom-buffers-in-mode 'circe-mode (doom-buffer-list) t) + (message "Circe buffers are already open")) + (circe-network-options + (mapc #'circe (mapcar #'car circe-network-options))) + ((call-interactively #'circe)))) ;;;###autoload (defun +irc/connect (&optional inhibit-workspace) From 44fcbb52dc9746c3dc26421c9109b74035b03fef Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 25 Dec 2019 02:13:53 -0500 Subject: [PATCH 391/983] Change format of doom-large-file-size-alist Instead of mapping major modes to file size thresholds, it maps file regexps (like auto-mode-alist) since the major mode cannot be known before set-auto-mode is called (in after-find-file). --- core/core-editor.el | 9 ++++----- modules/lang/clojure/config.el | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index b2452f88e..5c2790425 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -12,8 +12,8 @@ successfully sets indent_style/indent_size.") (defvar-local doom-large-file-p nil) (put 'doom-large-file-p 'permanent-local t) -(defvar doom-large-file-size-alist '((t . 1.0)) - "An alist mapping major mode to filesize thresholds. +(defvar doom-large-file-size-alist '(("." . 1.0)) + "An alist mapping regexps (like `auto-mode-alist') to filesize thresholds. If a file is opened and discovered to be larger than the threshold, Doom performs emergency optimizations to prevent Emacs from hanging, crashing or @@ -42,11 +42,10 @@ possible." (if (setq doom-large-file-p (and buffer-file-name (not doom-large-file-p) - (file-readable-p buffer-file-name) (> (nth 7 (file-attributes buffer-file-name)) (* 1024 1024 - (cdr (or (assq major-mode doom-large-file-size-alist) - (assq 't doom-large-file-size-alist))))))) + (assoc-default buffer-file-name doom-large-file-size-alist + #'string-match-p))))) (prog1 (apply orig-fn args) (if (memq major-mode doom-large-file-excluded-modes) (setq doom-large-file-p nil) diff --git a/modules/lang/clojure/config.el b/modules/lang/clojure/config.el index 6c4887dcb..ffcee5334 100644 --- a/modules/lang/clojure/config.el +++ b/modules/lang/clojure/config.el @@ -5,7 +5,7 @@ ;; Large clojure buffers tend to be slower than large buffers of other modes, so ;; it should have a lower threshold too. -(add-to-list 'doom-large-file-size-alist '(clojure-mode . 0.5)) +(add-to-list 'doom-large-file-size-alist '("\\.\\(?:clj[sc]?\\|dtm\\|edn\\)\\'" . 0.5)) ;; From aa3cb1e7dc309ecda30769a3268d869a2569af51 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 25 Dec 2019 02:15:48 -0500 Subject: [PATCH 392/983] Inhibit saveplace in "large" files --- core/core-editor.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/core-editor.el b/core/core-editor.el index 5c2790425..e05101fee 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -251,6 +251,11 @@ possible." :after-while #'save-place-find-file-hook (if buffer-file-name (ignore-errors (recenter)))) + (defadvice! doom--inhibit-saveplace-in-long-files-a (orig-fn &rest args) + :around #'save-place-to-alist + (unless doom-large-file-p + (apply orig-fn args))) + (defadvice! doom--dont-prettify-saveplace-cache-a (orig-fn) "`save-place-alist-to-file' uses `pp' to prettify the contents of its cache. `pp' can be expensive for longer lists, and there's no reason to prettify cache From fd66b2321e5445650a062f394bec65bca39ba700 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 25 Dec 2019 02:16:26 -0500 Subject: [PATCH 393/983] Trigger so-long even in modes with no comment syntax Refactoring of #2183 --- core/core-editor.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-editor.el b/core/core-editor.el index e05101fee..8f33e9285 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -511,7 +511,7 @@ files, so we replace calls to `pp' with the much faster `prin1'." ;; syntax, but in some buffers comment state isn't initialized, leading ;; to a wrong-type-argument: stringp error. (defun doom-buffer-has-long-lines-p () - (when (bound-and-true-p comment-use-syntax) + (let ((so-long-skip-leading-comments (bound-and-true-p comment-use-syntax))) (so-long-detected-long-line-p))) (setq so-long-predicate #'doom-buffer-has-long-lines-p)) From 712ac3349a18849fa518349b37c9c01ec1398b10 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 25 Dec 2019 15:22:16 +0700 Subject: [PATCH 394/983] Add dune-mode to lispy modes Dune uses an sexpression based syntax as well Signed-off-by: Rudi Grinberg --- modules/editor/lispy/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/editor/lispy/config.el b/modules/editor/lispy/config.el index 3d78c72f5..0103f0cbe 100644 --- a/modules/editor/lispy/config.el +++ b/modules/editor/lispy/config.el @@ -7,6 +7,7 @@ (racket-mode . lispy-mode) (hy-mode . lispy-mode) (lfe-mode . lispy-mode) + (dune-mode . lispy-mode) (clojure-mode . lispy-mode)) :config (setq lispy-close-quotes-at-end-p t) From 21e6304ced0a247f2ddddc1da96cd0a2fd1086c0 Mon Sep 17 00:00:00 2001 From: Cody Wilson Date: Wed, 25 Dec 2019 10:51:44 -0600 Subject: [PATCH 395/983] Small typo fix --- docs/faq.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/faq.org b/docs/faq.org index bc5169c94..504ecf1ad 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -472,7 +472,7 @@ to as your ~$DOOMDIR~. Your private config is typically comprised of an =init.el=, =config.el= and =packages.el= file. Put all your config in =config.el=, install packages by -adding ~package!~ declarations to =packagse.el=, and enable/disable modules in +adding ~package!~ declarations to =packages.el=, and enable/disable modules in you ~doom!~ block, which should have been created in your =init.el= when you first ran ~doom install~. From 606d53cc47a6b206add2258e6dc95424ddcf9500 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 25 Dec 2019 14:01:46 -0500 Subject: [PATCH 396/983] Fix wrong-type-argument when opening file that doesn't exist yet --- core/core-editor.el | 1 + 1 file changed, 1 insertion(+) diff --git a/core/core-editor.el b/core/core-editor.el index 8f33e9285..ab7ddedb2 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -42,6 +42,7 @@ possible." (if (setq doom-large-file-p (and buffer-file-name (not doom-large-file-p) + (file-exists-p buffer-file-name) (> (nth 7 (file-attributes buffer-file-name)) (* 1024 1024 (assoc-default buffer-file-name doom-large-file-size-alist From 550c9bda748814d5e4474e9cd0d840dd04a8a54c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 25 Dec 2019 13:34:36 -0500 Subject: [PATCH 397/983] cli/packages: implement commit pinning support This is step 2 toward version pinning and rollback. Next step is to actually pin packages. Step 1 was 125561eb0 --- core/cli/packages.el | 124 +++++++++++++++++++++++++++---------------- 1 file changed, 79 insertions(+), 45 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 0eec01bc1..120c75933 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -57,6 +57,8 @@ list remains lean." ;; ;;; Library +;; TODO Refactor all of me to be more functional! + (defun doom-cli-packages-install () "Installs missing packages. @@ -64,15 +66,27 @@ This function will install any primary package (i.e. a package with a `package!' declaration) or dependency thereof that hasn't already been." (print! (start "Installing & building packages...")) (print-group! - (let ((n 0)) - (dolist (package (hash-table-keys straight--recipe-cache)) - (straight--with-plist (gethash package straight--recipe-cache) - (local-repo) + (let ((versions-alist doom-pinned-packages) + (n 0)) + (dolist (recipe (hash-table-values straight--recipe-cache)) + (straight--with-plist recipe + (package local-repo) (let ((existed-p (file-directory-p (straight--repos-dir package)))) (condition-case-unless-debug e - (and (straight-use-package (intern package) nil nil (make-string (1- (or doom-format-indent 1)) 32)) + (and (straight-use-package + (intern package) nil nil + (make-string (1- (or doom-format-indent 1)) 32)) (not existed-p) (file-directory-p (straight--repos-dir package)) + (if-let (commit (cdr (assoc package versions-alist))) + (progn + (print! "Checking out %s commit %s" + package (substring commit 0 7)) + (unless (straight-vc-commit-present-p recipe commit) + (straight-vc-fetch-from-remote recipe)) + (straight-vc-check-out-commit recipe commit) + t) + t) (cl-incf n)) (error (signal 'doom-package-error @@ -136,54 +150,73 @@ declaration) or dependency thereof that hasn't already been." (defun doom-cli-packages-update () "Updates packages." (print! (start "Updating packages (this may take a while)...")) - ;; TODO Refactor me (let ((straight--repos-dir (straight--repos-dir)) (straight--packages-to-rebuild (make-hash-table :test #'equal)) (total (hash-table-count straight--repo-cache)) + (versions-alist doom-pinned-packages) (i 1) errors) + ;; TODO Log this somewhere? (print-group! (dolist (recipe (hash-table-values straight--repo-cache)) - (straight--with-plist recipe (package type local-repo) - (condition-case-unless-debug e - (let ((default-directory (straight--repos-dir local-repo))) - (if (not (file-in-directory-p default-directory straight--repos-dir)) - (print! (warn "[%d/%d] Skipping %s because it is local") - i total package) - (let ((commit (straight-vc-get-commit type local-repo))) - (if (not (straight-vc-fetch-from-remote recipe)) - (print! (warn "\033[K(%d/%d) Failed to fetch %s" i total package)) - (let ((output (straight--process-get-output))) + (catch 'skip + (straight--with-plist recipe (package type local-repo) + (unless (straight--repository-is-available-p recipe) + (print! (error "(%d/%d) Couldn't find local repo for %s!") + i total package)) + (let ((default-directory (straight--repos-dir local-repo))) + (unless (file-in-directory-p default-directory straight--repos-dir) + (print! (warn "(%d/%d) Skipping %s because it is local") + i total package) + (throw 'skip t)) + (condition-case-unless-debug e + (let ((commit (straight-vc-get-commit type local-repo)) + (newcommit (cdr (assoc package versions-alist))) + fetch-p) + (unless (or (and (stringp newcommit) + (straight-vc-commit-present-p recipe newcommit) + (print! (start "\033[K(%d/%d) Checking out %s for %s...\033[1A") + i total newcommit package)) + (and (print! (start "\033[K(%d/%d) Fetching %s...\033[1A") + i total package) + (straight-vc-fetch-from-remote recipe) + (setq fetch t))) + (print! (warn "\033[K(%d/%d) Failed to fetch %s" i total package)) + (throw 'skip t)) + (let ((output (straight--process-get-output))) + (if newcommit + (straight-vc-check-out-commit recipe newcommit) (straight-merge-package package) - (let ((newcommit (straight-vc-get-commit type local-repo))) - (if (string= commit newcommit) - (print! (start "\033[K(%d/%d) %s is up-to-date\033[1A") i total package) - (ignore-errors - (delete-directory (straight--build-dir package) 'recursive)) - (puthash package t straight--packages-to-rebuild) - (print! (info "\033[K(%d/%d) Updating %s...") i total package) - (unless (string-empty-p output) - (print-group! - (print! (info "%s") output) - (when (eq type 'git) - (straight--call "git" "log" "--oneline" newcommit (concat "^" commit)) - (print-group! - (print! "%s" (straight--process-get-output)))))) - (print! (success "(%d/%d) %s updated (%s -> %s)") i total package - (substring commit 0 7) - (substring newcommit 0 7)))))))) - (cl-incf i)) - (user-error - (signal 'user-error (error-message-string e))) - (error - (print! (warn "(%d/%d) Encountered error with %s" i total package)) - (print-group! - (print! (error "%s" e)) - (print-group! (print! (info "%s" (straight--process-get-output))))) - (push package errors))))) + (setq newcommit (straight-vc-get-commit type local-repo))) + (when (string= commit newcommit) + (throw 'skip t)) + (print! (info "\033[K(%d/%d) Updating %s...") i total package) + (puthash package t straight--packages-to-rebuild) + (ignore-errors + (delete-directory (straight--build-dir package) 'recursive)) + (print-group! + (unless (string-empty-p output) + (print! (info "%s") output)) + (when (eq type 'git) + ;; TODO Truncate long logs + (straight--call "git" "log" "--oneline" newcommit (concat "^" commit)) + (print-group! + (print! "%s" (straight--process-get-output))))) + (print! (success "(%d/%d) %s updated (%s -> %s)") i total package + (substring commit 0 7) + (substring newcommit 0 7)))) + (user-error + (signal 'user-error (error-message-string e))) + (error + (print! (warn "\033[K(%d/%d) Encountered error with %s" i total package)) + (print-group! + (print! (error "%s" e)) + (print-group! (print! (info "%s" (straight--process-get-output))))) + (push package errors)))))) + (cl-incf i)) (princ "\033[K") (when errors - (print! (error "There were %d errors, the offending packages are: %s") + (print! (error "Encountered %d error(s), the offending packages: %s") (length errors) (string-join errors ", "))) (if (hash-table-empty-p straight--packages-to-rebuild) (ignore @@ -193,8 +226,9 @@ declaration) or dependency thereof that hasn't already been." (packages (hash-table-keys straight--packages-to-rebuild))) (sort packages #'string-lessp) (doom--finalize-straight) - (doom-cli-packages-build) - (print! (success "Updated %d package(s)") count)) + (print! (success "Updated %d package(s): %s") + count (string-join packages ", ")) + (doom-cli-packages-build)) t)))) From ac21c094195576ae502a82b206111aa54e8ca923 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 25 Dec 2019 15:21:16 -0500 Subject: [PATCH 398/983] emacs/vc: better feedback from 'SPC g {y,Y}' --- modules/emacs/vc/autoload/vc.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/emacs/vc/autoload/vc.el b/modules/emacs/vc/autoload/vc.el index b381bc545..8f9ac8d07 100644 --- a/modules/emacs/vc/autoload/vc.el +++ b/modules/emacs/vc/autoload/vc.el @@ -19,10 +19,13 @@ the URL." If a selection is active, highlight them. Otherwise omits the #L suffix in the URL." (interactive) - (if (or (use-region-p) - (ignore-errors (evil-visual-state-p))) - (browse-at-remote-kill) - (kill-new (browse-at-remote--file-url (buffer-file-name))))) + (let ((url + (if (or (use-region-p) + (evil-visual-state-p)) + (browse-at-remote-get-url) + (browse-at-remote--file-url (buffer-file-name))))) + (kill-new url) + (message "Copied to clipboard: %S" url))) (defun +vc--remote-homepage () @@ -40,4 +43,6 @@ the URL." (defun +vc/browse-at-remote-kill-homepage () "Copy homepage URL of current project to clipboard." (interactive) - (kill-new (+vc--remote-homepage))) + (let ((url (+vc--remote-homepage))) + (kill-new url) + (message "Copied to clipboard: %S" url))) From adc8cba14b92e4e7472b77cb294296cd664eb241 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 25 Dec 2019 21:04:52 -0500 Subject: [PATCH 399/983] Revise docstrings & minor reformatting --- core/autoload/scratch.el | 2 +- modules/config/default/autoload/search.el | 2 +- modules/editor/evil/autoload/evil.el | 16 ++++++++++---- modules/tools/debugger/config.el | 22 ++++++++++---------- modules/ui/popup/autoload/popup.el | 4 ++-- modules/ui/workspaces/autoload/workspaces.el | 3 ++- 6 files changed, 29 insertions(+), 20 deletions(-) diff --git a/core/autoload/scratch.el b/core/autoload/scratch.el index a93456ebc..5e5b216ab 100644 --- a/core/autoload/scratch.el +++ b/core/autoload/scratch.el @@ -98,7 +98,7 @@ following: ;;;###autoload (defun doom/open-scratch-buffer (&optional arg project-p) - "Opens the (persistent) scratch buffer in a popup. + "Pop up a persistent scratch buffer. If passed the prefix ARG, switch to it in the current window. If PROJECT-P is non-nil, open a persistent scratch buffer associated with the diff --git a/modules/config/default/autoload/search.el b/modules/config/default/autoload/search.el index 2d03c0696..595ec4aa9 100644 --- a/modules/config/default/autoload/search.el +++ b/modules/config/default/autoload/search.el @@ -46,7 +46,7 @@ If prefix ARG is set, prompt for a known project to search from." ;;;###autoload (defun +default/search-project-for-symbol-at-point (&optional arg symbol) - "Conduct a text search in the current project for symbol at point. + "Search current project for symbol at point. If prefix ARG is set, prompt for a known project to search from." (interactive (list current-prefix-arg diff --git a/modules/editor/evil/autoload/evil.el b/modules/editor/evil/autoload/evil.el index 2393d5d93..f981ef47f 100644 --- a/modules/editor/evil/autoload/evil.el +++ b/modules/editor/evil/autoload/evil.el @@ -76,13 +76,21 @@ the only window, use evil-window-move-* (e.g. `evil-window-move-far-left')." (select-window that-window)))) ;;;###autoload -(defun +evil/window-move-left () "See `+evil--window-swap'" (interactive) (+evil--window-swap 'left)) +(defun +evil/window-move-left () + "Swap windows to the left." + (interactive) (+evil--window-swap 'left)) ;;;###autoload -(defun +evil/window-move-right () "See `+evil--window-swap'" (interactive) (+evil--window-swap 'right)) +(defun +evil/window-move-right () + "Swap windows to the right" + (interactive) (+evil--window-swap 'right)) ;;;###autoload -(defun +evil/window-move-up () "See `+evil--window-swap'" (interactive) (+evil--window-swap 'up)) +(defun +evil/window-move-up () + "Swap windows upward." + (interactive) (+evil--window-swap 'up)) ;;;###autoload -(defun +evil/window-move-down () "See `+evil--window-swap'" (interactive) (+evil--window-swap 'down)) +(defun +evil/window-move-down () + "Swap windows downward." + (interactive) (+evil--window-swap 'down)) ;;;###autoload (defun +evil/easymotion () diff --git a/modules/tools/debugger/config.el b/modules/tools/debugger/config.el index 816a9923d..4c5fedce9 100644 --- a/modules/tools/debugger/config.el +++ b/modules/tools/debugger/config.el @@ -1,20 +1,20 @@ ;;; tools/debugger/config.el -*- lexical-binding: t; -*- (defvar +debugger--realgud-alist - '((realgud:zshdb :modes (sh-mode)) - (realgud:kshdb :modes (sh-mode)) - (realgud:rdebug :modes (ruby-mode enh-ruby-mode)) - (realgud:pdb :modes (python-mode)) - (realgud:trepan2 :modes (python-mode)) - (realgud:gub :modes (go-mode)) + '((realgud:bashdb :modes (sh-mode)) (realgud:gdb) - (realgud:trepan :modes (perl-mode perl6-mode)) - (realgud:trepanpl :modes (perl-mode perl6-mode)) - (realgud:trepanjs :modes (javascript-mode js2-mode js3-mode)) + (realgud:gub :modes (go-mode)) + (realgud:kshdb :modes (sh-mode)) + (realgud:pdb :modes (python-mode)) + (realgud:perldb :modes (perl-mode perl6-mode)) + (realgud:rdebug :modes (ruby-mode enh-ruby-mode)) (realgud:remake) + (realgud:trepan :modes (perl-mode perl6-mode)) + (realgud:trepan2 :modes (python-mode)) (realgud:trepan3k :modes (python-mode)) - (realgud:bashdb :modes (sh-mode)) - (realgud:perldb :modes (perl-mode perl6-mode)))) + (realgud:trepanjs :modes (javascript-mode js2-mode js3-mode)) + (realgud:trepanpl :modes (perl-mode perl6-mode)) + (realgud:zshdb :modes (sh-mode)))) ;; diff --git a/modules/ui/popup/autoload/popup.el b/modules/ui/popup/autoload/popup.el index 3d030b92b..4c28b97b1 100644 --- a/modules/ui/popup/autoload/popup.el +++ b/modules/ui/popup/autoload/popup.el @@ -394,8 +394,8 @@ This window parameter is ignored if FORCE-P is non-nil." ;;;###autoload (defun +popup/toggle () - "If popups are open, close them. If they aren't, restore the last one or open -the message buffer in a popup window." + "Toggle any visible popups. +If no popups are available, display the *Messages* buffer in a popup window." (interactive) (let ((+popup--inhibit-transient t)) (cond ((+popup-windows) (+popup/close-all t)) diff --git a/modules/ui/workspaces/autoload/workspaces.el b/modules/ui/workspaces/autoload/workspaces.el index 41099dab9..a367f2664 100644 --- a/modules/ui/workspaces/autoload/workspaces.el +++ b/modules/ui/workspaces/autoload/workspaces.el @@ -342,7 +342,8 @@ end of the workspace list." ;;;###autoload (dotimes (i 9) (defalias (intern (format "+workspace/switch-to-%d" i)) - (lambda () (interactive) (+workspace/switch-to i)))) + (lambda () (interactive) (+workspace/switch-to i)) + (format "Switch to workspace #%d" (1+ i)))) ;;;###autoload (defun +workspace/switch-to-final () From 0b4356a7d5b1e40a4c0c9757bcfc7eadd76ac54d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 25 Dec 2019 21:05:09 -0500 Subject: [PATCH 400/983] Fix 'search documentation' button on dashboard --- modules/ui/doom-dashboard/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index 2659ecd64..046e5b840 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -69,7 +69,7 @@ Possible values: :action doom/open-private-config) ("Search Documentation" :icon (all-the-icons-octicon "book" :face 'font-lock-keyword-face) - :action doom/help-search)) + :action doom/help-search-headings)) "An alist of menu buttons used by `doom-dashboard-widget-shortmenu'. Each element is a cons cell (LABEL . PLIST). LABEL is a string to display after the icon and before the key string. From 7cc8a90c118f64607fb90e6b76d011ecd1aac105 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 25 Dec 2019 21:15:30 -0500 Subject: [PATCH 401/983] Disable save-place in large/long files --- core/core-editor.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/core-editor.el b/core/core-editor.el index ab7ddedb2..8747d9bbf 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -492,6 +492,8 @@ files, so we replace calls to `pp' with the much faster `prin1'." (delq! 'buffer-read-only so-long-variable-overrides 'assq) ;; ...but at least reduce the level of syntax highlighting (add-to-list 'so-long-variable-overrides '(font-lock-maximum-decoration . 1)) + ;; ...and insist that save-place not operate in large/long files + (add-to-list 'so-long-variable-overrides '(save-place-alist . nil)) ;; Text files could possibly be too long too (add-to-list 'so-long-target-modes 'text-mode) ;; But disable everything else that may be unnecessary/expensive for large From fe1642e85490bee6432aef3d29a39d337158fc09 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 25 Dec 2019 22:54:15 -0500 Subject: [PATCH 402/983] Add special goto def/docs support in doom! blocks - Pressing gd on a module in your doom! block will now browse that module's directory. - Pressing K on a module will jump to that module's documentation, if any. - Pressing K on a module flag will jump to that flag's description within that module's documenation. - This is now explained in init.example.el Closes #2249 --- core/autoload/help.el | 32 +++++----- init.example.el | 18 ++++-- modules/editor/evil/README.org | 2 +- .../templates/org-mode/__doom-readme | 2 +- modules/lang/emacs-lisp/autoload.el | 64 ++++++++++++++++++- modules/lang/emacs-lisp/config.el | 2 +- 6 files changed, 93 insertions(+), 27 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 706f9406e..1e4d1fefb 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -335,13 +335,7 @@ without needing to check if they are available." readme-path))) (defun doom--help-current-module-str () - (cond ((and buffer-file-name - (eq major-mode 'emacs-lisp-mode) - (file-in-directory-p buffer-file-name doom-private-dir) - (save-excursion (goto-char (point-min)) - (re-search-forward "^\\s-*(doom! " nil t)) - (thing-at-point 'sexp t))) - ((save-excursion + (cond ((save-excursion (require 'smartparens) (ignore-errors (sp-beginning-of-sexp) @@ -360,11 +354,14 @@ without needing to check if they are available." (symbol-name (cadr mod))))))) ;;;###autoload -(defun doom/help-modules (category module) +(defun doom/help-modules (category module &optional visit-dir) "Open the documentation for a Doom module. CATEGORY is a keyword and MODULE is a symbol. e.g. :editor and 'evil. +If VISIT-DIR is non-nil, visit the module's directory rather than its +documentation. + Automatically selects a) the module at point (in private init files), b) the module derived from a `featurep!' or `require!' call, c) the module that the current file is in, or d) the module associated with the current major mode (see @@ -373,7 +370,8 @@ current file is in, or d) the module associated with the current major mode (see (mapcar #'intern (split-string (completing-read "Describe module: " - (doom--help-modules-list) nil t nil nil + (doom--help-modules-list) + nil t nil nil (doom--help-current-module-str)) " " t))) (cl-check-type category symbol) @@ -383,12 +381,16 @@ current file is in, or d) the module associated with the current major mode (see (user-error "'%s %s' is not a valid module" category module)) (unless (file-readable-p path) (error "Can't find or read %S module at %S" module-string path)) - (if (not (file-directory-p path)) - (find-file path) - (if (y-or-n-p (format "The %S module has no README file. Explore its directory?" - module-string)) - (doom-project-browse path) - (user-error "Aborted module lookup"))))) + (cond ((not (file-directory-p path)) + (if visit-dir + (doom-project-browse (file-name-directory path)) + (find-file path))) + (visit-dir + (doom-project-browse path)) + ((y-or-n-p (format "The %S module has no README file. Explore its directory?" + module-string)) + (doom-project-browse (file-name-directory path))) + ((user-error "Aborted module lookup"))))) ;; diff --git a/init.example.el b/init.example.el index 6bf9c773c..b25f89e30 100644 --- a/init.example.el +++ b/init.example.el @@ -1,12 +1,18 @@ ;;; init.el -*- lexical-binding: t; -*- -;; Copy this file to ~/.doom.d/init.el or ~/.config/doom/init.el ('doom install' -;; will do this for you). The `doom!' block below controls what modules are -;; enabled and in what order they will be loaded. Remember to run 'doom refresh' -;; after modifying it. +;; This file controls what Doom modules are enabled and what order they load in. +;; Remember to run 'doom sync' after modifying it! + +;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's +;; documentation. There you'll find information about all of Doom's modules +;; and what flags they support. + +;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or +;; 'C-c g k' for non-vim users) to view its documentation. This works on +;; flags as well (those symbols that start with a plus). ;; -;; More information about these modules (and what flags they support) can be -;; found in modules/README.org. +;; Alternatively, press 'gd' (or 'C-c g d') on a module to browse its +;; directory (for easy access to its source code). (doom! :input ;;chinese diff --git a/modules/editor/evil/README.org b/modules/editor/evil/README.org index 38563af10..8c23d70f5 100644 --- a/modules/editor/evil/README.org +++ b/modules/editor/evil/README.org @@ -1,7 +1,7 @@ #+TITLE: feature/evil #+DATE: February 2, 2017 #+SINCE: v2.0 -#+STARTUP: inlineimages +#+STARTUP: inlineimages nofold * Table of Contents :TOC_3:noexport: - [[#description][Description]] diff --git a/modules/editor/file-templates/templates/org-mode/__doom-readme b/modules/editor/file-templates/templates/org-mode/__doom-readme index 8e8af8fa6..23b967bd3 100644 --- a/modules/editor/file-templates/templates/org-mode/__doom-readme +++ b/modules/editor/file-templates/templates/org-mode/__doom-readme @@ -8,7 +8,7 @@ "")`} #+DATE: `(format (format-time-string "%B %%s, %Y") (string-to-number (format-time-string "%d")))` #+SINCE: ${2:{replace with next tagged release version}} -#+STARTUP: inlineimages +#+STARTUP: inlineimages nofold * Table of Contents :TOC_3:noexport: diff --git a/modules/lang/emacs-lisp/autoload.el b/modules/lang/emacs-lisp/autoload.el index 2ee0a1c37..e16e66b0f 100644 --- a/modules/lang/emacs-lisp/autoload.el +++ b/modules/lang/emacs-lisp/autoload.el @@ -66,13 +66,71 @@ library/userland functions" (with-no-warnings (byte-compile #'+emacs-lisp-highlight-vars-and-faces))) + +(defun +emacs-lisp--module-at-point () + (let ((origin (point))) + (save-excursion + (goto-char (point-min)) + (when (re-search-forward "(doom! " nil 'noerror) + (goto-char (match-beginning 0)) + (cl-destructuring-bind (beg . end) + (bounds-of-thing-at-point 'sexp) + (when (and (>= origin beg) + (<= origin end)) + (goto-char origin) + (while (not (sexp-at-point)) + (forward-symbol -1)) + (let (category module flag) + (cond ((keywordp (setq category (sexp-at-point))) + (while (keywordp (sexp-at-point)) + (forward-sexp 1)) + (setq module (car (doom-enlist (sexp-at-point))))) + ((and (symbolp (setq module (sexp-at-point))) + (string-prefix-p "+" (symbol-name module))) + (while (symbolp (sexp-at-point)) + (beginning-of-sexp)) + (setq flag module + module (car (sexp-at-point))) + (when (re-search-backward "\\_<:\\w+\\_>" nil t) + (setq category (sexp-at-point)))) + ((symbolp module) + (when (re-search-backward "\\_<:\\w+\\_>" nil t) + (setq category (sexp-at-point))))) + (list category module flag)))))))) + +;;;###autoload +(defun +emacs-lisp-lookup-definition (thing) + "Lookup definition of THING." + (if-let (module (+emacs-lisp--module-at-point)) + (doom/help-modules (car module) (cadr module) 'visit-dir) + (call-interactively #'elisp-def))) + ;;;###autoload (defun +emacs-lisp-lookup-documentation (thing) "Lookup THING with `helpful-variable' if it's a variable, `helpful-callable' if it's callable, `apropos' otherwise." - (if thing - (doom/describe-symbol thing) - (call-interactively #'doom/describe-symbol))) + (cond ((when-let (module (+emacs-lisp--module-at-point thing)) + (doom/help-modules (car module) (cadr module)) + (when (eq major-mode 'org-mode) + (with-demoted-errors "%s" + (re-search-forward + (if (caddr module) + "\\* Module Flags$" + "\\* Description$")) + (when (caddr module) + (re-search-forward (format "=\\%s=" (caddr module)) + nil t)) + (when (invisible-p (point)) + (org-show-hidden-entry)))) + t)) + (thing (doom/describe-symbol thing)) + ((call-interactively #'doom/describe-symbol)))) + +;; FIXME +;; (defun +emacs-lisp-lookup-file (thing) +;; (when-let (module (+emacs-lisp--module-at-point thing)) +;; (doom/help-modules (car module) (cadr module) 'visit-dir) +;; t)) ;; diff --git a/modules/lang/emacs-lisp/config.el b/modules/lang/emacs-lisp/config.el index ef11526b3..a4224cf09 100644 --- a/modules/lang/emacs-lisp/config.el +++ b/modules/lang/emacs-lisp/config.el @@ -22,7 +22,7 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.") (set-repl-handler! '(emacs-lisp-mode lisp-interaction-mode) #'+emacs-lisp/open-repl) (set-eval-handler! '(emacs-lisp-mode lisp-interaction-mode) #'+emacs-lisp-eval) (set-lookup-handlers! 'emacs-lisp-mode - :definition #'elisp-def + :definition #'+emacs-lisp-lookup-definition :documentation #'+emacs-lisp-lookup-documentation) (set-docsets! '(emacs-lisp-mode lisp-interaction-mode) "Emacs Lisp") (set-pretty-symbols! 'emacs-lisp-mode :lambda "lambda") From 934e4fc06fc3d2214e3b4d3fd89b84c018d435ea Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 26 Dec 2019 01:39:33 -0500 Subject: [PATCH 403/983] ui/doom-dashboard: fix vertical padding #2251 --- modules/ui/doom-dashboard/config.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index 046e5b840..01d7583cd 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -19,7 +19,7 @@ relative to `+doom-dashboard-banner-dir'. If nil, always use the ASCII banner.") (defvar +doom-dashboard-banner-dir (concat (dir!) "/banners/") "Where to look for `+doom-dashboard-banner-file'.") -(defvar +doom-dashboard-banner-padding '(4 . 4) +(defvar +doom-dashboard-banner-padding '(0 . 4) "Number of newlines to pad the banner with, above and below, respectively.") (defvar +doom-dashboard-inhibit-refresh nil @@ -249,10 +249,10 @@ whose dimensions may not be fully initialized by the time this is run." (save-excursion (skip-chars-forward "\n") (point))) (insert (make-string - (max 0 (- (/ (window-height (get-buffer-window)) 2) - (round (/ (+ (count-lines (point-min) (point-max)) - (car +doom-dashboard-banner-padding)) - 2)))) + (+ (max 0 (- (/ (window-height (get-buffer-window)) 2) + (round (/ (count-lines (point-min) (point-max)) + 2)))) + (car +doom-dashboard-banner-padding)) ?\n))))))))) (defun +doom-dashboard--persp-detect-project-h (&rest _) From c1ff03ebed0cf792013d7d59a2db03207a991601 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 26 Dec 2019 02:40:56 -0500 Subject: [PATCH 404/983] Expand :local-repo relative to containing file --- core/core-packages.el | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index f59f82a98..682396a24 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -334,10 +334,16 @@ elsewhere." (plist-put! plist prop val))) ;; Some basic key validation; error if you're not using a valid key (condition-case e - (cl-destructuring-bind - (&key _local-repo _files _flavor _no-build - _type _repo _host _branch _remote _nonrecursive _fork _depth) - (plist-get plist :recipe)) + (when-let (recipe (plist-get plist :recipe)) + (cl-destructuring-bind + (&key local-repo _files _flavor _no-build + _type _repo _host _branch _remote _nonrecursive _fork _depth) + recipe + ;; Expand :local-repo from current directory + (when local-repo + (plist-put! plist :recipe + (plist-put recipe :local-repo + (expand-file-name local-repo ,(dir!))))))) (error (signal 'doom-package-error (cons ,(symbol-name name) From 09b49ee83a0fe557640604f4298983542946d06a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 26 Dec 2019 02:44:12 -0500 Subject: [PATCH 405/983] Silence unused retval warnings from package! --- core/core-packages.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core-packages.el b/core/core-packages.el index 682396a24..6dfbfe57c 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -350,7 +350,8 @@ elsewhere." (error-message-string e))))) ;; This is the only side-effect of this macro! (setf (alist-get name doom-packages) plist) - (not (plist-get plist :disable)))) + (with-no-warnings + (not (plist-get plist :disable))))) (defmacro disable-packages! (&rest packages) "A convenience macro for disabling packages in bulk. From 1c7ba9d2cb712971148fa97a54ebd45726f522b6 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Thu, 26 Dec 2019 14:31:51 +0200 Subject: [PATCH 406/983] Set the directory for the Java LSP workspace --- modules/lang/java/+lsp.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/lang/java/+lsp.el b/modules/lang/java/+lsp.el index 03937e5c1..7e9bf68ce 100644 --- a/modules/lang/java/+lsp.el +++ b/modules/lang/java/+lsp.el @@ -5,7 +5,8 @@ :after-call java-mode :init (add-hook 'java-mode-local-vars-hook #'lsp!) - (setq lsp-java-server-install-dir (concat doom-etc-dir "eclipse.jdt.ls/server/")) + (setq lsp-java-server-install-dir (concat doom-etc-dir "eclipse.jdt.ls/server/") + lsp-java-workspace-dir (concat doom-etc-dir "java-workspace")) :config ;; TODO keybinds ;; TODO treemacs integration (?) From a488c308bb050abd2dc9ef17de25bcdc99ebc1cd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 26 Dec 2019 14:47:53 -0500 Subject: [PATCH 407/983] config/default: fix switch-buffer keys for vanilla users Closes #2256 --- modules/config/default/+emacs-bindings.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index 6ebca7a8d..45c809563 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -300,12 +300,15 @@ "M-SPC" #'objed-activate) ;;; buffer management - "C-x b" #'persp-switch-to-buffer - (:when (featurep! :completion ivy) - "C-x 4 b" #'+ivy/switch-workspace-buffer-other-window) + "C-x b" #'switch-to-buffer + "C-x 4 b" #'switch-to-buffer-other-window + (:when (featurep! :ui workspaces) + "C-x b" #'persp-switch-to-buffer + "C-x B" #'switch-to-buffer + "C-x 4 B" #'switch-to-buffer-other-window + (:when (featurep! :completion ivy) + "C-x 4 b" #'+ivy/switch-workspace-buffer-other-window)) "C-x C-b" #'ibuffer-list-buffers - "C-x B" #'switch-to-buffer - "C-x 4 B" #'switch-to-buffer-other-window "C-x K" #'doom/kill-this-buffer-in-all-windows ;;; company-mode From 5c45a9eff9158f197bbebd08ff328d7789cc6b79 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 26 Dec 2019 14:55:43 -0500 Subject: [PATCH 408/983] Fall back to typescript-mode for *.tsx #2252 --- modules/lang/javascript/config.el | 11 ++++++++++- modules/lang/web/+html.el | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/lang/javascript/config.el b/modules/lang/javascript/config.el index 93c839fae..02f513175 100644 --- a/modules/lang/javascript/config.el +++ b/modules/lang/javascript/config.el @@ -94,7 +94,16 @@ (if (= n 1) (rjsx-maybe-reparse)))) -(after! typescript-mode +(use-package! typescript-mode + :defer t + :init + ;; REVIEW Fix #2252. This is overwritten if the :lang web module is enabled. + ;; We associate TSX files with `web-mode' by default instead because + ;; `typescript-mode' does not officially support JSX/TSX. See + ;; https://github.com/emacs-typescript/typescript.el/issues/4 + (unless (featurep! :lang web) + (add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-mode))) + :config (add-hook 'typescript-mode-hook #'rainbow-delimiters-mode) (setq-hook! 'typescript-mode-hook comment-line-break-function #'js2-line-break) diff --git a/modules/lang/web/+html.el b/modules/lang/web/+html.el index 424cad0c3..4870ab20c 100644 --- a/modules/lang/web/+html.el +++ b/modules/lang/web/+html.el @@ -1,6 +1,9 @@ ;;; lang/web/+html.el -*- lexical-binding: t; -*- (use-package! web-mode + ;; REVIEW We associate TSX files with `web-mode' because `typescript-mode' + ;; does not officially support JSX/TSX. See + ;; https://github.com/emacs-typescript/typescript.el/issues/4 :mode "\\.\\(?:as\\(?:[cp]x\\)\\|blade\\.php\\|erb\\|hbs\\|j\\(?:inja\\|sp\\)\\|mustache\\|p?html?\\|svelte\\|t\\(?:pl\\.php\\|sx\\|wig\\)\\|vue\\)\\'" :mode "wp-content/themes/.+/.+\\.php\\'" :mode "templates/.+\\.php\\'" From 026fa8e65b0d8c1e4f9ca23ae915f7f88673847a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 26 Dec 2019 15:51:18 -0500 Subject: [PATCH 409/983] ui/pretty-code: use mac-auto-operator-composition-mode --- modules/ui/pretty-code/config.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/ui/pretty-code/config.el b/modules/ui/pretty-code/config.el index 49dae0cd3..0299a2aba 100644 --- a/modules/ui/pretty-code/config.el +++ b/modules/ui/pretty-code/config.el @@ -83,7 +83,14 @@ Otherwise it builds `prettify-code-symbols-alist' according to (add-hook 'after-change-major-mode-hook #'+pretty-code-init-pretty-symbols-h) ;; Font-specific ligature support -(cond ((featurep! +fira) +(cond ((and IS-MAC + (fboundp 'mac-auto-operator-composition-mode) + (or (featurep! +fira) + (featurep! +iosevka) + (featurep! +hasklig) + (featurep! +pragmata-pro))) + (mac-auto-operator-composition-mode)) + ((featurep! +fira) (load! "+fira")) ((featurep! +iosevka) (load! "+iosevka")) From 45e9f2cffc34a52cc1d80e7a4bf0f912d8a0dc56 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 26 Dec 2019 15:52:11 -0500 Subject: [PATCH 410/983] ui/pretty-code: add missing fira ligatures --- modules/ui/pretty-code/+fira.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/ui/pretty-code/+fira.el b/modules/ui/pretty-code/+fira.el index 3f236bd75..f1983a99d 100644 --- a/modules/ui/pretty-code/+fira.el +++ b/modules/ui/pretty-code/+fira.el @@ -110,7 +110,12 @@ ("~>" . #Xe167) ("~~" . #Xe168) ("~~>" . #Xe169) - ("%%" . #Xe16a))) + ("%%" . #Xe16a) + ("x" . #Xe16b) + (":" . #Xe16c) + ("+" . #Xe16d) + ("+" . #Xe16e) + ("*" . #Xe16f))) (defun +pretty-code-setup-fira-ligatures-h () (set-fontset-font t '(#Xe100 . #Xe16f) +pretty-code-fira-code-font-name) From 2e9195742a7d2890661dbcd2616355ab23be9c76 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 26 Dec 2019 16:49:03 -0500 Subject: [PATCH 411/983] Fix shell popups from regaining their modeline #2228 --- modules/ui/popup/config.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui/popup/config.el b/modules/ui/popup/config.el index 5111a7311..8b2c889ce 100644 --- a/modules/ui/popup/config.el +++ b/modules/ui/popup/config.el @@ -137,8 +137,8 @@ prevent the popup(s) from messing up the UI (or vice versa)." :vslot -3 :size +popup-shrink-to-fit :autosave t :select ignore :quit t :ttl 0) ("^\\*doom:" ; editing buffers (interaction required) :vslot -4 :size 0.35 :autosave t :select t :modeline t :quit nil :ttl t) - ("^\\*doom:\\(?:v?term\\|eshell\\)-popup" ; editing buffers (interaction required) - :vslot -5 :size 0.35 :select t :modeline t :quit nil :ttl nil) + ("^\\*doom:\\(?:v?term\\|e?shell\\)-popup" ; editing buffers (interaction required) + :vslot -5 :size 0.35 :select t :modeline nil :quit nil :ttl nil) ("^\\*\\(?:Wo\\)?Man " :vslot -6 :size 0.45 :select t :quit t :ttl 0) ("^\\*Calc" From d1f4a77fbb70856a4c3dad4cacfa34cadc6cddd8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 26 Dec 2019 16:50:14 -0500 Subject: [PATCH 412/983] Fix vestigial reference to old help-search-headings fn --- modules/editor/evil/autoload/ex.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/editor/evil/autoload/ex.el b/modules/editor/evil/autoload/ex.el index 776b1395e..a6405b950 100644 --- a/modules/editor/evil/autoload/ex.el +++ b/modules/editor/evil/autoload/ex.el @@ -168,10 +168,11 @@ function and open its documentation with `helpful-function'. Otherwise, it will search for it with `apropos'. If QUERY is empty, this runs the equivalent of 'M-x apropos'. If BANG is -non-nil, a search is preformed against Doom's manual (with `doom/help-search')." +non-nil, a search is preformed against Doom's manual (with +`doom/help-search-headings')." (interactive "") (if bang - (doom/help-search query) + (doom/help-search-headings query) (save-match-data (cond ((or (null query) (string-empty-p (string-trim query))) (call-interactively From 01e728dad58035ec5936c27c86d164cd2d9a253d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 26 Dec 2019 22:40:29 -0500 Subject: [PATCH 413/983] app/irc: remove hard dependencies on persp-mode And fix wrong type argument perspective nil error on M-x circe --- modules/app/irc/autoload/irc.el | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/app/irc/autoload/irc.el b/modules/app/irc/autoload/irc.el index 038d36978..699422c4a 100644 --- a/modules/app/irc/autoload/irc.el +++ b/modules/app/irc/autoload/irc.el @@ -49,16 +49,17 @@ workspace for it." (defun +irc/quit () "Kill current circe session and workgroup." (interactive) - (if (y-or-n-p "Really kill IRC session?") - (let (circe-channel-killed-confirmation - circe-server-killed-confirmation) - (when +irc--defer-timer - (cancel-timer +irc--defer-timer)) - (disable-circe-notifications) - (mapc #'kill-buffer (doom-buffers-in-mode 'circe-mode (buffer-list) t)) - (when (equal (+workspace-current-name) +irc--workspace-name) - (+workspace/delete +irc--workspace-name))) - (message "Aborted"))) + (unless (y-or-n-p "Really kill IRC session?") + (user-error "Aborted")) + (let (circe-channel-killed-confirmation + circe-server-killed-confirmation) + (when +irc--defer-timer + (cancel-timer +irc--defer-timer)) + (disable-circe-notifications) + (mapc #'kill-buffer (doom-buffers-in-mode 'circe-mode (buffer-list) t)) + (when (featurep! :ui workspaces) + (when (equal (+workspace-current-name) +irc--workspace-name) + (+workspace/delete +irc--workspace-name))))) ;;;###autoload (defun +irc/ivy-jump-to-channel (&optional this-server) @@ -90,7 +91,7 @@ argument) is non-nil only show channels in current server." ;;;###autoload (defun +irc/tracking-next-buffer () - "Dissables switching to an unread buffer unless in the irc workspace." + "Disables switching to an unread buffer unless in the irc workspace." (interactive) (when (derived-mode-p 'circe-mode) (tracking-next-buffer))) @@ -103,13 +104,12 @@ argument) is non-nil only show channels in current server." (defun +circe-buffer-p (buf) "Return non-nil if BUF is a `circe-mode' buffer." (with-current-buffer buf - (and (derived-mode-p 'circe-mode) - (eq (safe-persp-name (get-current-persp)) - +irc--workspace-name)))) + (derived-mode-p 'circe-mode))) ;;;###autoload (defun +irc--add-circe-buffer-to-persp-h () - (when (bound-and-true-p persp-mode) + (when (and (bound-and-true-p persp-mode) + (+workspace-exists-p +irc--workspace-name)) (let ((persp (get-current-persp)) (buf (current-buffer))) ;; Add a new circe buffer to irc workspace when we're in another workspace From ac336a55ea13744d02b323f6036b758dfaf2e0d6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Dec 2019 00:30:13 -0500 Subject: [PATCH 414/983] app/irc: use SERVER for :host if no host is specified --- modules/app/irc/autoload/settings.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/app/irc/autoload/settings.el b/modules/app/irc/autoload/settings.el index 59615a760..5f88eb993 100644 --- a/modules/app/irc/autoload/settings.el +++ b/modules/app/irc/autoload/settings.el @@ -1,9 +1,17 @@ ;;; app/irc/autoload/settings.el -*- lexical-binding: t; -*- ;;;###autodef -(defun set-irc-server! (server letvars) +(defun set-irc-server! (server plist) "Registers an irc SERVER for circe. +SERVER can either be a name for the network (in which case you must specify a +:host), or it may be the hostname itself, in which case it will be used as the +:host. + See `circe-network-options' for details." (after! circe - (push (cons server letvars) circe-network-options))) + (unless (plist-member plist :host) + (plist-put! plist :host server)) + (setf (alist-get server circe-network-options + nil nil #'equal) + plist))) From 995617edf17bf53652d267567ad173823709986e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Dec 2019 00:17:18 -0500 Subject: [PATCH 415/983] app/irc: update README & clarify gnutls dependency --- modules/app/irc/README.org | 57 ++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/modules/app/irc/README.org b/modules/app/irc/README.org index f2d56d0e7..5e9ab0f60 100644 --- a/modules/app/irc/README.org +++ b/modules/app/irc/README.org @@ -7,8 +7,11 @@ - [[#description][Description]] - [[#module-flags][Module Flags]] - [[#plugins][Plugins]] -- [[#dependencies][Dependencies]] - [[#prerequisites][Prerequisites]] + - [[#macos][macOS]] + - [[#debian--ubuntu][Debian / Ubuntu]] + - [[#arch-linux][Arch Linux]] + - [[#nixos][NixOS]] - [[#features][Features]] - [[#an-irc-client-in-emacs][An IRC Client in Emacs]] - [[#configuration][Configuration]] @@ -17,7 +20,7 @@ - [[#troubleshooting][Troubleshooting]] * Description -This module turns adds an IRC client to Emacs with OS notifications. +This module turns Emacs into an IRC client, capable of OS notifications. ** Module Flags This module provides no flags. @@ -26,11 +29,27 @@ This module provides no flags. + [[https://github.com/jorgenschaefer/circe][circe]] + [[https://github.com/eqyiel/circe-notifications][circe-notifications]] -* Dependencies -This module requires =gnutls-cli= or =openssl= for secure connections. - * Prerequisites -This module has no direct prerequisites. +This module requires =gnutls= for secure IRC connections to work. + +** macOS +#+BEGIN_SRC sh +brew install gnutls +#+END_SRC + +** Debian / Ubuntu +#+BEGIN_SRC sh +apt install gnutls-bin +#+END_SRC + +** Arch Linux +#+BEGIN_SRC sh +pacman -S gnutls +#+END_SRC +** NixOS +#+BEGIN_SRC nix +environment.systemPackages = [ pkgs.gnutls ]; +#+END_SRC * Features ** An IRC Client in Emacs @@ -54,20 +73,23 @@ When in a circe buffer these keybindings will be available. | ~circe-reconnect~ | =SPC m R= | Reconnect the current server | * Configuration -Use ~set-irc-server!~ to configure IRC servers. Its second argument (a plist) +Use ~set-irc-server! SERVER PLIST~ to configure IRC servers. Its second argument (a plist) takes the same arguments as ~circe-network-options~. #+BEGIN_SRC emacs-lisp :tangle no -(set-irc-server! "chat.freenode.net" - `(:tls t - :nick "doom" - :sasl-username "myusername" - :sasl-password "mypassword" - :channels ("#emacs"))) +;; if you omit =:host=, ~SERVER~ will be used instead. +(after! circe + (set-irc-server! "chat.freenode.net" + `(:tls t + :port 6697 + :nick "doom" + :sasl-username "myusername" + :sasl-password "mypassword" + :channels ("#emacs")))) #+END_SRC -*It is a obviously a bad idea to store auth-details in plaintext,* so here are -some ways to avoid that: +However, *it is a obviously a bad idea to store your password in plaintext,* so +here are ways to avoid that: ** Pass: the unix password manager [[https://www.passwordstore.org/][Pass]] is my tool of choice. I use it to manage my passwords. If you activate the @@ -80,6 +102,7 @@ password store. #+BEGIN_SRC emacs-lisp :tangle no (set-irc-server! "chat.freenode.net" `(:tls t + :port 6697 :nick "doom" :sasl-username ,(+pass-get-user "irc/freenode.net") :sasl-password ,(+pass-get-secret "irc/freenode.net") @@ -105,10 +128,10 @@ Note that =+pass-get-user= tries to find your username by looking for the fields listed in =+pass-user-fields= (by default =login=, =user==, =username== and =email=)=). An example configuration looks like -#+BEGIN_SRC txt :tangle no +#+begin_example mysecretpassword username: myusername -#+END_SRC +#+end_example ** Emacs' auth-source API ~auth-source~ is built into Emacs. As suggested [[https://github.com/jorgenschaefer/circe/wiki/Configuration#safer-password-management][in the circe wiki]], you can store From a02cfdc365cf8720e865f363de8ab8a175aff175 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Dec 2019 01:41:14 -0500 Subject: [PATCH 416/983] No-op package--ensure-init-file completely Rather than setting package--init-file-ensured to nil. It's less work for Emacs at startup and is functionally equivalent. --- core/core-packages.el | 5 +++-- early-init.el | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index 6dfbfe57c..5bed3ba81 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -80,8 +80,7 @@ missing) and shouldn't be deleted.") ;; Ensure that, if we do need package.el, it is configured correctly. You really ;; shouldn't be using it, but it may be convenient for quick package testing. -(setq package--init-file-ensured t - package-enable-at-startup nil +(setq package-enable-at-startup nil package-user-dir (concat doom-local-dir "elpa/") package-gnupghome-dir (expand-file-name "gpg" package-user-dir) ;; I omit Marmalade because its packages are manually submitted rather @@ -92,6 +91,8 @@ missing) and shouldn't be deleted.") ("melpa" . ,(concat proto "://melpa.org/packages/")) ("org" . ,(concat proto "://orgmode.org/elpa/"))))) +(advice-add #'package--ensure-init-file :override #'ignore) + ;; Don't save `package-selected-packages' to `custom-file' (defadvice! doom--package-inhibit-custom-file-a (&optional value) :override #'package--save-selected-packages diff --git a/early-init.el b/early-init.el index 25005c3ef..cf3138571 100644 --- a/early-init.el +++ b/early-init.el @@ -10,6 +10,7 @@ ;; loaded, but after `early-init-file'. Doom handles package initialization, so ;; we must prevent Emacs from doing it early! (setq package-enable-at-startup nil) +(advice-add #'package--ensure-init-file :override #'ignore) ;; Prevent the glimpse of un-styled Emacs by disabling these UI elements early. (push '(menu-bar-lines . 0) default-frame-alist) From 0ff68e5a7fab6571c63f72293a954bb062ab0acb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Dec 2019 01:42:38 -0500 Subject: [PATCH 417/983] Don't handle straight transactions anymore Since raxod502/straight.el@e45f726, straight handles its transactions in non-interactive sessions. --- core/core-packages.el | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index 5bed3ba81..3bc7ce7a5 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -118,15 +118,11 @@ missing) and shouldn't be deleted.") ;; certain things to work (like magit and org), but we can deal with that ;; when we cross that bridge. straight-vc-git-default-clone-depth 1 - ;; Straight's own emacsmirror mirror is a little smaller and faster. - straight-recipes-emacsmirror-use-mirror t ;; Prefix declarations are unneeded bulk added to our autoloads file. Best ;; we just don't have to deal with them at all. - autoload-compute-prefixes nil) - -(defun doom--finalize-straight () - (mapc #'funcall (delq nil (mapcar #'cdr straight--transaction-alist))) - (setq straight--transaction-alist nil)) + autoload-compute-prefixes nil + ;; We handle it ourselves + straight-fix-org nil) ;;; Getting straight to behave in batch mode (when noninteractive @@ -247,9 +243,7 @@ necessary package metadata is initialized and available for them." (print! (warn "%s\n%s") (format "You've disabled %S" name) (indent 2 (concat "This is a core package. Disabling it will cause errors, as Doom assumes\n" - "core packages are always available. Disable their minor-modes or hooks instead."))))))))) - (unless doom-interactive-mode - (add-hook 'kill-emacs-hook #'doom--finalize-straight)))) + "core packages are always available. Disable their minor-modes or hooks instead."))))))))))) (defun doom-ensure-straight () "Ensure `straight' is installed and was compiled with this version of Emacs." From 6920ae80f0d0b5a6b54de7a4ac95ead9a982dc1a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Dec 2019 01:45:15 -0500 Subject: [PATCH 418/983] Fix wrong-type-argument sequencep when loading ein's hydra #2057 --- modules/tools/ein/autoload/hydra.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/ein/autoload/hydra.el b/modules/tools/ein/autoload/hydra.el index 3bbba5fcd..ef4d5d74d 100644 --- a/modules/tools/ein/autoload/hydra.el +++ b/modules/tools/ein/autoload/hydra.el @@ -2,7 +2,7 @@ ;;;###if (featurep! :ui hydra) ;;;###autoload (autoload '+ein/hydra/body "tools/ein/autoload/hydra" nil t) -(defhydra +ein/hydra (:hint t :color red) +(defhydra +ein/hydra (:color red) " Operations on Cells^^^^^^ Other ----------------------------^^^^^^ ----------------------------------^^^^ From e5602c180265ad9679cb673c4bfcd39d57eebbe6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Dec 2019 01:52:45 -0500 Subject: [PATCH 419/983] Move async.el out of baseline packages It isn't needed anywhere atm. Perhaps we don't need it in core at all? --- core/core-packages.el | 2 +- core/packages.el | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core-packages.el b/core/core-packages.el index 3bc7ce7a5..b678d8c3f 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -51,7 +51,7 @@ their `package!' declarations, which is simpler than lockfiles, where version management would be done in a whole new file that users shouldn't have to deal with.") -(defvar doom-core-packages '(straight use-package async) +(defvar doom-core-packages '(straight use-package) "A list of packages that must be installed (and will be auto-installed if missing) and shouldn't be deleted.") diff --git a/core/packages.el b/core/packages.el index 8535a023a..13da63a94 100644 --- a/core/packages.el +++ b/core/packages.el @@ -3,6 +3,7 @@ ;; core.el (package! auto-minor-mode) +(package! async) (package! gcmh) ;; core-ui.el From dcb0b6042eaf6fca8b267b6d8b0691876f187fa9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Dec 2019 01:54:01 -0500 Subject: [PATCH 420/983] Ensure evil-easymotion is lazy-loaded The evilem-create calls were pulling it in early, at startup. --- modules/editor/evil/autoload/evil.el | 2 +- modules/editor/evil/config.el | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/modules/editor/evil/autoload/evil.el b/modules/editor/evil/autoload/evil.el index f981ef47f..326aec771 100644 --- a/modules/editor/evil/autoload/evil.el +++ b/modules/editor/evil/autoload/evil.el @@ -97,7 +97,7 @@ the only window, use evil-window-move-* (e.g. `evil-window-move-far-left')." "Invoke and lazy-load `evil-easymotion' without compromising which-key integration." (interactive) - (evilem-default-keybindings "") + (require 'evil-easymotion) (setq prefix-arg current-prefix-arg) (push '(t . easymotion) unread-command-events)) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 7f920a335..cb8bc1dad 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -210,6 +210,7 @@ directives. By default, this only recognizes C directives.") (use-package! evil-easymotion :commands evilem-create evilem-default-keybindings :config + (evilem-default-keybindings "") ;; Use evil-search backend, instead of isearch (evilem-make-motion evilem-motion-search-next #'evil-ex-search-next :bind ((evil-ex-search-highlight-all nil))) @@ -557,14 +558,20 @@ To change these keys see `+evil-repeat-keys'." :textobj "x" #'evil-inner-xml-attr #'evil-outer-xml-attr ;; evil-easymotion - (:prefix "" ; see `+evil/easymotion' - "a" (evilem-create #'evil-forward-arg) - "A" (evilem-create #'evil-backward-arg) - "s" #'evil-avy-goto-char-2 - "SPC" (λ!! #'evil-avy-goto-char-timer t) - "/" #'evil-avy-goto-char-timer) + (:after evil-easymotion + (:prefix "" ; see `+evil/easymotion' + "a" (evilem-create #'evil-forward-arg) + "A" (evilem-create #'evil-backward-arg) + "s" #'evil-avy-goto-char-2 + "w" (evilem-create #'evil-snipe-repeat + :pre-hook (save-excursion (call-interactively #'evil-snipe-f)) + :bind ((evil-snipe-scope 'visible) + (evil-snipe-enable-highlight) + (evil-snipe-enable-incremental-highlight))) + "SPC" (λ!! #'evil-avy-goto-char-timer t) + "/" #'evil-avy-goto-char-timer)) - ;; evil-snipe + ;; evil-snipe (:after evil-snipe :map evil-snipe-parent-transient-map "C-;" (λ! (require 'evil-easymotion) From 2f540f8c45de93bec2614f72a9937fd72c9916c1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Dec 2019 03:30:03 -0500 Subject: [PATCH 421/983] Remove vestigial references to doom--finalize-straight --- core/cli/packages.el | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 120c75933..fc4f01518 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -142,7 +142,6 @@ declaration) or dependency thereof that hasn't already been." (straight--byte-compile-package recipe))))))))) (if (= n 0) (ignore (print! (success "No packages need rebuilding"))) - (doom--finalize-straight) (print! (success "Rebuilt %d package(s)" n)) t)))) @@ -225,7 +224,6 @@ declaration) or dependency thereof that hasn't already been." (let ((count (hash-table-count straight--packages-to-rebuild)) (packages (hash-table-keys straight--packages-to-rebuild))) (sort packages #'string-lessp) - (doom--finalize-straight) (print! (success "Updated %d package(s): %s") count (string-join packages ", ")) (doom-cli-packages-build)) @@ -346,6 +344,4 @@ If ELPA-P, include packages installed with package.el (M-x package-install)." (print! (start "Regrafting %d repos..." (length repos-to-regraft))) (and (doom--cli-packages-regraft-repos repos-to-regraft) (setq success t))) - (when success - (doom--finalize-straight) - t))))) + success)))) From e9b85997a991c9427f8781c9870168e6e3f33c35 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Dec 2019 03:33:12 -0500 Subject: [PATCH 422/983] tools/ein: disable hydra hints #2057 --- modules/tools/ein/autoload/hydra.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/ein/autoload/hydra.el b/modules/tools/ein/autoload/hydra.el index ef4d5d74d..e743c7e24 100644 --- a/modules/tools/ein/autoload/hydra.el +++ b/modules/tools/ein/autoload/hydra.el @@ -2,7 +2,7 @@ ;;;###if (featurep! :ui hydra) ;;;###autoload (autoload '+ein/hydra/body "tools/ein/autoload/hydra" nil t) -(defhydra +ein/hydra (:color red) +(defhydra +ein/hydra (:hint nil :color red) " Operations on Cells^^^^^^ Other ----------------------------^^^^^^ ----------------------------------^^^^ From 75c25fa182f6b85e1bea270d85a6bd8a7ffe7311 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Dec 2019 03:35:02 -0500 Subject: [PATCH 423/983] ui/hydra: fix +hydra/text-zoom Issue brought to light by #2057 --- modules/ui/hydra/autoload/windows.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/hydra/autoload/windows.el b/modules/ui/hydra/autoload/windows.el index 6d703ad81..de082eba4 100644 --- a/modules/ui/hydra/autoload/windows.el +++ b/modules/ui/hydra/autoload/windows.el @@ -1,7 +1,7 @@ ;;; ui/hydra/autoload/windows.el -*- lexical-binding: t; -*- ;;;###autoload (autoload '+hydra/text-zoom/body "ui/hydra/autoload/windows" nil t) -(defhydra +hydra/text-zoom (:hint t :color red) +(defhydra +hydra/text-zoom (:hint nil :color red) " Text zoom: _j_:zoom in, _k_:zoom out, _0_:reset " From e5fa19ea2d97220f089408e0d9f2936322d96e9e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Dec 2019 04:44:20 -0500 Subject: [PATCH 424/983] lang/emacs-lisp: fix wrong-num-args error on doc lookup --- modules/lang/emacs-lisp/autoload.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/emacs-lisp/autoload.el b/modules/lang/emacs-lisp/autoload.el index e16e66b0f..94f0221e1 100644 --- a/modules/lang/emacs-lisp/autoload.el +++ b/modules/lang/emacs-lisp/autoload.el @@ -109,7 +109,7 @@ library/userland functions" (defun +emacs-lisp-lookup-documentation (thing) "Lookup THING with `helpful-variable' if it's a variable, `helpful-callable' if it's callable, `apropos' otherwise." - (cond ((when-let (module (+emacs-lisp--module-at-point thing)) + (cond ((when-let (module (+emacs-lisp--module-at-point)) (doom/help-modules (car module) (cadr module)) (when (eq major-mode 'org-mode) (with-demoted-errors "%s" From 566d54d984fc8903f8c89b82522c8b4fcf75ba3d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Dec 2019 13:32:24 -0500 Subject: [PATCH 425/983] Disable continue-comments-on-RET in ess-r-mode & coq-mode Fixes #2081, #2233 --- modules/lang/coq/config.el | 10 +++++++--- modules/lang/ess/config.el | 5 +++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/lang/coq/config.el b/modules/lang/coq/config.el index 86cd6ee0b..b44b58612 100644 --- a/modules/lang/coq/config.el +++ b/modules/lang/coq/config.el @@ -14,9 +14,13 @@ ;;;###package coq -;; Doom syncs other indent variables with `tab-width'; we trust major modes to -;; set it -- which most of them do -- but coq-mode doesn't, so... -(setq-hook! 'coq-mode-hook tab-width proof-indent) +(setq-hook! 'coq-mode-hook + ;; Doom syncs other indent variables with `tab-width'; we trust major modes to + ;; set it -- which most of them do -- but coq-mode doesn't, so... + tab-width proof-indent + ;; HACK Fix #2081: Doom continues comments on RET, but coq-mode doesn't have a + ;; sane `comment-line-break-function', so... + comment-line-break-function nil) ;; We've replaced coq-mode abbrevs with yasnippet snippets (in the snippets ;; library included with Doom). diff --git a/modules/lang/ess/config.el b/modules/lang/ess/config.el index 381a87bf5..2d9c2eb98 100644 --- a/modules/lang/ess/config.el +++ b/modules/lang/ess/config.el @@ -28,6 +28,11 @@ (set-eval-handler! 'ess-help-mode #'ess-eval-region-and-go) (set-eval-handler! 'ess-r-help-mode #'ess-eval-region-and-go) + (setq-hook! 'ess-r-mode-hook + ;; HACK Fix #2233: Doom continues comments on RET, but ess-r-mode doesn't + ;; have a sane `comment-line-break-function', so... + comment-line-break-function nil) + (map! (:after ess-help :map ess-help-mode-map :n "q" #'kill-current-buffer From 9bc3d05cb50c7ab03d9058b4e2743aa7cdd491f3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Dec 2019 14:14:31 -0500 Subject: [PATCH 426/983] docs/getting_started: add macports install docs --- docs/getting_started.org | 55 ++++++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 13 deletions(-) diff --git a/docs/getting_started.org b/docs/getting_started.org index c5fa9add8..ec0aa41d4 100644 --- a/docs/getting_started.org +++ b/docs/getting_started.org @@ -141,16 +141,23 @@ environment.systemPackages = with pkgs; [ #+END_SRC *** On macOS -Mac users several options to install Emacs, but only a few of them are -recommended for Doom Emacs (you'll need to [[http://brew.sh/][install Homebrew]] first). To start -with: +MacOS users have many options for installing Emacs, but they are not created +equal. First, a package manager must be installed. You have a choice between +Homebrew and MacPorts (you only need one): + ++ [[http://brew.sh/][Install Homebrew]] ++ [[https://www.macports.org/install.php][Install MacPorts]] + +**** Homebrew +Homebrew users have a number of formulas available to them. Before they can be +installed, start with Doom's dependencies: #+BEGIN_SRC bash -brew install git clang ripgrep fd coreutils +brew install coreutils git ripgrep fd clang #+END_SRC -As for Emacs, there are several formulas to choose from. There are the best -options, in order from most to least recommended for Doom. +For Emacs itself these three are the best options, ordered from most to least +recommended for Doom (based on compatibility). - [[https://github.com/d12frosted/homebrew-emacs-plus][emacs-plus]] (the safest option): @@ -166,10 +173,9 @@ options, in order from most to least recommended for Doom. brew install emacs #+END_SRC -- [[https://bitbucket.org/mituharu/emacs-mac/overview][emacs-mac]] is also acceptable. It offers slightly better integration into - macOS, with native emojis and better childframe support. However, at the time - of writing, it [[https://github.com/railwaycat/homebrew-emacsmacport/issues/52][lacks multi-tty support]] (which impacts daemon usage). Use it if - you experience crashing or performance issues with emacs-plus. +- [[https://bitbucket.org/mituharu/emacs-mac/overview][emacs-mac]] is another acceptable option. It offers slightly better integration + with macOS, native emojis and better childframe support. However, at the time + of writing, it [[https://github.com/railwaycat/homebrew-emacsmacport/issues/52][lacks multi-tty support]] (which impacts daemon usage). #+BEGIN_SRC bash brew tap railwaycat/emacsmacport @@ -177,15 +183,38 @@ options, in order from most to least recommended for Doom. ln -s /usr/local/opt/emacs-mac/Emacs.app /Applications/Emacs.app #+END_SRC -**** Where *not* to install Emacs from -These builds/forks have known compatibility issues with Doom and are likely to -cause you issues later on. Do not use them: +***** Where *not* to install Emacs from +These builds/forks have known compatibility issues with Doom and are *very +likely* to cause you issues later on. Do not use them: + emacsformacosx.com + ~brew cask install emacs~ (installs from emacsformacosx.com) + AquaMacs + XEmacs +**** MacPorts +There are four ports (at writing) available through MacPorts: + ++ [[https://ports.macports.org/port/emacs/summary][emacs]] (26.3) and [[https://ports.macports.org/port/emacs-devel/summary][emacs-devel]] (27) -- Installs terminal-only Emacs ++ [[https://ports.macports.org/port/emacs-app/summary][emacs-app]] (26.3), [[https://ports.macports.org/port/emacs-app-devel/summary][emacs-app-devel]] (27) -- Installs GUI Emacs ++ [[https://ports.macports.org/port/emacs-mac-app/summary][emacs-mac-app]] (26.3) -- the [[https://bitbucket.org/mituharu/emacs-mac][Mitsuharu Yamamoto mac port]] + +Some of these ports do not add an =emacs= binary to your ~PATH~, which is +necessary for Doom's installation. This can be fixed by adding the following to +your shell config: + +#+BEGIN_SRC sh +# Add this to ~/.zshrc or ~/.bash_profile +export PATH="/Applications/MacPorts/Emacs.app/Contents/MacOS:$PATH" +#+END_SRC + +Or by creating a shim script at ~/usr/local/bin/emacs~: + +#+BEGIN_SRC +#!/bin/sh +/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs "$@" +#+END_SRC + *** On Windows *Support for Windows is immature,* so your mileage will vary. Some have reported success with installing Doom via WSL, chocolatey on git-bash or cygwin. From 66b005aa1863d3e2a716a523926aa01e95b56d48 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Dec 2019 14:46:10 -0500 Subject: [PATCH 427/983] ui/doom-dashboard: expand README #1166 --- modules/ui/doom-dashboard/README.org | 51 +++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/modules/ui/doom-dashboard/README.org b/modules/ui/doom-dashboard/README.org index 62bf11a99..68caf7cc7 100644 --- a/modules/ui/doom-dashboard/README.org +++ b/modules/ui/doom-dashboard/README.org @@ -1,20 +1,63 @@ #+TITLE: ui/doom-dashboard #+DATE: October 9, 2019 #+SINCE: v1.3 -#+STARTUP: inlineimages +#+STARTUP: inlineimages nofold * Table of Contents :TOC_3:noexport: - [[#description][Description]] - [[#module-flags][Module Flags]] - [[#prerequisites][Prerequisites]] +- [[#configuration][Configuration]] + - [[#a-custom-banner][A custom banner]] + - [[#adding-text-to-the-dashboard][Adding text to the dashboard]] * Description -This module gives Doom Emacs a dashboard buffer. +This module adds a minimalistic, Atom-inspired dashboard to Emacs. -It is loosely inspired by Atom's dashboard. +Besides eye candy, the dashboard serves two other purposes: + +1. To improve Doom's startup times (the dashboard is lighter than the scratch + buffer in many cases). + +2. And to preserve the "last open directory" you were in. Occasionally, I kill + the last buffer in my project and I end up who-knows-where (in the working + directory of another buffer/project). It can take some work to find my way + back to where I was. Not with the Dashboard. + + Since the dashboard cannot be killed, and it remembers the working directory + of the last open buffer, ~M-x find-file~ will work from the directory I + expect. ** Module Flags This module provides no flags. * Prerequisites -This module only requires that ~all-the-icons~'s icon fonts are installed. Use ~M-x all-the-icons-install-fonts~ to do so. +This module only requires that ~all-the-icons~'s icon fonts are installed. + +It should've been installed when you first installed Doom, but ~M-x +all-the-icons-install-fonts~ will install them again. + +* Configuration +** A custom banner +To use a custom image as your banner, change ~fancy-splash-image~: + +#+BEGIN_SRC elisp +(setq fancy-splash-image "~/my/banners/image.png") +#+END_SRC + +#+begin_quote +Doom will fall back to its ASCII banner in Terminal Emacs. To replace the ASCII +banner, replace the ~doom-dashboard-widget-banner~ function in +~+doom-dashboard-functions~ with a function that inserts your new banner into +the current file. +#+end_quote + +** Adding text to the dashboard +Doom's dashboard iterates over ~+doom-dashboard-functions~ when it is told to +redraw. Add your own functions to operate on the buffer and potentially add +whatever you like to Doom's splash screen. + +#+begin_quote +Keep in mind that inserting text from expensive sources, e.g. your org agenda, +will negate most of Doom's startup benefits. +#+end_quote From dafa4deef458fec0b8c2d69390e1492a72ca37ab Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 28 Dec 2019 13:52:15 -0500 Subject: [PATCH 428/983] lang/python: autoload lsp-python-ms setup/update commands And set lsp-python-ms-python-executable-cmd a little sooner, to make it easier for folks to change. --- modules/lang/python/config.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/lang/python/config.el b/modules/lang/python/config.el index 461f3d8db..e68bf692a 100644 --- a/modules/lang/python/config.el +++ b/modules/lang/python/config.el @@ -283,11 +283,13 @@ called.") (use-package! lsp-python-ms :when (featurep! +lsp) :after (python lsp-clients) - :init - (setq lsp-python-ms-dir (concat doom-etc-dir "mspyls/")) - + :preface + (autoload 'lsp-python-ms-update-server "lsp-python-ms" nil t) + (autoload 'lsp-python-ms-setup "lsp-python-ms" nil t) (after! python (setq lsp-python-ms-python-executable-cmd python-shell-interpreter)) + :init + (setq lsp-python-ms-dir (concat doom-etc-dir "mspyls/")) ;; HACK If you don't have python installed, then opening python buffers with ;; this on causes a "wrong number of arguments: nil 0" error, because of From 7ef3bee85118eba1edc3f8193a5161391dbe724a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 28 Dec 2019 13:53:13 -0500 Subject: [PATCH 429/983] Consider eval output width when deciding how to display it If ':tools (eval +overlay)' is enabled, eval commands display their output in a floating overlay at EOL. If the output is longer than +eval-popup-min-lines (5), it will display it in a popup window instead. With this, it also will use a popup window if the output is longer than the minibuffer can display in one line, --- modules/tools/eval/autoload/eval.el | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/modules/tools/eval/autoload/eval.el b/modules/tools/eval/autoload/eval.el index 1bad3201e..e1cd7b018 100644 --- a/modules/tools/eval/autoload/eval.el +++ b/modules/tools/eval/autoload/eval.el @@ -5,8 +5,14 @@ "Display OUTPUT in a popup buffer." (if (with-temp-buffer (insert output) - (>= (count-lines (point-min) (point-max)) - +eval-popup-min-lines)) + (or (>= (count-lines (point-min) (point-max)) + +eval-popup-min-lines) + (> (string-width + (buffer-substring (point-min) + (save-excursion + (goto-char (point-min)) + (line-end-position)))) + (window-width)))) (let ((output-buffer (get-buffer-create "*doom eval*")) (origin (selected-window))) (with-current-buffer output-buffer @@ -42,8 +48,14 @@ (funcall (if (or current-prefix-arg (with-temp-buffer (insert output) - (>= (count-lines (point-min) (point-max)) - +eval-popup-min-lines)) + (or (>= (count-lines (point-min) (point-max)) + +eval-popup-min-lines) + (>= (string-width + (buffer-substring (point-min) + (save-excursion + (goto-char (point-min)) + (line-end-position)))) + (window-width)))) (not (require 'eros nil t))) #'+eval-display-results-in-popup #'+eval-display-results-in-overlay) From da09a3eb8c78f8f9d17e01ed42c154dde256fb30 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 28 Dec 2019 14:00:08 -0500 Subject: [PATCH 430/983] Mention commit pinning in docs with package! --- core/templates/packages.example.el | 9 +++++++++ docs/api.org | 13 +++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/core/templates/packages.example.el b/core/templates/packages.example.el index 2d69479cb..1329ac574 100644 --- a/core/templates/packages.example.el +++ b/core/templates/packages.example.el @@ -11,6 +11,15 @@ ;; ;; Here are a couple examples: + +;; All of Doom's packages are pnned to a specific commit, and updated from +;; release to release. To un-pin all packages and live on the edge, do: +;(setq doom-pinned-packages nil) + +;; ...but to unpin a single package: +;(package! pinned-package :pin nil) + + ;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: ;(package! some-package) diff --git a/docs/api.org b/docs/api.org index 7a31a7ee5..642fb8f47 100644 --- a/docs/api.org +++ b/docs/api.org @@ -404,15 +404,12 @@ These are side-by-side comparisons, showing how to bind keys with and without ;; you can tell the package manager not to clone the repo recursively: (package! ansible :recipe (:nonrecursive t)) -;; To install a particular branch, commit or tag: -(package! evil - ;; if :host and :fetcher aren't specified, the package manager will fall back - ;; to evil's default source provided by their (M)ELPA recipes: - :recipe (:commit "e7bc39de2f961505e8e112da8c1b315ae8afce52")) - +;; To pin a package to a specific commit: +(package! evil :pin "e7bc39de2f961505e8e112da8c1b315ae8afce52") +;; ...or branch: (package! evil :recipe (:branch "stable")) - -(package! evil :recipe (:tag "1.2.9")) +;; To unpin a pinned package: +(package! evil :pin nil) ;; If you share your config between two computers, and don't want bin/doom ;; refresh to delete packages used only on one system, use :ignore From 6396cbf6cdd1223fc7a8ffb50713da92bfbcac35 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 28 Dec 2019 14:01:36 -0500 Subject: [PATCH 431/983] Refactor 'doom build' --- core/cli/packages.el | 51 +++++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 32 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index fc4f01518..2ff86e627 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -65,6 +65,7 @@ list remains lean." This function will install any primary package (i.e. a package with a `package!' declaration) or dependency thereof that hasn't already been." (print! (start "Installing & building packages...")) + (straight--transaction-finalize) (print-group! (let ((versions-alist doom-pinned-packages) (n 0)) @@ -100,46 +101,31 @@ declaration) or dependency thereof that hasn't already been." (defun doom-cli-packages-build (&optional force-p) "(Re)build all packages." (print! (start "(Re)building %spackages...") (if force-p "all " "")) + (straight--transaction-finalize) (print-group! - (let ((n 0)) + (let ((straight-check-for-modifications + (when (file-directory-p (straight--modified-dir)) + '(find-when-checking))) + (straight--allow-find (and straight-check-for-modifications t)) + (straight--packages-not-to-rebuild + (or straight--packages-not-to-rebuild (make-hash-table :test #'equal))) + (straight-use-package-pre-build-functions + straight-use-package-pre-build-functions) + (n 0)) + (add-hook! 'straight-use-package-pre-build-functions (cl-incf n)) (if force-p - (let ((straight--packages-to-rebuild :all) - (straight--packages-not-to-rebuild (make-hash-table :test #'equal))) + (let ((straight--packages-to-rebuild :all)) (dolist (package (hash-table-keys straight--recipe-cache)) (straight-use-package - (intern package) nil (lambda (_) (cl-incf n) nil) + (intern package) nil nil (make-string (1- (or doom-format-indent 1)) 32)))) + (straight--make-package-modifications-available) (dolist (recipe (hash-table-values straight--recipe-cache)) (straight--with-plist recipe (package local-repo no-build) (unless (or no-build (null local-repo)) - ;; REVIEW We do these modification checks manually because - ;; Straight's checks seem to miss stale elc files. Need - ;; more tests to confirm this. - (when (or (ignore-errors - (gethash package straight--packages-to-rebuild)) - (gethash package straight--cached-package-modifications) - (not (file-directory-p (straight--build-dir package))) - (cl-loop for file - in (doom-files-in (straight--build-dir package) - :match "\\.el$" - :full t) - for elc-file = (byte-compile-dest-file file) - if (and (file-exists-p elc-file) - (file-newer-than-file-p file elc-file)) - return t)) - (let ((straight-use-package-pre-build-functions - straight-use-package-pre-build-functions)) - (add-hook 'straight-use-package-pre-build-functions - (lambda (&rest _) (cl-incf n))) - (let ((straight--packages-to-rebuild :all) - (straight--packages-not-to-rebuild (make-hash-table :test #'equal))) - (straight-use-package - (intern package) nil nil - (make-string (or doom-format-indent 0) 32))) - (straight--byte-compile-package recipe) - (dolist (dep (straight--get-dependencies package)) - (when-let (recipe (gethash dep straight--recipe-cache)) - (straight--byte-compile-package recipe))))))))) + (straight-use-package + (intern package) nil nil + (make-string (or doom-format-indent 0) 32)))))) (if (= n 0) (ignore (print! (success "No packages need rebuilding"))) (print! (success "Rebuilt %d package(s)" n)) @@ -149,6 +135,7 @@ declaration) or dependency thereof that hasn't already been." (defun doom-cli-packages-update () "Updates packages." (print! (start "Updating packages (this may take a while)...")) + (straight--transaction-finalize) (let ((straight--repos-dir (straight--repos-dir)) (straight--packages-to-rebuild (make-hash-table :test #'equal)) (total (hash-table-count straight--repo-cache)) From 8d3954257ece7998333d5eee597370afbc527d01 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 28 Dec 2019 14:02:07 -0500 Subject: [PATCH 432/983] Refactor 'doom purge' & fix elpa purging Wasn't picking up ELPA packages. --- core/cli/packages.el | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 2ff86e627..51627a298 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -230,8 +230,10 @@ declaration) or dependency thereof that hasn't already been." (if (not builds) (progn (print! (info "No builds to purge")) 0) - (length - (delq nil (mapcar #'doom--cli-packages-purge-build builds))))) + (print! (start "Purging straight builds..." (length builds))) + (print-group! + (length + (delq nil (mapcar #'doom--cli-packages-purge-build builds)))))) (defun doom--cli-packages-regraft-repo (repo) (let ((default-directory (straight--repos-dir repo))) @@ -252,6 +254,7 @@ declaration) or dependency thereof that hasn't already been." (if (not repos) (progn (print! (info "No repos to regraft")) 0) + (print! (start "Regrafting %d repos..." (length repos))) (let ((before-size (doom-directory-size (straight--repos-dir)))) (print-group! (prog1 (delq nil (mapcar #'doom--cli-packages-regraft-repo repos)) @@ -275,22 +278,28 @@ declaration) or dependency thereof that hasn't already been." (if (not repos) (progn (print! (info "No repos to purge")) 0) - (length - (delq nil (mapcar #'doom--cli-packages-purge-repo repos))))) + (print! (start "Purging straight repositories...")) + (print-group! + (length + (delq nil (mapcar #'doom--cli-packages-purge-repo repos)))))) (defun doom--cli-packages-purge-elpa () - (unless (bound-and-true-p package--initialized) - (package-initialize)) - (let ((packages (cl-loop for (package desc) in package-alist - for dir = (package-desc-dir desc) - if (file-in-directory-p dir package-user-dir) - collect (cons package dir)))) - (if (not package-alist) + (require 'core-packages) + (let ((dirs (doom-files-in package-user-dir :type t :depth 0))) + (if (not dirs) (progn (print! (info "No ELPA packages to purge")) 0) - (mapc (doom-rpartial #'delete-directory 'recursive) - (mapcar #'cdr packages)) - (length packages)))) + (print! (start "Purging ELPA packages...")) + (dolist (path dirs (length dirs)) + (condition-case e + (print-group! + (if (file-directory-p path) + (delete-directory path 'recursive) + (delete-file path)) + (print! (success "Deleted %s") (relpath path))) + (error + (print! (error "Failed to delete %s because: %s") + (relpath path) e))))))) (defun doom-cli-packages-purge (&optional elpa-p builds-p repos-p regraft-repos-p) "Auto-removes orphaned packages and repos. @@ -328,7 +337,6 @@ If ELPA-P, include packages installed with package.el (M-x package-install)." (setq success t))) (if (not regraft-repos-p) (print! (info "Skipping regrafting")) - (print! (start "Regrafting %d repos..." (length repos-to-regraft))) (and (doom--cli-packages-regraft-repos repos-to-regraft) (setq success t))) success)))) From 47be32d42293121163d4f6383565d0af70a16487 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 28 Dec 2019 15:46:29 -0500 Subject: [PATCH 433/983] Fail gracefully if no session file is present --- core/autoload/sessions.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/autoload/sessions.el b/core/autoload/sessions.el index 3cdf2c09c..f808c1201 100644 --- a/core/autoload/sessions.el +++ b/core/autoload/sessions.el @@ -47,7 +47,9 @@ "TODO" (setq file (expand-file-name (or file (doom-session-file)))) (message "Attempting to load %s" file) - (cond ((require 'persp-mode nil t) + (cond ((not (file-readable-p file)) + (message "No session file at %S to read from" file)) + ((require 'persp-mode nil t) (unless persp-mode (persp-mode +1)) (let ((allowed (persp-list-persp-names-in-file file))) From 2fb76b3ba024a2cf409eedd3727baf4e76ec498b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 28 Dec 2019 17:39:00 -0500 Subject: [PATCH 434/983] Use [escape] instead of ESC to abort company Because rebinding ESC breaks some meta keybinds for tty users. --- modules/config/default/+evil-bindings.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 0070605f3..91d4fa52d 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -142,7 +142,7 @@ "C-j" #'company-select-next-or-abort "C-k" #'company-select-previous-or-abort "C-s" (λ! (company-search-abort) (company-filter-candidates)) - "ESC" #'company-search-abort)) + [escape] #'company-search-abort)) ;; TAB auto-completion in term buffers (:after comint :map comint-mode-map "TAB" #'company-complete From b38501a67beb0a105a45856ecd9266a12ff755a9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 28 Dec 2019 19:55:44 -0500 Subject: [PATCH 435/983] Refactor load-path & loaded-files search commands Follow up to 0df480bf8 --- core/autoload/help.el | 73 ++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 1e4d1fefb..2965f64b5 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -618,50 +618,51 @@ config blocks in your private config." (interactive (list (doom--package-list))) (browse-url (doom--package-url package))) + +(defun doom--help-search-prompt (prompt) + (let ((query + (if (use-region-p) + (buffer-substring-no-properties (region-beginning) (region-end)) + (or (thing-at-point 'symbol t) "")))) + (if (featurep 'counsel) + query + (read-string prompt query 'git-grep query)))) + +(defvar counsel-rg-base-command) +(defun doom--help-search (dirs query prompt) + ;; REVIEW Replace with deadgrep + (unless (executable-find "rg") + (user-error "Can't find ripgrep on your system")) + (if (fboundp 'counsel-rg) + (let ((counsel-rg-base-command + (concat counsel-rg-base-command " " + (mapconcat #'shell-quote-argument dirs " ")))) + (counsel-rg query nil "-Lz" prompt)) + ;; TODO Add helm support? + (grep-find + (string-join + (append (list "rg" "-L" "--search-zip" "--no-heading" "--color=never" + (shell-quote-argument query)) + (mapcar #'shell-quote-argument dirs)) + " ")))) + ;;;###autoload (defun doom/help-search-load-path (query) "Perform a text search on your `load-path'. Uses the symbol at point or the current selection, if available." (interactive - (let ((query - ;; TODO Generalize this later; into something the lookup module and - ;; project search commands could as well - (if (use-region-p) - (buffer-substring-no-properties (region-beginning) (region-end)) - (or (symbol-name (symbol-at-point)) "")))) - (list (read-string - (format "Search load-path (default: %s): " query) - nil 'git-grep query)))) - ;; REVIEW Replace with deadgrep - (grep-find - (mapconcat - #'shell-quote-argument - (append (list "rg" "-L" "--search-zip" "--no-heading" "--color=never" query) - (cl-remove-if-not #'file-directory-p load-path)) - " "))) + (list (doom--help-search-prompt "Search load-path: "))) + (doom--help-search (cl-remove-if-not #'file-directory-p load-path) + query "Search load-path: ")) -;; TODO factor our the duplicate code between this and the above ;;;###autoload (defun doom/help-search-loaded-files (query) "Perform a text search on your `load-path'. Uses the symbol at point or the current selection, if available." (interactive - (let ((query - ;; TODO Generalize this later; into something the lookup module and - ;; project search commands could as well. - (if (use-region-p) - (buffer-substring-no-properties (region-beginning) (region-end)) - (or (symbol-name (symbol-at-point)) "")))) - (list (read-string - (format "Search load-path (default: %s): " query) - nil 'git-grep query)))) - (unless (executable-find "rg") - (user-error "Can't find ripgrep on your system")) - (require 'elisp-refs) - ;; REVIEW Replace with deadgrep - (grep-find - (mapconcat - #'shell-quote-argument - (append (list "rg" "-L" "--search-zip" "--no-heading" "--color=never" query) - (cl-remove-if-not #'file-directory-p (elisp-refs--loaded-paths))) - " "))) + (list (doom--help-search-prompt "Search loaded files: "))) + (let ((paths (cl-loop for (file . _) in load-history + for filebase = (file-name-sans-extension file) + if (file-exists-p! (format "%s.el" filebase)) + collect it))) + (doom--help-search paths query "Search loaded files: "))) From 678a5d1f7cfd43517d20587b6ad5f0b57ab1c49a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 28 Dec 2019 19:57:37 -0500 Subject: [PATCH 436/983] Improve prompts for various help commands To make it clearer what you're searching for. --- core/autoload/help.el | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 2965f64b5..91832fa1d 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -96,7 +96,7 @@ the current major-modea.") "Get information on an active minor mode. Use `describe-minor-mode' for a selection of all minor-modes, active or not." (interactive - (list (completing-read "Minor mode: " (doom-active-minor-modes)))) + (list (completing-read "Describe active mode: " (doom-active-minor-modes)))) (let ((symbol (cond ((stringp mode) (intern mode)) ((symbolp mode) mode) @@ -453,9 +453,9 @@ If prefix arg is present, refresh the cache." (list (intern (completing-read (if guess - (format "Select package to search for (default %s): " + (format "Select Doom package to search for (default %s): " guess) - "Describe package: ") + "Describe Doom package: ") packages nil t nil nil (if guess (symbol-name guess)))))))) (require 'core-packages) @@ -533,7 +533,7 @@ If prefix arg is present, refresh the cache." (insert "\n\n"))))) (defvar doom--package-cache nil) -(defun doom--package-list () +(defun doom--package-list (&optional prompt) (let* ((guess (or (function-called-at-point) (symbol-at-point)))) (require 'finder-inf nil t) @@ -549,10 +549,11 @@ If prefix arg is present, refresh the cache." (setq doom--package-cache packages) (unless (memq guess packages) (setq guess nil)) - (intern (completing-read (if guess - (format "Select package to search for (default %s): " - guess) - "Describe package: ") + (intern (completing-read (or prompt + (if guess + (format "Select package to search for (default %s): " + guess) + "Describe package: ")) packages nil t nil nil (if guess (symbol-name guess))))))) @@ -599,7 +600,7 @@ If prefix arg is present, refresh the cache." This only searches `doom-emacs-dir' (typically ~/.emacs.d) and does not include config blocks in your private config." - (interactive (list (doom--package-list))) + (interactive (list (doom--package-list "Find package config: "))) (cl-destructuring-bind (file line _match) (split-string (completing-read @@ -615,7 +616,7 @@ config blocks in your private config." ;;;###autoload (defun doom/help-package-homepage (package) "Open PACKAGE's repo or homepage in your browser." - (interactive (list (doom--package-list))) + (interactive (list (doom--package-list "Open package homepage: "))) (browse-url (doom--package-url package))) From 6f31d774b905c485b5bbc5bdf1c9ab861abc7819 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 28 Dec 2019 21:27:22 -0500 Subject: [PATCH 437/983] Show the pdf compilation window while its building Even if its output isn't entirely visible (because it redraws once a second), this is better feedback that something is going on. --- modules/tools/pdf/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/tools/pdf/config.el b/modules/tools/pdf/config.el index 91f600e0e..d1385d5d6 100644 --- a/modules/tools/pdf/config.el +++ b/modules/tools/pdf/config.el @@ -68,6 +68,7 @@ (with-current-buffer buffer (fundamental-mode))) (while compilation-in-progress ;; Block until `pdf-tools-install' is done + (redisplay) (sleep-for 1)) ;; HACK If pdf-tools was loaded by you opening a pdf file, once ;; `pdf-tools-install' completes, `pdf-view-mode' will throw an error From 54f42fef2393874b1b4b236d47f8951ac75ef71e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 29 Dec 2019 15:44:10 -0500 Subject: [PATCH 438/983] Add popup rules for image-dired --- modules/emacs/dired/config.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index d8a6d5a19..f368d3ae1 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -14,8 +14,14 @@ image-dired-db-file (concat image-dired-dir "db.el") image-dired-gallery-dir (concat image-dired-dir "gallery/") image-dired-temp-image-file (concat image-dired-dir "temp-image") - image-dired-temp-rotate-image-file (concat image-dired-dir "temp-rotate-image")) + image-dired-temp-rotate-image-file (concat image-dired-dir "temp-rotate-image") + ;; Screens are larger nowadays, we can afford slightly larger thumbnails + image-dired-thumb-size 150) :config + (set-popup-rule! "^\\*image-dired" + :slot 20 :size 0.8 :select t :quit nil :ttl 0) + (set-evil-initial-state! 'image-dired-display-image-mode 'emacs) + (let ((args (list "-aBhl" "--group-directories-first"))) (when IS-BSD ;; Use GNU ls as `gls' from `coreutils' if available. Add `(setq From 14cf97e594ed8e70672eae5a31dc2119231d3f1f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 29 Dec 2019 16:31:25 -0500 Subject: [PATCH 439/983] lang/org: use org-attach instead of custom system - Adds more keys under ` a` - Reconfigures org-download to use org-attach system - Make org-id-track-globally = t a global default now (not just for org-brain) - Renamed +org-init-centralized-attachments-h to +org-init-attachments-h - org-attach-store-link-p = t (stores a link to an attachment when it is attached) - org-attach-use-inheritance = t (inherit attachment properties from parent nodes) --- modules/lang/org/autoload/org-attach.el | 96 +++++++------------------ modules/lang/org/config.el | 78 +++++++++----------- modules/lang/org/contrib/brain.el | 4 +- modules/lang/org/contrib/dragndrop.el | 3 +- 4 files changed, 62 insertions(+), 119 deletions(-) diff --git a/modules/lang/org/autoload/org-attach.el b/modules/lang/org/autoload/org-attach.el index b3cee8902..fa41685b2 100644 --- a/modules/lang/org/autoload/org-attach.el +++ b/modules/lang/org/autoload/org-attach.el @@ -1,30 +1,5 @@ ;;; lang/org/autoload/org-attach.el -*- lexical-binding: t; -*- -;; -(defvar +org-attachments nil - "A list of all indexed attachments in `org-directory'.") - -(defvar +org-attachments-files nil - "A list of all attachments in `org-attach-id-dir'.") - -(defun +org-list-attachments (&optional beg end) - "Return a list of all attachment file names in the current buffer between BEG -and END (defaults to `point-min' and `point-max')." - (let ((case-fold-search t) - attachments) - (or end (setq end (point-max))) - (org-save-outline-visibility nil - (org-with-wide-buffer - (goto-char (or beg (point-min))) - (while (search-forward "[[attach:" end t) - (let* ((context (save-match-data (org-element-context))) - (link (expand-file-name (org-link-unescape (org-element-property :path context)) - org-attach-id-dir))) - (when (and (equal "file" (org-element-property :type context)) - (file-in-directory-p link org-attach-id-dir)) - (push (file-name-nondirectory link) attachments)))))) - (cl-delete-duplicates attachments :test #'string=))) - ;;;###autoload (defun +org-attach-icon-for (path) (char-to-string @@ -39,63 +14,46 @@ and END (defaults to `point-min' and `point-max')." ((or "zip" "gz" "tar" "7z" "rar") ?) (_ ?)))) +;;;###autoload +(defun +org/open-gallery-from-attachments () + "TODO" + (interactive) + (require 'org-attach) + (if-let (dir (org-attach-dir)) + (pop-to-buffer + ;; Rather than opening dired *and* image-dired windows, suppress them + ;; both and open only the image-dired window. + (save-window-excursion + (image-dired dir) + (current-buffer))) + (user-error "No attachments for this node"))) ;;;###autoload -(defun +org-attach/sync (arg) - "Reindex all attachments in `org-directory' and delete orphaned attachments in -`org-attach-id-dir'. If ARG (universal arg), conduct a dry run." - (declare (interactive-only t)) - (interactive "P") - (message "Reloading") - (setq +org-attachments-files (directory-files org-attach-id-dir nil "^[^.]" t)) - (with-temp-buffer - (delay-mode-hooks (org-mode)) - (dolist (org-file (directory-files-recursively org-directory "\\.org$")) - (insert-file-contents-literally org-file)) - (setq +org-attachments (+org-list-attachments))) - ;; clean up - (let ((deleted 0)) - (dolist (file (cl-set-difference +org-attachments-files +org-attachments - :test #'string=)) - (message "Deleting orphaned attachment: %s" file) - (cl-incf deleted) - (unless arg - (delete-file (expand-file-name file org-attach-id-dir)))) - (message "Buffer's attachments synced (%d deleted)" deleted))) - -;;;###autoload -(defun +org-attach/find-file () +(defun +org/find-file-in-attachments () "Open a file from `org-attach-id-dir'." (interactive) (doom-project-browse org-attach-id-dir)) ;;;###autoload -(defun +org-attach/file (path) - "Copies the file at PATH to `+org-attach-dir' and places an org link to it at -the cursor." - (interactive "fAttach file: ") - (+org-attach/uri path)) - -;;;###autoload -(defun +org-attach/uri (uri) - "Downloads the file at URL and place an org link to it at the cursor." +(defun +org/attach-file-and-insert-link (path) + "Downloads the file at PATH and insert an org link at point. +PATH (a string) can be an url, a local file path, or a base64 encoded datauri." (interactive "sUri/file: ") (unless (eq major-mode 'org-mode) (user-error "Not in an org buffer")) (require 'org-download) - (let ((raw-uri (url-unhex-string uri))) - (condition-case ex - (cond ((string-match-p "^data:image/png;base64," uri) - (org-download-dnd-base64 uri nil)) + (condition-case ex + (let ((raw-uri (url-unhex-string path))) + (cond ((string-match-p "^data:image/png;base64," path) + (org-download-dnd-base64 path nil)) ((image-type-from-file-name raw-uri) (org-download-image raw-uri)) - (t - (let ((new-path (expand-file-name (org-download--fullname raw-uri)))) + ((let ((new-path (expand-file-name (org-download--fullname raw-uri)))) ;; Download the file - (if (string-match-p (concat "^" (regexp-opt '("http" "https" "nfs" "ftp" "file")) ":/") uri) + (if (string-match-p (concat "^" (regexp-opt '("http" "https" "nfs" "ftp" "file")) ":/") path) (url-copy-file raw-uri new-path) - (copy-file uri new-path)) + (copy-file path new-path)) ;; insert the link - (org-download-insert-link raw-uri new-path)))) - (error - (user-error "Failed to attach file: %s" (error-message-string ex)))))) + (org-download-insert-link raw-uri new-path))))) + (error + (user-error "Failed to attach file: %s" (error-message-string ex))))) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 83b75aa13..ffce10b0c 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -355,42 +355,14 @@ underlying, modified buffer. This fixes that." (add-hook '+doom-dashboard-inhibit-functions #'+org-capture-frame-p))) -(defun +org-init-centralized-attachments-h () - "I believe Org's native attachment system is over-complicated and litters -files with metadata I don't want. So I wrote my own, which: - -+ Places attachments in a centralized location (`org-attach-id-dir' in - `org-directory'). -+ Adds attach:* link abbreviation for quick links to these files from anywhere. -+ Use `+org-attach/sync' to index all attachments in `org-directory' that use - the attach:* abbreviation and delete orphaned ones that are no longer - referenced. -+ This compliments the +dragndrop flag which provides drag'n'drop support for - images (with preview) and media files. - -Some commands of interest: -+ `org-download-screenshot' -+ `+org-attach/file' -+ `+org-attach/url' -+ `+org-attach/sync'" - (setq org-attach-id-dir (doom-path org-directory org-attach-id-dir)) - - ;; A shorter link to attachments - (add-to-list 'org-link-abbrev-alist - (cons "attach" - (abbreviate-file-name org-attach-id-dir))) - - (org-link-set-parameters - "attach" - :follow (lambda (link) (find-file (doom-path org-attach-id-dir link))) - :complete (lambda (&optional _arg) - (+org--relpath (+org-link-read-file "attach" org-attach-id-dir) - org-attach-id-dir)) - :face (lambda (link) - (if (file-exists-p (expand-file-name link org-attach-id-dir)) - 'org-link - 'error))) - +(defun +org-init-attachments-h () + "Sets up org's attachment system." + ;; Centralized attachments directory + (setq org-attach-id-dir (doom-path org-directory org-attach-id-dir) + ;; Store a link to attachments when they are attached + org-attach-store-link-p t + ;; Inherit attachment properties from parent nodes + org-attach-use-inheritance t) (after! projectile (add-to-list 'projectile-globally-ignored-directories org-attach-id-dir))) @@ -650,10 +622,21 @@ between the two." "t" #'org-todo "T" #'org-todo-list (:prefix ("a" . "attachments") - "a" #'+org-attach/file - "u" #'+org-attach/uri - "f" #'+org-attach/find-file - "s" #'+org-attach/sync) + "a" #'org-attach + "d" #'org-attach-delete-one + "D" #'org-attach-delete-all + "f" #'+org/find-file-in-attachments + "l" #'+org/attach-file-and-insert-link + "n" #'org-attach-new + "o" #'org-attach-open + "O" #'org-attach-open-in-emacs + "r" #'org-attach-reveal + "R" #'org-attach-reveal-in-emacs + "u" #'org-attach-url + "s" #'org-attach-set-directory + "S" #'org-attach-sync + (:when (featurep! +dragndrop) + "y" #'org-download-yank)) (:prefix ("b" . "tables") "-" #'org-table-insert-hline "a" #'org-table-align @@ -944,11 +927,14 @@ compelling reason, so..." org-capture :preface ;; Change org defaults (should be set before org loads) - (defvar org-directory "~/org/") - (defvar org-attach-id-dir ".attach/") - - (setq org-publish-timestamp-directory (concat doom-cache-dir "org-timestamps/") - org-preview-latex-image-directory (concat doom-cache-dir "org-latex/")) + (setq org-directory "~/org/" + org-attach-id-dir ".attach/" + org-publish-timestamp-directory (concat doom-cache-dir "org-timestamps/") + org-preview-latex-image-directory (concat doom-cache-dir "org-latex/") + org-id-locations-file (concat doom-etc-dir "org-id-locations") + ;; Global ID state means we can have ID links anywhere (required by + ;; `org-brain') + org-id-track-globally t) (defvar org-modules '(;; ol-w3m @@ -978,11 +964,11 @@ compelling reason, so..." (add-hook! 'org-load-hook #'+org-init-appearance-h #'+org-init-agenda-h + #'+org-init-attachments-h #'+org-init-babel-h #'+org-init-babel-lazy-loader-h #'+org-init-capture-defaults-h #'+org-init-capture-frame-h - #'+org-init-centralized-attachments-h #'+org-init-centralized-exports-h #'+org-init-custom-links-h #'+org-init-export-h diff --git a/modules/lang/org/contrib/brain.el b/modules/lang/org/contrib/brain.el index 019310284..4e0ed6365 100644 --- a/modules/lang/org/contrib/brain.el +++ b/modules/lang/org/contrib/brain.el @@ -4,9 +4,7 @@ (use-package! org-brain :defer t :init - (setq org-id-track-globally t - org-id-locations-file (concat doom-etc-dir "org-id-locations") - org-brain-visualize-default-choices 'all + (setq org-brain-visualize-default-choices 'all org-brain-title-max-length 24 org-brain-include-file-entries nil org-brain-file-entries-use-title nil) diff --git a/modules/lang/org/contrib/dragndrop.el b/modules/lang/org/contrib/dragndrop.el index 4095e25a4..35526cda3 100644 --- a/modules/lang/org/contrib/dragndrop.el +++ b/modules/lang/org/contrib/dragndrop.el @@ -10,7 +10,8 @@ '("^data:" . org-download-dnd-base64)) (advice-add #'org-download-enable :override #'ignore) :config - (setq org-download-image-dir org-attach-directory + (setq org-download-image-dir org-attach-id-dir + org-download-method 'attach org-download-heading-lvl nil org-download-timestamp "_%Y%m%d_%H%M%S" org-download-screenshot-method From f05f4d2b59a95377112731f4eb7b237a17d4cf98 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 29 Dec 2019 16:34:21 -0500 Subject: [PATCH 440/983] Replace search docs button w/ open docs on dashboard It is more helpful to newcomers. --- modules/ui/doom-dashboard/config.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index 01d7583cd..d158b9205 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -67,9 +67,9 @@ Possible values: :icon (all-the-icons-octicon "tools" :face 'font-lock-keyword-face) :when (file-directory-p doom-private-dir) :action doom/open-private-config) - ("Search Documentation" + ("Open documentation" :icon (all-the-icons-octicon "book" :face 'font-lock-keyword-face) - :action doom/help-search-headings)) + :action doom/help)) "An alist of menu buttons used by `doom-dashboard-widget-shortmenu'. Each element is a cons cell (LABEL . PLIST). LABEL is a string to display after the icon and before the key string. From 0ac7facea737c4c32ceef18ab7e2b9bf29c83013 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 29 Dec 2019 18:22:44 -0500 Subject: [PATCH 441/983] Reorganize & rethink help commands Changes: - Move da to u & du = lookup docs for an autodef - Rebind dC = goto private init file (and jump to doom! block) - Add u & du = lookup docs on an autodef - Add dl = text search on all packages in load-path - Add dL = text search on all load el files New p prefix for package help commands: - dpc = jump to a config block for a package - dpd = goto private packages.el file - dph = open a package's homepage (its repo or on melpa) - dpp = lookup docs on a package (including Doom info; what module(s) install package, where it is configured, etc) --- core/autoload/config.el | 9 +++++---- modules/config/default/config.el | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/core/autoload/config.el b/core/autoload/config.el index df4e71622..484bf18fd 100644 --- a/core/autoload/config.el +++ b/core/autoload/config.el @@ -26,8 +26,9 @@ (doom-project-find-file doom-private-dir)) ;;;###autoload -(defun doom/goto-doomblock () - "Open your private init.el and go to your `doom!' block." +(defun doom/goto-private-init-file () + "Open your private init.el file. +And jumps to your `doom!' block." (interactive) (find-file (expand-file-name "init.el" doom-private-dir)) (goto-char @@ -37,13 +38,13 @@ (point)))) ;;;###autoload -(defun doom/goto-config-file () +(defun doom/goto-private-config-file () "Open your private config.el file." (interactive) (find-file (expand-file-name "config.el" doom-private-dir))) ;;;###autoload -(defun doom/goto-packages-file () +(defun doom/goto-private-packages-file () "Open your private packages.el file." (interactive) (find-file (expand-file-name "packages.el" doom-private-dir))) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index fb6d8c2c7..6e2537375 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -282,6 +282,7 @@ (define-key! help-map ;; new keybinds "'" #'describe-char + "u" #'doom/help-autodefs "E" #'doom/sandbox "M" #'doom/describe-active-minor-mode "O" #'+lookup/online @@ -317,26 +318,27 @@ ;; replaces `apropos-documentation' b/c `apropos' covers this "d" nil - "da" #'doom/help-autodefs "db" #'doom/report-bug + "dc" #'doom/goto-private-config-file + "dC" #'doom/goto-private-init-file "dd" #'doom/toggle-debug-mode "df" #'doom/help-faq "dh" #'doom/help - "dk" #'doom/goto-packages-file "dl" #'doom/help-search-load-path + "dL" #'doom/help-search-loaded-files "dm" #'doom/help-modules "dn" #'doom/help-news "dN" #'doom/help-news-search - "di" #'doom/goto-doomblock - "dp" #'doom/help-packages - "dP" #'doom/help-package-homepage - "dc" #'doom/goto-config-file - "dC" #'doom/help-package-config + "dpc" #'doom/help-package-config + "dpd" #'doom/goto-private-packages-file + "dph" #'doom/help-package-homepage + "dpp" #'doom/help-packages "ds" #'doom/help-search-headings "dS" #'doom/help-search - "dx" #'doom/sandbox "dt" #'doom/toggle-profiler + "du" #'doom/help-autodefs "dv" #'doom/version + "dx" #'doom/sandbox ;; replaces `apropos-command' "a" #'apropos From b63ce9873167a53125044b67a220ed4c60b5ba22 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 29 Dec 2019 18:47:12 -0500 Subject: [PATCH 442/983] Add benchmark hook & restore switch earlier If the user wants to remove them for some reason. --- core/core.el | 6 +++++- init.el | 4 +--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/core.el b/core/core.el index 5f1b21899..964aa479a 100644 --- a/core/core.el +++ b/core/core.el @@ -543,7 +543,11 @@ to least)." (warn "Your Doom core autoloads file is missing")) (unless pkg-autoloads-p (warn "Your package autoloads file is missing")) - (signal 'doom-autoload-error (list "Run `bin/doom refresh' to generate them")))) + (signal 'doom-autoload-error (list "Run `bin/doom refresh' to generate them"))) + + (when doom-interactive-mode + (add-hook 'window-setup-hook #'doom-display-benchmark-h 'append) + (add-to-list 'command-switch-alist (cons "--restore" #'doom-restore-session-handler)))) t)) (defun doom-initialize-core () diff --git a/init.el b/init.el index c1b8d7674..13ed45647 100644 --- a/init.el +++ b/init.el @@ -50,6 +50,4 @@ (if noninteractive (doom-initialize-packages) (doom-initialize-core) - (doom-initialize-modules) - (add-hook 'window-setup-hook #'doom-display-benchmark-h) - (add-to-list 'command-switch-alist (cons "--restore" #'doom-restore-session-handler))) + (doom-initialize-modules)) From c57aff9b81611e078b5b3b050002524393944189 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 29 Dec 2019 19:21:09 -0500 Subject: [PATCH 443/983] Change how +lookup/online populates initial input If no selection is active, there is no initial input. If selection is active, use the selection. Also remove helm-google package, as the helm functionality is provided by the core helm package already (and actually works). --- modules/completion/ivy/config.el | 3 +- modules/tools/lookup/autoload/online.el | 48 +++++++++++++++++++------ modules/tools/lookup/config.el | 4 +-- modules/tools/lookup/packages.el | 1 - 4 files changed, 42 insertions(+), 14 deletions(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index bf34992c8..84445f621 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -243,7 +243,8 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." ("L" (lambda (path) (with-ivy-window (insert (format "[[%s]]" path)))) "Insert absolute org-link"))) - ;; `counsel-search' + ;; `counsel-search': use normal page for displaying results, so that we see + ;; custom ddg themes (if one is set). (setf (nth 1 (alist-get 'ddg counsel-search-engines-alist)) "https://duckduckgo.com/?q=") diff --git a/modules/tools/lookup/autoload/online.el b/modules/tools/lookup/autoload/online.el index f5de9b1a0..bdd9639a0 100644 --- a/modules/tools/lookup/autoload/online.el +++ b/modules/tools/lookup/autoload/online.el @@ -25,8 +25,8 @@ argument is non-nil)." (+lookup--online-provider (not current-prefix-arg)))) ;;;###autoload -(defun +lookup/online (arg &optional query provider) - "Looks up QUERY (a string) in you browser using PROVIDER. +(defun +lookup/online (query provider) + "Looks up QUERY (a string) in you browser usin PROVIDER. PROVIDER should be a key of `+lookup-provider-url-alist'. @@ -34,14 +34,13 @@ When used interactively, it will prompt for a query and, for the first time, the provider from `+lookup-provider-url-alist'. On consecutive uses, the last provider will be reused. If the universal argument is supplied, always prompt for the provider." - (interactive "P") - (let* ((provider (or provider (+lookup--online-provider arg))) - (query (or query (+lookup-symbol-or-region))) - (backend (cl-find-if (lambda (x) (or (stringp x) (fboundp x))) - (cdr (assoc provider +lookup-provider-url-alist))))) - (if (and (functionp backend) - (commandp backend)) - (call-interactively backend) + (interactive + (list (if (use-region-p) (+lookup-symbol-or-region)) + (+lookup--online-provider current-prefix-arg))) + (let ((backend (cl-find-if (lambda (x) (or (stringp x) (fboundp x))) + (cdr (assoc provider +lookup-provider-url-alist))))) + (unless (and (functionp backend) + (funcall backend query)) (unless backend (user-error "%S is an invalid query engine backend for %S provider" backend provider)) @@ -69,3 +68,32 @@ for the provider." (interactive) (let ((current-prefix-arg t)) (call-interactively #'+lookup/online))) + + +;; +;;; Special provider frontends + +(defvar ivy-initial-inputs-alist) +(defvar counsel-search-engine) +;;;###autoload +(defun +lookup--online-backend-google (query) + "Search google, starting with QUERY, with live autocompletion." + (cond ((fboundp 'counsel-search) + (let ((ivy-initial-inputs-alist `((t . ,query))) + (counsel-search-engine 'google)) + (call-interactively #'counsel-search) + t)) + ((require 'helm-net nil t) + (helm :sources 'helm-source-google-suggest + :buffer "*helm google*" + :input query) + t))) + +;;;###autoload +(defun +lookup--online-backend-duckduckgo (query) + "Search duckduckgo, starting with QUERY, with live autocompletion." + (cond ((fboundp 'counsel-search) + (let ((ivy-initial-inputs-alist `((t . ,query))) + (counsel-search-engine 'ddg)) + (call-interactively #'counsel-search) + t)))) diff --git a/modules/tools/lookup/config.el b/modules/tools/lookup/config.el index c80e09c52..017619f84 100644 --- a/modules/tools/lookup/config.el +++ b/modules/tools/lookup/config.el @@ -13,11 +13,11 @@ ;; `dumb-jump' to find what you want. (defvar +lookup-provider-url-alist - (append '(("Google" counsel-search helm-google-suggest "https://google.com/search?q=%s") + (append '(("Google" +lookup--online-backend-google "https://google.com/search?q=%s") ("Google images" "https://www.google.com/images?q=%s") ("Google maps" "https://maps.google.com/maps?q=%s") ("Project Gutenberg" "http://www.gutenberg.org/ebooks/search/?query=%s") - ("DuckDuckGo" counsel-search "https://duckduckgo.com/?q=%s") + ("DuckDuckGo" +lookup--online-backend-duckduckgo "https://duckduckgo.com/?q=%s") ("DevDocs.io" "https://devdocs.io/#q=%s") ("StackOverflow" "https://stackoverflow.com/search?q=%s") ("Github" "https://github.com/search?ref=simplesearch&q=%s") diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index 173350732..6f82a56eb 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -12,7 +12,6 @@ (when (featurep! :completion ivy) (package! ivy-xref)) (when (featurep! :completion helm) - (package! helm-google) (package! helm-xref)) (when (featurep! +docsets) From db9bc763ef3db733a827d3a10d0b2607afa084a8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 29 Dec 2019 19:23:14 -0500 Subject: [PATCH 444/983] Remove redundant straight-fix-org setting Already exists in core-packages.el --- modules/lang/org/packages.el | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index dd7fad90b..a3ec20f5d 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -13,7 +13,6 @@ ;; call in the repo's root. Of course, this command won't work in a sparse ;; clone, and more than that, initiating these compilation step is a ;; hassle, so... -(setq straight-fix-org nil) (add-hook! 'straight-use-package-pre-build-functions (defun +org-fix-package-h (package &rest _) (when (member package '("org" "org-plus-contrib")) From 4808d40736709b281b6d20715a8dc05bdc8bd763 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 29 Dec 2019 21:23:39 -0500 Subject: [PATCH 445/983] Convert def-modeline! macro into function Eager-expansion was causing void-function errors for set-modeline! --- modules/ui/modeline/+light.el | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/modules/ui/modeline/+light.el b/modules/ui/modeline/+light.el index 3f9870805..c6fa8bc46 100644 --- a/modules/ui/modeline/+light.el +++ b/modules/ui/modeline/+light.el @@ -141,17 +141,15 @@ See `def-modeline!' on how modelines are defined." (remove-hook hook (intern (format "+modeline-set-%s-format-h" name))))) (add-hook hook fn)))) -(defmacro def-modeline! (name lhs rhs) +(defun def-modeline! (name lhs rhs) "Define a modeline format by NAME. LHS and RHS are the formats representing the left and right hand side of the mode-line, respectively. See the variable `format-mode-line' for details on what LHS and RHS will accept." - `(progn - (setf (alist-get ',name +modeline-format-alist) - (cons ,lhs ,rhs)) - (defun ,(intern (format "+modeline-set-%s-format-h" name)) (&rest _) - "TODO" - (set-modeline! ',name)))) + (setf (alist-get name +modeline-format-alist) + (cons lhs rhs)) + (fset (intern (format "+modeline-set-%s-format-h" name)) + (lambda (&rest _) (set-modeline! name)))) (defmacro def-modeline-var! (name body &optional docstring &rest plist) "TODO" @@ -499,7 +497,7 @@ lines are selected, or the NxM dimensions of a block selection.") " " (+modeline-checker ("" +modeline-checker " ")))) -(def-modeline! project +(def-modeline! 'project `(" " ,(all-the-icons-octicon "file-directory" @@ -510,7 +508,7 @@ lines are selected, or the NxM dimensions of a block selection.") face bold)) '("" +modeline-modes)) -(def-modeline! special +(def-modeline! 'special '("" +modeline-matches " " +modeline-buffer-identification) '("" +modeline-modes)) From f8ff50565ebf5ffeeac1a332715c39147894ac0f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 29 Dec 2019 21:25:40 -0500 Subject: [PATCH 446/983] Refactor autoload generator - Halves LOC - Adopts functional paradigm where possible. - Reduces the filesize of autoloads files by ~10-20% - Speeds up autoloads generation by ~20% --- core/cli/autoloads.el | 639 +++++++++++++++++------------------------- core/cli/packages.el | 10 +- core/core-cli.el | 11 +- 3 files changed, 264 insertions(+), 396 deletions(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index fa113ed9f..6f0fae7a8 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -1,407 +1,274 @@ ;;; core/cli/autoloads.el -*- lexical-binding: t; -*- (defvar doom-autoload-excluded-packages '("gh") - "Packages that have silly or destructive autoload files that try to load + "What packages whose autoloads file we won't index. + +These packages have silly or destructive autoload files that try to load everyone in the universe and their dog, causing errors that make babies cry. No one wants that.") +(defvar doom-autoload-cached-vars + '(load-path + auto-mode-alist + Info-directory-list + doom-disabled-packages) + "A list of variables to be cached in `doom-package-autoload-file'.") + ;; externs (defvar autoload-timestamps) (defvar generated-autoload-load-name) -(defvar generated-autoload-file) - -;; -;;; Helpers - -(defun doom--cli-delete-autoloads-file (file) - "Delete FILE (an autoloads file) and accompanying *.elc file, if any." - (cl-check-type file string) - (when (file-exists-p file) - (when-let (buf (find-buffer-visiting file)) - (with-current-buffer buf - (set-buffer-modified-p nil)) - (kill-buffer buf)) - (delete-file file) - (ignore-errors (delete-file (byte-compile-dest-file file))) - t)) - -(defun doom--cli-warn-refresh-session-h () - (message "Restart or reload Doom Emacs for changes to take effect:\n") - (message " M-x doom/restart-and-restore") - (message " M-x doom/restart") - (message " M-x doom/reload")) - -(defun doom--cli-byte-compile-file (file) - (let ((byte-compile-warnings (if doom-debug-mode byte-compile-warnings)) - (byte-compile-dynamic t) - (byte-compile-dynamic-docstrings t)) - (condition-case-unless-debug e - (when (byte-compile-file file) - (unless doom-interactive-mode - (add-hook 'doom-cli-post-success-execute-hook #'doom--cli-warn-refresh-session-h)) - (let (noninteractive) - (load file 'noerror 'nomessage 'nosuffix))) - ((debug error) - (let ((backup-file (concat file ".bk"))) - (print! (warn "Copied backup to %s") (relpath backup-file)) - (copy-file file backup-file 'overwrite)) - (doom--cli-delete-autoloads-file file) - (signal 'doom-autoload-error (list file e)))))) - -(defun doom-cli-reload-autoloads (&optional file force-p) +(defun doom-cli-reload-autoloads (&optional type force-p) "Reloads FILE (an autoload file), if it needs reloading. FILE should be one of `doom-autoload-file' or `doom-package-autoload-file'. If it is nil, it will try to reload both. If FORCE-P (universal argument) do it even if it doesn't need reloading!" - (or (null file) - (stringp file) - (signal 'wrong-type-argument (list 'stringp file))) - (if (stringp file) - (cond ((file-equal-p file doom-autoload-file) - (doom-cli-reload-core-autoloads force-p)) - ((file-equal-p file doom-package-autoload-file) - (doom-cli-reload-package-autoloads force-p)) - ((error "Invalid autoloads file: %s" file))) - (doom-cli-reload-core-autoloads force-p) - (doom-cli-reload-package-autoloads force-p))) + (if type + (cond ((eq type 'core) + (doom-cli-reload-core-autoloads + doom-autoload-file force-p)) + ((eq type 'package) + (doom-cli-reload-package-autoloads + doom-package-autoload-file force-p)) + ((error "Invalid autoloads file: %s" type))) + (doom-cli-reload-autoloads 'core force-p) + (doom-cli-reload-autoloads 'package force-p))) - -;; -;;; Doom autoloads - -(defun doom--cli-generate-header (func) - (goto-char (point-min)) - (insert ";; -*- lexical-binding:t; -*-\n" - ";; This file is autogenerated by `" (symbol-name func) "', DO NOT EDIT !!\n\n")) - -(defun doom--cli-generate-autoloads (targets) - (let ((n 0)) - (dolist (file targets) - (insert - (with-temp-buffer - (cond ((not (doom-file-cookie-p file "if" t)) - (print! (debug "Ignoring %s") (relpath file))) - - ((let ((generated-autoload-load-name (file-name-sans-extension file)) - ;; Prevent `autoload-find-file' from firing file hooks, - ;; e.g. adding to recentf. - find-file-hook - write-file-functions - ;; Prevent a possible source of crashes when there's a - ;; syntax error in the autoloads file - debug-on-error) - (quiet! (autoload-generate-file-autoloads file (current-buffer)))) - (print! (debug "Nothing in %s") (relpath file))) - - ((cl-incf n) - (print! (debug "Scanning %s...") (relpath file)))) - (buffer-string)))) - (print! (class (if (> n 0) 'success 'info) - "Scanned %d file(s)") - n))) - -(defun doom--cli-expand-autoload-paths (&optional allow-internal-paths) - (let ((load-path - ;; NOTE With `doom-private-dir' in `load-path', Doom autoloads files - ;; will be unable to declare autoloads for the built-in autoload.el - ;; Emacs package, should $DOOMDIR/autoload.el exist. Not sure why - ;; they'd want to though, so it's an acceptable compromise. - (append (list doom-private-dir) - doom-modules-dirs - (straight--directory-files (straight--build-dir) nil t) - load-path))) - (defvar doom--autoloads-path-cache nil) - (while (re-search-forward "^\\s-*(\\(?:custom-\\)?autoload\\s-+'[^ ]+\\s-+\"\\([^\"]*\\)\"" nil t) - (let ((path (match-string 1))) - (replace-match - (or (cdr (assoc path doom--autoloads-path-cache)) - (when-let* ((libpath (or (and allow-internal-paths - (locate-library path nil (cons doom-emacs-dir doom-modules-dirs))) - (locate-library path))) - (libpath (file-name-sans-extension libpath)) - (libpath (abbreviate-file-name libpath))) - (push (cons path libpath) doom--autoloads-path-cache) - libpath) - path) - t t nil 1))))) - -(defun doom--cli-generate-autodefs-1 (path &optional member-p) - (let (forms) - (while (re-search-forward "^;;;###autodef *\\([^\n]+\\)?\n" nil t) - (let* ((sexp (sexp-at-point)) - (alt-sexp (match-string 1)) - (type (car sexp)) - (name (doom-unquote (cadr sexp))) - (origin (doom-module-from-path path))) - (cond - ((and (not member-p) - alt-sexp) - (push (read alt-sexp) forms)) - - ((memq type '(defun defmacro cl-defun cl-defmacro)) - (cl-destructuring-bind (_ _name arglist &rest body) sexp - (appendq! - forms - (list (if member-p - (make-autoload sexp path) - (let ((docstring - (format "THIS FUNCTION DOES NOTHING BECAUSE %s IS DISABLED\n\n%s" - origin - (if (stringp (car body)) - (pop body) - "No documentation.")))) - (condition-case-unless-debug e - (if alt-sexp - (read alt-sexp) - (append - (list (pcase type - (`defun 'defmacro) - (`cl-defun `cl-defmacro) - (_ type)) - name arglist docstring) - (cl-loop for arg in arglist - if (and (symbolp arg) - (not (keywordp arg)) - (not (memq arg cl--lambda-list-keywords))) - collect arg into syms - else if (listp arg) - collect (car arg) into syms - finally return (if syms `((ignore ,@syms)))))) - ('error - (print! "- Ignoring autodef %s (%s)" name e) - nil)))) - `(put ',name 'doom-module ',origin))))) - - ((eq type 'defalias) - (cl-destructuring-bind (_type name target &optional docstring) sexp - (let ((name (doom-unquote name)) - (target (doom-unquote target))) - (unless member-p - (setq target #'ignore - docstring - (format "THIS FUNCTION DOES NOTHING BECAUSE %s IS DISABLED\n\n%s" - origin docstring))) - (appendq! forms `((put ',name 'doom-module ',origin) - (defalias ',name #',target ,docstring)))))) - - (member-p (push sexp forms))))) - forms)) - -(defun doom--cli-generate-autodefs (targets enabled-targets) - (goto-char (point-max)) - (search-backward ";;;***" nil t) - (save-excursion (insert "\n")) - (dolist (path targets) - (insert - (with-temp-buffer - (insert-file-contents path) - (if-let (forms (doom--cli-generate-autodefs-1 path (member path enabled-targets))) - (concat (mapconcat #'prin1-to-string (nreverse forms) "\n") - "\n") - ""))))) - -(defun doom--cli-cleanup-autoloads () - (goto-char (point-min)) - (when (re-search-forward "^;;\\(;[^\n]*\\| no-byte-compile: t\\)\n" nil t) - (replace-match "" t t))) - -(defun doom-cli-reload-core-autoloads (&optional force-p) - "Refreshes `doom-autoload-file', if necessary (or if FORCE-P is non-nil). - -It scans and reads autoload cookies (;;;###autoload) in core/autoload/*.el, -modules/*/*/autoload.el and modules/*/*/autoload/*.el, and generates -`doom-autoload-file'. - -Run this whenever your `doom!' block, or a module autoload file, is modified." - (require 'autoload) - (let* ((default-directory doom-emacs-dir) - (doom-modules (doom-modules)) - - ;; The following bindings are in `package-generate-autoloads'. - ;; Presumably for a good reason, so I just copied them - (backup-inhibited t) - (version-control 'never) - (case-fold-search nil) ; reduce magic - (autoload-timestamps nil) - - ;; Where we'll store the files we'll scan for autoloads. This should - ;; contain *all* autoload files, even in disabled modules, so we can - ;; scan those for autodefs. We start with the core libraries. - (targets (doom-glob doom-core-dir "autoload/*.el")) - ;; A subset of `targets' in enabled modules - (active-targets (copy-sequence targets))) - - (dolist (path (doom-module-load-path 'all-p)) - (when-let* ((files (cons (doom-glob path "autoload.el") - (doom-files-in (doom-path path "autoload") - :match "\\.el$"))) - (files (delq nil files))) - (appendq! targets files) - (when (or (doom-module-from-path path 'enabled-only) - (file-equal-p path doom-private-dir)) - (appendq! active-targets files)))) - - (print! (start "Checking core autoloads file")) - (print-group! - (if (and (not force-p) - (file-exists-p doom-autoload-file) - (not (file-newer-than-file-p doom-emacs-dir doom-autoload-file)) - (not (cl-loop for dir - in (append (doom-glob doom-private-dir "init.el*") - targets) - if (file-newer-than-file-p dir doom-autoload-file) - return t))) - (ignore - (print! (success "Skipping core autoloads, they are up-to-date")) - (doom-load-autoloads-file doom-autoload-file)) - (if (doom--cli-delete-autoloads-file doom-autoload-file) - (print! (success "Deleted old %s") (filename doom-autoload-file)) - (make-directory (file-name-directory doom-autoload-file) t)) - - (print! (start "Regenerating core autoloads file")) - (print-group! - (with-temp-file doom-autoload-file - (doom--cli-generate-header 'doom-cli-reload-core-autoloads) - (save-excursion - (doom--cli-generate-autoloads active-targets) - (print! (success "Generated new autoloads.el"))) - ;; Replace autoload paths (only for module autoloads) with absolute - ;; paths for faster resolution during load and simpler `load-path' - (save-excursion - (doom--cli-expand-autoload-paths 'allow-internal-paths) - (print! (success "Expanded module autoload paths"))) - ;; Generates stub definitions for functions/macros defined in disabled - ;; modules, so that you will never get a void-function when you use - ;; them. - (save-excursion - (doom--cli-generate-autodefs targets (reverse active-targets)) - (print! (success "Generated autodefs"))) - ;; Remove byte-compile-inhibiting file variables so we can byte-compile - ;; the file, and autoload comments. - (doom--cli-cleanup-autoloads) - (print! (success "Cleaned up autoloads")))) - ;; Byte compile it to give the file a chance to reveal errors (and buy us a - ;; few marginal performance boosts) - (print! "> Byte-compiling %s..." (relpath doom-autoload-file)) - (when (doom--cli-byte-compile-file doom-autoload-file) - (print-group! - (print! (success "Compiled %s") (relpath doom-autoload-file))))) - t))) - - -;; -;;; Package autoloads - -(defun doom--generate-package-autoloads () - "Concatenates package autoload files, let-binds `load-file-name' around -them,and remove unnecessary `provide' statements or blank links." - (dolist (pkg (hash-table-keys straight--build-cache)) - (unless (member pkg doom-autoload-excluded-packages) - (let ((file (straight--autoloads-file pkg))) - (when (file-exists-p file) - (insert-file-contents file) - (save-excursion - (while (re-search-forward "\\(?:\\_" nil t) - ;; `load-file-name' is meaningless in a concatenated - ;; mega-autoloads file, so we replace references to it and #$ with - ;; the file they came from. - (unless (doom-point-in-string-or-comment-p) - (replace-match (prin1-to-string (abbreviate-file-name file)) - t t)))) - (while (re-search-forward "^\\(?:;;\\(.*\n\\)\\|\n\\|(provide '[^\n]+\\)" nil t) - (unless (doom-point-in-string-p) - (replace-match "" t t))) - (unless (bolp) (insert "\n"))))))) - -(defun doom--generate-var-cache () - "Print a `setq' form for expensive-to-initialize variables, so we can cache -them in Doom's autoloads file." - (doom-initialize-packages) - (prin1 `(setq load-path ',load-path - auto-mode-alist ',auto-mode-alist - Info-directory-list ',Info-directory-list - doom-disabled-packages ',doom-disabled-packages) - (current-buffer))) - -(defun doom--cleanup-package-autoloads () - "Remove (some) forms that modify `load-path' or `auto-mode-alist'. - -These variables are cached all at once and at later, so these removed statements -served no purpose but to waste cycles." - (while (re-search-forward "^\\s-*\\((\\(?:add-to-list\\|\\(?:when\\|if\\) (boundp\\)\\s-+'\\(?:load-path\\|auto-mode-alist\\)\\)" nil t) - (goto-char (match-beginning 1)) - (kill-sexp))) - -(defun doom-cli-reload-package-autoloads (&optional force-p) - "Compiles `doom-package-autoload-file' from the autoloads files of all -installed packages. It also caches `load-path', `Info-directory-list', -`doom-disabled-packages', `package-activated-list' and `auto-mode-alist'. - -Will do nothing if none of your installed packages have been modified. If -FORCE-P (universal argument) is non-nil, regenerate it anyway. - -This should be run whenever your `doom!' block or update your packages." - (require 'autoload) - (print! (start "Checking package autoloads file")) +(defun doom-cli-reload-core-autoloads (file &optional force-p) + (cl-check-type file string) + (print! (start "(Re)generating core autoloads...")) (print-group! - (if (and (not force-p) - (file-exists-p doom-package-autoload-file) - (not (file-newer-than-file-p package-user-dir doom-package-autoload-file)) - (not (cl-loop for dir in (straight--directory-files (straight--build-dir)) - if (cl-find-if - (lambda (dir) - (file-newer-than-file-p dir doom-package-autoload-file)) - (doom-glob (straight--build-dir dir) "*.el")) - return t)) - (not (cl-loop with doom-modules = (doom-modules) - for key being the hash-keys of doom-modules - for path = (doom-module-path (car key) (cdr key) "packages.el") - if (file-newer-than-file-p path doom-package-autoload-file) - return t))) - (ignore - (print! (success "Skipping package autoloads, they are up-to-date")) - (doom-load-autoloads-file doom-package-autoload-file)) - (let (;; The following bindings are in `package-generate-autoloads'. + (let ((autoload-files + (cl-loop for dir in (append (list doom-core-dir) + (cdr (doom-module-load-path 'all-p)) + (list doom-private-dir)) + if (doom-glob dir "autoload.el") collect it + if (doom-glob dir "autoload/*.el") append it))) + (if (or force-p + (not (file-exists-p file)) + (file-newer-than-file-p doom-emacs-dir file) + (cl-loop for dir + in (append (doom-glob doom-private-dir "init.el*") + autoload-files) + if (file-newer-than-file-p dir doom-autoload-file) + return t)) + (and (print! (start "Generating core autoloads...")) + (doom-cli--write-autoloads + file (doom-cli--generate-autoloads autoload-files 'scan)) + (print! (start "Byte-compiling core autoloads file...")) + (doom-cli--byte-compile-file file) + (print! (success "Generated %s") + (relpath (byte-compile-dest-file file) + doom-emacs-dir))) + (print! (success "Core autoloads are up-to-date")) + nil)))) + +(defun doom-cli-reload-package-autoloads (file &optional force-p) + (cl-check-type file string) + (print! (start "(Re)generating package autoloads...")) + (print-group! + (doom-initialize-packages) + (if (or force-p + (not (file-exists-p file)) + (file-newer-than-file-p package-user-dir file) + (cl-loop for dir in (straight--directory-files (straight--build-dir)) + if (cl-find-if + (doom-rpartial #'file-newer-than-file-p doom-package-autoload-file) + (doom-glob (straight--build-dir dir) "*.el")) + return t) + (not (cl-loop with doom-modules = (doom-modules) + for key being the hash-keys of doom-modules + for path = (doom-module-path (car key) (cdr key) "packages.el") + if (file-newer-than-file-p path doom-package-autoload-file) + return t))) + (and (print! (start "Generating package autoloads...")) + (doom-cli--write-autoloads + file + (doom-cli--generate-var-cache doom-autoload-cached-vars) + (doom-cli--generate-autoloads + (mapcar #'straight--autoloads-file + (cl-set-difference (hash-table-keys straight--build-cache) + doom-autoload-excluded-packages + :test #'string=)))) + (print! (start "Byte-compiling package autoloads file...")) + (doom-cli--byte-compile-file file) + (print! (success "Generated %s") + (relpath (byte-compile-dest-file file) + doom-emacs-dir))) + (print! (success "Package autoloads are up-to-date")) + nil))) + + +;; +;;; Helpers + +(defun doom-cli--write-autoloads (file &rest forms) + (make-directory (file-name-directory file) 'parents) + (condition-case-unless-debug e + (with-temp-file file + (let ((standard-output (current-buffer)) + (print-quoted t) + (print-level nil) + (print-length nil)) + (insert ";; -*- lexical-binding: t; -*-\n" + ";; This file is autogenerated by Doom, DO NOT EDIT IT!!\n") + (dolist (form (delq nil forms)) + (mapc #'print form)) + t)) + (error (delete-file file) + (signal 'doom-autoload-error (list file e))))) + +(defun doom-cli--byte-compile-file (file) + (condition-case-unless-debug e + (let ((byte-compile-warnings (if doom-debug-mode byte-compile-warnings)) + (byte-compile-dynamic t) + (byte-compile-dynamic-docstrings t)) + (when (byte-compile-file file) + (unless doom-interactive-mode + (add-hook 'doom-cli-post-success-execute-hook #'doom-cli--warn-refresh-session-h)) + (load (byte-compile-dest-file file) nil t))) + (error + (delete-file (byte-compile-dest-file file)) + (signal 'doom-autoload-error (list file e))))) + +(defun doom-cli--warn-refresh-session-h () + (print! "Restart or reload Doom Emacs for changes to take effect:") + (print-group! (print! "M-x doom/restart-and-restore") + (print! "M-x doom/restart") + (print! "M-x doom/reload"))) + +(defun doom-cli--generate-var-cache (vars) + `((setq ,@(cl-loop for var in vars + append `(,var ',(symbol-value var)))))) + +(defun doom-cli--filter-form (form &optional expand) + (let ((func (car-safe form))) + (cond ((memq func '(provide custom-autoload)) + nil) + ((and (eq func 'add-to-list) + (memq (doom-unquote (cadr form)) + doom-autoload-cached-vars)) + nil) + ((not (eq func 'autoload)) + form) + ((and expand (not (file-name-absolute-p (nth 2 form)))) + (defvar doom--autoloads-path-cache nil) + (setf (nth 2 form) + (let ((path (nth 2 form))) + (or (cdr (assoc path doom--autoloads-path-cache)) + (when-let* ((libpath (locate-library path)) + (libpath (file-name-sans-extension libpath)) + (libpath (abbreviate-file-name libpath))) + (push (cons path libpath) doom--autoloads-path-cache) + libpath) + path))) + form) + (form)))) + +(defun doom-cli--generate-autoloads-autodefs (file buffer module &optional module-enabled-p) + (with-current-buffer + (or (get-file-buffer file) + (autoload-find-file file)) + (goto-char (point-min)) + (while (re-search-forward "^;;;###autodef *\\([^\n]+\\)?\n" nil t) + (let* ((standard-output buffer) + (form (read (current-buffer))) + (altform (match-string 1)) + (definer (car-safe form)) + (symbol (doom-unquote (cadr form)))) + (cond ((and (not module-enabled-p) altform) + (print (read altform))) + ((memq definer '(defun defmacro cl-defun cl-defmacro)) + (if module-enabled-p + (print (make-autoload form file)) + (cl-destructuring-bind (_ _ arglist &rest body) form + (print + (if altform + (read altform) + (append + (list (pcase definer + (`defun 'defmacro) + (`cl-defun `cl-defmacro) + (_ type)) + symbol arglist + (format "THIS FUNCTION DOES NOTHING BECAUSE %s IS DISABLED\n\n%s" + module + (if (stringp (car body)) + (pop body) + "No documentation."))) + (cl-loop for arg in arglist + if (and (symbolp arg) + (not (keywordp arg)) + (not (memq arg cl--lambda-list-keywords))) + collect arg into syms + else if (listp arg) + collect (car arg) into syms + finally return (if syms `((ignore ,@syms))))))))) + (print `(put ',symbol 'doom-module ',module))) + ((eq definer 'defalias) + (cl-destructuring-bind (_ _ target &optional docstring) form + (unless module-enabled-p + (setq target #'ignore + docstring + (format "THIS FUNCTION DOES NOTHING BECAUSE %s IS DISABLED\n\n%s" + module docstring))) + (print `(put ',symbol 'doom-module ',module)) + (print `(defalias ',symbol #',(doom-unquote target) ,docstring)))) + (module-enabled-p (print form))))))) + +(defun doom-cli--generate-autoloads-buffer (file) + (when (doom-file-cookie-p file "if" t) + (let* (;; Prevent `autoload-find-file' from firing file hooks, e.g. adding + ;; to recentf. + find-file-hook + write-file-functions + ;; Prevent a possible source of crashes when there's a syntax error + ;; in the autoloads file + debug-on-error + ;; The following bindings are in `package-generate-autoloads'. ;; Presumably for a good reason, so I just copied them (backup-inhibited t) (version-control 'never) - (case-fold-search nil) ; reduce magic - (autoload-timestamps nil)) + case-fold-search ; reduce magic + autoload-timestamps ; reduce noise in generated files + ;; Needed for `autoload-generate-file-autoloads' + (generated-autoload-load-name (file-name-sans-extension file)) + (target-buffer (current-buffer)) + (module (doom-module-from-path file)) + (module-enabled-p (or (memq (car module) '(:core :private)) + (doom-module-p (car module) (cdr module))))) + (save-excursion + (when module-enabled-p + (quiet! (autoload-generate-file-autoloads file target-buffer))) + (doom-cli--generate-autoloads-autodefs + file target-buffer module module-enabled-p))))) - (if (doom--cli-delete-autoloads-file doom-package-autoload-file) - (print! (success "Deleted old %s") (filename doom-package-autoload-file)) - (make-directory (file-name-directory doom-autoload-file) t)) - - (print! (start "Regenerating package autoloads file")) - (print-group! - (with-temp-file doom-package-autoload-file - (doom--cli-generate-header 'doom-cli-reload-package-autoloads) - - (save-excursion - ;; Cache important and expensive-to-initialize state here. - (doom--generate-var-cache) - (print! (success "Cached package state")) - ;; Concatenate the autoloads of all installed packages. - (doom--generate-package-autoloads) - (print! (success "Package autoloads included"))) - - ;; Replace autoload paths (only for module autoloads) with absolute - ;; paths for faster resolution during load and simpler `load-path' - (save-excursion - (doom--cli-expand-autoload-paths) - (print! (success "Expanded module autoload paths"))) - - ;; Remove `load-path' and `auto-mode-alist' modifications (most of them, - ;; at least); they are cached later, so all those membership checks are - ;; unnecessary overhead. - (doom--cleanup-package-autoloads) - (print! (success "Removed load-path/auto-mode-alist entries")))) - ;; Byte compile it to give the file a chance to reveal errors (and buy us a - ;; few marginal performance boosts) - (print! (start "Byte-compiling %s...") (relpath doom-package-autoload-file)) - (when (doom--cli-byte-compile-file doom-package-autoload-file) - (print-group! - (print! (success "Compiled %s") (relpath doom-package-autoload-file)))))) - t)) +(defun doom-cli--generate-autoloads (files &optional scan) + (require 'autoload) + (let (autoloads) + (dolist (file files (delq nil (nreverse autoloads))) + (and (file-readable-p file) + (with-temp-buffer + (save-excursion + (if scan + (doom-cli--generate-autoloads-buffer file) + (insert-file-contents-literally file))) + (save-excursion + (let ((filestr (prin1-to-string file))) + (while (re-search-forward "\\_" nil t) + ;; `load-file-name' is meaningless in a concatenated + ;; mega-autoloads file, so we replace references to it with the + ;; file they came from. + (replace-match filestr t t)))) + (let ((load-file-name file) + (load-path + (append (list doom-private-dir) + doom-modules-dirs + load-path))) + (condition-case _ + (while t + (push (doom-cli--filter-form (read (current-buffer)) + scan) + autoloads)) + (end-of-file)))))))) diff --git a/core/cli/packages.el b/core/cli/packages.el index 51627a298..90ca0ba55 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -10,9 +10,9 @@ between HEAD and FETCH_HEAD. This can take a while. This excludes packages whose `package!' declaration contains a non-nil :freeze or :ignore property." (straight-check-all) - (doom-cli-reload-core-autoloads) + (doom-cli-reload-autoloads 'core) (when (doom-cli-packages-update) - (doom-cli-reload-package-autoloads 'force-p)) + (doom-cli-reload-autoloads 'package 'force)) t) (defcli! (build b) @@ -23,7 +23,7 @@ This ensures that all needed files are symlinked from their package repo and their elisp files are byte-compiled. This is especially necessary if you upgrade Emacs (as byte-code is generally not forward-compatible)." (when (doom-cli-packages-build (not rebuild-p)) - (doom-cli-reload-package-autoloads 'force-p)) + (doom-cli-reload-autoloads 'package 'force)) t) (defcli! (purge p) @@ -46,7 +46,7 @@ list remains lean." (not norepos-p) (not nobuilds-p) regraft-p) - (doom-cli-reload-package-autoloads 'force-p)) + (doom-cli-reload-autoloads 'package 'force)) t) ;; (defcli! rollback () ; TODO doom rollback @@ -310,7 +310,7 @@ a `package!' declaration) or isn't depended on by another primary package. If BUILDS-P, include straight package builds. If REPOS-P, include straight repos. If ELPA-P, include packages installed with package.el (M-x package-install)." - (print! (start "Searching for orphaned packages to purge (for the emperor)...")) + (print! (start "Purging orphaned packages (for the emperor)...")) (cl-destructuring-bind (&optional builds-to-purge repos-to-purge repos-to-regraft) (let ((rdirs (straight--directory-files (straight--repos-dir) nil nil 'sort)) (bdirs (straight--directory-files (straight--build-dir) nil nil 'sort))) diff --git a/core/core-cli.el b/core/core-cli.el index 6e1aac662..c18aec87e 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -248,13 +248,14 @@ stale." ;; Ensures that no pre-existing state pollutes the generation of the new ;; autoloads files. - (mapc #'doom--cli-delete-autoloads-file - (list doom-autoload-file - doom-package-autoload-file)) + (dolist (file (list doom-autoload-file doom-package-autoload-file)) + (delete-file file) + (delete-file (byte-compile-dest-file file))) + (doom-initialize 'force 'noerror) (doom-initialize-modules) - (doom-cli-reload-core-autoloads (not if-necessary-p)) + (doom-cli-reload-autoloads 'core (not if-necessary-p)) (unwind-protect (progn (and (doom-cli-packages-install) @@ -263,7 +264,7 @@ stale." (setq success t)) (and (doom-cli-packages-purge prune-p 'builds-p prune-p prune-p) (setq success t))) - (doom-cli-reload-package-autoloads (or success (not if-necessary-p))) + (doom-cli-reload-autoloads 'package (or success (not if-necessary-p))) (doom-cli-byte-compile nil 'recompile)) t))) From b9f90b3a1a4055fec9c88034153a70de6b501e1e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 00:07:19 -0500 Subject: [PATCH 447/983] lang/org: clear src block results on TAB When cursor is inside a src block. e.g. #+BEGIN_SRC elisp <-- not here (message "hi") <-- in here #+END_SRC <-- not here --- modules/lang/org/autoload/org.el | 8 ++++++++ modules/lang/org/config.el | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/lang/org/autoload/org.el b/modules/lang/org/autoload/org.el index 14ea6d959..511f908fe 100644 --- a/modules/lang/org/autoload/org.el +++ b/modules/lang/org/autoload/org.el @@ -406,6 +406,14 @@ with `org-cycle')." (org-cycle-internal-local) t))))) +;;;###autoload +(defun +org-clear-babel-results-h () + "Remove the results block for the org babel block at point." + (when (and (org-in-src-block-p t) + (org-babel-where-is-src-block-result)) + (org-babel-remove-result) + t)) + ;;;###autoload (defun +org-unfold-to-2nd-level-or-point-h () "My version of the 'overview' #+STARTUP option: expand first-level headings. diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index ffce10b0c..5ac1e8de1 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -850,8 +850,11 @@ compelling reason, so..." (defvar evil-org-use-additional-insert t) :config (evil-org-set-key-theme) - ;; Only fold the current tree, rather than recursively - (add-hook 'org-tab-first-hook #'+org-cycle-only-current-subtree-h 'append) + (add-hook! 'org-tab-first-hook :append + ;; Only fold the current tree, rather than recursively + #'+org-cycle-only-current-subtree-h + ;; Clear babel results if point is inside a src block + #'+org-clear-babel-results-h) (map! :map evil-org-mode-map :ni [C-return] #'+org/insert-item-below :ni [C-S-return] #'+org/insert-item-above From 8c0561df932a2c36d81a79dd19173efe90aa1b57 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 00:49:32 -0500 Subject: [PATCH 448/983] Fix ui/tabs module Remove all my custom hacks because none of them work anymore. --- modules/ui/tabs/config.el | 69 +++++---------------------------------- 1 file changed, 9 insertions(+), 60 deletions(-) diff --git a/modules/ui/tabs/config.el b/modules/ui/tabs/config.el index ff2b0f780..1ac654d6f 100644 --- a/modules/ui/tabs/config.el +++ b/modules/ui/tabs/config.el @@ -3,69 +3,18 @@ (use-package! centaur-tabs :after-call after-find-file dired-initial-position-hook :init - (setq centaur-tabs-height 28 + (setq centaur-tabs-set-icons t + centaur-tabs-gray-out-icons 'buffer centaur-tabs-set-bar 'left - centaur-tabs-set-modified-marker t) + centaur-tabs-set-modified-marker t + centaur-tabs-close-button "✕" + centaur-tabs-modified-marker "⬤") :config - (add-hook! 'centaur-tabs-mode-hook - (defun +tabs-init-frames-h () - (dolist (frame (frame-list)) - (if (not centaur-tabs-mode) - (set-frame-parameter frame 'buffer-predicate (frame-parameter frame 'old-buffer-predicate)) - (set-frame-parameter frame 'old-buffer-predicate (frame-parameter frame 'buffer-predicate)) - (set-frame-parameter frame 'buffer-predicate #'+tabs-buffer-predicate))))) - - (add-to-list 'window-persistent-parameters '(tab-buffers . t)) - - (defun +tabs-window-buffer-list-fn () - (centaur-tabs-filter-out - 'centaur-tabs-hide-tab-cached - (delq nil - (cl-mapcar #'(lambda (b) - (cond - ;; Always include the current buffer. - ((eq (current-buffer) b) b) - ((buffer-file-name b) b) - ((char-equal ?\ (aref (buffer-name b) 0)) nil) - ((buffer-live-p b) b))) - (window-parameter nil 'tab-buffers))))) - - (defun +tabs-buffer-groups-fn () - (list - (cond ((or (string-equal "*" (substring (buffer-name) 0 1)) - (memq major-mode '(magit-process-mode - magit-status-mode - magit-diff-mode - magit-log-mode - magit-file-mode - magit-blob-mode - magit-blame-mode - ))) - "Emacs") - ((derived-mode-p 'eshell-mode) - "EShell") - ((derived-mode-p 'dired-mode) - "Dired") - ((centaur-tabs-get-group-name (current-buffer)))))) - - (setq centaur-tabs-buffer-list-function #'+tabs-window-buffer-list-fn - centaur-tabs-buffer-groups-function #'+tabs-buffer-groups-fn) - - (advice-add #'centaur-tabs-buffer-close-tab :override #'+tabs-kill-tab-maybe-a) - (advice-add #'bury-buffer :around #'+tabs-bury-buffer-a) - (advice-add #'kill-current-buffer :before #'+tabs-kill-current-buffer-a) - (add-hook 'doom-switch-buffer-hook #'+tabs-add-buffer-h) - (add-hook 'doom-switch-window-hook #'+tabs-new-window-h) - (add-hook '+doom-dashboard-mode-hook #'centaur-tabs-local-mode) - (map! (:map centaur-tabs-mode-map - [remap delete-window] #'+tabs/close-tab-or-window - [remap +workspace/close-window-or-workspace] #'+tabs/close-tab-or-window) - (:after persp-mode - :map persp-mode-map - [remap delete-window] #'+tabs/close-tab-or-window - [remap +workspace/close-window-or-workspace] #'+tabs/close-tab-or-window)) - (centaur-tabs-mode +1)) + + +;; TODO tab-bar-mode (emacs 27) +;; TODO tab-line-mode (emacs 27) From 0ec1355f132a833e231cea8dd1db99a98f09c884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Busschaert?= Date: Mon, 30 Dec 2019 09:35:53 +0100 Subject: [PATCH 449/983] docs/core: typo in `featurep!` docs `s/moduel/module` --- core/core-modules.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-modules.el b/core/core-modules.el index f58d9da4c..5c8c606ad 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -527,7 +527,7 @@ Module FLAGs are set in your config's `doom!' block, typically in :config (default +flag1 -flag2) CATEGORY and MODULE can be omitted When this macro is used from inside a module -(except your DOOMDIR, which is a special moduel). e.g. (featurep! +flag)" +(except your DOOMDIR, which is a special module). e.g. (featurep! +flag)" (and (cond (flag (memq flag (doom-module-get category module :flags))) (module (doom-module-p category module)) (doom--current-flags (memq category doom--current-flags)) From eba070d8ba514b29b0b04209d38e6676e7d4e662 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 05:26:57 -0500 Subject: [PATCH 450/983] Move dap-breakpoints-file to doom etc dir #2273 --- modules/tools/debugger/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/debugger/config.el b/modules/tools/debugger/config.el index 4c5fedce9..052c16725 100644 --- a/modules/tools/debugger/config.el +++ b/modules/tools/debugger/config.el @@ -25,7 +25,7 @@ :after lsp-mode :preface (add-hook 'dap-mode-hook #'dap-ui-mode) ; use a hook so users can remove it - (setq dap--breakpoints-file (concat doom-etc-dir "dap-breakpoints") + (setq dap-breakpoints-file (concat doom-etc-dir "dap-breakpoints") dap-utils-extension-path (concat doom-etc-dir "dap-extension/")) :config (dap-mode 1) From bfce00d0b478634d502644261098cfb85897330e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 05:27:25 -0500 Subject: [PATCH 451/983] Don't use so-long if it's been disabled --- core/core-editor.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core-editor.el b/core/core-editor.el index 8747d9bbf..847c35578 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -50,7 +50,8 @@ possible." (prog1 (apply orig-fn args) (if (memq major-mode doom-large-file-excluded-modes) (setq doom-large-file-p nil) - (so-long-minor-mode +1) + (when (fboundp 'so-long-minor-mode) ; in case the user disabled it + (so-long-minor-mode +1)) (message "Large file detected! Cutting a few corners to improve performance..."))) (apply orig-fn args))) From bb425a2e65a1ebd864f0008d3569c14d9fa592c6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 05:31:55 -0500 Subject: [PATCH 452/983] Add .dap-breakpoints & .extension/ to gitignore #2273 --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fcc169df8..d733b1c25 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,9 @@ elpa/ .mc-lists.el .org-id-locations .tern-port -auto-save-list +.extension/ +.dap-breakpoints +auto-save-list/ semanticdb ede-projects.el tramp From 908bd4b9455c7b1cadcf5e5c199ad8fa70a0d303 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 06:44:16 -0500 Subject: [PATCH 453/983] Remove FORCE-P argument for doom-cli-reload-autoloads We weren't using them anyway. --- core/autoload/config.el | 2 +- core/cli/autoloads.el | 100 +++++++++++++++------------------------- core/cli/install.el | 2 +- core/cli/packages.el | 6 +-- core/cli/test.el | 4 +- core/core-cli.el | 4 +- 6 files changed, 45 insertions(+), 73 deletions(-) diff --git a/core/autoload/config.el b/core/autoload/config.el index 484bf18fd..5984af4de 100644 --- a/core/autoload/config.el +++ b/core/autoload/config.el @@ -105,7 +105,7 @@ line." (require 'core-cli) (require 'core-packages) (doom-initialize-packages) - (doom-cli-reload-autoloads nil 'force)) + (doom-cli-reload-autoloads)) ;;;###autoload (defun doom/reload-env (&optional arg) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 6f0fae7a8..6bdc6d51d 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -18,86 +18,58 @@ one wants that.") (defvar autoload-timestamps) (defvar generated-autoload-load-name) -(defun doom-cli-reload-autoloads (&optional type force-p) +(defun doom-cli-reload-autoloads (&optional type) "Reloads FILE (an autoload file), if it needs reloading. FILE should be one of `doom-autoload-file' or `doom-package-autoload-file'. If -it is nil, it will try to reload both. If FORCE-P (universal argument) do it -even if it doesn't need reloading!" +it is nil, it will try to reload both." (if type (cond ((eq type 'core) - (doom-cli-reload-core-autoloads - doom-autoload-file force-p)) + (doom-cli-reload-core-autoloads doom-autoload-file)) ((eq type 'package) - (doom-cli-reload-package-autoloads - doom-package-autoload-file force-p)) + (doom-cli-reload-package-autoloads doom-package-autoload-file)) ((error "Invalid autoloads file: %s" type))) - (doom-cli-reload-autoloads 'core force-p) - (doom-cli-reload-autoloads 'package force-p))) + (doom-cli-reload-autoloads 'core) + (doom-cli-reload-autoloads 'package))) -(defun doom-cli-reload-core-autoloads (file &optional force-p) +(defun doom-cli-reload-core-autoloads (file) (cl-check-type file string) (print! (start "(Re)generating core autoloads...")) (print-group! - (let ((autoload-files - (cl-loop for dir in (append (list doom-core-dir) - (cdr (doom-module-load-path 'all-p)) - (list doom-private-dir)) - if (doom-glob dir "autoload.el") collect it - if (doom-glob dir "autoload/*.el") append it))) - (if (or force-p - (not (file-exists-p file)) - (file-newer-than-file-p doom-emacs-dir file) - (cl-loop for dir - in (append (doom-glob doom-private-dir "init.el*") - autoload-files) - if (file-newer-than-file-p dir doom-autoload-file) - return t)) - (and (print! (start "Generating core autoloads...")) - (doom-cli--write-autoloads - file (doom-cli--generate-autoloads autoload-files 'scan)) - (print! (start "Byte-compiling core autoloads file...")) - (doom-cli--byte-compile-file file) - (print! (success "Generated %s") - (relpath (byte-compile-dest-file file) - doom-emacs-dir))) - (print! (success "Core autoloads are up-to-date")) - nil)))) + (and (print! (start "Generating core autoloads...")) + (doom-cli--write-autoloads + file (doom-cli--generate-autoloads + (cl-loop for dir in (append (list doom-core-dir) + (cdr (doom-module-load-path 'all-p)) + (list doom-private-dir)) + if (doom-glob dir "autoload.el") collect it + if (doom-glob dir "autoload/*.el") append it) + 'scan)) + (print! (start "Byte-compiling core autoloads file...")) + (doom-cli--byte-compile-file file) + (print! (success "Generated %s") + (relpath (byte-compile-dest-file file) + doom-emacs-dir))))) -(defun doom-cli-reload-package-autoloads (file &optional force-p) +(defun doom-cli-reload-package-autoloads (file) (cl-check-type file string) (print! (start "(Re)generating package autoloads...")) (print-group! (doom-initialize-packages) - (if (or force-p - (not (file-exists-p file)) - (file-newer-than-file-p package-user-dir file) - (cl-loop for dir in (straight--directory-files (straight--build-dir)) - if (cl-find-if - (doom-rpartial #'file-newer-than-file-p doom-package-autoload-file) - (doom-glob (straight--build-dir dir) "*.el")) - return t) - (not (cl-loop with doom-modules = (doom-modules) - for key being the hash-keys of doom-modules - for path = (doom-module-path (car key) (cdr key) "packages.el") - if (file-newer-than-file-p path doom-package-autoload-file) - return t))) - (and (print! (start "Generating package autoloads...")) - (doom-cli--write-autoloads - file - (doom-cli--generate-var-cache doom-autoload-cached-vars) - (doom-cli--generate-autoloads - (mapcar #'straight--autoloads-file - (cl-set-difference (hash-table-keys straight--build-cache) - doom-autoload-excluded-packages - :test #'string=)))) - (print! (start "Byte-compiling package autoloads file...")) - (doom-cli--byte-compile-file file) - (print! (success "Generated %s") - (relpath (byte-compile-dest-file file) - doom-emacs-dir))) - (print! (success "Package autoloads are up-to-date")) - nil))) + (and (print! (start "Generating package autoloads...")) + (doom-cli--write-autoloads + file + (doom-cli--generate-var-cache doom-autoload-cached-vars) + (doom-cli--generate-autoloads + (mapcar #'straight--autoloads-file + (cl-set-difference (hash-table-keys straight--build-cache) + doom-autoload-excluded-packages + :test #'string=)))) + (print! (start "Byte-compiling package autoloads file...")) + (doom-cli--byte-compile-file file) + (print! (success "Generated %s") + (relpath (byte-compile-dest-file file) + doom-emacs-dir))))) ;; diff --git a/core/cli/install.el b/core/cli/install.el index ff4e7e6fe..69efbcd5a 100644 --- a/core/cli/install.el +++ b/core/cli/install.el @@ -78,7 +78,7 @@ DOOMDIR environment variable. e.g. (doom-cli-packages-install)) (print! "Regenerating autoloads files") - (doom-cli-reload-autoloads nil 'force-p) + (doom-cli-reload-autoloads) (if nofonts-p (print! (warn "Not installing fonts, as requested")) diff --git a/core/cli/packages.el b/core/cli/packages.el index 90ca0ba55..f07c02c18 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -12,7 +12,7 @@ or :ignore property." (straight-check-all) (doom-cli-reload-autoloads 'core) (when (doom-cli-packages-update) - (doom-cli-reload-autoloads 'package 'force)) + (doom-cli-reload-autoloads 'package)) t) (defcli! (build b) @@ -23,7 +23,7 @@ This ensures that all needed files are symlinked from their package repo and their elisp files are byte-compiled. This is especially necessary if you upgrade Emacs (as byte-code is generally not forward-compatible)." (when (doom-cli-packages-build (not rebuild-p)) - (doom-cli-reload-autoloads 'package 'force)) + (doom-cli-reload-autoloads 'package)) t) (defcli! (purge p) @@ -46,7 +46,7 @@ list remains lean." (not norepos-p) (not nobuilds-p) regraft-p) - (doom-cli-reload-autoloads 'package 'force)) + (doom-cli-reload-autoloads 'package)) t) ;; (defcli! rollback () ; TODO doom rollback diff --git a/core/cli/test.el b/core/cli/test.el index 0d5949ada..44db855ea 100644 --- a/core/cli/test.el +++ b/core/cli/test.el @@ -50,9 +50,9 @@ (require 'core-cli) (doom-initialize 'force 'noerror) (doom-initialize-modules) - (doom-cli-reload-core-autoloads 'force) + (doom-cli-reload-autoloads 'core) (when (doom-cli-packages-install) - (doom-cli-reload-package-autoloads 'force))))) + (doom-cli-reload-autoloads 'package))))) (unless (zerop status) (error "Failed to bootstrap unit tests")))) (with-temp-buffer diff --git a/core/core-cli.el b/core/core-cli.el index c18aec87e..6d6c10bb7 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -255,7 +255,7 @@ stale." (doom-initialize 'force 'noerror) (doom-initialize-modules) - (doom-cli-reload-autoloads 'core (not if-necessary-p)) + (doom-cli-reload-autoloads 'core) (unwind-protect (progn (and (doom-cli-packages-install) @@ -264,7 +264,7 @@ stale." (setq success t)) (and (doom-cli-packages-purge prune-p 'builds-p prune-p prune-p) (setq success t))) - (doom-cli-reload-autoloads 'package (or success (not if-necessary-p))) + (doom-cli-reload-autoloads 'package) (doom-cli-byte-compile nil 'recompile)) t))) From 9698235affcf08c1c714840d32df03c4e7901b25 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 07:10:30 -0500 Subject: [PATCH 454/983] Pre-emptively update license --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 02b93bee4..cb8f2620c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016-2019 Henrik Lissner. +Copyright (c) 2016-2020 Henrik Lissner. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the From 497a6a206ed22b5dad20279dc67edd5af687998a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 15:49:12 -0500 Subject: [PATCH 455/983] Fix 'wrong-number-of-arguments autoload 9' error in autoloads This error was caused by over-aggressive replacement of load-file-name in autoloads files. Instances of "load-file-name" would be replaced with a quoted file-path, even in strings and comments, which would break surrounding strings and docstrings. Mentioned in hlissner/doom-emacs@f8ff505 --- core/cli/autoloads.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 6bdc6d51d..55b66402e 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -232,7 +232,8 @@ it is nil, it will try to reload both." ;; `load-file-name' is meaningless in a concatenated ;; mega-autoloads file, so we replace references to it with the ;; file they came from. - (replace-match filestr t t)))) + (unless (doom-point-in-string-or-comment-p) + (replace-match filestr t t))))) (let ((load-file-name file) (load-path (append (list doom-private-dir) From 7a2f4bddea848b9b5d18c469595b9e9ffb9cefe3 Mon Sep 17 00:00:00 2001 From: Brett Lyons Date: Mon, 30 Dec 2019 15:00:33 -0700 Subject: [PATCH 456/983] flyspell-correct-word-generic -> flyspell-correct-at-point New release of flyspell-correct yesterday, removed the word-generic aliases. (Also in tools/flyspell/config.el) --- modules/editor/evil/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index cb8bc1dad..8f39b084e 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -509,7 +509,7 @@ To change these keys see `+evil-repeat-keys'." :n "gr" #'elfeed-search-update--force :n "gR" #'elfeed-search-fetch)) - :nv "z=" #'flyspell-correct-word-generic + :nv "z=" #'flyspell-correct-at-point ;; custom evil keybinds :nv "zn" #'+evil:narrow-buffer :n "zN" #'doom/widen-indirectly-narrowed-buffer From 20a9beadf80d7a519a2345d4f7b1d27ce920d3d0 Mon Sep 17 00:00:00 2001 From: Brett Lyons Date: Mon, 30 Dec 2019 15:06:44 -0700 Subject: [PATCH 457/983] updated commands to flyspell-correct version bump on flyspell-correct to 0.6.1. brings deletion of old aliases. --- modules/tools/flyspell/config.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/tools/flyspell/config.el b/modules/tools/flyspell/config.el index be54fa426..ef36a7271 100644 --- a/modules/tools/flyspell/config.el +++ b/modules/tools/flyspell/config.el @@ -68,13 +68,13 @@ e.g. proselint and langtool." (add-hook 'flyspell-mode-hook #'+flyspell-init-predicate-h) (map! :map flyspell-mouse-map - "RET" #'flyspell-correct-word-generic - [return] #'flyspell-correct-word-generic - [mouse-1] #'flyspell-correct-word-generic)) + "RET" #'flyspell-correct-at-point + [return] #'flyspell-correct-at-point + [mouse-1] #'flyspell-correct-at-point)) (use-package! flyspell-correct - :commands flyspell-correct-word-generic flyspell-correct-previous-word-generic + :commands flyspell-correct-at-point flyspell-correct-previous :config (cond ((and (featurep! :completion helm) (require 'flyspell-correct-helm nil t))) From 0b1ab39a00f933adcbb7ef8819e3d52a75d6ccb4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 17:06:49 -0500 Subject: [PATCH 458/983] Refactor doom-cli--generate-autoloads --- core/cli/autoloads.el | 52 +++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 55b66402e..e7921261f 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -219,29 +219,29 @@ it is nil, it will try to reload both." (defun doom-cli--generate-autoloads (files &optional scan) (require 'autoload) (let (autoloads) - (dolist (file files (delq nil (nreverse autoloads))) - (and (file-readable-p file) - (with-temp-buffer - (save-excursion - (if scan - (doom-cli--generate-autoloads-buffer file) - (insert-file-contents-literally file))) - (save-excursion - (let ((filestr (prin1-to-string file))) - (while (re-search-forward "\\_" nil t) - ;; `load-file-name' is meaningless in a concatenated - ;; mega-autoloads file, so we replace references to it with the - ;; file they came from. - (unless (doom-point-in-string-or-comment-p) - (replace-match filestr t t))))) - (let ((load-file-name file) - (load-path - (append (list doom-private-dir) - doom-modules-dirs - load-path))) - (condition-case _ - (while t - (push (doom-cli--filter-form (read (current-buffer)) - scan) - autoloads)) - (end-of-file)))))))) + (dolist (file + (cl-remove-if-not #'file-readable-p files) + (nreverse (delq nil autoloads))) + (with-temp-buffer + (if scan + (doom-cli--generate-autoloads-buffer file) + (insert-file-contents-literally file)) + (save-excursion + (let ((filestr (prin1-to-string file))) + (while (re-search-forward "\\_" nil t) + ;; `load-file-name' is meaningless in a concatenated + ;; mega-autoloads file, so we replace references to it with the + ;; file they came from. + (unless (doom-point-in-string-or-comment-p) + (replace-match filestr t t))))) + (let ((load-file-name file) + (load-path + (append (list doom-private-dir) + doom-modules-dirs + load-path))) + (condition-case _ + (while t + (push (doom-cli--filter-form (read (current-buffer)) + scan) + autoloads)) + (end-of-file))))))) From f8ed1894e730aa9fd10e1a24e3349d2ff4a68704 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 17:07:39 -0500 Subject: [PATCH 459/983] Strip text properties from recentf entries Causing tremendous bloat in recentf lists included with TRAMP paths. --- core/core-editor.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 847c35578..a5989a581 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -196,9 +196,11 @@ possible." (not (file-remote-p file))) (file-truename file) file)) - (setq recentf-filename-handlers '(doom--recent-file-truename abbreviate-file-name)) - - (setq recentf-save-file (concat doom-cache-dir "recentf") + (setq recentf-filename-handlers + '(substring-no-properties + doom--recent-file-truename + abbreviate-file-name) + recentf-save-file (concat doom-cache-dir "recentf") recentf-auto-cleanup 'never recentf-max-menu-items 0 recentf-max-saved-items 200) From a4653f475b06e325f8305e5894a2e30c0c45854e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 17:28:31 -0500 Subject: [PATCH 460/983] Print filename instead of absolute paths for purged ELPA packages --- core/cli/packages.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index f07c02c18..66ad5886a 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -296,10 +296,11 @@ declaration) or dependency thereof that hasn't already been." (if (file-directory-p path) (delete-directory path 'recursive) (delete-file path)) - (print! (success "Deleted %s") (relpath path))) + (print! (success "Deleted %s") (filename path))) (error (print! (error "Failed to delete %s because: %s") - (relpath path) e))))))) + (filename path) + e))))))) (defun doom-cli-packages-purge (&optional elpa-p builds-p repos-p regraft-repos-p) "Auto-removes orphaned packages and repos. From 10f29bffde6ed976f79c1ad53ea69f29be75fade Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 18:07:37 -0500 Subject: [PATCH 461/983] Add chemacs support to doom/restart-and-restore --- core/autoload/sessions.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/autoload/sessions.el b/core/autoload/sessions.el index f808c1201..e345cf18b 100644 --- a/core/autoload/sessions.el +++ b/core/autoload/sessions.el @@ -131,4 +131,8 @@ (setq doom-autosave-session nil) (doom/quicksave-session) (restart-emacs - (delq nil (list (if debug "--debug-init") "--restore")))) + (delq + nil (append (if debug (list "--debug-init")) + (when (boundp 'chemacs-current-emacs-profile) + (list "--with-profile" chemacs-current-emacs-profile)) + (list "--restore"))))) From 3271cd3a542d79b1232699c16fd14bce6b74be49 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 18:08:11 -0500 Subject: [PATCH 462/983] Remove unused ui/tabs/autoload.el --- modules/ui/tabs/autoload.el | 77 ------------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 modules/ui/tabs/autoload.el diff --git a/modules/ui/tabs/autoload.el b/modules/ui/tabs/autoload.el deleted file mode 100644 index be3e62cfa..000000000 --- a/modules/ui/tabs/autoload.el +++ /dev/null @@ -1,77 +0,0 @@ -;;; ui/tabs/autoload.el -*- lexical-binding: t; -*- - -;;;###autoload -(defun +tabs-buffer-predicate (buffer) - "TODO" - (or (memq buffer (window-parameter nil 'tab-buffers)) - (eq buffer (doom-fallback-buffer)))) - - -;; -;;; Commands - -;;;###autoload -(defun +tabs/close-tab-or-window () - "TODO" - (interactive) - (call-interactively - (cond ((cdr (window-parameter nil 'tab-buffers)) - #'kill-current-buffer) - ((fboundp '+workspace/close-window-or-workspace) - #'+workspace/close-window-or-workspace) - (#'delete-window)))) - - -;; -;;; Advice - -;;;###autoload -(defun +tabs-kill-current-buffer-a (&rest _) - (+tabs-remove-buffer-h)) - -;;;###autoload -(defun +tabs-bury-buffer-a (orig-fn &rest args) - (if centaur-tabs-mode - (let ((b (current-buffer))) - (apply orig-fn args) - (unless (eq b (current-buffer)) - (with-current-buffer b - (+tabs-remove-buffer-h)))) - (apply orig-fn args))) - -;;;###autoload -(defun +tabs-kill-tab-maybe-a (tab) - (let ((buffer (centaur-tabs-tab-value tab))) - (with-current-buffer buffer - ;; `kill-current-buffer' is advised not to kill buffers visible in another - ;; window, so it behaves better than `kill-buffer'. - (kill-current-buffer)) - (centaur-tabs-display-update))) - - -;; -;;; Hooks - -;;;###autoload -(defun +tabs-add-buffer-h () - (when (and centaur-tabs-mode - (doom-real-buffer-p (current-buffer))) - (let* ((this-buf (current-buffer)) - (buffers (window-parameter nil 'tab-buffers))) - (cl-pushnew this-buf buffers) - (add-hook 'kill-buffer-hook #'+tabs-remove-buffer-h nil t) - (set-window-parameter nil 'tab-buffers buffers)))) - -;;;###autoload -(defun +tabs-remove-buffer-h () - (when centaur-tabs-mode - (set-window-parameter - nil - 'tab-buffers (delete (current-buffer) - (window-parameter nil 'tab-buffers))))) - -;;;###autoload -(defun +tabs-new-window-h () - (when centaur-tabs-mode - (unless (window-parameter nil 'tab-buffers) - (+tabs-add-buffer-h)))) From 960d756b471407b269a7d3eda2cc37f90d1b35fc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 18:23:56 -0500 Subject: [PATCH 463/983] General, minor refactors --- bin/doom | 7 ++++--- core/autoload/format.el | 5 +++-- core/autoload/sessions.el | 9 ++++----- modules/lang/rust/config.el | 6 +++--- modules/ui/popup/+hacks.el | 4 ++-- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/bin/doom b/bin/doom index 36bb10582..0baa1cd41 100755 --- a/bin/doom +++ b/bin/doom @@ -9,10 +9,11 @@ :; exec $EMACS --script "$0" -- "$@" :; exit 0 -(let* ((loaddir (file-name-directory (file-truename load-file-name))) +(let* ((load-prefer-newer t) + (loaddir (file-name-directory (file-truename load-file-name))) (emacsdir (getenv "EMACSDIR")) - (user-emacs-directory (or emacsdir (expand-file-name "../" loaddir))) - (load-prefer-newer t)) + (user-emacs-directory + (abbreviate-file-name (or emacsdir (expand-file-name "../" loaddir))))) (push (expand-file-name "core" user-emacs-directory) load-path) (require 'core) diff --git a/core/autoload/format.el b/core/autoload/format.el index 4f87aaaa3..2be22513e 100644 --- a/core/autoload/format.el +++ b/core/autoload/format.el @@ -212,8 +212,9 @@ into faces or ANSI codes depending on the type of sesssion we're in." ;;;###autoload (defmacro print! (message &rest args) - "Uses `message' in interactive sessions and `princ' otherwise (prints to -standard out). + "Prints MESSAGE, formatted with ARGS, to stdout. + +Always returns non-nil. Can be colored using (color ...) blocks: diff --git a/core/autoload/sessions.el b/core/autoload/sessions.el index e345cf18b..0d2833802 100644 --- a/core/autoload/sessions.el +++ b/core/autoload/sessions.el @@ -131,8 +131,7 @@ (setq doom-autosave-session nil) (doom/quicksave-session) (restart-emacs - (delq - nil (append (if debug (list "--debug-init")) - (when (boundp 'chemacs-current-emacs-profile) - (list "--with-profile" chemacs-current-emacs-profile)) - (list "--restore"))))) + (append (if debug (list "--debug-init")) + (when (boundp 'chemacs-current-emacs-profile) + (list "--with-profile" chemacs-current-emacs-profile)) + (list "--restore")))) diff --git a/modules/lang/rust/config.el b/modules/lang/rust/config.el index 3f4652b5f..e728492e0 100644 --- a/modules/lang/rust/config.el +++ b/modules/lang/rust/config.el @@ -69,9 +69,9 @@ :unless (featurep! +lsp) :hook (rustic-mode . racer-mode) :init - ;; Fix #2132: `racer' depends on `rust-mode', which tries to modify - ;; `auto-mode-alist'. We make extra sure that doesn't stick, especially when a - ;; buffer is reverted, as it is after rustfmt is done wiht it. + ;; HACK Fix #2132: `racer' depends on `rust-mode', which tries to modify + ;; `auto-mode-alist'. We make extra sure that doesn't stick, especially + ;; when a buffer is reverted, as it is after rustfmt is done wiht it. (after! rust-mode (setq auto-mode-alist (delete '("\\.rs\\'" . rust-mode) auto-mode-alist))) :config diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index c3a76e7a2..20f9ce799 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -37,8 +37,8 @@ to this commmand." (let ((orig-buffer (current-buffer))) (quit-window) (when (and (eq orig-buffer (current-buffer)) - (+popup-window-p)) - (+popup/close)))) + (+popup-buffer-p)) + (+popup/close nil 'force)))) (global-set-key [remap quit-window] #'+popup/quit-window) From 7c968a8b1103c4892bda48e9246c9a6d0ecdcde2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 23:19:56 -0500 Subject: [PATCH 464/983] Fix #2278: autoload gen skipping disabled autodefs If a ;;;###if module cookie returned nil for a file, it should still allow autodefs to be scraped from it, which wasn't happening before this fix. An autodef's guarantee is that it will always be defined, whether or not the containing module is enabled. --- core/cli/autoloads.el | 50 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index e7921261f..196118879 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -190,31 +190,31 @@ it is nil, it will try to reload both." (module-enabled-p (print form))))))) (defun doom-cli--generate-autoloads-buffer (file) - (when (doom-file-cookie-p file "if" t) - (let* (;; Prevent `autoload-find-file' from firing file hooks, e.g. adding - ;; to recentf. - find-file-hook - write-file-functions - ;; Prevent a possible source of crashes when there's a syntax error - ;; in the autoloads file - debug-on-error - ;; The following bindings are in `package-generate-autoloads'. - ;; Presumably for a good reason, so I just copied them - (backup-inhibited t) - (version-control 'never) - case-fold-search ; reduce magic - autoload-timestamps ; reduce noise in generated files - ;; Needed for `autoload-generate-file-autoloads' - (generated-autoload-load-name (file-name-sans-extension file)) - (target-buffer (current-buffer)) - (module (doom-module-from-path file)) - (module-enabled-p (or (memq (car module) '(:core :private)) - (doom-module-p (car module) (cdr module))))) - (save-excursion - (when module-enabled-p - (quiet! (autoload-generate-file-autoloads file target-buffer))) - (doom-cli--generate-autoloads-autodefs - file target-buffer module module-enabled-p))))) + (let* (;; Prevent `autoload-find-file' from firing file hooks, e.g. adding + ;; to recentf. + find-file-hook + write-file-functions + ;; Prevent a possible source of crashes when there's a syntax error + ;; in the autoloads file + debug-on-error + ;; The following bindings are in `package-generate-autoloads'. + ;; Presumably for a good reason, so I just copied them + (backup-inhibited t) + (version-control 'never) + case-fold-search ; reduce magic + autoload-timestamps ; reduce noise in generated files + ;; Needed for `autoload-generate-file-autoloads' + (generated-autoload-load-name (file-name-sans-extension file)) + (target-buffer (current-buffer)) + (module (doom-module-from-path file)) + (module-enabled-p (and (or (memq (car module) '(:core :private)) + (doom-module-p (car module) (cdr module))) + (doom-file-cookie-p file "if" t)))) + (save-excursion + (when module-enabled-p + (quiet! (autoload-generate-file-autoloads file target-buffer))) + (doom-cli--generate-autoloads-autodefs + file target-buffer module module-enabled-p)))) (defun doom-cli--generate-autoloads (files &optional scan) (require 'autoload) From a947f64ff2e5ce4af9ca89a00aac562f319c64bc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 23:59:46 -0500 Subject: [PATCH 465/983] Replace ace-link with link-hint Better link support, easier to extend, and maintained more actively. --- modules/app/twitter/autoload.el | 1 + modules/config/default/+emacs-bindings.el | 10 +++++----- modules/config/default/+evil-bindings.el | 10 +++++----- modules/config/default/config.el | 6 ++---- modules/config/default/packages.el | 2 +- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/modules/app/twitter/autoload.el b/modules/app/twitter/autoload.el index 1116633be..7c6d7c065 100644 --- a/modules/app/twitter/autoload.el +++ b/modules/app/twitter/autoload.el @@ -83,6 +83,7 @@ that works with the feature/popup module." "Open a visible link, username or hashtag in a `twittering-mode' buffer." (interactive) (require 'avy) + ;; REVIEW Is this necessary anymore with `link-hint' (let ((pt (avy-with +twitter/ace-link (avy--process (+twitter--collect-links) diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index 45c809563..be474329e 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -65,7 +65,7 @@ :desc "Search other directory" "D" #'+default/search-other-cwd :desc "Locate file" "f" #'locate :desc "Jump to symbol" "i" #'imenu - :desc "Jump to visible link" "l" #'ace-link + :desc "Jump to visible link" "l" #'link-hint-open-link :desc "Jump to link" "L" #'ffap-menu :desc "Jump list" "j" #'evil-show-jumps :desc "Jump to mark" "m" #'evil-show-marks @@ -350,22 +350,22 @@ ;;; help and info (:after help-mode :map help-mode-map - "o" #'ace-link-help + "o" #'link-hint-open-link ">" #'help-go-forward "<" #'help-go-back "n" #'forward-button "p" #'backward-button) (:after helpful :map helpful-mode-map - "o" #'ace-link-help) + "o" #'link-hint-open-link) (:after apropos :map apropos-mode-map - "o" #'ace-link-help + "o" #'link-hint-open-link "n" #'forward-button "p" #'backward-button) (:after info :map Info-mode-map - "o" #'ace-link-info) + "o" #'link-hint-open-link) ;;; ivy & counsel (:when (featurep! :completion ivy) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 91d4fa52d..c6ceb5988 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -61,13 +61,13 @@ :i "C-j" #'+default/newline ; default behavior (:after help :map help-mode-map - :n "o" #'ace-link-help) + :n "o" #'link-hint-open-link) (:after helpful :map helpful-mode-map - :n "o" #'ace-link-help) + :n "o" #'link-hint-open-link) (:after info :map Info-mode-map - :n "o" #'ace-link-info) + :n "o" #'link-hint-open-link) (:after apropos :map apropos-mode-map - :n "o" #'ace-link-help + :n "o" #'link-hint-open-link :n "TAB" #'forward-button :n [tab] #'forward-button :n [backtab] #'backward-button) @@ -583,7 +583,7 @@ :desc "Search other directory" "D" #'+default/search-other-cwd :desc "Locate file" "f" #'locate :desc "Jump to symbol" "i" #'imenu - :desc "Jump to visible link" "l" #'ace-link + :desc "Jump to visible link" "l" #'link-hint-open-link :desc "Jump to link" "L" #'ffap-menu :desc "Jump list" "j" #'evil-show-jumps :desc "Jump to mark" "m" #'evil-show-marks diff --git a/modules/config/default/config.el b/modules/config/default/config.el index 6e2537375..f2e36c5b5 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -25,9 +25,7 @@ avy-all-windows-alt t avy-background t ;; the unpredictability of this makes it a poor default - avy-single-candidate-jump nil - ;; Since `goto-address-mode' is enabled everywhere... - ace-link-fallback-function #'ace-link-addr) + avy-single-candidate-jump nil) (after! epa @@ -67,7 +65,7 @@ ;; (sp-pair "{" nil :post-handlers '(:rem ("| " "SPC"))) (after! smartparens ;; Smartparens is broken in `cc-mode' as of Emacs 27. See - ;; . + ;; https://github.com/Fuco1/smartparens/issues/963. (unless EMACS27+ (pushnew! sp--special-self-insert-commands 'c-electric-paren 'c-electric-brace)) diff --git a/modules/config/default/packages.el b/modules/config/default/packages.el index 14a4de010..901090656 100644 --- a/modules/config/default/packages.el +++ b/modules/config/default/packages.el @@ -2,8 +2,8 @@ ;;; config/default/packages.el (package! avy) -(package! ace-link) (package! drag-stuff) +(package! link-hint) (unless (featurep! :editor evil) (package! expand-region)) From fb261a9c65e92dc4301d3abb45631541e96c0ef5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 31 Dec 2019 00:02:00 -0500 Subject: [PATCH 466/983] Fix extra ivy actions for counsel-{rg,find-file} --- modules/completion/ivy/config.el | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 84445f621..e097c3975 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -211,7 +211,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." ;; Record in jumplist when opening files via counsel-{ag,rg,pt,git-grep} (add-hook 'counsel-grep-post-action-hook #'better-jumper-set-jump) (ivy-add-actions - 'counsel-ag ; also applies to `counsel-rg' + 'counsel-rg ; also applies to `counsel-rg' '(("O" +ivy-git-grep-other-window-action "open in other window"))) ;; Make `counsel-compile' projectile-aware (if you prefer it over @@ -232,16 +232,16 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." ;; `counsel-find-file' (setq counsel-find-file-ignore-regexp "\\(?:^[#.]\\)\\|\\(?:[#~]$\\)\\|\\(?:^Icon?\\)") - (ivy-add-actions - 'counsel-find-file - '(("p" (lambda (path) (with-ivy-window (insert (file-relative-name path default-directory)))) - "insert relative path") - ("P" (lambda (path) (with-ivy-window (insert path))) - "insert absolute path") - ("l" (lambda (path) (with-ivy-window (insert (format "[[./%s]]" (file-relative-name path default-directory))))) - "insert relative org-link") - ("L" (lambda (path) (with-ivy-window (insert (format "[[%s]]" path)))) - "Insert absolute org-link"))) + (dolist (fn '(counsel-rg counsel-find-file)) + (ivy-add-actions + fn '(("p" (lambda (path) (with-ivy-window (insert (file-relative-name path default-directory)))) + "insert relative path") + ("P" (lambda (path) (with-ivy-window (insert path))) + "insert absolute path") + ("l" (lambda (path) (with-ivy-window (insert (format "[[./%s]]" (file-relative-name path default-directory))))) + "insert relative org-link") + ("L" (lambda (path) (with-ivy-window (insert (format "[[%s]]" path)))) + "Insert absolute org-link")))) ;; `counsel-search': use normal page for displaying results, so that we see ;; custom ddg themes (if one is set). From d7d873e11b3278cab64de95cebc76c628304e81e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 31 Dec 2019 00:02:20 -0500 Subject: [PATCH 467/983] Fix counsel-projectile-find-file from occur buffers #2268 counsel-projectile-find-file-action would open the candidate from wrong buffer. This is an experimental fix. --- modules/completion/ivy/config.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index e097c3975..e9ed06f73 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -200,6 +200,14 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." :config (set-popup-rule! "^\\*ivy-occur" :size 0.35 :ttl 0 :quit nil) + ;; HACK Fix an issue where `counsel-projectile-find-file-action' would try to + ;; open a candidate in an occur buffer relative to the wrong buffer, + ;; causing it to fail to find the file we want. + (defadvice! +ivy--run-from-ivy-directory-a (orig-fn &rest args) + :around #'counsel-projectile-find-file-action + (let ((default-directory (ivy-state-directory ivy-last))) + (apply orig-fn args))) + ;; Don't use ^ as initial input. Set this here because `counsel' defines more ;; of its own, on top of the defaults. (setq ivy-initial-inputs-alist nil) From 9012635d3fc51e4142dd2eaae647656f68af82f2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 31 Dec 2019 02:27:31 -0500 Subject: [PATCH 468/983] Remove default doom-variable-pitch-font in config.el template "sans" may not be available. --- core/templates/config.example.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/templates/config.example.el b/core/templates/config.example.el index 102881e80..0af845956 100644 --- a/core/templates/config.example.el +++ b/core/templates/config.example.el @@ -18,9 +18,7 @@ ;; ;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd ;; font string. You generally only need these two: -;; test -(setq doom-font (font-spec :family "monospace" :size 14) - doom-variable-pitch-font (font-spec :family "sans")) +(setq doom-font (font-spec :family "monospace" :size 14)) ;; There are two ways to load a theme. Both assume the theme is installed and ;; available. You can either set `doom-theme' or manually load a theme with the From a5fc782e76e995c731e82167b1ce2ad81b786cd3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 31 Dec 2019 03:37:23 -0500 Subject: [PATCH 469/983] cli/upgrade: fix wrong-type-arg string force file error #2277 Due to a vestigial call to the old doom-cli-reload-package-autoloads --- core/cli/upgrade.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/cli/upgrade.el b/core/cli/upgrade.el index 54ccb660b..66c6482b9 100644 --- a/core/cli/upgrade.el +++ b/core/cli/upgrade.el @@ -18,7 +18,7 @@ following shell commands: (doom-cli-upgrade doom-auto-accept force-p) (doom-cli-execute "refresh") (when (doom-cli-packages-update) - (doom-cli-reload-package-autoloads 'force) + (doom-cli-reload-autoloads 'package) t))) (print! (success "Done! Restart Emacs for changes to take effect.")) (print! "Nothing to do. Doom is up-to-date!"))) From b592e58c97cd4f6f436ad91e0deeed7eb63fe888 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 31 Dec 2019 14:10:52 -0500 Subject: [PATCH 470/983] Fix warning when disabling core packages --- core/core-packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index b678d8c3f..0a0a28e45 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -223,7 +223,7 @@ necessary package metadata is initialized and available for them." doom-packages (doom-package-list)) (dolist (package doom-packages) (let ((name (car package))) - (with-plist! (cdr package) (recipe module disable ignore pin) + (with-plist! (cdr package) (recipe modules disable ignore pin) (if ignore (doom-log "Ignoring package %S" name) (when pin @@ -239,7 +239,7 @@ necessary package metadata is initialized and available for them." (doom-log "Disabling package %S" name) (cl-pushnew name doom-disabled-packages) ;; Warn about disabled core packages - (when (cl-find :core module :key #'car) + (when (cl-find :core modules :key #'car) (print! (warn "%s\n%s") (format "You've disabled %S" name) (indent 2 (concat "This is a core package. Disabling it will cause errors, as Doom assumes\n" From 6f951229ec179baff5f2c2e640698a65a93753d7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 31 Dec 2019 15:55:56 -0500 Subject: [PATCH 471/983] Add & revise comments And move line number hooks to core/autoload/ui.el --- core/autoload/ui.el | 16 ++++++++++++---- core/core-ui.el | 17 +++++++++++------ 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/core/autoload/ui.el b/core/autoload/ui.el index 80735e26f..af5ef34f1 100644 --- a/core/autoload/ui.el +++ b/core/autoload/ui.el @@ -1,7 +1,7 @@ ;;; core/autoload/ui.el -*- lexical-binding: t; -*- ;; -;; Public library +;;; Public library ;;;###autoload (defun doom-resize-window (window new-size &optional horizontal force-p) @@ -24,7 +24,7 @@ are open." ;; -;; Advice +;;; Advice ;;;###autoload (defun doom-recenter-a (&rest _) @@ -43,7 +43,7 @@ In tty Emacs, messages suppressed completely." ;; -;; Hooks +;;; Hooks ;;;###autoload (defun doom-apply-ansi-color-to-compilation-buffer-h () @@ -57,9 +57,17 @@ In tty Emacs, messages suppressed completely." "Turn off `show-paren-mode' buffer-locally." (setq-local show-paren-mode nil)) +;;;###autoload +(defun doom-enable-line-numbers-h () + (display-line-numbers-mode +1)) + +;;;###autoload +(defun doom-disable-line-numbers-h () + (display-line-numbers-mode -1)) + ;; -;; Commands +;;; Commands ;;;###autoload (defun doom/toggle-line-numbers () diff --git a/core/core-ui.el b/core/core-ui.el index ea9bcdbf5..7ea90354c 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -514,16 +514,16 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original ;; Explicitly define a width to reduce computation (setq-default display-line-numbers-width 3) -;; Show absolute line numbers for narrowed regions +;; Show absolute line numbers for narrowed regions makes it easier to tell the +;; buffer is narrowed, and where you are, exactly. (setq-default display-line-numbers-widen t) -;; Enable line numbers in most text-editing modes +;; Enable line numbers in most text-editing modes. We avoid +;; `global-display-line-numbers-mode' because there are many special and +;; temporary modes where we don't need/want them. (add-hook! '(prog-mode-hook text-mode-hook conf-mode-hook) #'display-line-numbers-mode) -(defun doom-enable-line-numbers-h () (display-line-numbers-mode +1)) -(defun doom-disable-line-numbers-h () (display-line-numbers-mode -1)) - ;; ;;; Theme & font @@ -539,6 +539,8 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.") "Loads `doom-font'." (cond (doom-font (cl-pushnew + ;; Avoiding `set-frame-font' because it does a lot of extra, expensive + ;; work we can avoid by setting the font frame parameter instead. (cons 'font (cond ((stringp doom-font) doom-font) ((fontp doom-font) (font-xlfd-name doom-font)) @@ -547,6 +549,8 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.") default-frame-alist :key #'car :test #'eq)) ((display-graphic-p) + ;; We try our best to record your system font, so `doom-big-font-mode' + ;; can still use it to compute a larger font size with. (setq font-use-system-font t doom-font (face-attribute 'default :font))))) @@ -639,7 +643,8 @@ startup (or theme switch) time, so long as `doom--prefer-theme-elc' is non-nil." (put 'customize 'disabled "Doom doesn't support `customize', configure Emacs from $DOOMDIR/config.el instead") (put 'customize-themes 'disabled "Set `doom-theme' or use `load-theme' in $DOOMDIR/config.el instead") -;; doesn't exist in terminal Emacs; we define it to prevent errors +;; Doesn't exist in terminal Emacs, so we define it to prevent void-function +;; errors emitted from packages use it without checking for it first. (unless (fboundp 'define-fringe-bitmap) (fset 'define-fringe-bitmap #'ignore)) From 69a7c60c3ad932614fbc5f21b5f36a90af2b9b44 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 31 Dec 2019 17:46:53 -0500 Subject: [PATCH 472/983] Update text objects list in evil readme --- modules/editor/evil/README.org | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/editor/evil/README.org b/modules/editor/evil/README.org index 8c23d70f5..82dce265c 100644 --- a/modules/editor/evil/README.org +++ b/modules/editor/evil/README.org @@ -96,6 +96,9 @@ And these are text objects added by this module: + =a= C-style function arguments (provided by ~evil-args~) + =B= any block delimited by braces, parentheses or brackets (provided by ~evil-textobj-anyblock~) ++ =c= Comments ++ =f= For functions (but relies on the major mode to have defined a sane ++ =g= The entire buffer + =i j k= by indentation (=k= includes one line above; =j= includes one line above and below) (provided by ~evil-indent-plus~) + =x= XML attributes (provided by ~exato~) From 33701ea407aa512df6083f2969b8b0ce78d4ca92 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 31 Dec 2019 19:11:16 -0500 Subject: [PATCH 473/983] Prevent packages from pulling in org org-plus-contrib already satisfies that dependency. --- modules/lang/org/packages.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index a3ec20f5d..91b04d25b 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -21,7 +21,11 @@ "(fset 'org-git-version #'ignore)\n" "(provide 'org-version)\n"))))) -(package! org-plus-contrib) ; install cutting-edge version of org-mode +;; install cutting-edge version of org-mode +(package! org-plus-contrib) +;; ...And prevent other packages from pulling org; org-plus-contrib satisfies +;; the dependency already: https://github.com/raxod502/straight.el/issues/352 +(package! org :recipe (:local-repo nil)) (package! avy) (package! htmlize) From d1b597fde462e633d4f106ce303f628b5010925d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 31 Dec 2019 19:14:43 -0500 Subject: [PATCH 474/983] Remove redundant evil keybinds for neotree Some of these were already bound by evil-collection-neotree. --- modules/ui/neotree/config.el | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/modules/ui/neotree/config.el b/modules/ui/neotree/config.el index 4a474c998..af3e2d16c 100644 --- a/modules/ui/neotree/config.el +++ b/modules/ui/neotree/config.el @@ -54,28 +54,19 @@ (skip-chars-forward " \t\r")) (map! :map neotree-mode-map - :n "g" nil - :n "TAB" #'neotree-quick-look - :n "RET" #'neotree-enter - :n [tab] #'neotree-quick-look - :n [return] #'neotree-enter + :n [tab] (neotree-make-executor + :dir-fn #'neo-open-dir + :file-fn #'neotree-quick-look) :n "DEL" #'evil-window-prev - :n "c" #'neotree-create-node - :n "r" #'neotree-rename-node - :n "d" #'neotree-delete-node - :n "j" #'neotree-next-line - :n "k" #'neotree-previous-line :n "n" #'neotree-next-line :n "p" #'neotree-previous-line - :n "h" #'+neotree/collapse-or-up - :n "l" #'+neotree/expand-or-open + :m "h" #'+neotree/collapse-or-up + :m "l" #'+neotree/expand-or-open :n "J" #'neotree-select-next-sibling-node :n "K" #'neotree-select-previous-sibling-node :n "H" #'neotree-select-up-node :n "L" #'neotree-select-down-node :n "G" #'evil-goto-line :n "gg" #'evil-goto-first-line - :n "v" #'neotree-enter-vertical-split - :n "s" #'neotree-enter-horizontal-split - :n "q" #'neotree-hide - :n "R" #'neotree-refresh)) + :n "v" (neotree-make-executor :file-fn 'neo-open-file-vertical-split) + :n "s" (neotree-make-executor :file-fn 'neo-open-file-horizontal-split))) From 445ba1a46d6a8c45de2e2baa0825b0f8679c2077 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 31 Dec 2019 19:17:55 -0500 Subject: [PATCH 475/983] Minor refactors & comment revision across the board --- core/core-editor.el | 18 ++++++++++-------- modules/config/default/config.el | 6 +++--- modules/editor/evil/+everywhere.el | 5 ++++- modules/ui/neotree/autoload.el | 7 +++---- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index a5989a581..00f86f215 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -431,19 +431,21 @@ files, so we replace calls to `pp' with the much faster `prin1'." (setq sp-highlight-pair-overlay nil sp-highlight-wrap-overlay nil sp-highlight-wrap-tag-overlay nil) - ;; But if someone does want overlays enabled, evil users will be stricken with - ;; an off-by-one issue where smartparens assumes you're outside the pair when - ;; you're really at the last character in insert mode. We must correct this - ;; vile injustice. - (setq sp-show-pair-from-inside t) - ;; ...and stay highlighted until we've truly escaped the pair! - (setq sp-cancel-autoskip-on-backward-movement nil) + (with-eval-after-load 'evil + ;; But if someone does want overlays enabled, evil users will be stricken + ;; with an off-by-one issue where smartparens assumes you're outside the + ;; pair when you're really at the last character in insert mode. We must + ;; correct this vile injustice. + (setq sp-show-pair-from-inside t) + ;; ...and stay highlighted until we've truly escaped the pair! + (setq sp-cancel-autoskip-on-backward-movement nil)) + ;; The default is 100, because smartparen's scans are relatively expensive ;; (especially with large pair lists for somoe modes), we halve it, as a ;; better compromise between performance and accuracy. (setq sp-max-prefix-length 50) ;; This speeds up smartparens. No pair has any business being longer than 4 - ;; characters; if they must, the modes that need it set it buffer-locally. + ;; characters; if they must, set it buffer-locally. (setq sp-max-pair-length 4) ;; This isn't always smart enough to determine when we're in a string or not. ;; See https://github.com/Fuco1/smartparens/issues/783. diff --git a/modules/config/default/config.el b/modules/config/default/config.el index f2e36c5b5..b5547a83a 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -24,7 +24,7 @@ (setq avy-all-windows nil avy-all-windows-alt t avy-background t - ;; the unpredictability of this makes it a poor default + ;; the unpredictability of this (when enabled) makes it a poor default avy-single-candidate-jump nil) @@ -78,7 +78,7 @@ sp-navigate-consider-sgml-tags nil))) ;; Autopair quotes more conservatively; if I'm next to a word/before another - ;; quote, I likely don't want to open a new pair. + ;; quote, I don't want to open a new pair or it would unbalance them. (let ((unless-list '(sp-point-before-word-p sp-point-after-word-p sp-point-before-same-p))) @@ -353,7 +353,7 @@ "t" #'load-theme ;; replaces `finder-by-keyword' b/c not useful "p" #'doom/help-packages - ;; replaces `describe-package' b/c redundant w/ `doom/describe-package' + ;; replaces `describe-package' b/c redundant w/ `doom/help-packages' "P" #'find-library) (after! which-key diff --git a/modules/editor/evil/+everywhere.el b/modules/editor/evil/+everywhere.el index 8ed0a7acd..369c26cea 100644 --- a/modules/editor/evil/+everywhere.el +++ b/modules/editor/evil/+everywhere.el @@ -238,7 +238,10 @@ and complains if a module is loaded too early (during startup)." (list doom-leader-key doom-localleader-key doom-leader-alt-key doom-localleader-alt-key)) -;; Load the rest +;; HACK Do this ourselves because evil-collection break's `eval-after-load' load +;; order by loading their target plugin before applying keys. It'd be too +;; much work to accommodate this eveywhere we want to bind our own evil +;; keybinds. (dolist (mode evil-collection-mode-list) (dolist (req (or (cdr-safe mode) (list mode))) (with-eval-after-load req diff --git a/modules/ui/neotree/autoload.el b/modules/ui/neotree/autoload.el index 783c57f20..2b26442f6 100644 --- a/modules/ui/neotree/autoload.el +++ b/modules/ui/neotree/autoload.el @@ -39,10 +39,9 @@ "Collapse an expanded directory node or go to the parent node." (interactive) (when-let (node (neo-buffer--get-filename-current-line)) - (if (file-directory-p node) - (if (neo-buffer--expanded-node-p node) - (+neotree/collapse) - (neotree-select-up-node)) + (if (and (file-directory-p node) + (neo-buffer--expanded-node-p node)) + (+neotree/collapse) (neotree-select-up-node)))) ;;;###autoload From 4a53f0818d25602cb591fb749c62f89e626bd9ff Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Jan 2020 03:01:30 -0500 Subject: [PATCH 476/983] Don't insert autoloads literally #2281 It causes encoding issues. --- core/cli/autoloads.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 196118879..279b3e870 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -225,7 +225,7 @@ it is nil, it will try to reload both." (with-temp-buffer (if scan (doom-cli--generate-autoloads-buffer file) - (insert-file-contents-literally file)) + (insert-file-contents file)) (save-excursion (let ((filestr (prin1-to-string file))) (while (re-search-forward "\\_" nil t) From 00c087be89d52179d8f40fa7e9f0f2f506f07880 Mon Sep 17 00:00:00 2001 From: RBckmnn <53320014+RBckmnn@users.noreply.github.com> Date: Wed, 1 Jan 2020 17:19:44 +0100 Subject: [PATCH 477/983] Fix typo --- modules/editor/file-templates/autoload.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/file-templates/autoload.el b/modules/editor/file-templates/autoload.el index e77622729..70c416dbd 100644 --- a/modules/editor/file-templates/autoload.el +++ b/modules/editor/file-templates/autoload.el @@ -41,7 +41,7 @@ these properties: ;;;###autodef (defun set-file-templates! (&rest templates) - "Like `set-file-templates!', but can register multiple file templates at once. + "Like `set-file-template!', but can register multiple file templates at once. \(fn &rest (PRED &key WHEN TRIGGER MODE PROJECT IGNORE))" (defer-until! (boundp '+file-templates-alist) From 4f676bd2188d573dee71844a80f55b0a96ff2be1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Jan 2020 13:31:40 -0500 Subject: [PATCH 478/983] Refactor autoload generator bootstrappers --- core/cli/autoloads.el | 84 ++++++++++++++++++++----------------------- core/cli/packages.el | 8 ++--- core/cli/test.el | 4 +-- core/cli/upgrade.el | 2 +- core/core-cli.el | 13 ++----- 5 files changed, 48 insertions(+), 63 deletions(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 279b3e870..33b0261eb 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -18,58 +18,51 @@ one wants that.") (defvar autoload-timestamps) (defvar generated-autoload-load-name) -(defun doom-cli-reload-autoloads (&optional type) - "Reloads FILE (an autoload file), if it needs reloading. +(defun doom-cli-reload-autoloads () + "Reloads `doom-autoload-file' and `doom-package-autoload-file' files." + (doom-cli-reload-core-autoloads) + (doom-cli-reload-package-autoloads)) -FILE should be one of `doom-autoload-file' or `doom-package-autoload-file'. If -it is nil, it will try to reload both." - (if type - (cond ((eq type 'core) - (doom-cli-reload-core-autoloads doom-autoload-file)) - ((eq type 'package) - (doom-cli-reload-package-autoloads doom-package-autoload-file)) - ((error "Invalid autoloads file: %s" type))) - (doom-cli-reload-autoloads 'core) - (doom-cli-reload-autoloads 'package))) - -(defun doom-cli-reload-core-autoloads (file) - (cl-check-type file string) +(defun doom-cli-reload-core-autoloads (&optional file) (print! (start "(Re)generating core autoloads...")) (print-group! - (and (print! (start "Generating core autoloads...")) - (doom-cli--write-autoloads - file (doom-cli--generate-autoloads - (cl-loop for dir in (append (list doom-core-dir) - (cdr (doom-module-load-path 'all-p)) - (list doom-private-dir)) - if (doom-glob dir "autoload.el") collect it - if (doom-glob dir "autoload/*.el") append it) - 'scan)) - (print! (start "Byte-compiling core autoloads file...")) - (doom-cli--byte-compile-file file) - (print! (success "Generated %s") - (relpath (byte-compile-dest-file file) - doom-emacs-dir))))) + (let ((file (or file doom-autoload-file))) + (cl-check-type file string) + (and (print! (start "Generating core autoloads...")) + (doom-cli--write-autoloads + file (doom-cli--generate-autoloads + (cl-loop for dir in (append (list doom-core-dir) + (cdr (doom-module-load-path 'all-p)) + (list doom-private-dir)) + if (doom-glob dir "autoload.el") collect it + if (doom-glob dir "autoload/*.el") append it) + 'scan)) + (print! (start "Byte-compiling core autoloads file...")) + (doom-cli--byte-compile-file file) + (print! (success "Generated %s") + (relpath (byte-compile-dest-file file) + doom-emacs-dir)))))) -(defun doom-cli-reload-package-autoloads (file) - (cl-check-type file string) +(defun doom-cli-reload-package-autoloads (&optional file) (print! (start "(Re)generating package autoloads...")) (print-group! (doom-initialize-packages) - (and (print! (start "Generating package autoloads...")) - (doom-cli--write-autoloads - file - (doom-cli--generate-var-cache doom-autoload-cached-vars) - (doom-cli--generate-autoloads - (mapcar #'straight--autoloads-file - (cl-set-difference (hash-table-keys straight--build-cache) - doom-autoload-excluded-packages - :test #'string=)))) - (print! (start "Byte-compiling package autoloads file...")) - (doom-cli--byte-compile-file file) - (print! (success "Generated %s") - (relpath (byte-compile-dest-file file) - doom-emacs-dir))))) + (let ((file (or file doom-package-autoload-file))) + (cl-check-type file string) + (and (print! (start "Generating package autoloads...")) + (doom-cli--write-autoloads + file + (doom-cli--generate-var-cache doom-autoload-cached-vars) + (doom-cli--generate-autoloads + (mapcar #'straight--autoloads-file + (cl-set-difference (hash-table-keys straight--build-cache) + doom-autoload-excluded-packages + :test #'string=)))) + (print! (start "Byte-compiling package autoloads file...")) + (doom-cli--byte-compile-file file) + (print! (success "Generated %s") + (relpath (byte-compile-dest-file file) + doom-emacs-dir)))))) ;; @@ -223,6 +216,7 @@ it is nil, it will try to reload both." (cl-remove-if-not #'file-readable-p files) (nreverse (delq nil autoloads))) (with-temp-buffer + (print! (debug "- Scanning %s") (relpath file doom-emacs-dir)) (if scan (doom-cli--generate-autoloads-buffer file) (insert-file-contents file)) diff --git a/core/cli/packages.el b/core/cli/packages.el index 66ad5886a..931a2da5d 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -10,9 +10,9 @@ between HEAD and FETCH_HEAD. This can take a while. This excludes packages whose `package!' declaration contains a non-nil :freeze or :ignore property." (straight-check-all) - (doom-cli-reload-autoloads 'core) + (doom-cli-reload-core-autoloads) (when (doom-cli-packages-update) - (doom-cli-reload-autoloads 'package)) + (doom-cli-reload-package-autoloads)) t) (defcli! (build b) @@ -23,7 +23,7 @@ This ensures that all needed files are symlinked from their package repo and their elisp files are byte-compiled. This is especially necessary if you upgrade Emacs (as byte-code is generally not forward-compatible)." (when (doom-cli-packages-build (not rebuild-p)) - (doom-cli-reload-autoloads 'package)) + (doom-cli-reload-package-autoloads)) t) (defcli! (purge p) @@ -46,7 +46,7 @@ list remains lean." (not norepos-p) (not nobuilds-p) regraft-p) - (doom-cli-reload-autoloads 'package)) + (doom-cli-reload-package-autoloads)) t) ;; (defcli! rollback () ; TODO doom rollback diff --git a/core/cli/test.el b/core/cli/test.el index 44db855ea..1defcf063 100644 --- a/core/cli/test.el +++ b/core/cli/test.el @@ -50,9 +50,9 @@ (require 'core-cli) (doom-initialize 'force 'noerror) (doom-initialize-modules) - (doom-cli-reload-autoloads 'core) + (doom-cli-reload-core-autoloads) (when (doom-cli-packages-install) - (doom-cli-reload-autoloads 'package))))) + (doom-cli-reload-package-autoloads))))) (unless (zerop status) (error "Failed to bootstrap unit tests")))) (with-temp-buffer diff --git a/core/cli/upgrade.el b/core/cli/upgrade.el index 66c6482b9..003f737de 100644 --- a/core/cli/upgrade.el +++ b/core/cli/upgrade.el @@ -18,7 +18,7 @@ following shell commands: (doom-cli-upgrade doom-auto-accept force-p) (doom-cli-execute "refresh") (when (doom-cli-packages-update) - (doom-cli-reload-autoloads 'package) + (doom-cli-reload-package-autoloads) t))) (print! (success "Done! Restart Emacs for changes to take effect.")) (print! "Nothing to do. Doom is up-to-date!"))) diff --git a/core/core-cli.el b/core/core-cli.el index 6d6c10bb7..23304d01b 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -246,16 +246,7 @@ stale." (file-exists-p doom-env-file)) (doom-cli-reload-env-file 'force)) - ;; Ensures that no pre-existing state pollutes the generation of the new - ;; autoloads files. - (dolist (file (list doom-autoload-file doom-package-autoload-file)) - (delete-file file) - (delete-file (byte-compile-dest-file file))) - - (doom-initialize 'force 'noerror) - (doom-initialize-modules) - - (doom-cli-reload-autoloads 'core) + (doom-cli-reload-core-autoloads) (unwind-protect (progn (and (doom-cli-packages-install) @@ -264,7 +255,7 @@ stale." (setq success t)) (and (doom-cli-packages-purge prune-p 'builds-p prune-p prune-p) (setq success t))) - (doom-cli-reload-autoloads 'package) + (doom-cli-reload-package-autoloads) (doom-cli-byte-compile nil 'recompile)) t))) From 7a348f8784d636b16bc353226fcb34b14cc0dc4f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Jan 2020 14:29:40 -0500 Subject: [PATCH 479/983] Refactor how we indent straight's progress output More work up front, less work in the trenches. --- core/cli/packages.el | 44 ++++++++++++++++++------------------------- core/core-cli.el | 15 ++++++++++++--- core/core-packages.el | 13 +++++++++++++ 3 files changed, 43 insertions(+), 29 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 931a2da5d..8733d5dc7 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -74,9 +74,7 @@ declaration) or dependency thereof that hasn't already been." (package local-repo) (let ((existed-p (file-directory-p (straight--repos-dir package)))) (condition-case-unless-debug e - (and (straight-use-package - (intern package) nil nil - (make-string (1- (or doom-format-indent 1)) 32)) + (and (straight-use-package (intern package)) (not existed-p) (file-directory-p (straight--repos-dir package)) (if-let (commit (cdr (assoc package versions-alist))) @@ -103,29 +101,23 @@ declaration) or dependency thereof that hasn't already been." (print! (start "(Re)building %spackages...") (if force-p "all " "")) (straight--transaction-finalize) (print-group! - (let ((straight-check-for-modifications - (when (file-directory-p (straight--modified-dir)) - '(find-when-checking))) - (straight--allow-find (and straight-check-for-modifications t)) - (straight--packages-not-to-rebuild - (or straight--packages-not-to-rebuild (make-hash-table :test #'equal))) - (straight-use-package-pre-build-functions - straight-use-package-pre-build-functions) - (n 0)) - (add-hook! 'straight-use-package-pre-build-functions (cl-incf n)) - (if force-p - (let ((straight--packages-to-rebuild :all)) - (dolist (package (hash-table-keys straight--recipe-cache)) - (straight-use-package - (intern package) nil nil - (make-string (1- (or doom-format-indent 1)) 32)))) - (straight--make-package-modifications-available) - (dolist (recipe (hash-table-values straight--recipe-cache)) - (straight--with-plist recipe (package local-repo no-build) - (unless (or no-build (null local-repo)) - (straight-use-package - (intern package) nil nil - (make-string (or doom-format-indent 0) 32)))))) + (let* ((n 0) + (straight-check-for-modifications + (when (file-directory-p (straight--modified-dir)) + '(find-when-checking))) + (straight--allow-find (and straight-check-for-modifications t)) + (straight--packages-not-to-rebuild + (or straight--packages-not-to-rebuild (make-hash-table :test #'equal))) + (straight--packages-to-rebuild + (or (if force-p :all straight--packages-to-rebuild) + (make-hash-table :test #'equal))) + (straight-use-package-pre-build-functions + (cons (lambda (&rest _) (cl-incf n)) + straight-use-package-pre-build-functions))) + (unless force-p + (straight--make-package-modifications-available)) + (dolist (package (hash-table-keys straight--recipe-cache)) + (straight-use-package (intern package))) (if (= n 0) (ignore (print! (success "No packages need rebuilding"))) (print! (success "Rebuilt %d package(s)" n)) diff --git a/core/core-cli.el b/core/core-cli.el index 23304d01b..3d483faae 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -239,9 +239,18 @@ It will ensure that unneeded packages are removed, all needed packages are installed, autoloads files are up-to-date and no byte-compiled files have gone stale." :bare t - (print! (start "Initiating a refresh of Doom Emacs...")) - (print-group! - (let (success) + (let (success) + ;; Ensures that no pre-existing state pollutes the generation of the new + ;; autoloads files. + (dolist (file (list doom-autoload-file doom-package-autoload-file)) + (delete-file file) + (delete-file (byte-compile-dest-file file))) + + (doom-initialize 'force 'noerror) + (doom-initialize-modules) + + (print! (start "Synchronizing your config with Doom Emacs...")) + (print-group! (when (and (not inhibit-envvar-p) (file-exists-p doom-env-file)) (doom-cli-reload-env-file 'force)) diff --git a/core/core-packages.el b/core/core-packages.el index 0a0a28e45..b6cdf3105 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -182,6 +182,19 @@ missing) and shouldn't be deleted.") (print! (warn "%s is not a valid answer, try again.") answer)) (funcall fn)))))) +(defadvice! doom--straight-respect-print-indent-a (args) + :filter-args #'straight-use-package + (cl-destructuring-bind + (melpa-style-recipe &optional no-clone no-build cause interactive) + args + (list melpa-style-recipe no-clone no-build + (if (and (not cause) + (boundp 'doom-format-indent) + (> doom-format-indent 0)) + (make-string (1- (or doom-format-indent 1)) 32) + cause) + interactive))) + ;; ;;; Bootstrapper From 5929e5b75aaa36bf8a87b9d3ea0030422b901333 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Jan 2020 14:31:49 -0500 Subject: [PATCH 480/983] Add undefadvice! macro for rotate-text convenience --- core/core-lib.el | 18 ++++++++++++++++++ modules/lang/emacs-lisp/config.el | 1 + 2 files changed, 19 insertions(+) diff --git a/core/core-lib.el b/core/core-lib.el index 95e8f618c..a35393d1f 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -424,5 +424,23 @@ DOCSTRING and BODY are as in `defun'. (dolist (target (cdr targets)) (advice-add target (car targets) #',symbol)))))) +(defmacro undefadvice! (symbol _arglist &optional docstring &rest body) + "Undefine an advice called SYMBOL. + +This has the same signature as `defadvice!' an exists as an easy undefiner when +testing advice (when combined with `rotate-text'). + +\(fn SYMBOL ARGLIST &optional DOCSTRING &rest [WHERE PLACES...] BODY\)" + (declare (doc-string 3) (indent defun)) + (let (where-alist) + (unless (stringp docstring) + (push docstring body)) + (while (keywordp (car body)) + (push `(cons ,(pop body) (doom-enlist ,(pop body))) + where-alist)) + `(dolist (targets (list ,@(nreverse where-alist))) + (dolist (target (cdr targets)) + (advice-remove target #',symbol))))) + (provide 'core-lib) ;;; core-lib.el ends here diff --git a/modules/lang/emacs-lisp/config.el b/modules/lang/emacs-lisp/config.el index a4224cf09..2623a04ab 100644 --- a/modules/lang/emacs-lisp/config.el +++ b/modules/lang/emacs-lisp/config.el @@ -31,6 +31,7 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.") ("let" "let*") ("when" "unless") ("advice-add" "advice-remove") + ("defadvice!" "undefadvice!") ("add-hook" "remove-hook") ("add-hook!" "remove-hook!") ("it" "xit") From a332885d3312ed3ce7f57899e1414a6a72c8406f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Jan 2020 14:54:41 -0500 Subject: [PATCH 481/983] Remove M-ret binds; make C-ret binds less aggressive They were a tad too aggressive. Our C-ret keybinds are more than enough. I've removed them from insert state maps, however, so that those keybinds won't override new C-ret keybinds on non-evilified minor mode keymaps (for evil users). --- modules/config/default/config.el | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index b5547a83a..afca873d8 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -392,14 +392,11 @@ ;; which ctrl+RET will add a new "item" below the current one and ;; cmd+RET (Mac) / meta+RET (elsewhere) will add a new, blank line below ;; the current one. - :gni [C-return] #'+default/newline-below - :gni [C-S-return] #'+default/newline-above + :gn [C-return] #'+default/newline-below + :gn [C-S-return] #'+default/newline-above (:when IS-MAC - :gni [s-return] #'+default/newline-below - :gni [S-s-return] #'+default/newline-above) - (:unless IS-MAC - :gni [M-return] #'+default/newline-below - :gni [M-S-return] #'+default/newline-above))) + :gn [s-return] #'+default/newline-below + :gn [S-s-return] #'+default/newline-above))) ;; From f0e05c1a44360bfc9e407e6e2a5e53641bf592c1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Jan 2020 16:02:08 -0500 Subject: [PATCH 482/983] Fix C-w in ivy not moving up directory And ensure C-w doesn't affect kill-ring from minibuffer. --- core/autoload/text.el | 7 +++++++ modules/completion/ivy/config.el | 4 +++- modules/config/default/+evil-bindings.el | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/core/autoload/text.el b/core/autoload/text.el index 44e4d695d..4bb427160 100644 --- a/core/autoload/text.el +++ b/core/autoload/text.el @@ -143,6 +143,13 @@ line to beginning of line. Same as `evil-delete-back-to-indentation'." (unless empty-line-p (indent-according-to-mode)))) +;;;###autoload +(defun doom/delete-backward-word (arg) + "Like `backward-kill-word', but doesn't affect the kill-ring." + (interactive "p") + (let (kill-ring) + (backward-kill-word arg))) + ;;;###autoload (defun doom/dumb-indent () "Inserts a tab character (or spaces x tab-width)." diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index e9ed06f73..b74623bdb 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -103,7 +103,9 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." (let ((completion-in-region-function #'completion--in-region)) (apply orig-fn args))) - (define-key ivy-minibuffer-map (kbd "C-c C-e") #'+ivy/woccur) + (define-key! ivy-minibuffer-map + "C-c C-e" #'+ivy/woccur + [remap doom/delete-backward-word] #'ivy-backward-kill-word) (ivy-mode +1) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index c6ceb5988..368a300d2 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -17,7 +17,7 @@ "C-r" #'evil-paste-from-register "C-u" #'evil-delete-back-to-indentation "C-v" #'yank - "C-w" #'evil-delete-backward-word + "C-w" #'doom/delete-backward-word "C-z" (λ! (ignore-errors (call-interactively #'undo))) ;; Scrolling lines "C-j" #'next-line From 2ef0ed90a496ebace333c66e3f7364154f2313e0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Jan 2020 16:18:50 -0500 Subject: [PATCH 483/983] Fix C-a/C-e #1802 Fixes two issues: 1. Where C-e would throw the cursor somewhere on another line (or at BOF). 2. Fixes #1802; where the cursor would stop a character shy of true end-of-text. --- core/autoload/text.el | 102 +++++++++++++++++++++--------------------- 1 file changed, 52 insertions(+), 50 deletions(-) diff --git a/core/autoload/text.el b/core/autoload/text.el index 4bb427160..88ecc3208 100644 --- a/core/autoload/text.el +++ b/core/autoload/text.el @@ -64,70 +64,72 @@ POS defaults to the current position." ;; ;;; Commands -(defvar doom--last-backward-pt most-positive-fixnum) +(defun doom--bol-bot-eot-eol (&optional pos) + (let* ((bol (if visual-line-mode + (save-excursion + (beginning-of-visual-line) + (point)) + (line-beginning-position))) + (bot (save-excursion + (goto-char bol) + (skip-chars-forward " \t\r") + (point))) + (eol (if visual-line-mode + (save-excursion (end-of-visual-line) (point)) + (line-end-position))) + (eot (or (save-excursion + (if (not comment-use-syntax) + (progn + (goto-char bol) + (when (re-search-forward comment-start-skip eol t) + (or (match-end 1) (match-beginning 0)))) + (goto-char eol) + (while (and (doom-point-in-comment-p) + (> (point) bol)) + (backward-char)) + (skip-chars-backward " " bol) + (unless (or (eq (char-after) 32) (eolp)) + (forward-char)) + (point))) + eol))) + (list bol bot eot eol))) + +(defvar doom--last-backward-pt nil) ;;;###autoload -(defun doom/backward-to-bol-or-indent () +(defun doom/backward-to-bol-or-indent (&optional point) "Jump between the indentation column (first non-whitespace character) and the beginning of the line. The opposite of `doom/forward-to-last-non-comment-or-eol'." - (interactive) - (let ((pt (point))) - (cl-destructuring-bind (bol . bot) - (save-excursion - (beginning-of-visual-line) - (cons (point) - (progn (skip-chars-forward " \t\r") - (point)))) + (interactive "d") + (let ((pt (or point (point)))) + (cl-destructuring-bind (bol bot _eot eol) + (doom--bol-bot-eot-eol pt) (cond ((> pt bot) (goto-char bot)) ((= pt bol) - (goto-char (min doom--last-backward-pt bot)) - (setq doom--last-backward-pt most-positive-fixnum)) + (goto-char (or doom--last-backward-pt bot)) + (setq doom--last-backward-pt nil)) ((<= pt bot) (setq doom--last-backward-pt pt) (goto-char bol)))))) -(defvar doom--last-forward-pt -1) +(defvar doom--last-forward-pt nil) ;;;###autoload -(defun doom/forward-to-last-non-comment-or-eol () +(defun doom/forward-to-last-non-comment-or-eol (&optional point) "Jumps between the last non-blank, non-comment character in the line and the true end of the line. The opposite of `doom/backward-to-bol-or-indent'." - (interactive) - (let ((eol (if (not visual-line-mode) - (line-end-position) - (save-excursion (end-of-visual-line) (point))))) - (if (or (and (< (point) eol) - (sp-point-in-comment)) - (not (sp-point-in-comment eol))) - (if (= (point) eol) - (progn - (goto-char doom--last-forward-pt) - (setq doom--last-forward-pt -1)) - (setq doom--last-forward-pt (point)) - (goto-char eol)) - (let* ((bol (save-excursion (beginning-of-visual-line) (point))) - (boc (or (save-excursion - (if (not comment-use-syntax) - (progn - (goto-char bol) - (when (re-search-forward comment-start-skip eol t) - (or (match-end 1) (match-beginning 0)))) - (goto-char eol) - (while (and (sp-point-in-comment) - (> (point) bol)) - (backward-char)) - (skip-chars-backward " " bol) - (point))) - eol))) - (when (> doom--last-forward-pt boc) - (setq boc doom--last-forward-pt)) - (if (or (= eol (point)) - (> boc (point))) - (progn - (goto-char boc) - (setq doom--last-forward-pt -1)) - (setq doom--last-forward-pt (point)) - (goto-char eol)))))) + (interactive "d") + (let ((pt (or point (point)))) + (cl-destructuring-bind (_bol _bot eot eol) + (doom--bol-bot-eot-eol pt) + (cond ((< pt eot) + (goto-char eot)) + ((= pt eol) + (goto-char (or doom--last-forward-pt eot)) + (setq doom--last-forward-pt nil)) + ((>= pt eot) + (setq doom--last-backward-pt pt) + (goto-char eol)))))) ;;;###autoload (defun doom/backward-kill-to-bol-and-indent () From ab994627bcc5b109675d4536f32a5df0e457dba4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Jan 2020 16:49:00 -0500 Subject: [PATCH 484/983] Add counsel-find-file's actions to counsel-file-jump --- modules/completion/ivy/config.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index b74623bdb..57fb445f4 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -253,6 +253,8 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." ("L" (lambda (path) (with-ivy-window (insert (format "[[%s]]" path)))) "Insert absolute org-link")))) + (ivy-add-actions 'counsel-file-jump (plist-get ivy--actions-list 'counsel-find-file)) + ;; `counsel-search': use normal page for displaying results, so that we see ;; custom ddg themes (if one is set). (setf (nth 1 (alist-get 'ddg counsel-search-engines-alist)) From 29773baa5555409d1de4264909306f37b1497068 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Jan 2020 17:01:22 -0500 Subject: [PATCH 485/983] Add 'doom sync' as an alias for 'doom refresh' 'sync' more accurately describes the purpose of the command. 'refresh' is now soft-deprecated; but I will phase it out of the documentation and promote 'sync' instead, but it won't be removed. --- core/core-cli.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core-cli.el b/core/core-cli.el index 3d483faae..38cee2ffb 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -221,11 +221,11 @@ BODY will be run when this dispatcher is called." (defcligroup! "Maintenance" "For managing your config and packages" - (defcli! (refresh re sync) + (defcli! (sync s refresh re) ((if-necessary-p ["-n" "--if-necessary"] "Only regenerate autoloads files if necessary") (inhibit-envvar-p ["-e"] "Don't regenerate the envvar file") (prune-p ["-p" "--prune"] "Purge orphaned packages & regraft repos")) - "Ensure Doom is properly set up. + "Synchronize your config with Doom Emacs. This is the equivalent of running autoremove, install, autoloads, then recompile. Run this whenever you: From d0380c42e720566b50eb82f75e5806974db04753 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Jan 2020 20:31:34 -0500 Subject: [PATCH 486/983] Rename face: +modeline-bar -> +modeline-bar-active It shared the name of a variable, which could be confusing. --- modules/ui/modeline/+light.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui/modeline/+light.el b/modules/ui/modeline/+light.el index c6fa8bc46..b6882e169 100644 --- a/modules/ui/modeline/+light.el +++ b/modules/ui/modeline/+light.el @@ -50,7 +50,7 @@ side of the modeline, and whose CDR is the right-hand side.") ;; ;;; Faces -(defface +modeline-bar '((t (:inherit highlight))) +(defface +modeline-bar-active '((t (:inherit highlight))) "Face used for left-most bar on the mode-line of an active window.") (defface +modeline-bar-inactive '((t (:inherit mode-line-inactive))) @@ -186,7 +186,7 @@ LHS and RHS will accept." (setq +modeline-bar (+modeline--make-xpm (and +modeline-bar-width - (face-background '+modeline-bar nil t)) + (face-background '+modeline-bar-active nil t)) width height) +modeline-inactive-bar (+modeline--make-xpm From 07823d00a7ef46b6112b8d47924e7995b8ebc9b4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Jan 2020 20:59:58 -0500 Subject: [PATCH 487/983] Fix yasnippet expansion in org src blocks This is hacky, and causes weirdness with org-bullets-mode, but it works. --- modules/lang/org/autoload/org.el | 32 ++++++++++++++++++++------------ modules/lang/org/config.el | 6 +++--- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/modules/lang/org/autoload/org.el b/modules/lang/org/autoload/org.el index 511f908fe..f4b892053 100644 --- a/modules/lang/org/autoload/org.el +++ b/modules/lang/org/autoload/org.el @@ -374,18 +374,26 @@ Made for `org-tab-first-hook' in evil-mode." "Tries to expand a yasnippet snippet, if one is available. Made for `org-tab-first-hook'." (when (bound-and-true-p yas-minor-mode) - (cond ((and (or (not (bound-and-true-p evil-local-mode)) - (evil-insert-state-p)) - (yas--templates-for-key-at-point)) - (call-interactively #'yas-expand) - t) - ((use-region-p) - ;; Triggering mode-specific indentation is expensive in src blocks - ;; (if `org-src-tab-acts-natively' is non-nil), and can cause errors, - ;; so we avoid smart indentation in this case. - (let ((yas-indent-line 'fixed)) - (call-interactively #'yas-insert-snippet)) - t)))) + (let ((major-mode (if (org-in-src-block-p t) + (org-src-get-lang-mode (org-eldoc-get-src-lang)) + major-mode)) + (org-src-tab-acts-natively nil) ; causes breakages + ;; Smart indentation doesn't work with yasnippet, and painfully slow + ;; in the few cases where it does. + (yas-indent-line 'fixed)) + ;; HACK Yasnippet field overlays break org-bullet-mode. Don't ask me why. + (add-hook! 'yas-after-exit-snippet-hook :local + (when (bound-and-true-p org-bullets-mode) + (org-bullets-mode -1) + (org-bullets-mode +1))) + (cond ((and (or (not (bound-and-true-p evil-local-mode)) + (evil-insert-state-p)) + (yas--templates-for-key-at-point)) + (yas-expand) + t) + ((use-region-p) + (yas-insert-snippet) + t))))) ;;;###autoload (defun +org-cycle-only-current-subtree-h (&optional arg) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 5ac1e8de1..6acdecca4 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -184,7 +184,7 @@ background (and foreground) match the current theme." (defun +org-init-babel-h () (setq org-src-preserve-indentation t ; use native major-mode indentation - org-src-tab-acts-natively t + org-src-tab-acts-natively t ; we do this ourselves ;; You don't need my permission (just be careful, mkay?) org-confirm-babel-evaluate nil org-link-elisp-confirm-function nil @@ -581,8 +581,8 @@ between the two." org-insert-heading-respect-content t) (add-hook! 'org-tab-first-hook - #'+org-indent-maybe-h - #'+org-yas-expand-maybe-h) + #'+org-yas-expand-maybe-h + #'+org-indent-maybe-h) (add-hook 'doom-delete-backward-functions #'+org-delete-backward-char-and-realign-table-maybe-h) From d84df723645a348824f681141485113ea82e667d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Jan 2020 21:00:59 -0500 Subject: [PATCH 488/983] Dumb indent on TAB when in middle of subtree --- modules/lang/org/autoload/org.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/lang/org/autoload/org.el b/modules/lang/org/autoload/org.el index f4b892053..30d01ff19 100644 --- a/modules/lang/org/autoload/org.el +++ b/modules/lang/org/autoload/org.el @@ -360,6 +360,12 @@ Made for `org-tab-first-hook' in evil-mode." ((org-in-src-block-p t) (org-babel-do-in-edit-buffer (call-interactively #'indent-for-tab-command)) + t) + ((and (save-excursion + (skip-chars-backward " \t") + (bolp)) + (org-in-subtree-not-table-p)) + (call-interactively #'tab-to-tab-stop) t))) ;;;###autoload From 8f5977d9b8daf9e733a5abc8dcbf12e328902147 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Jan 2020 21:24:06 -0500 Subject: [PATCH 489/983] Fix #2282: save-interprogram-paste-before-kill = nil Seems more problematic than helpful to manipulate Emacs' kill-ring more than we have to. --- core/core-editor.el | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 00f86f215..fd67394c1 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -130,9 +130,6 @@ possible." ;; (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)) -;; Save clipboard contents into kill-ring before replacing them -(setq save-interprogram-paste-before-kill t) - ;; Fixes the clipboard in tty Emacs by piping clipboard I/O through xclip, xsel, ;; pb{copy,paste}, wl-copy, termux-clipboard-get, or getclip (cygwin). (add-hook! 'tty-setup-hook From f0abb3264c036e741dd22230125505ee23585b1e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Jan 2020 22:47:59 -0500 Subject: [PATCH 490/983] Fix #2014: +shell/here doesn't execute COMMAND --- modules/term/shell/autoload.el | 35 +++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/modules/term/shell/autoload.el b/modules/term/shell/autoload.el index 183106785..47dca9372 100644 --- a/modules/term/shell/autoload.el +++ b/modules/term/shell/autoload.el @@ -41,6 +41,18 @@ prompt." (when (memq (process-status process) '(exit stop)) (kill-buffer (process-buffer process)))) +(defun +shell--send-input (buffer input &optional no-newline) + (when input + (with-current-buffer buffer + (unless (number-or-marker-p (cdr comint-last-prompt)) + (message "Waiting for shell to start up...") + (while (not (number-or-marker-p (cdr comint-last-prompt))) + (sleep-for 0.1))) + (goto-char (cdr comint-last-prompt)) + (delete-region (cdr comint-last-prompt) (point-max)) + (insert input) + (comint-send-input no-newline)))) + ;;;###autoload (defun +shell/toggle (&optional command) @@ -69,12 +81,11 @@ If popup is focused, kill it." (with-current-buffer (pop-to-buffer buffer) (if (not (eq major-mode 'shell-mode)) (shell buffer) - (run-mode-hooks 'shell-mode-hook) - (cd dir)) - (let ((process (get-buffer-process (current-buffer)))) - (set-process-sentinel process #'+shell--sentinel) - (when command - (comint-send-string process command))))))) + (cd dir) + (run-mode-hooks 'shell-mode-hook)))) + (when-let (process (get-buffer-process buffer)) + (set-process-sentinel process #'+shell--sentinel) + (+shell--send-input buffer command)))) ;;;###autoload (defun +shell/here (&optional command) @@ -85,14 +96,12 @@ If already in a shell buffer, clear it and cd into the current directory." (let ((buffer (+shell-unused-buffer)) (dir default-directory)) (with-current-buffer (switch-to-buffer buffer) - (if (not (eq major-mode 'shell-mode)) - (shell buffer) - (erase-buffer) - (cd dir)) - (let ((process (get-buffer-process (current-buffer)))) + (if (eq major-mode 'shell-mode) + (+shell--send-input buffer (format "cd %S" dir)) + (shell buffer)) + (let ((process (get-buffer-process buffer))) (set-process-sentinel process #'+shell--sentinel) - (when command - (comint-send-string process command)))) + (+shell--send-input buffer command))) buffer)) From fd6def4d5acdd1f0fc7ed1f4a719ca1ffdfab0b3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Jan 2020 23:48:19 -0500 Subject: [PATCH 491/983] Fix letenv! macro It didn't work due to over-aggressive quoting of the let-vars. --- core/core-lib.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index a35393d1f..53c3cdced 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -171,9 +171,11 @@ If FETCHER is a function, ELT is used as the key in LIST (an alist)." (defmacro letenv! (envvars &rest body) "Lexically bind ENVVARS in BODY, like `let' but for `process-environment'." + (declare (indent 1)) `(let ((process-environment (copy-sequence process-environment))) - (dolist (var ',envvars) - (setenv (car var) (cadr var))) + (dolist (var (list ,@(cl-loop for (var val) in envvars + collect `(cons ,var ,val)))) + (setenv (car var) (cdr var))) ,@body)) (defmacro add-load-path! (&rest dirs) From f78f71a74c9a64d493687a686a599ea25f5d4a57 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Jan 2020 23:52:02 -0500 Subject: [PATCH 492/983] Minor refactors & comment revision --- core/cli/packages.el | 6 +++--- core/core-ui.el | 8 +++++--- early-init.el | 6 +++--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 8733d5dc7..d834e0432 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -64,8 +64,8 @@ list remains lean." This function will install any primary package (i.e. a package with a `package!' declaration) or dependency thereof that hasn't already been." - (print! (start "Installing & building packages...")) (straight--transaction-finalize) + (print! (start "Installing & building packages...")) (print-group! (let ((versions-alist doom-pinned-packages) (n 0)) @@ -98,8 +98,8 @@ declaration) or dependency thereof that hasn't already been." (defun doom-cli-packages-build (&optional force-p) "(Re)build all packages." - (print! (start "(Re)building %spackages...") (if force-p "all " "")) (straight--transaction-finalize) + (print! (start "(Re)building %spackages...") (if force-p "all " "")) (print-group! (let* ((n 0) (straight-check-for-modifications @@ -126,8 +126,8 @@ declaration) or dependency thereof that hasn't already been." (defun doom-cli-packages-update () "Updates packages." - (print! (start "Updating packages (this may take a while)...")) (straight--transaction-finalize) + (print! (start "Updating packages (this may take a while)...")) (let ((straight--repos-dir (straight--repos-dir)) (straight--packages-to-rebuild (make-hash-table :test #'equal)) (total (hash-table-count straight--repo-cache)) diff --git a/core/core-ui.el b/core/core-ui.el index 7ea90354c..f19f988b5 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -277,9 +277,11 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (setq window-resize-pixelwise t frame-resize-pixelwise t) -(unless EMACS27+ ; We already do this in early-init.el - ;; Disable tool and scrollbars; Doom encourages keyboard-centric workflows, so - ;; these are just clutter (the scrollbar also impacts Emacs' performance). +(unless EMACS27+ + ;; We do this in early-init.el too, but in case the user is on Emacs 26 we do + ;; it here too: disable tool and scrollbars, as Doom encourages + ;; keyboard-centric workflows, so these are just clutter (the scrollbar also + ;; impacts performance). (push '(menu-bar-lines . 0) default-frame-alist) (push '(tool-bar-lines . 0) default-frame-alist) (push '(vertical-scroll-bars) default-frame-alist)) diff --git a/early-init.el b/early-init.el index cf3138571..02ba00bb2 100644 --- a/early-init.el +++ b/early-init.el @@ -13,9 +13,9 @@ (advice-add #'package--ensure-init-file :override #'ignore) ;; Prevent the glimpse of un-styled Emacs by disabling these UI elements early. -(push '(menu-bar-lines . 0) default-frame-alist) -(push '(tool-bar-lines . 0) default-frame-alist) -(push '(vertical-scroll-bars) default-frame-alist) +(setq tool-bar-mode nil + menu-bar-mode nil) +(set-scroll-bar-mode nil) ;; Resizing the Emacs frame can be a terribly expensive part of changing the ;; font. By inhibiting this, we easily halve startup times with fonts that are From 3661406e74f7d12fc579117702995d877dd2a444 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Thu, 2 Jan 2020 11:36:10 +0200 Subject: [PATCH 493/983] Add evil binding to lsp-execute-code-action --- modules/config/default/+evil-bindings.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 368a300d2..cd5d23b2f 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -348,6 +348,7 @@ ;;; c --- code (:prefix-map ("c" . "code") + :desc "LSP Execute code action" "a" #'lsp-execute-code-action :desc "Compile" "c" #'compile :desc "Recompile" "C" #'recompile :desc "Jump to definition" "d" #'+lookup/definition From 13e2eefae1b55603fb62d604848a61e4cf77b658 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Jan 2020 00:31:20 -0500 Subject: [PATCH 494/983] Move org-id-locations-file to org-directory It makes more sense to store this file where you keep your org files, rather than in Doom's .local files, which could be deleted for debugging, or local only to a specific machine. Also make ID links relative to org-directory, in case you use the same org library on a different system with different filesystem layout/system of symlinks. --- modules/lang/org/config.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 6acdecca4..34c49501b 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -933,11 +933,7 @@ compelling reason, so..." (setq org-directory "~/org/" org-attach-id-dir ".attach/" org-publish-timestamp-directory (concat doom-cache-dir "org-timestamps/") - org-preview-latex-image-directory (concat doom-cache-dir "org-latex/") - org-id-locations-file (concat doom-etc-dir "org-id-locations") - ;; Global ID state means we can have ID links anywhere (required by - ;; `org-brain') - org-id-track-globally t) + org-preview-latex-image-directory (concat doom-cache-dir "org-latex/")) (defvar org-modules '(;; ol-w3m @@ -1000,4 +996,10 @@ compelling reason, so..." (run-hooks 'org-load-hook)) :config + ;; Global ID state means we can have ID links anywhere. This is required for + ;; `org-brain', however. + (setq org-id-track-globally t + org-id-locations-file (concat org-directory ".orgids") + org-id-locations-file-relative t) + (add-hook 'org-open-at-point-functions #'doom-set-jump-h)) From 647750c18c4ae2c6e1fb610813b3b0cc2c1324bf Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Jan 2020 01:30:50 -0500 Subject: [PATCH 495/983] Add org heading support to bookmark.el --- modules/lang/org/config.el | 4 ++++ modules/lang/org/packages.el | 1 + 2 files changed, 5 insertions(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 34c49501b..cba098154 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -791,6 +791,10 @@ compelling reason, so..." :config (setq toc-org-hrefify-default "gh")) +(use-package! org-bookmark-heading ; add org heading support to bookmark.el + :after (:or bookmark org)) + + (use-package! org-bullets ; "prettier" bullets :hook (org-mode . org-bullets-mode)) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index 91b04d25b..09277f344 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -35,6 +35,7 @@ (package! ox-clip) (package! toc-org) (package! org-cliplink) +(package! org-bookmark-heading) (when (featurep! :editor evil +everywhere) (package! evil-org :recipe (:host github :repo "hlissner/evil-org-mode"))) From 37ba1d886484ec4f0a3bc28d29b7585f6063cd61 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Jan 2020 01:34:13 -0500 Subject: [PATCH 496/983] Bind 'SPC b {m,M}' & 'SPC s m' to bookmarks And move former 'SPC s m' (evil-show-marks) to 'SPC s r', since it is slightly less useful do to evil having native keys for jumping to marks: ` ' and :marks --- modules/config/default/+evil-bindings.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 368a300d2..16ea00723 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -333,6 +333,8 @@ :desc "Kill buffer" "k" #'kill-current-buffer :desc "Kill all buffers" "K" #'doom/kill-all-buffers :desc "Switch to last buffer" "l" #'evil-switch-to-windows-last-buffer + :desc "Set bookmark" "m" #'bookmark-set + :desc "Delete bookmark" "M" #'bookmark-delete :desc "Next buffer" "n" #'next-buffer :desc "New empty buffer" "N" #'evil-buffer-new :desc "Kill other buffers" "O" #'doom/kill-other-buffers @@ -586,13 +588,14 @@ :desc "Jump to visible link" "l" #'link-hint-open-link :desc "Jump to link" "L" #'ffap-menu :desc "Jump list" "j" #'evil-show-jumps - :desc "Jump to mark" "m" #'evil-show-marks + :desc "Jump to bookmark" "m" #'bookmark-jump :desc "Look up online" "o" #'+lookup/online :desc "Look up online (w/ prompt)" "O" #'+lookup/online-select :desc "Look up in local docsets" "k" #'+lookup/in-docsets :desc "Look up in all docsets" "K" #'+lookup/in-all-docsets :desc "Search project" "p" #'+default/search-project :desc "Search other project" "P" #'+default/search-other-project + :desc "Jump to mark" "r" #'evil-show-marks :desc "Search buffer" "s" #'swiper-isearch :desc "Search buffer for thing at point" "S" #'swiper-isearch-thing-at-point) From da8bce53bc8fee20cb4cecb28c3b5527b3182a0f Mon Sep 17 00:00:00 2001 From: How Si Wei Date: Fri, 3 Jan 2020 00:21:01 +0800 Subject: [PATCH 497/983] Enable smartparens-mode during pp-eval-expression --- core/core-editor.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index fd67394c1..5f0caf319 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -454,9 +454,9 @@ files, so we replace calls to `pp' with the much faster `prin1'." (add-hook! 'minibuffer-setup-hook (defun doom-init-smartparens-in-minibuffer-maybe-h () - "Enable `smartparens-mode' in the minibuffer, during `eval-expression' or -`evil-ex'." - (when (memq this-command '(eval-expression evil-ex)) + "Enable `smartparens-mode' in the minibuffer, during `eval-expression', +`pp-eval-expression' or `evil-ex'." + (when (memq this-command '(eval-expression pp-eval-expression evil-ex)) (smartparens-mode)))) ;; You're likely writing lisp in the minibuffer, therefore, disable these From 91665df40b6cc159420836db53a86ab69b0755a9 Mon Sep 17 00:00:00 2001 From: Undead Kernel Date: Wed, 1 Jan 2020 23:30:56 +0100 Subject: [PATCH 498/983] bindings: default emacs up to the state of the art Added `toggle` (C-c t), `code` (C-c c), `open` (C-c o) and `insert` (C-c i) bindings. Moved org bindings from the `C-c o` to the `C-c n` prefix. Updated the `file` (C-c f) and `quit` (C-c q) bindings. Removed the `terminal` bindings, now under `open` (C-c o). Removed standalone bindings for the REPL (now under `open` (C-c o)). --- modules/config/default/+emacs-bindings.el | 179 ++++++++++++++++------ 1 file changed, 132 insertions(+), 47 deletions(-) diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index be474329e..51c385589 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -25,28 +25,54 @@ (:prefix ("l" . "")) ; bound locally (:prefix ("!" . "checkers")) ; bound by flycheck + ;;; c --- code + (:prefix-map ("c" . "code") + :desc "Compile" "c" #'compile + :desc "Recompile" "C" #'recompile + :desc "Jump to definition" "d" #'+lookup/definition + :desc "Jump to references" "D" #'+lookup/references + :desc "Evaluate buffer/region" "e" #'+eval/buffer-or-region + :desc "Evaluate & replace region" "E" #'+eval/region-and-replace + :desc "Format buffer/region" "f" #'+format/region-or-buffer + :desc "Jump to documentation" "k" #'+lookup/documentation + :desc "Send to repl" "s" #'+eval/send-region-to-repl + :desc "Delete trailing whitespace" "w" #'delete-trailing-whitespace + :desc "Delete trailing newlines" "W" #'doom/delete-trailing-newlines + :desc "List errors" "x" #'flymake-show-diagnostics-buffer + (:when (featurep! :tools flycheck) + :desc "List errors" "x" #'flycheck-list-errors) + (:when (featurep! :tools lsp) + :desc "LSP Code actions" "a" #'lsp-execute-code-action + :desc "LSP Format buffer/region" "F" #'+default/lsp-format-region-or-buffer + :desc "LSP Organize imports" "i" #'lsp-organize-imports + :desc "LSP Rename" "r" #'lsp-rename + (:when (featurep! :completion ivy) + :desc "Jump to symbol in current workspace" "j" #'lsp-ivy-workspace-symbol + :desc "Jump to symbol in any workspace" "J" #'lsp-ivy-global-workspace-symbol) + (:when (featurep! :completion helm) + :desc "Jump to symbol in current workspace" "j" #'helm-lsp-workspace-symbol + :desc "Jump to symbol in any workspace" "J" #'helm-lsp-global-workspace-symbol))) + ;;; f --- file (:prefix-map ("f" . "file") - :desc "Open project editorconfig" "." #'editorconfig-find-current-editorconfig - :desc "Find other file" "a" #'projectile-find-other-file - :desc "Browse private config" "c" #'doom/open-private-config + :desc "Copy this file" "C" #'doom/copy-this-file :desc "Find file in private config" "C" #'doom/find-file-in-private-config - :desc "Find directory" "d" #'dired + :desc "Delete this file" "D" #'doom/delete-this-file :desc "Find file in emacs.d" "e" #'+default/find-in-emacsd :desc "Browse emacs.d" "E" #'+default/browse-emacsd - :desc "Find file from here" "f" (if (fboundp 'counsel-file-jump) #'counsel-file-jump #'find-file) - :desc "Find file in other project" "F" #'doom/browse-in-other-project - :desc "Delete this file" "K" #'doom/delete-this-file - :desc "Move this file" "m" #'doom/move-this-file - :desc "Find file in project" "p" #'projectile-find-file - :desc "Find file in other project" "P" #'doom/find-file-in-other-project + :desc "Find file from here" "f" #'+default/find-file-under-here + :desc "Rename/move this file" "m" #'doom/move-this-file + :desc "Browse private config" "p" #'doom/open-private-config + :desc "Browse private config" "P" #'doom/open-private-config :desc "Recent files" "r" #'recentf-open-files :desc "Recent project files" "R" #'projectile-recentf :desc "Sudo this file" "s" #'doom/sudo-this-file :desc "Sudo find file" "S" #'doom/sudo-find-file :desc "Yank filename" "y" #'+default/yank-buffer-filename :desc "Open scratch buffer" "x" #'doom/open-scratch-buffer - :desc "Open project scratch buffer" "X" #'doom/switch-to-scratch-buffer) + :desc "Open project scratch buffer" "X" #'doom/switch-to-scratch-buffer + (:when (featurep! :tools editorconfig) + :desc "Open project editorconfig" "." #'editorconfig-find-current-editorconfig)) ;;; r --- remote (:when (featurep! :tools upload) @@ -85,26 +111,72 @@ "i" #'+lookup/in-docsets "I" #'+lookup/in-all-docsets)) - ;;; o --- org - "o" nil ; we need to unbind it first as Org claims this - (:prefix-map ("o". "org") - :desc "Do what I mean" "o" #'+org/dwim-at-point - :desc "Display inline images" "i" #'org-display-inline-images - :desc "Search notes for symbol" "." #'+default/search-notes-for-symbol-at-point - (:prefix ("a" . "org agenda") - :desc "Agenda" "a" #'org-agenda - :desc "Todo list" "t" #'org-todo-list - :desc "Tags view" "m" #'org-tags-view - :desc "View search" "v" #'org-search-view) - :desc "Browse notes" "f" #'+default/browse-notes - :desc "Search org-directory" "s" #'+default/org-notes-search - :desc "Switch org buffers" "b" #'org-switchb - :desc "Capture" "c" #'org-capture - :desc "Goto capture" "C" #'org-capture-goto-target - :desc "Link store" "l" #'org-store-link - :desc "Sync org caldav" "S" #'org-caldav-sync - (:when (featurep! :lang org +pomodoro) - :desc "Pomodoro timer" "t" #'org-pomodoro)) + ;;; i --- insert + (:prefix-map ("i" . "insert") + :desc "Current file name" "f" #'+default/insert-file-path + :desc "Current file path" "F" (λ!! #'+default/insert-file-path t) + :desc "Snippet" "s" #'yas-insert-snippet + :desc "Unicode" "u" #'unicode-chars-list-chars + :desc "From clipboard" "y" #'+default/yank-pop) + + ;;; n --- notes + (:prefix-map ("n" . "notes") + :desc "Search notes for symbol" "." #'+default/search-notes-for-symbol-at-point + :desc "Org agenda" "a" #'org-agenda + :desc "Find file in notes" "f" #'+default/find-in-notes + :desc "Browse notes" "F" #'+default/browse-notes + :desc "Org store link" "l" #'org-store-link + :desc "Tags search" "m" #'org-tags-view + :desc "Org capture" "n" #'org-capture + :desc "Goto capture" "N" #'org-capture-goto-target + :desc "Active org-clock" "o" #'org-clock-goto + :desc "Todo list" "t" #'org-todo-list + :desc "Search notes" "s" #'+default/org-notes-search + :desc "Search org agenda headlines" "S" #'+default/org-notes-headlines + :desc "View search" "v" #'org-search-view + :desc "Org export to clipboard" "y" #'+org/export-to-clipboard + :desc "Org export to clipboard as RTF" "Y" #'+org/export-to-clipboard-as-rich-text + (:when (featurep! :lang org +journal) + (:prefix ("j" . "journal") + :desc "New Entry" "j" #'org-journal-new-entry + :desc "Search Forever" "s" #'org-journal-search-forever))) + + ;;; o --- open + "o" nil ; we need to unbind it first as Org claims this prefix + (:prefix-map ("o" . "open") + :desc "Browser" "b" #'browse-url-of-file + :desc "Debugger" "d" #'+debugger/start + :desc "New frame" "f" #'make-frame + :desc "REPL" "r" #'+eval/open-repl-other-window + :desc "REPL (same window)" "R" #'+eval/open-repl-same-window + :desc "Dired" "-" #'dired-jump + (:when (featurep! :ui neotree) + :desc "Project sidebar" "p" #'+neotree/open + :desc "Find file in project sidebar" "P" #'+neotree/find-this-file) + (:when (featurep! :ui treemacs) + :desc "Project sidebar" "p" #'+treemacs/toggle + :desc "Find file in project rsidebar" "P" #'+treemacs/find-file) + (:when (featurep! :term shell) + :desc "Toggle shell popup" "t" #'+shell/toggle + :desc "Open shell here" "T" #'+shell/here) + (:when (featurep! :term term) + :desc "Toggle terminal popup" "t" #'+term/toggle + :desc "Open terminal here" "T" #'+term/here) + (:when (featurep! :term vterm) + :desc "Toggle vterm popup" "t" #'+vterm/toggle + :desc "Open vterm here" "T" #'+vterm/here) + (:when (featurep! :term eshell) + :desc "Toggle eshell popup" "e" #'+eshell/toggle + :desc "Open eshell here" "E" #'+eshell/here) + (:when (featurep! :tools macos) + :desc "Reveal in Finder" "o" #'+macos/reveal-in-finder + :desc "Reveal project in Finder" "O" #'+macos/reveal-project-in-finder + :desc "Send to Transmit" "u" #'+macos/send-to-transmit + :desc "Send project to Transmit" "U" #'+macos/send-project-to-transmit + :desc "Send to Launchbar" "l" #'+macos/send-to-launchbar + :desc "Send project to Launchbar" "L" #'+macos/send-project-to-launchbar) + (:when (featurep! :tools docker) + :desc "Docker" "D" #'docker)) ;;; p --- project (:prefix ("p" . "project") @@ -119,10 +191,16 @@ ;;; q --- quit/restart (:prefix-map ("q" . "quit/restart") + :desc "Restart emacs server" "d" #'+default/restart-server + :desc "Delete frame" "f" #'delete-frame + :desc "Clear current frame" "F" #'doom/kill-all-buffers + :desc "Kill Emacs (and daemon)" "K" #'save-buffers-kill-emacs :desc "Quit Emacs" "q" #'kill-emacs :desc "Save and quit Emacs" "Q" #'save-buffers-kill-terminal - (:when (featurep! :ui workspaces) - :desc "Quit Emacs & forget session" "X" #'+workspace/kill-session-and-quit) + :desc "Quick save current session" "s" #'doom/quicksave-session + :desc "Restore last session" "l" #'doom/quickload-session + :desc "Save session to file" "S" #'doom/save-session + :desc "Restore session from file" "L" #'doom/load-session :desc "Restart & restore Emacs" "r" #'doom/restart-and-restore :desc "Restart Emacs" "R" #'doom/restart) @@ -135,16 +213,27 @@ :desc "Create Temp Template" "c" #'aya-create :desc "Use Temp Template" "e" #'aya-expand) - (:prefix-map ("t" . "terminal") - (:when (featurep! :term term) - :desc "Toggle term popup" "t" #'+term/toggle - :desc "Open term here" "T" #'+term/here) - (:when (featurep! :term vterm) - :desc "Toggle vterm popup" "t" #'+vterm/toggle - :desc "Open vterm here" "T" #'+vterm/here) - (:when (featurep! :term eshell) - :desc "Toggle eshell popup" "t" #'+eshell/toggle - :desc "Open eshell here" "T" #'+eshell/here)) + ;;; t --- toggle + (:prefix-map ("t" . "toggle") + :desc "Big mode" "b" #'doom-big-font-mode + :desc "Flymake" "f" #'flymake-mode + :desc "Frame fullscreen" "F" #'toggle-frame-fullscreen + :desc "Indent style" "I" #'doom/toggle-indent-style + :desc "Line numbers" "l" #'doom/toggle-line-numbers + :desc "Word-wrap mode" "w" #'+word-wrap-mode + (:when (featurep! :tools flycheck) + :desc "Flycheck" "f" #'flycheck-mode) + (:when (featurep! :ui indent-guides) + :desc "Indent guides" "i" #'highlight-indent-guides-mode) + (:when (featurep! :lang org +present) + :desc "org-tree-slide mode" "p" #'+org-present/start) + :desc "Read-only mode" "r" #'read-only-mode + (:when (featurep! :tools flyspell) + :desc "Flyspell" "s" #'flyspell-mode) + (:when (featurep! :lang org +pomodoro) + :desc "Pomodoro timer" "t" #'org-pomodoro) + (:when (featurep! :ui zen) + :desc "Zen mode" "z" #'writeroom-mode)) ;;; v --- versioning (:prefix-map ("v" . "versioning") @@ -408,10 +497,6 @@ "C-`" #'+popup/toggle "C-~" #'+popup/raise) - ;;; repl - "C-c C-z" #'+eval/open-repl-other-window - "C-c C-S-z" #'+eval/open-repl-same-window - ;;; smartparens (:after smartparens :map smartparens-mode-map From a9763fe76be4a5bd0f50e6c7d83c24d213ffcb93 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Jan 2020 16:22:52 -0500 Subject: [PATCH 499/983] Fix vestigial reference to +org-attach/uri --- modules/lang/org/autoload/contrib-dragndrop.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/autoload/contrib-dragndrop.el b/modules/lang/org/autoload/contrib-dragndrop.el index b54831cf6..6dfb31157 100644 --- a/modules/lang/org/autoload/contrib-dragndrop.el +++ b/modules/lang/org/autoload/contrib-dragndrop.el @@ -5,7 +5,7 @@ (defun +org-dragndrop-download-dnd-fn (uri action) "Handle file links and base64 data uris." (if (eq major-mode 'org-mode) - (+org-attach/uri uri) + (+org/attach-file-and-insert-link uri) (let ((dnd-protocol-alist (rassq-delete-all '+org-attach-download-dnd (copy-alist dnd-protocol-alist)))) From dca166f79c63a2d4ab49cd870413986ef62cae99 Mon Sep 17 00:00:00 2001 From: Sean Farley Date: Thu, 2 Jan 2020 15:40:29 -0800 Subject: [PATCH 500/983] irc: fix logic for creating a workspace The `+workspace-switch` logic takes care of the check, so let's remove it. --- modules/app/irc/autoload/irc.el | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/app/irc/autoload/irc.el b/modules/app/irc/autoload/irc.el index 699422c4a..b560563fe 100644 --- a/modules/app/irc/autoload/irc.el +++ b/modules/app/irc/autoload/irc.el @@ -4,7 +4,6 @@ (defun +irc-setup-wconf (&optional inhibit-workspace) (when (and (featurep! :ui workspaces) - (+workspace-exists-p +irc--workspace-name) (not inhibit-workspace)) (+workspace-switch +irc--workspace-name 'auto-create)) (let ((buffers (doom-buffers-in-mode 'circe-mode nil t))) From 56ef4d8800c6eb124d30d8b9bfd7719d85ec877e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Jan 2020 19:52:10 -0500 Subject: [PATCH 501/983] Use powerthesaurus-lookup-word-dwim in +lookup/word-synonyms --- modules/tools/lookup/autoload/lookup.el | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/modules/tools/lookup/autoload/lookup.el b/modules/tools/lookup/autoload/lookup.el index ceba1552b..9e21437e6 100644 --- a/modules/tools/lookup/autoload/lookup.el +++ b/modules/tools/lookup/autoload/lookup.el @@ -353,18 +353,4 @@ Otherwise, falls back on `find-file-at-point'." (unless +lookup-dictionary-enable-online ;; TODO Implement offline synonyms backend (user-error "No offline dictionary implemented yet")) - (require 'request) - (require 'powerthesaurus) - (request - (powerthesaurus-compose-url identifier) - :parser (lambda () (libxml-parse-html-region (point) (point-max))) - :headers '(("User-Agent" . "Chrome/74.0.3729.169")) - :success (cl-function - (lambda (&key data &allow-other-keys) - ;; in order to allow users to quit powerthesaurus prompt - ;; with C-g, we need to wrap callback with this - (with-local-quit - (funcall (powerthesaurus-choose-callback - (region-beginning) (region-end)) - (powerthesaurus-pick-synonym data) - identifier)))))) + (powerthesaurus-lookup-word-dwim)) From 5fe658e5838c491df45d0dc9bd3627e6906eca79 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Jan 2020 19:53:49 -0500 Subject: [PATCH 502/983] Rename synonym/dictionary definition lookup commands --- modules/tools/lookup/autoload/lookup.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tools/lookup/autoload/lookup.el b/modules/tools/lookup/autoload/lookup.el index 9e21437e6..7ed72136d 100644 --- a/modules/tools/lookup/autoload/lookup.el +++ b/modules/tools/lookup/autoload/lookup.el @@ -328,7 +328,7 @@ Otherwise, falls back on `find-file-at-point'." ;;; Dictionary ;;;###autoload -(defun +lookup/word-definition (identifier &optional arg) +(defun +lookup/dictionary-definition (identifier &optional arg) "Look up the definition of the word at point (or selection)." (interactive (list (+lookup-symbol-or-region) @@ -343,7 +343,7 @@ Otherwise, falls back on `find-file-at-point'." ((user-error "No offline dictionary defined yet")))) ;;;###autoload -(defun +lookup/word-synonyms (identifier &optional arg) +(defun +lookup/synonyms (identifier &optional arg) "Look up and insert a synonym for the word at point (or selection)." (interactive (list (+lookup-symbol-or-region) From 6938f8b97dff11c232bd721aa0a7f2cdf8999962 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Jan 2020 20:03:50 -0500 Subject: [PATCH 503/983] Fix references to old dictionary/thesaurus lookup commands And pass word explicitly to powerthesaurus. --- modules/tools/lookup/autoload/lookup.el | 9 ++++++++- modules/tools/lookup/config.el | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/tools/lookup/autoload/lookup.el b/modules/tools/lookup/autoload/lookup.el index 7ed72136d..270b39227 100644 --- a/modules/tools/lookup/autoload/lookup.el +++ b/modules/tools/lookup/autoload/lookup.el @@ -353,4 +353,11 @@ Otherwise, falls back on `find-file-at-point'." (unless +lookup-dictionary-enable-online ;; TODO Implement offline synonyms backend (user-error "No offline dictionary implemented yet")) - (powerthesaurus-lookup-word-dwim)) + ;; Necessary because powerthesaurus lacks a way to pass text directly + (with-temp-buffer + (insert identifier) + ;; HACK I'd rather use `+lookup-symbol-or-region' for consistency, but + ;; powerthesaurus lacks a simple way to pass a string directly to any + ;; of its lookup functions, so... + (cl-letf (((symbol-function 'use-region-p) (lambda () t))) + (powerthesaurus-lookup-word (point-min) (point-max))))) diff --git a/modules/tools/lookup/config.el b/modules/tools/lookup/config.el index 017619f84..f441031ea 100644 --- a/modules/tools/lookup/config.el +++ b/modules/tools/lookup/config.el @@ -193,5 +193,5 @@ See https://github.com/magit/ghub/issues/81" (when (featurep! +dictionary) (define-key! text-mode-map - [remap +lookup/definition] #'+lookup/word-definition - [remap +lookup/references] #'+lookup/word-synonyms)) + [remap +lookup/definition] #'+lookup/dictionary-definition + [remap +lookup/references] #'+lookup/synonyms)) From 8f6161f4802d2d0f5b85fdbf24f494cec5b037da Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Jan 2020 21:08:04 -0500 Subject: [PATCH 504/983] Generalize lookup thing-at-pt fn; fix dict/synonym commands --- modules/tools/lookup/autoload/lookup.el | 43 ++++++++++++------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/modules/tools/lookup/autoload/lookup.el b/modules/tools/lookup/autoload/lookup.el index 270b39227..9b8e697b7 100644 --- a/modules/tools/lookup/autoload/lookup.el +++ b/modules/tools/lookup/autoload/lookup.el @@ -163,13 +163,18 @@ This can be passed nil as its second argument to unset handlers for MODES. e.g. result))) ;;;###autoload -(defun +lookup-symbol-or-region (&optional initial) - "Grab the symbol at point or selected region." +(defun +lookup-thing-or-region (&optional initial thing) + "Return INITIAL, grab the THING at point, or contents of selection. + +If THING is nil, uses `xref-backend-identifier-at-point' (like symbol, but +smarter)." (cond ((stringp initial) initial) ((use-region-p) (buffer-substring-no-properties (region-beginning) (region-end))) + (thing + (thing-at-point thing t)) ((require 'xref nil t) ;; A little smarter than using `symbol-at-point', though in most cases, ;; xref ends up using `symbol-at-point' anyway. @@ -245,7 +250,7 @@ Each function in `+lookup-definition-functions' is tried until one changes the point or current buffer. Falls back to dumb-jump, naive ripgrep/the_silver_searcher text search, then `evil-goto-definition' if evil-mode is active." - (interactive (list (+lookup-symbol-or-region) + (interactive (list (+lookup-thing-or-region) current-prefix-arg)) (cond ((null identifier) (user-error "Nothing under point")) ((+lookup--jump-to :definition identifier nil arg)) @@ -258,7 +263,7 @@ evil-mode is active." Tries each function in `+lookup-references-functions' until one changes the point and/or current buffer. Falls back to a naive ripgrep/the_silver_searcher search otherwise." - (interactive (list (+lookup-symbol-or-region) + (interactive (list (+lookup-thing-or-region) current-prefix-arg)) (cond ((null identifier) (user-error "Nothing under point")) ((+lookup--jump-to :references identifier nil arg)) @@ -271,7 +276,7 @@ search otherwise." First attempts the :documentation handler specified with `set-lookup-handlers!' for the current mode/buffer (if any), then falls back to the backends in `+lookup-documentation-functions'." - (interactive (list (+lookup-symbol-or-region) + (interactive (list (+lookup-thing-or-region) current-prefix-arg)) (cond ((+lookup--jump-to :documentation identifier #'pop-to-buffer arg)) ((user-error "Couldn't find documentation for %S" identifier)))) @@ -292,7 +297,7 @@ Otherwise, falls back on `find-file-at-point'." (or (ffap-guesser) (ffap-read-file-or-url (if ffap-url-regexp "Find file or URL: " "Find file: ") - (+lookup-symbol-or-region)))))) + (+lookup-thing-or-region)))))) (require 'ffap) (cond ((not path) (call-interactively #'find-file-at-point)) @@ -331,33 +336,27 @@ Otherwise, falls back on `find-file-at-point'." (defun +lookup/dictionary-definition (identifier &optional arg) "Look up the definition of the word at point (or selection)." (interactive - (list (+lookup-symbol-or-region) + (list (or (+lookup-thing-or-region nil 'word) + (read-string "Look up in dictionary: ")) current-prefix-arg)) - (unless (featurep! +dictionary) - (user-error "The +dictionary feature hasn't be enabled on :tools lookup module")) (cond ((and IS-MAC (require 'osx-dictionary nil t)) (osx-dictionary--view-result identifier)) - (+lookup-dictionary-enable-online + ((and +lookup-dictionary-enable-online (require 'define-word nil t)) + (message "Looking up definition of %S" identifier) (define-word identifier nil arg)) ;; TODO Implement offline dictionary backend - ((user-error "No offline dictionary defined yet")))) + ((user-error "No dictionary backend is available")))) ;;;###autoload (defun +lookup/synonyms (identifier &optional arg) "Look up and insert a synonym for the word at point (or selection)." (interactive - (list (+lookup-symbol-or-region) + (list (+lookup-thing-or-region nil 'word) ; TODO actually use this current-prefix-arg)) - (unless (featurep! +dictionary) - (user-error "The +dictionary feature hasn't be enabled on :tools lookup module")) + (unless (require 'powerthesaurus nil t) + (user-error "No dictionary backend is available")) (unless +lookup-dictionary-enable-online ;; TODO Implement offline synonyms backend (user-error "No offline dictionary implemented yet")) - ;; Necessary because powerthesaurus lacks a way to pass text directly - (with-temp-buffer - (insert identifier) - ;; HACK I'd rather use `+lookup-symbol-or-region' for consistency, but - ;; powerthesaurus lacks a simple way to pass a string directly to any - ;; of its lookup functions, so... - (cl-letf (((symbol-function 'use-region-p) (lambda () t))) - (powerthesaurus-lookup-word (point-min) (point-max))))) + (message "Looking up synonyms for %S" identifier) + (powerthesaurus-lookup-word-dwim)) From 7f654f156614137ed5cca23907229e459969acfd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Jan 2020 21:09:37 -0500 Subject: [PATCH 505/983] Bind SPC s {t,T} for dictionary/thesaurus lookups --- modules/config/default/+evil-bindings.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 5bbf0648b..29fee16e2 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -598,7 +598,9 @@ :desc "Search other project" "P" #'+default/search-other-project :desc "Jump to mark" "r" #'evil-show-marks :desc "Search buffer" "s" #'swiper-isearch - :desc "Search buffer for thing at point" "S" #'swiper-isearch-thing-at-point) + :desc "Search buffer for thing at point" "S" #'swiper-isearch-thing-at-point + :desc "Dictionary" "t" #'+lookup/dictionary-definition + :desc "Thesaurus" "T" #'+lookup/synonyms) ;;; t --- toggle (:prefix-map ("t" . "toggle") From 10f7c9fbcc77d71ffac8e5ad6133d39f09e7aa4b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Jan 2020 21:10:38 -0500 Subject: [PATCH 506/983] ispell-dictionary = en_US Set a default so we at least don't get stringp errors on startup. --- modules/tools/flyspell/config.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/tools/flyspell/config.el b/modules/tools/flyspell/config.el index ef36a7271..3636d8c0c 100644 --- a/modules/tools/flyspell/config.el +++ b/modules/tools/flyspell/config.el @@ -3,6 +3,8 @@ ;; ;;; Packages +(defvar ispell-dictionary "en_US") + (after! ispell (add-to-list 'ispell-extra-args "--dont-tex-check-comments") From 195dfda045138ee710fdc7a04661ff47fdc3a6b1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Jan 2020 21:13:31 -0500 Subject: [PATCH 507/983] Minor refactors & comment revision --- .gitignore | 1 + core/core.el | 3 ++- core/packages.el | 2 +- modules/lang/web/+css.el | 1 - modules/ui/workspaces/autoload/workspaces.el | 11 ++++++----- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index d733b1c25..3e7eda3d5 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ modules/private .cask/ cask/ elpa/ +test/.local* # emacs tempfiles that shouldn't be there .mc-lists.el diff --git a/core/core.el b/core/core.el index 964aa479a..226ce8e6d 100644 --- a/core/core.el +++ b/core/core.el @@ -196,7 +196,8 @@ users).") (when IS-WINDOWS (setq abbreviated-home-dir "\\`'")) -;; Don't litter `doom-emacs-dir' +;; Don't litter `doom-emacs-dir'. We don't use `no-littering' because it's a +;; mote too opinionated for our needs. (setq abbrev-file-name (concat doom-local-dir "abbrev.el") async-byte-compile-log-file (concat doom-etc-dir "async-bytecomp.log") bookmark-default-file (concat doom-etc-dir "bookmarks") diff --git a/core/packages.el b/core/packages.el index 13da63a94..5f4bbeaba 100644 --- a/core/packages.el +++ b/core/packages.el @@ -21,7 +21,7 @@ (package! pcre2el) (package! smartparens) (package! so-long - :built-in 'prefer + :built-in 'prefer ; included in Emacs 27+ ;; REVIEW so-long is slated to be published to ELPA eventually, but until then ;; I've created my own mirror for it because git.savannah.gnu.org runs on a ;; potato. diff --git a/modules/lang/web/+css.el b/modules/lang/web/+css.el index 7f8162814..f182a6ef8 100644 --- a/modules/lang/web/+css.el +++ b/modules/lang/web/+css.el @@ -36,7 +36,6 @@ (use-package! counsel-css :when (featurep! :completion ivy) - :commands counsel-css :hook (css-mode . counsel-css-imenu-setup) :init (map! :map (css-mode-map scss-mode-map less-css-mode-map) diff --git a/modules/ui/workspaces/autoload/workspaces.el b/modules/ui/workspaces/autoload/workspaces.el index a367f2664..547998dd8 100644 --- a/modules/ui/workspaces/autoload/workspaces.el +++ b/modules/ui/workspaces/autoload/workspaces.el @@ -174,11 +174,12 @@ throws an error." (+workspace-new name) (error "%s is not an available workspace" name))) (let ((old-name (+workspace-current-name))) - (setq +workspace--last - (or (and (not (string= old-name persp-nil-name)) - old-name) - +workspaces-main)) - (persp-frame-switch name) + (unless (equal old-name name) + (setq +workspace--last + (or (and (not (string= old-name persp-nil-name)) + old-name) + +workspaces-main)) + (persp-frame-switch name)) (equal (+workspace-current-name) name))) From ec7a067109853288c0372d168d1dd86e1f831683 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Jan 2020 21:13:50 -0500 Subject: [PATCH 508/983] Enable ligatures on emacs-mac if pretty-code is enabled No longer necessary to enable a font ligature flag for it. --- modules/ui/pretty-code/config.el | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/ui/pretty-code/config.el b/modules/ui/pretty-code/config.el index 0299a2aba..a1f942bc0 100644 --- a/modules/ui/pretty-code/config.el +++ b/modules/ui/pretty-code/config.el @@ -82,14 +82,11 @@ Otherwise it builds `prettify-code-symbols-alist' according to (add-hook 'after-change-major-mode-hook #'+pretty-code-init-pretty-symbols-h) -;; Font-specific ligature support -(cond ((and IS-MAC - (fboundp 'mac-auto-operator-composition-mode) - (or (featurep! +fira) - (featurep! +iosevka) - (featurep! +hasklig) - (featurep! +pragmata-pro))) +;; The emacs-mac build of Emacs appear to have built-in support for ligatures, +;; so use that instead if this module is enabled. +(cond ((and IS-MAC (fboundp 'mac-auto-operator-composition-mode)) (mac-auto-operator-composition-mode)) + ;; Font-specific ligature support ((featurep! +fira) (load! "+fira")) ((featurep! +iosevka) From d426349f2126db66cbf964f4edabb8f5a30f21fd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Jan 2020 21:54:28 -0500 Subject: [PATCH 509/983] ui/zen: add +zen-text-scale variable --- modules/ui/zen/config.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/ui/zen/config.el b/modules/ui/zen/config.el index 41db5ea5b..ae55cb76c 100644 --- a/modules/ui/zen/config.el +++ b/modules/ui/zen/config.el @@ -3,6 +3,9 @@ (defvar +zen-mixed-pitch-modes '(markdown-mode org-mode) "What major-modes to enable `mixed-pitch-mode' in with `writeroom-mode'.") +(defvar +zen-text-scale 1 + "The text-scaling level for `writeroom-mode'.") + ;; ;;; Packages @@ -11,6 +14,12 @@ (setq writeroom-fullscreen-effect nil writeroom-maximize-window nil) + (add-hook! 'writeroom-mode-hook + (defun +zen-enable-mixed-pitch-mode-h () + "Enable `mixed-pitch-mode' when in `+zen-mixed-pitch-modes'." + (when (/= +zen-text-scale 0) + (text-scale-set (if writeroom-mode +zen-text-scale 0))))) + ;; Adjust margins when text size is changed (advice-add #'text-scale-adjust :after #'visual-fill-column-adjust)) From 760aa50c44fefe004afe77e27a4dadc60eaab0e5 Mon Sep 17 00:00:00 2001 From: Foldex Date: Thu, 2 Jan 2020 23:18:19 -0500 Subject: [PATCH 510/983] ui/doom-dashboard: De-hardcode dashboard faces --- modules/ui/doom-dashboard/README.org | 25 ++++++++++++ modules/ui/doom-dashboard/config.el | 60 +++++++++++++++++++++------- 2 files changed, 70 insertions(+), 15 deletions(-) diff --git a/modules/ui/doom-dashboard/README.org b/modules/ui/doom-dashboard/README.org index 68caf7cc7..7120ea470 100644 --- a/modules/ui/doom-dashboard/README.org +++ b/modules/ui/doom-dashboard/README.org @@ -10,6 +10,7 @@ - [[#configuration][Configuration]] - [[#a-custom-banner][A custom banner]] - [[#adding-text-to-the-dashboard][Adding text to the dashboard]] + - [[#customizing-faces][Customizing Faces]] * Description This module adds a minimalistic, Atom-inspired dashboard to Emacs. @@ -61,3 +62,27 @@ whatever you like to Doom's splash screen. Keep in mind that inserting text from expensive sources, e.g. your org agenda, will negate most of Doom's startup benefits. #+end_quote + +** Customizing Faces +Doom's dashboard defaults to inheriting faces set by the current theme. If you wish +to customize it independently of the theme (or just inherit a different color +from the theme) you can make use of ~custom-set-faces!~ or ~custom-theme-set-faces!~ +#+BEGIN_SRC elisp +(custom-set-faces! + '(doom-dashboard-banner :foreground "red" :background "#000000" :weight bold) + '(doom-dashboard-footer :inherit font-lock-constant-face) + '(doom-dashboard-footer-icon :inherit all-the-icons-red) + '(doom-dashboard-loaded :inherit font-lock-warning-face) + '(doom-dashboard-menu-desc :inherit font-lock-string-face) + '(doom-dashboard-menu-title :inherit font-lock-function-name-face)) +#+END_SRC +or for a per-theme setting +#+BEGIN_SRC elisp +(custom-theme-set-faces! 'doom-tomorrow-night + '(doom-dashboard-banner :foreground "red" :background "#000000" :weight bold) + '(doom-dashboard-footer :inherit font-lock-constant-face) + '(doom-dashboard-footer-icon :inherit all-the-icons-red) + '(doom-dashboard-loaded :inherit font-lock-warning-face) + '(doom-dashboard-menu-desc :inherit font-lock-string-face) + '(doom-dashboard-menu-title :inherit font-lock-function-name-face)) +#+END_SRC diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index d158b9205..caa6896e7 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -43,32 +43,32 @@ Possible values: (defvar +doom-dashboard-menu-sections '(("Reload last session" - :icon (all-the-icons-octicon "history" :face 'font-lock-keyword-face) + :icon (all-the-icons-octicon "history" :face 'doom-dashboard-menu-title) :when (cond ((require 'persp-mode nil t) (file-exists-p (expand-file-name persp-auto-save-fname persp-save-dir))) ((require 'desktop nil t) (file-exists-p (desktop-full-file-name)))) - :face (:inherit (font-lock-keyword-face bold)) + :face (:inherit (doom-dashboard-menu-title bold)) :action doom/quickload-session) ("Open org-agenda" - :icon (all-the-icons-octicon "calendar" :face 'font-lock-keyword-face) + :icon (all-the-icons-octicon "calendar" :face 'doom-dashboard-menu-title) :when (fboundp 'org-agenda) :action org-agenda) ("Recently opened files" - :icon (all-the-icons-octicon "file-text" :face 'font-lock-keyword-face) + :icon (all-the-icons-octicon "file-text" :face 'doom-dashboard-menu-title) :action recentf-open-files) ("Open project" - :icon (all-the-icons-octicon "briefcase" :face 'font-lock-keyword-face) + :icon (all-the-icons-octicon "briefcase" :face 'doom-dashboard-menu-title) :action projectile-switch-project) ("Jump to bookmark" - :icon (all-the-icons-octicon "bookmark" :face 'font-lock-keyword-face) + :icon (all-the-icons-octicon "bookmark" :face 'doom-dashboard-menu-title) :action bookmark-jump) ("Open private configuration" - :icon (all-the-icons-octicon "tools" :face 'font-lock-keyword-face) + :icon (all-the-icons-octicon "tools" :face 'doom-dashboard-menu-title) :when (file-directory-p doom-private-dir) :action doom/open-private-config) ("Open documentation" - :icon (all-the-icons-octicon "book" :face 'font-lock-keyword-face) + :icon (all-the-icons-octicon "book" :face 'doom-dashboard-menu-title) :action doom/help)) "An alist of menu buttons used by `doom-dashboard-widget-shortmenu'. Each element is a cons cell (LABEL . PLIST). LABEL is a string to display after the @@ -133,6 +133,36 @@ PLIST can have the following properties: (add-hook 'doom-init-ui-hook #'+doom-dashboard-init-h) +;; +;;; Faces +(defgroup doom-dashboard nil + "Manage how doom-dashboard is coloured and themed." + :prefix "doom-dashboard" + :group 'doom-themes) + +(defface doom-dashboard-banner '((t (:inherit font-lock-comment-face))) + "Face used for the DOOM banner on the dashboard" + :group 'doom-dashboard) + +(defface doom-dashboard-footer '((t (:inherit font-lock-keyword-face))) + "Face used for the footer on the dashboard" + :group 'doom-dashboard) + +(defface doom-dashboard-footer-icon '((t (:inherit all-the-icons-green))) + "Face used for the icon of the footer on the dashboard" + :group 'doom-dashboard) + +(defface doom-dashboard-loaded '((t (:inherit font-lock-comment-face))) + "Face used for the loaded packages benchmark" + :group 'doom-dashboard) + +(defface doom-dashboard-menu-desc '((t (:inherit font-lock-constant-face))) + "Face used for the key description of menu widgets on the dashboard" + :group 'doom-dashboard) + +(defface doom-dashboard-menu-title '((t (:inherit font-lock-keyword-face))) + "Face used for the title of menu widgets on the dashboard" + :group 'doom-dashboard) ;; ;;; Major mode @@ -352,7 +382,7 @@ controlled by `+doom-dashboard-pwd-policy'." (let ((point (point))) (mapc (lambda (line) (insert (propertize (+doom-dashboard--center +doom-dashboard--width line) - 'face 'font-lock-comment-face) " ") + 'face 'doom-dashboard-banner) " ") (insert "\n")) '("================= =============== =============== ======== ========" "\\\\ . . . . . . .\\\\ //. . . . . . .\\\\ //. . . . . . .\\\\ \\\\. . .\\\\// . . //" @@ -397,7 +427,7 @@ controlled by `+doom-dashboard-pwd-policy'." (+doom-dashboard--center +doom-dashboard--width (doom-display-benchmark-h 'return)) - 'face 'font-lock-comment-face) + 'face 'doom-dashboard-loaded) "\n")) (defun doom-dashboard-widget-shortmenu () @@ -422,11 +452,11 @@ controlled by `+doom-dashboard-pwd-policy'." `(lambda (_) (call-interactively (or (command-remapping #',action) #',action))) - 'face (or face 'font-lock-keyword-face) + 'face (or face 'doom-dashboard-menu-title) 'follow-link t 'help-echo (format "%s (%s)" label - (propertize (symbol-name action) 'face 'font-lock-constant-face))) + (propertize (symbol-name action) 'face 'doom-dashboard-menu-desc))) (format "%-37s" (buffer-string))) ;; Lookup command keys dynamically (or (when-let (key (where-is-internal action nil t)) @@ -438,7 +468,7 @@ controlled by `+doom-dashboard-pwd-policy'." (upcase (if (< (length str) 3) str (substring str 0 3)))))) - (propertize (buffer-string) 'face 'font-lock-constant-face))) + (propertize (buffer-string) 'face 'doom-dashboard-menu-desc))) "")))) (if (display-graphic-p) "\n\n" @@ -450,8 +480,8 @@ controlled by `+doom-dashboard-pwd-policy'." (+doom-dashboard--center (- +doom-dashboard--width 2) (with-temp-buffer - (insert-text-button (or (all-the-icons-octicon "octoface" :face 'all-the-icons-green :height 1.3 :v-adjust -0.15) - (propertize "github" 'face 'font-lock-keyword-face)) + (insert-text-button (or (all-the-icons-octicon "octoface" :face 'doom-dashboard-footer-icon :height 1.3 :v-adjust -0.15) + (propertize "github" 'face 'doom-dashboard-footer)) 'action (lambda (_) (browse-url "https://github.com/hlissner/doom-emacs")) 'follow-link t 'help-echo "Open Doom Emacs github page") From 27bf3c85b5fe821f1ea8dde00cad9437aa733cc4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 3 Jan 2020 02:39:47 -0500 Subject: [PATCH 511/983] Generalize thing-at-point & region functions --- core/autoload/help.el | 5 +- core/autoload/text.el | 54 ++++++++++++++++++++++ modules/completion/ivy/autoload/ivy.el | 26 +++++------ modules/config/default/autoload/default.el | 2 +- modules/config/default/autoload/search.el | 15 ++---- modules/emacs/vc/autoload/vc.el | 6 +-- modules/tools/lookup/autoload/lookup.el | 30 +++--------- 7 files changed, 80 insertions(+), 58 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 91832fa1d..ca8f1f18f 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -621,10 +621,7 @@ config blocks in your private config." (defun doom--help-search-prompt (prompt) - (let ((query - (if (use-region-p) - (buffer-substring-no-properties (region-beginning) (region-end)) - (or (thing-at-point 'symbol t) "")))) + (let ((query (doom-thing-at-point-or-region))) (if (featurep 'counsel) query (read-string prompt query 'git-grep query)))) diff --git a/core/autoload/text.el b/core/autoload/text.el index 88ecc3208..3bd0dfcc1 100644 --- a/core/autoload/text.el +++ b/core/autoload/text.el @@ -57,9 +57,63 @@ POS defaults to the current position." ;;;###autoload (defun doom-point-in-string-or-comment-p (&optional pos) "Return non-nil if POS is in a string or comment." + (declare (side-effect-free t)) (or (doom-point-in-string-p pos) (doom-point-in-comment-p pos))) +;;;###autoload +(defun doom-region-active-p () + "Return non-nil if selection is active. +Detects evil visual mode as well." + (declare (side-effect-free t)) + (or (use-region-p) + (and (bound-and-true-p evil-local-mode) + (evil-visual-state-p)))) + +;;;###autoload +(defun doom-region-beginning () + "Return beginning position of selection. +Uses `evil-visual-beginning' if available." + (declare (side-effect-free t)) + (if (bound-and-true-p evil-local-mode) + evil-visual-beginning + (region-beginning))) + +;;;###autoload +(defun doom-region-end () + "Return end position of selection. +Uses `evil-visual-end' if available." + (declare (side-effect-free t)) + (if (bound-and-true-p evil-local-mode) + evil-visual-end + (region-end))) + +;;;###autoload +(defun doom-thing-at-point-or-region (&optional thing prompt) + "Grab the current selection, THING at point, or xref identifier at point. + +Returns THING if it is a string. Otherwise, if nothing is found at point and +PROMPT is non-nil, prompt for a string (if PROMPT is a string it'll be used as +the prompting string). Returns nil if all else fails. + +NOTE: Don't use THING for grabbing symbol-at-point. The xref fallback is smarter +in some cases." + (declare (side-effect-free t)) + (cond ((stringp thing) + thing) + ((doom-region-active-p) + (buffer-substring-no-properties + (doom-region-beginning) + (doom-region-end))) + (thing + (thing-at-point thing t)) + ((require 'xref nil t) + ;; A little smarter than using `symbol-at-point', though in most cases, + ;; xref ends up using `symbol-at-point' anyway. + (xref-backend-identifier-at-point (xref-find-backend))) + (prompt + (read-string (if (stringp prompt) prompt ""))))) + ;; ;;; Commands diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index b453c405a..fdabf446c 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -264,21 +264,17 @@ The point of this is to avoid Emacs locking up indexing massive file trees." " " (mapconcat #'shell-quote-argument args " ")))) (counsel-rg - (or (if query query) - (when (use-region-p) - (let ((beg (or (bound-and-true-p evil-visual-beginning) (region-beginning))) - (end (or (bound-and-true-p evil-visual-end) (region-end)))) - (when (> (abs (- end beg)) 1) - (let ((query (buffer-substring-no-properties beg end))) - ;; Escape characters that are special to ivy searches - (replace-regexp-in-string "[! |]" (lambda (substr) - (cond ((and (string= substr " ") - (not (featurep! +fuzzy))) - " ") - ((string= substr "|") - "\\\\\\\\|") - ((concat "\\\\" substr)))) - (rxt-quote-pcre query))))))) + (or query + (when (doom-region-active-p) + (replace-regexp-in-string + "[! |]" (lambda (substr) + (cond ((and (string= substr " ") + (not (featurep! +fuzzy))) + " ") + ((string= substr "|") + "\\\\\\\\|") + ((concat "\\\\" substr)))) + (rxt-quote-pcre (doom-thing-at-point-or-region))))) directory args (or prompt (format "rg%s [%s]: " diff --git a/modules/config/default/autoload/default.el b/modules/config/default/autoload/default.el index 6022a11a3..fdd1cc096 100644 --- a/modules/config/default/autoload/default.el +++ b/modules/config/default/autoload/default.el @@ -43,7 +43,7 @@ If ARG (universal argument), runs `compile' from the current directory." (unless (bound-and-true-p lsp-mode) (user-error "Not in an LSP buffer")) (call-interactively - (if (use-region-p) + (if (doom-region-active-p) #'lsp-format-region #'lsp-format-buffer))) diff --git a/modules/config/default/autoload/search.el b/modules/config/default/autoload/search.el index 595ec4aa9..dcd704895 100644 --- a/modules/config/default/autoload/search.el +++ b/modules/config/default/autoload/search.el @@ -45,17 +45,12 @@ If prefix ARG is set, prompt for a known project to search from." (+default/search-project 'other)) ;;;###autoload -(defun +default/search-project-for-symbol-at-point (&optional arg symbol) +(defun +default/search-project-for-symbol-at-point (&optional symbol arg) "Search current project for symbol at point. If prefix ARG is set, prompt for a known project to search from." (interactive - (list current-prefix-arg - (or (and (use-region-p) - (rxt-quote-pcre - (buffer-substring-no-properties (region-beginning) - (region-end)))) - (rxt-quote-pcre (thing-at-point 'symbol t)) - ""))) + (list (rxt-quote-pcre (or (doom-thing-at-point-or-region) "")) + current-prefix-arg)) (let ((default-directory (if arg (if-let (projects (projectile-relevant-known-projects)) @@ -74,7 +69,7 @@ If prefix ARG is set, prompt for a known project to search from." "Conduct a text search in the current project for symbol at point. If prefix ARG is set, prompt for a known project to search from." (interactive - (list (rxt-quote-pcre (or (thing-at-point 'symbol t) "")))) + (list (rxt-quote-pcre (or (doom-thing-at-point-or-region) "")))) (require 'org) (let ((default-directory org-directory)) (+default/search-project-for-symbol-at-point @@ -86,7 +81,7 @@ ARG is set, prompt for a known project to search from." (interactive) (require 'org) (let ((default-directory org-directory)) - (+default/search-project-for-symbol-at-point nil ""))) + (+default/search-project-for-symbol-at-point ""))) ;;;###autoload (defun +default/org-notes-headlines () diff --git a/modules/emacs/vc/autoload/vc.el b/modules/emacs/vc/autoload/vc.el index 8f9ac8d07..ccc68c9dc 100644 --- a/modules/emacs/vc/autoload/vc.el +++ b/modules/emacs/vc/autoload/vc.el @@ -8,8 +8,7 @@ If a selection is active, highlight them. Otherwise omits the #L suffix in the URL." (interactive) - (if (or (use-region-p) - (ignore-errors (evil-visual-state-p))) + (if (doom-region-active-p) (browse-at-remote) (browse-url (browse-at-remote--file-url (buffer-file-name))))) @@ -20,8 +19,7 @@ If a selection is active, highlight them. Otherwise omits the #L suffix in the URL." (interactive) (let ((url - (if (or (use-region-p) - (evil-visual-state-p)) + (if (doom-region-active-p) (browse-at-remote-get-url) (browse-at-remote--file-url (buffer-file-name))))) (kill-new url) diff --git a/modules/tools/lookup/autoload/lookup.el b/modules/tools/lookup/autoload/lookup.el index 9b8e697b7..3ee8f0cf4 100644 --- a/modules/tools/lookup/autoload/lookup.el +++ b/modules/tools/lookup/autoload/lookup.el @@ -162,24 +162,6 @@ This can be passed nil as its second argument to unset handlers for MODES. e.g. (better-jumper-set-jump (marker-position origin))) result))) -;;;###autoload -(defun +lookup-thing-or-region (&optional initial thing) - "Return INITIAL, grab the THING at point, or contents of selection. - -If THING is nil, uses `xref-backend-identifier-at-point' (like symbol, but -smarter)." - (cond ((stringp initial) - initial) - ((use-region-p) - (buffer-substring-no-properties (region-beginning) - (region-end))) - (thing - (thing-at-point thing t)) - ((require 'xref nil t) - ;; A little smarter than using `symbol-at-point', though in most cases, - ;; xref ends up using `symbol-at-point' anyway. - (xref-backend-identifier-at-point (xref-find-backend))))) - ;; ;;; Lookup backends @@ -250,7 +232,7 @@ Each function in `+lookup-definition-functions' is tried until one changes the point or current buffer. Falls back to dumb-jump, naive ripgrep/the_silver_searcher text search, then `evil-goto-definition' if evil-mode is active." - (interactive (list (+lookup-thing-or-region) + (interactive (list (doom-thing-at-point-or-region) current-prefix-arg)) (cond ((null identifier) (user-error "Nothing under point")) ((+lookup--jump-to :definition identifier nil arg)) @@ -263,7 +245,7 @@ evil-mode is active." Tries each function in `+lookup-references-functions' until one changes the point and/or current buffer. Falls back to a naive ripgrep/the_silver_searcher search otherwise." - (interactive (list (+lookup-thing-or-region) + (interactive (list (doom-thing-at-point-or-region) current-prefix-arg)) (cond ((null identifier) (user-error "Nothing under point")) ((+lookup--jump-to :references identifier nil arg)) @@ -276,7 +258,7 @@ search otherwise." First attempts the :documentation handler specified with `set-lookup-handlers!' for the current mode/buffer (if any), then falls back to the backends in `+lookup-documentation-functions'." - (interactive (list (+lookup-thing-or-region) + (interactive (list (doom-thing-at-point-or-region) current-prefix-arg)) (cond ((+lookup--jump-to :documentation identifier #'pop-to-buffer arg)) ((user-error "Couldn't find documentation for %S" identifier)))) @@ -297,7 +279,7 @@ Otherwise, falls back on `find-file-at-point'." (or (ffap-guesser) (ffap-read-file-or-url (if ffap-url-regexp "Find file or URL: " "Find file: ") - (+lookup-thing-or-region)))))) + (doom-thing-at-point-or-region)))))) (require 'ffap) (cond ((not path) (call-interactively #'find-file-at-point)) @@ -336,7 +318,7 @@ Otherwise, falls back on `find-file-at-point'." (defun +lookup/dictionary-definition (identifier &optional arg) "Look up the definition of the word at point (or selection)." (interactive - (list (or (+lookup-thing-or-region nil 'word) + (list (or (doom-thing-at-point-or-region 'word) (read-string "Look up in dictionary: ")) current-prefix-arg)) (cond ((and IS-MAC (require 'osx-dictionary nil t)) @@ -351,7 +333,7 @@ Otherwise, falls back on `find-file-at-point'." (defun +lookup/synonyms (identifier &optional arg) "Look up and insert a synonym for the word at point (or selection)." (interactive - (list (+lookup-thing-or-region nil 'word) ; TODO actually use this + (list (doom-thing-at-point-or-region 'word) ; TODO actually use this current-prefix-arg)) (unless (require 'powerthesaurus nil t) (user-error "No dictionary backend is available")) From 8857dc1a5e5c20ebb95b6e9bbd6de7fd4b9c9e8f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 3 Jan 2020 02:40:23 -0500 Subject: [PATCH 512/983] Add doom-point-in-{comment,string}-functions Fixes #2297 --- core/autoload/text.el | 51 +++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/core/autoload/text.el b/core/autoload/text.el index 3bd0dfcc1..36f7b989f 100644 --- a/core/autoload/text.el +++ b/core/autoload/text.el @@ -1,5 +1,17 @@ ;;; core/autoload/text.el -*- lexical-binding: t; -*- +(defvar doom-point-in-comment-functions () + "List of functions to run to determine if point is in a comment. + +Each function takes one argument: the position of the point. Stops on the first +function to return non-nil. Used by `doom-point-in-comment-p'.") + +(defvar doom-point-in-string-functions () + "List of functions to run to determine if point is in a string. + +Each function takes one argument: the position of the point. Stops on the first +function to return non-nil. Used by `doom-point-in-string-p'.") + ;;;###autoload (defun doom-surrounded-p (pair &optional inline balanced) "Returns t if point is surrounded by a brace delimiter: {[( @@ -28,31 +40,32 @@ lines, above and below, with only whitespace in between." ;;;###autoload (defun doom-point-in-comment-p (&optional pos) "Return non-nil if POS is in a comment. - POS defaults to the current position." - ;; REVIEW Should we cache `syntax-ppss'? - (let* ((pos (or pos (point))) - (ppss (syntax-ppss pos))) - (or (nth 4 ppss) - (nth 8 ppss) - (and (< pos (point-max)) - (memq (char-syntax (char-after pos)) '(?< ?>)) - (not (eq (char-after pos) ?\n))) - (when-let (s (car (syntax-after pos))) - (or (and (/= 0 (logand (lsh 1 16) s)) - (nth 4 (doom-syntax-ppss (+ pos 2)))) - (and (/= 0 (logand (lsh 1 17) s)) - (nth 4 (doom-syntax-ppss (+ pos 1)))) - (and (/= 0 (logand (lsh 1 18) s)) - (nth 4 (doom-syntax-ppss (- pos 1)))) - (and (/= 0 (logand (lsh 1 19) s)) - (nth 4 (doom-syntax-ppss (- pos 2))))))))) + (let ((pos (or pos (point)))) + (or (run-hook-with-args-until-success 'doom-point-in-comment-functions pos) + (let ((ppss (syntax-ppss pos))) + (or (nth 4 ppss) + (nth 8 ppss) + (and (< pos (point-max)) + (memq (char-syntax (char-after pos)) '(?< ?>)) + (not (eq (char-after pos) ?\n))) + (when-let (s (car (syntax-after pos))) + (or (and (/= 0 (logand (lsh 1 16) s)) + (nth 4 (syntax-ppss (+ pos 2)))) + (and (/= 0 (logand (lsh 1 17) s)) + (nth 4 (syntax-ppss (+ pos 1)))) + (and (/= 0 (logand (lsh 1 18) s)) + (nth 4 (syntax-ppss (- pos 1)))) + (and (/= 0 (logand (lsh 1 19) s)) + (nth 4 (syntax-ppss (- pos 2))))))))))) ;;;###autoload (defun doom-point-in-string-p (&optional pos) "Return non-nil if POS is in a string." ;; REVIEW Should we cache `syntax-ppss'? - (nth 3 (syntax-ppss pos))) + (let ((pos (or pos (point)))) + (or (run-hook-with-args-until-success 'doom-point-in-string-functions pos) + (nth 3 (syntax-ppss pos))))) ;;;###autoload (defun doom-point-in-string-or-comment-p (&optional pos) From 8ff15c2aeb9e8e8d9e9079aa4b2910fee421bf3e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 3 Jan 2020 02:44:29 -0500 Subject: [PATCH 513/983] Optimize doom-point-in-*-p functions Since we won't be dumping smartparens just yet, use it for now. --- core/autoload/text.el | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/core/autoload/text.el b/core/autoload/text.el index 36f7b989f..623fc3cea 100644 --- a/core/autoload/text.el +++ b/core/autoload/text.el @@ -43,21 +43,7 @@ lines, above and below, with only whitespace in between." POS defaults to the current position." (let ((pos (or pos (point)))) (or (run-hook-with-args-until-success 'doom-point-in-comment-functions pos) - (let ((ppss (syntax-ppss pos))) - (or (nth 4 ppss) - (nth 8 ppss) - (and (< pos (point-max)) - (memq (char-syntax (char-after pos)) '(?< ?>)) - (not (eq (char-after pos) ?\n))) - (when-let (s (car (syntax-after pos))) - (or (and (/= 0 (logand (lsh 1 16) s)) - (nth 4 (syntax-ppss (+ pos 2)))) - (and (/= 0 (logand (lsh 1 17) s)) - (nth 4 (syntax-ppss (+ pos 1)))) - (and (/= 0 (logand (lsh 1 18) s)) - (nth 4 (syntax-ppss (- pos 1)))) - (and (/= 0 (logand (lsh 1 19) s)) - (nth 4 (syntax-ppss (- pos 2))))))))))) + (sp-point-in-comment pos)))) ;;;###autoload (defun doom-point-in-string-p (&optional pos) @@ -65,7 +51,7 @@ POS defaults to the current position." ;; REVIEW Should we cache `syntax-ppss'? (let ((pos (or pos (point)))) (or (run-hook-with-args-until-success 'doom-point-in-string-functions pos) - (nth 3 (syntax-ppss pos))))) + (sp-point-in-string)))) ;;;###autoload (defun doom-point-in-string-or-comment-p (&optional pos) From 5495922a20bcad81a3e2e4a150508284c16184e3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 3 Jan 2020 05:13:20 -0500 Subject: [PATCH 514/983] Resolve symlinks in doomdir slot for doom/info --- core/autoload/debug.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/autoload/debug.el b/core/autoload/debug.el index c3a98f004..25414bc78 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -47,7 +47,7 @@ ready to be pasted in a bug report on github." (doom (version . ,doom-version) (build . ,(sh "git" "log" "-1" "--format=%D %h %ci")) - (dir . ,(abbreviate-file-name doom-private-dir))) + (dir . ,(abbreviate-file-name (file-truename doom-private-dir)))) (system (type . ,system-type) (config . ,system-configuration) From 63d42c97bc7c1a76b4bc16bef0114dd357bd3eeb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 3 Jan 2020 05:14:53 -0500 Subject: [PATCH 515/983] Pass POS to sp-point-in-string And doom-point-in-string-or-comment-p is no longer side-effect-free, due to sp-point-in-* caching syntax-ppss. --- core/autoload/text.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/autoload/text.el b/core/autoload/text.el index 623fc3cea..5f33f468b 100644 --- a/core/autoload/text.el +++ b/core/autoload/text.el @@ -51,12 +51,11 @@ POS defaults to the current position." ;; REVIEW Should we cache `syntax-ppss'? (let ((pos (or pos (point)))) (or (run-hook-with-args-until-success 'doom-point-in-string-functions pos) - (sp-point-in-string)))) + (sp-point-in-string pos)))) ;;;###autoload (defun doom-point-in-string-or-comment-p (&optional pos) "Return non-nil if POS is in a string or comment." - (declare (side-effect-free t)) (or (doom-point-in-string-p pos) (doom-point-in-comment-p pos))) From 11676b01537bb445defe8dfe34ea9c637cae0d72 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 3 Jan 2020 05:20:45 -0500 Subject: [PATCH 516/983] Fix #2299: void-function sp-point-in-string during 'doom refresh' Due to use of third-party code before it is installed. Since we can be sure that elisp has a sane syntax-table we do not need sophisticated comment/string detection. --- core/cli/autoloads.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 33b0261eb..2a92ead24 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -226,8 +226,11 @@ one wants that.") ;; `load-file-name' is meaningless in a concatenated ;; mega-autoloads file, so we replace references to it with the ;; file they came from. - (unless (doom-point-in-string-or-comment-p) - (replace-match filestr t t))))) + (or (save-excursion + (let ((ppss (syntax-ppss))) + (or (nth 3 ppss) + (nth 4 ppss)))) + (replace-match filestr t t))))) (let ((load-file-name file) (load-path (append (list doom-private-dir) From 6523f6a12e4443f102e38b2f2d17b50999fc038f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 3 Jan 2020 05:49:43 -0500 Subject: [PATCH 517/983] Move cpp-mode{,-map} aliases to autoloads They don't need to be in config.el --- modules/lang/cc/autoload.el | 5 +++++ modules/lang/cc/config.el | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/lang/cc/autoload.el b/modules/lang/cc/autoload.el index 251840b85..3cc5f3f82 100644 --- a/modules/lang/cc/autoload.el +++ b/modules/lang/cc/autoload.el @@ -3,6 +3,11 @@ ;;;###autoload (add-to-list 'auto-mode-alist '("\\.cl\\'" . opencl-mode)) +;; The plusses in c++-mode can be annoying to search for ivy/helm (which reads +;; queries as regexps), so we add these for convenience. +;;;###autoload (defalias 'cpp-mode 'c++-mode) +;;;###autoload (defvaralias 'cpp-mode-map 'c++-mode-map) + ;; ;; Library diff --git a/modules/lang/cc/config.el b/modules/lang/cc/config.el index 4708676c5..4d6e428e0 100644 --- a/modules/lang/cc/config.el +++ b/modules/lang/cc/config.el @@ -36,11 +36,6 @@ This is ignored by ccls.") :commands (c-mode c++-mode objc-mode java-mode) :mode ("\\.mm\\'" . objc-mode) :init - ;; The plusses in c++-mode can be annoying to search for ivy/helm (which reads - ;; queries as regexps), so we add these for convenience. - (defalias 'cpp-mode 'c++-mode) - (defvaralias 'cpp-mode-map 'c++-mode-map) - ;; Activate `c-mode', `c++-mode' or `objc-mode' depending on heuristics (add-to-list 'auto-mode-alist '("\\.h\\'" . +cc-c-c++-objc-mode)) From 580de0be1fc7259bdab64298fa6e9493daa87f90 Mon Sep 17 00:00:00 2001 From: Sune Simonsen Date: Fri, 3 Jan 2020 17:19:44 +0100 Subject: [PATCH 518/983] Fix source code highlighting when using marked.js I'm currently experiencing problems getting the source code highlighting to work with https://github.com/markedjs/marked The reason is that Marked outputs the following structure: ```html
const hello = 'world';
``` and the current selector expects the `pre` tag to have a `lang` attribute. This PR splits the forwarding of the `lang` attribute to a class and the code that initialise the highlighting for each block. It will try to initialise the highlighting for every `code` block that is inside a `pre` tag. --- modules/lang/markdown/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/markdown/config.el b/modules/lang/markdown/config.el index 9639ef093..819bcc3ec 100644 --- a/modules/lang/markdown/config.el +++ b/modules/lang/markdown/config.el @@ -40,7 +40,7 @@ capture, the end position, and the output buffer.") (concat "" "" "" - "")) + "")) :config (set-flyspell-predicate! '(markdown-mode gfm-mode) From f9b3ad2bb1bd66d404290fb8a9d93922e3e770c4 Mon Sep 17 00:00:00 2001 From: Nikola M Date: Fri, 3 Jan 2020 21:42:14 +0100 Subject: [PATCH 519/983] Fix typo in env.el --- core/cli/env.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/cli/env.el b/core/cli/env.el index b32efefef..97cffa80b 100644 --- a/core/cli/env.el +++ b/core/cli/env.el @@ -36,7 +36,7 @@ Why this over exec-path-from-shell? I'd rather it inherit your shell environment /correctly/ (and /completely/) or not at all. It frontloads the debugging process rather than hiding it - until it you least want to deal with it." + until you least want to deal with it." (let ((env-file (expand-file-name (or outputfile doom-env-file)))) (cond (clear-p (unless (file-exists-p env-file) From 8818f2f7e8d4cf83d65ac09c658ada148cba70ac Mon Sep 17 00:00:00 2001 From: Paul Kuruvilla Date: Sat, 4 Jan 2020 11:32:14 +0530 Subject: [PATCH 520/983] cli: Handle --help without an argument --- bin/doom | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/doom b/bin/doom index 834e56afd..2b0e5086d 100755 --- a/bin/doom +++ b/bin/doom @@ -51,7 +51,8 @@ with a different private module." (setq doom-auto-accept t) (print! (info "Auto-yes on"))) (when help-p - (push command args) + (when command + (push command args)) (setq command "help")) ;; Reload core in case any of the directories were changed. From d1beb47e908fa43944a4671ca4fc15a4e50ebd2b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 4 Jan 2020 03:28:20 -0500 Subject: [PATCH 521/983] Fix invalid-function 116 when formatting with tidy Due to refactor upstream: lassik/emacs-format-all-the-code@4f458bd --- modules/editor/format/autoload/settings.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/format/autoload/settings.el b/modules/editor/format/autoload/settings.el index b912af50e..359480671 100644 --- a/modules/editor/format/autoload/settings.el +++ b/modules/editor/format/autoload/settings.el @@ -67,7 +67,7 @@ (doom-log "formatter (arglist) %s" args) (if ,(and (or ok-statuses error-regexp) t) (apply #'format-all--buffer-hard - ',ok-statuses ,error-regexp + ',ok-statuses ,error-regexp nil (reverse args)) (apply #'format-all--buffer-easy (reverse args))))) From e0b8b4f1903f8ec7b2cc7da6ce3c59661731e2ae Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 4 Jan 2020 04:55:57 -0500 Subject: [PATCH 522/983] Fix set-pretty-symbols! not merging properties w/ old rules This removes the :merge property, as merging is now its default behavior. --- core/autoload/plist.el | 2 +- modules/ui/pretty-code/autoload.el | 30 +++++++++++++----------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/core/autoload/plist.el b/core/autoload/plist.el index aeb9c7f9a..9fe4274be 100644 --- a/core/autoload/plist.el +++ b/core/autoload/plist.el @@ -66,7 +66,7 @@ BODY." ;;;###autoload (defun doom-plist-merge (from-plist to-plist) - "Destructively merge FROM-PLIST onto TO-PLIST" + "Non-destructively merge FROM-PLIST onto TO-PLIST" (let ((plist (copy-sequence from-plist))) (while plist (plist-put! to-plist (pop plist) (pop plist))) diff --git a/modules/ui/pretty-code/autoload.el b/modules/ui/pretty-code/autoload.el index 1d2a54cae..ee0942ea9 100644 --- a/modules/ui/pretty-code/autoload.el +++ b/modules/ui/pretty-code/autoload.el @@ -15,14 +15,11 @@ and whose values are strings representing the text to be replaced with that symbol. If the car of PLIST is nil, then unset any pretty symbols previously defined for MODES. -The following properties are special: +This function accepts one special property: :alist ALIST Appends ALIST to `prettify-symbols-alist' literally, without mapping text to `+pretty-code-symbols'. - :merge BOOL - If non-nil, merge with previously defined `prettify-symbols-alist', - otherwise overwrite it. For example, the rule for emacs-lisp-mode is very simple: @@ -38,18 +35,17 @@ Pretty symbols can be unset for emacs-lisp-mode with: (declare (indent defun)) (if (null (car-safe plist)) (dolist (mode (doom-enlist modes)) - (delq (assq mode +pretty-code-symbols-alist) - +pretty-code-symbols-alist)) - (let (results merge key) + (assq-delete-all mode +pretty-code-symbols-alist)) + (let (results) (while plist - (pcase (setq key (pop plist)) - (:merge (setq merge (pop plist))) - (:alist (setq results (append (pop plist) results))) - (_ - (when-let (char (plist-get +pretty-code-symbols key)) - (push (cons (pop plist) char) results))))) + (let ((key (pop plist))) + (if (eq key :alist) + (prependq! results (pop plist)) + (when-let (char (plist-get +pretty-code-symbols key)) + (push (cons (pop plist) char) results))))) (dolist (mode (doom-enlist modes)) - (unless merge - (delq (assq mode +pretty-code-symbols-alist) - +pretty-code-symbols-alist)) - (push (cons mode results) +pretty-code-symbols-alist))))) + (setf (alist-get mode +pretty-code-symbols-alist) + (if-let (old-results (alist-get mode +pretty-code-symbols-alist)) + (dolist (cell results old-results) + (setf (alist-get (car cell) old-results) (cdr cell))) + results)))))) From 13be4fa17888495adda212f230c65e84d03fb3b1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 4 Jan 2020 04:57:53 -0500 Subject: [PATCH 523/983] Fix doom/sudo-save-buffer Trying to open a buffer named after the filename, rather than opening the file and returning a buffer. --- core/autoload/files.el | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/core/autoload/files.el b/core/autoload/files.el index 0014280db..5471f5f06 100644 --- a/core/autoload/files.el +++ b/core/autoload/files.el @@ -346,10 +346,12 @@ file if it exists, without confirmation." (defun doom/sudo-save-buffer () "Save this file as root." (interactive) - (let ((origin (current-buffer)) - (buffer (doom--sudo-file buffer-file-name))) - (unwind-protect - (with-current-buffer buffer - (save-buffer)) - (unless (eq origin buffer) - (kill-buffer buffer))))) + (let ((file (doom--sudo-file buffer-file-name))) + (if-let (buffer (find-file-noselect file)) + (let ((origin (current-buffer))) + (unwind-protect + (with-current-buffer buffer + (save-buffer)) + (unless (eq origin buffer) + (kill-buffer buffer)))) + (user-error "Unable to open %S" file)))) From 8bed16eb72b566ee337dfb9bd81136fe34720eb7 Mon Sep 17 00:00:00 2001 From: brotzeit Date: Fri, 3 Jan 2020 23:22:28 +0100 Subject: [PATCH 524/983] fix message --- modules/lang/rust/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/rust/config.el b/modules/lang/rust/config.el index e728492e0..3cb786cbc 100644 --- a/modules/lang/rust/config.el +++ b/modules/lang/rust/config.el @@ -61,7 +61,7 @@ ;; that behavior. ((symbol-function #'rustic-install-lsp-client-p) (lambda (&rest _) - (message "No RLS server running")))) + (message "No LSP server running")))) (apply orig-fn args)))) From 61f6e7f430d0033cd039ec43c1ab36fbb57cf44c Mon Sep 17 00:00:00 2001 From: bennyyip Date: Sun, 5 Jan 2020 03:29:19 +0800 Subject: [PATCH 525/983] editor/evil: fix: outdated log --- modules/editor/evil/README.org | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/editor/evil/README.org b/modules/editor/evil/README.org index 82dce265c..b256b07ec 100644 --- a/modules/editor/evil/README.org +++ b/modules/editor/evil/README.org @@ -107,15 +107,11 @@ And these are text objects added by this module: | Ex Command | Description | |-----------------------+--------------------------------------------------------------------------------------| | ~:@~ | Apply macro on selected lines | -| ~:ag[!] REGEXP~ | Perform a project search with ag | -| ~:agcwd[!] REGEXP~ | Perform a project search with ag from the current directory | | ~:al[ign][!] REGEXP~ | Align text to the first match of REGEXP. If BANG, align all matches on each line | | ~:cp[!] NEWPATH~ | Copy the current file to NEWPATH | | ~:dash QUERY~ | Look up QUERY (or the symbol at point) in dash docsets | | ~:dehtml [INPUT]~ | HTML decode selected text / inserts result if INPUT is given | | ~:enhtml [INPUT]~ | HTML encode selected text / inserts result if INPUT is given | -| ~:grep[!]~ | Perform a project search with git-grep | -| ~:grepcwd[!]~ | Perform a project search with git-grep from the current directory | | ~:iedit REGEXP~ | Invoke iedit on all matches for REGEXP | | ~:k[ill]all[!]~ | Kill all buffers (if BANG, affect buffer across workspaces) | | ~:k[ill]b~ | Kill all buried buffers | @@ -131,8 +127,6 @@ And these are text objects added by this module: | ~:repl~ | Open a REPL and/or copy the current selection to it | | ~:retab~ | Convert indentation to the default within the selection | | ~:rev[erse]~ | Reverse the selected lines | -| ~:rg[!]~ | Perform a project search with ripgrep | -| ~:rgcwd[!]~ | Perform a project search with ripgrep from the current directory | | ~:rm[!] [PATH]~ | Delete the current buffer's file and buffer | | ~:tcd[!]~ | Send =cd X= to tmux. X = the project root if BANG, X = ~default-directory~ otherwise | From e6638b82a14735b16cb5702f6b6785249e363c81 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 4 Jan 2020 15:42:04 -0500 Subject: [PATCH 526/983] Autoload forge-create-{pullreq,issue} --- modules/tools/magit/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index e8deb640e..65d19abed 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -74,6 +74,7 @@ ;; We defer loading even further because forge's dependencies will try to ;; compile emacsql, which is a slow and blocking operation. :after-call magit-status + :commands forge-create-pullreq forge-create-issue :init (setq forge-database-file (concat doom-etc-dir "forge/forge-database.sqlite")) :config From a2eee97c9d7329afa40ed3563de123c0cbdd1f37 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 4 Jan 2020 16:26:28 -0500 Subject: [PATCH 527/983] undo-tree-{visualizer,auto-save-history} = t --- core/core-editor.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core-editor.el b/core/core-editor.el index 5f0caf319..427957f55 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -525,7 +525,8 @@ files, so we replace calls to `pp' with the much faster `prin1'." ;; Branching & persistent undo :after-call doom-switch-buffer-hook after-find-file :config - (setq undo-tree-auto-save-history t + (setq undo-tree-visualizer-diff t + undo-tree-auto-save-history t ;; Increase undo-limits by a factor of ten to avoid emacs prematurely ;; truncating the undo history and corrupting the tree. See ;; https://github.com/syl20bnr/spacemacs/issues/12110 From ae5cf1889b5dcd6a9839b96b63dec45c1419a4cc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 4 Jan 2020 17:10:15 -0500 Subject: [PATCH 528/983] Move custom-file to {doom-local-dir}/custom.el --- core/core-modules.el | 1 + core/core.el | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core-modules.el b/core/core-modules.el index 5c8c606ad..54971f34d 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -76,6 +76,7 @@ non-nil." (when (or force-p (not doom-init-modules-p)) (setq doom-init-modules-p t doom-modules nil) + (load custom-file 'noerror 'nomessage) (when (load! "init" doom-private-dir t) (when doom-modules (maphash (lambda (key plist) diff --git a/core/core.el b/core/core.el index 226ce8e6d..8a39f30bf 100644 --- a/core/core.el +++ b/core/core.el @@ -201,7 +201,7 @@ users).") (setq abbrev-file-name (concat doom-local-dir "abbrev.el") async-byte-compile-log-file (concat doom-etc-dir "async-bytecomp.log") bookmark-default-file (concat doom-etc-dir "bookmarks") - custom-file (concat doom-private-dir "init.el") + custom-file (concat doom-local-dir "custom.el") custom-theme-directory (concat doom-private-dir "themes/") desktop-dirname (concat doom-etc-dir "desktop") desktop-base-file-name "autosave" From 8c7aaa64684ffa76a33e5cccb2f76524bb541df2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 4 Jan 2020 17:12:09 -0500 Subject: [PATCH 529/983] scroll-conservatively = 101 #2217 --- core/core-ui.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/core-ui.el b/core/core-ui.el index f19f988b5..26f9b9d70 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -173,7 +173,12 @@ read-only or not file-visiting." (setq hscroll-margin 2 hscroll-step 1 - scroll-conservatively 10 + ;; Emacs spends too much effort recentering the screen if you scroll the + ;; cursor more than N lines past window edges (where N is the settings of + ;; `scroll-conservatively'). This is especially slow in larger files + ;; during large-scale scrolling commands. If kept over 100, the window is + ;; never automatically recentered. + scroll-conservatively 101 scroll-margin 0 scroll-preserve-screen-position t ;; Reduce cursor lag by a tiny bit by not auto-adjusting `window-vscroll' From 1c237106aae813d869d7ff31ddd96280c3878abc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 4 Jan 2020 17:12:49 -0500 Subject: [PATCH 530/983] Don't pollute module help warnings with text props --- core/autoload/help.el | 1 + 1 file changed, 1 insertion(+) diff --git a/core/autoload/help.el b/core/autoload/help.el index ca8f1f18f..0ca4fb9d9 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -379,6 +379,7 @@ current file is in, or d) the module associated with the current major mode (see (cl-destructuring-bind (module-string path) (or (assoc (format "%s %s" category module) (doom--help-modules-list)) (user-error "'%s %s' is not a valid module" category module)) + (setq module-string (substring-no-properties module-string)) (unless (file-readable-p path) (error "Can't find or read %S module at %S" module-string path)) (cond ((not (file-directory-p path)) From cf04a44ca7b3414fec2fc1f9335115982a5a303f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 4 Jan 2020 17:13:05 -0500 Subject: [PATCH 531/983] Refactor comment/string check in autoloads generator --- core/cli/autoloads.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 2a92ead24..28834aaf8 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -226,11 +226,10 @@ one wants that.") ;; `load-file-name' is meaningless in a concatenated ;; mega-autoloads file, so we replace references to it with the ;; file they came from. - (or (save-excursion - (let ((ppss (syntax-ppss))) - (or (nth 3 ppss) - (nth 4 ppss)))) - (replace-match filestr t t))))) + (let ((ppss (save-excursion (syntax-ppss)))) + (or (nth 3 ppss) + (nth 4 ppss) + (replace-match filestr t t)))))) (let ((load-file-name file) (load-path (append (list doom-private-dir) From f26b148b2b906997fbf0c98adcb12311a72b3fdc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 4 Jan 2020 18:10:55 -0500 Subject: [PATCH 532/983] Use my fork of ws-butler --- core/core-editor.el | 5 +---- core/packages.el | 5 ++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 427957f55..38a6d77bd 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -563,10 +563,7 @@ files, so we replace calls to `pp' with the much faster `prin1'." (use-package! ws-butler ;; a less intrusive `delete-trailing-whitespaces' on save :after-call after-find-file - :config - (appendq! ws-butler-global-exempt-modes - '(special-mode comint-mode term-mode eshell-mode)) - (ws-butler-global-mode +1)) + :config (ws-butler-global-mode +1)) (provide 'core-editor) ;;; core-editor.el ends here diff --git a/core/packages.el b/core/packages.el index 5f4bbeaba..19b43c8a6 100644 --- a/core/packages.el +++ b/core/packages.el @@ -30,7 +30,10 @@ ;; Version 0.6.5 is on ELPA which lacks a fix we need, so we install 0.6.6 ;; from emacsmirror/undo-tree instead. :recipe (:host github :repo "emacsmirror/undo-tree")) -(package! ws-butler) +(package! ws-butler + ;; Use my fork of ws-butler, which has a few choice improvements and + ;; optimizations (the original has been abandoned). + :recipe (:host github :repo "hlissner/ws-butler")) (package! xclip) ;; core-projects.el From 02a4f6b573f9630aadbfbc03fae7399ac80182ec Mon Sep 17 00:00:00 2001 From: Yiming Chen Date: Sun, 5 Jan 2020 11:25:21 +0800 Subject: [PATCH 533/983] Suppress delete-window in org related functions - If there's only one other window, delete-window would be called, instead of delete-other-windows - when there is only one window other than the popup, this other window is the main window in this frame, delete it would raise an error: `delete-window: Attempt to delete main window of frame ` --- modules/ui/popup/+hacks.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index 20f9ce799..29ff92997 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -240,6 +240,8 @@ the command buffer." org-fast-todo-selection) (if +popup-mode (cl-letf (((symbol-function #'delete-other-windows) + (symbol-function #'ignore)) + ((symbol-function #'delete-window) (symbol-function #'ignore))) (apply orig-fn args)) (apply orig-fn args))) From 326035199bb8c04eeca0e570860ab809844534fa Mon Sep 17 00:00:00 2001 From: Dominic Rubas Date: Sun, 5 Jan 2020 12:52:14 +0100 Subject: [PATCH 534/983] Typo --- core/templates/packages.example.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/templates/packages.example.el b/core/templates/packages.example.el index 1329ac574..b0c8dc3eb 100644 --- a/core/templates/packages.example.el +++ b/core/templates/packages.example.el @@ -12,7 +12,7 @@ ;; Here are a couple examples: -;; All of Doom's packages are pnned to a specific commit, and updated from +;; All of Doom's packages are pinned to a specific commit, and updated from ;; release to release. To un-pin all packages and live on the edge, do: ;(setq doom-pinned-packages nil) From dce7e1c5fb161b3701f3c4a9247f34f298a52c88 Mon Sep 17 00:00:00 2001 From: James Wood Date: Sun, 5 Jan 2020 15:58:18 +0000 Subject: [PATCH 535/983] Fix name of solarized package --- docs/faq.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/faq.org b/docs/faq.org index 504ecf1ad..d94a801ec 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -614,7 +614,7 @@ install it, then load it: #+BEGIN_SRC emacs-lisp ;;; add to ~/.doom.d/packages.el -(package! solarized) +(package! solarized-theme) ;;; add to ~/.doom.d/config.el (setq doom-theme 'solarized-dark) From e8cd89e4513d90fa0e3ebdabe9fe979aaf139c6d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 5 Jan 2020 16:06:02 -0500 Subject: [PATCH 536/983] Remove mention of the_silver_searcher from README And mention emacs/ripgrep deps in quickstart instructions. --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4ad52f31c..a1c603998 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ **Quick start** ```bash +# Install emacs and ripgrep through your package manager, then... git clone https://github.com/hlissner/doom-emacs ~/.emacs.d ~/.emacs.d/bin/doom install ``` @@ -104,8 +105,7 @@ to learn more about our favorite OS. integration. Let someone else argue about tabs vs **\_\***spaces**\*\_**. - Project-management tools and framework-specific minor modes with their own snippets libraries. -- Project search (and replace) utilities, powered by - [the_silver_searcher][url:the_silver_searcher] or [ripgrep][url:ripgrep]. +- Project search (and replace) utilities, powered by [ripgrep][url:ripgrep]. - Isolated and persistent workspaces (also substitutes for vim tabs). - An environment variables file generator and loader, so that Emacs can perfectly inherit your shell configuration. @@ -174,5 +174,4 @@ you can do to help; I welcome any contribution! [url:editorconfig]: http://editorconfig.org/ [url:evil-mode]: https://github.com/emacs-evil/evil [url:ripgrep]: https://github.com/BurntSushi/ripgrep -[url:the_silver_searcher]: https://github.com/ggreer/the_silver_searcher [url:straight]: https://github.com/raxod502/straight.el From ee4358a24348fcb215a6edefacadeac2f7d0d262 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 5 Jan 2020 17:45:14 -0500 Subject: [PATCH 537/983] Simplify org-format-latex-options setting Due to changes upstream, all that isn't necessary anymore. --- modules/lang/org/config.el | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index cba098154..3947e8146 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -124,18 +124,10 @@ path too.") org-refile-use-outline-path 'file org-outline-path-complete-in-steps nil) - ;; Scale up LaTeX previews a bit (default is too small) - (setq org-format-latex-options (plist-put org-format-latex-options :scale 1.5)) - ;; ...and fix their background w/ themes - (add-hook! 'doom-load-theme-hook - (defun +org-refresh-latex-background () - "Previews are usually rendered with light backgrounds, so ensure their -background (and foreground) match the current theme." - (plist-put! org-format-latex-options - :background - (face-attribute (or (cadr (assq 'default face-remapping-alist)) - 'default) - :background nil t)))) + (plist-put! org-format-latex-options + :scale 1.5 ; larger previews + :foreground 'auto ; match the theme foreground + :background 'auto) ; ... and its background ;; HACK Face specs fed directly to `org-todo-keyword-faces' don't respect ;; underlying faces like the `org-todo' face does, so we define our own From cd3f1399af9b7bea410308f506f450bf9c122a71 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 5 Jan 2020 19:08:11 -0500 Subject: [PATCH 538/983] Fontify latex blocks natively --- modules/lang/org/config.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 3947e8146..b5cbe7a13 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -124,6 +124,8 @@ path too.") org-refile-use-outline-path 'file org-outline-path-complete-in-steps nil) + ;; Fontify latex blocks natively + (setq org-highlight-latex-and-related '(native)) (plist-put! org-format-latex-options :scale 1.5 ; larger previews :foreground 'auto ; match the theme foreground From 40a35392d1f06480e097a821f5ee5e084ac832dc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 5 Jan 2020 19:14:54 -0500 Subject: [PATCH 539/983] Make evil backspace/DEL respect delete-selection-mode Perhaps this should be fixed upstream? --- modules/editor/evil/config.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 8f39b084e..2364d294b 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -161,6 +161,13 @@ directives. By default, this only recognizes C directives.") (advice-add #'evil-open-above :around #'+evil--insert-newline-above-and-respect-comments-a) (advice-add #'evil-open-below :around #'+evil--insert-newline-below-and-respect-comments-a) + ;; Fix backspace/DEL commands not respecting `delete-selection-mode' + (defadvice! +evil-delete-region-if-mark-a (orig-fn &rest args) + :around '(evil-delete-backward-word evil-delete-backward-char-and-join) + (if (and (bound-and-true-p delete-selection-mode) mark-active) + (call-interactively #'backward-delete-char-untabify) + (apply orig-fn args))) + ;; Recenter screen after most searches (dolist (fn '(evil-visualstar/begin-search-forward evil-visualstar/begin-search-backward From fe57256d6b4c40c7a998a51b9bdbb368ffa5e094 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 5 Jan 2020 19:58:59 -0500 Subject: [PATCH 540/983] Minor refactors; reduce sp-max-prefix-length --- core/core-editor.el | 8 ++++---- core/core-modules.el | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 38a6d77bd..8dba9ea79 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -438,11 +438,11 @@ files, so we replace calls to `pp' with the much faster `prin1'." (setq sp-cancel-autoskip-on-backward-movement nil)) ;; The default is 100, because smartparen's scans are relatively expensive - ;; (especially with large pair lists for somoe modes), we halve it, as a + ;; (especially with large pair lists for some modes), we reduce it, as a ;; better compromise between performance and accuracy. - (setq sp-max-prefix-length 50) - ;; This speeds up smartparens. No pair has any business being longer than 4 - ;; characters; if they must, set it buffer-locally. + (setq sp-max-prefix-length 25) + ;; No pair has any business being longer than 4 characters; if they must, set + ;; it buffer-locally. It's less work for smartparens. (setq sp-max-pair-length 4) ;; This isn't always smart enough to determine when we're in a string or not. ;; See https://github.com/Fuco1/smartparens/issues/783. diff --git a/core/core-modules.el b/core/core-modules.el index 54971f34d..63be64585 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -102,11 +102,10 @@ non-nil." (defun doom-module-p (category module &optional flag) "Returns t if CATEGORY MODULE is enabled (ie. present in `doom-modules')." (declare (pure t) (side-effect-free t)) - (let ((plist (gethash (cons category module) doom-modules))) - (and plist - (or (null flag) - (memq flag (plist-get plist :flags))) - t))) + (when-let (plist (gethash (cons category module) doom-modules)) + (or (null flag) + (and (memq flag (plist-get plist :flags)) + t)))) (defun doom-module-get (category module &optional property) "Returns the plist for CATEGORY MODULE. Gets PROPERTY, specifically, if set." From 8a9d8f03e28a9b816385e755fe42d41425e9f612 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 5 Jan 2020 20:12:05 -0500 Subject: [PATCH 541/983] Fix void-function set-scroll-bar-mode #2310 When emacs is built without GUI support. --- early-init.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/early-init.el b/early-init.el index 02ba00bb2..eea1e8fc2 100644 --- a/early-init.el +++ b/early-init.el @@ -15,7 +15,8 @@ ;; Prevent the glimpse of un-styled Emacs by disabling these UI elements early. (setq tool-bar-mode nil menu-bar-mode nil) -(set-scroll-bar-mode nil) +(when (fboundp 'set-scroll-bar-mode) + (set-scroll-bar-mode nil)) ;; Resizing the Emacs frame can be a terribly expensive part of changing the ;; font. By inhibiting this, we easily halve startup times with fonts that are From 14552bc66ba4a951f165904bfe79b9b207ca29fe Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 5 Jan 2020 21:17:34 -0500 Subject: [PATCH 542/983] Fontify latex script & entities in org-mode --- modules/lang/org/config.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index b5cbe7a13..4281dd23b 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -124,8 +124,8 @@ path too.") org-refile-use-outline-path 'file org-outline-path-complete-in-steps nil) - ;; Fontify latex blocks natively - (setq org-highlight-latex-and-related '(native)) + ;; Fontify latex blocks and entities natively + (setq org-highlight-latex-and-related '(native script entities)) (plist-put! org-format-latex-options :scale 1.5 ; larger previews :foreground 'auto ; match the theme foreground From 9fce4d51065091361b49f38bbda8c7432b12abce Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Jan 2020 00:57:35 -0500 Subject: [PATCH 543/983] Remove +workspace-buffer-list return order #2315 I cannot guarantee this. We simply return was `persp-buffers PERSP` returns. How buffers are ordered is up to persp-mode. --- modules/ui/workspaces/autoload/workspaces.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/ui/workspaces/autoload/workspaces.el b/modules/ui/workspaces/autoload/workspaces.el index 547998dd8..72fd29292 100644 --- a/modules/ui/workspaces/autoload/workspaces.el +++ b/modules/ui/workspaces/autoload/workspaces.el @@ -80,8 +80,6 @@ error if NAME doesn't exist." (defun +workspace-buffer-list (&optional persp) "Return a list of buffers in PERSP. -The buffer list is ordered by recency (same as `buffer-list'). - PERSP can be a string (name of a workspace) or a workspace (satisfies `+workspace-p'). If nil or omitted, it defaults to the current workspace." (let ((persp (or persp (+workspace-current)))) From 09f7db43be48d201abf9f6256328e5995ad26820 Mon Sep 17 00:00:00 2001 From: Xuan Bi Date: Mon, 6 Jan 2020 14:22:18 +0800 Subject: [PATCH 544/983] Be explicit about `fc-list` when listing fonts --- core/cli/doctor.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/cli/doctor.el b/core/cli/doctor.el index d50cfb564..5f790ccfa 100644 --- a/core/cli/doctor.el +++ b/core/cli/doctor.el @@ -136,7 +136,7 @@ in." (`darwin "~/Library/Fonts/")) (require 'all-the-icons nil t)) (with-temp-buffer - (insert (cdr (doom-call-process "fc-list"))) + (insert (cdr (doom-call-process "fc-list" "" "file"))) (dolist (font all-the-icons-font-names) (if (save-excursion (re-search-backward font nil t)) (success! "Found font %s" font) From ae8dc2749f06a0ab420cabfe5152a9cabf93e056 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Jan 2020 01:29:22 -0500 Subject: [PATCH 545/983] Remove ivy-{standard,alternative}-search #2314 Turns out ivy and counsel have a number of hard-coded checks for flx against ivy--regex-fuzzy: - https://github.com/abo-abo/swiper/blob/master/ivy.el#L3531 - https://github.com/abo-abo/swiper/blob/master/ivy.el#L3637 - https://github.com/abo-abo/swiper/blob/master/ivy.el#L4643 - https://github.com/abo-abo/swiper/blob/master/counsel.el#L1359 - https://github.com/abo-abo/swiper/blob/master/counsel.el#L1561 This means, by assigning our own delegates around ivy regex functions will break flx sorting (reported in #2314), and possibly other behavior. --- modules/completion/ivy/autoload/ivy.el | 10 ------ modules/completion/ivy/config.el | 42 +++++++++++--------------- 2 files changed, 18 insertions(+), 34 deletions(-) diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index fdabf446c..7634f09b1 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -13,16 +13,6 @@ (and (not (eq buffer (current-buffer))) (+workspace-contains-buffer-p buffer)))) -;;;###autoload -(defun +ivy-standard-search (str) - "TODO" - (funcall +ivy-standard-search-fn str)) - -;;;###autoload -(defun +ivy-alternative-search (str) - "TODO" - (funcall +ivy-alternative-search-fn str)) - ;;;###autoload (defun +ivy-rich-buffer-name (candidate) "Display the buffer name. diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 57fb445f4..fe18263c7 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -14,21 +14,6 @@ When 'everything, also preview virtual buffers") "A plist mapping ivy/counsel commands to commands that generate an editable results buffer.") -(defvar +ivy-standard-search-fn - (if (featurep! +prescient) - #'+ivy-prescient-non-fuzzy - #'ivy--regex-plus) - "Function to use for non-fuzzy search commands. -This uses the standard search algorithm ivy uses (or a variant of it).") - -(defvar +ivy-alternative-search-fn - (cond ((featurep! +prescient) #'ivy-prescient-re-builder) - ((featurep! +fuzzy) #'ivy--regex-fuzzy) - ;; Ignore order for non-fuzzy searches by default - (#'ivy--regex-ignore-order)) - "Function to use for fuzzy search commands. -This uses a search algorithm other than ivy's default.") - ;; ;;; Packages @@ -36,15 +21,24 @@ This uses a search algorithm other than ivy's default.") (use-package! ivy :after-call pre-command-hook :init - (setq ivy-re-builders-alist - `((counsel-rg . +ivy-standard-search) - (swiper . +ivy-standard-search) - (swiper-isearch . +ivy-standard-search) - (t . +ivy-alternative-search)) - ivy-more-chars-alist - '((counsel-rg . 1) - (counsel-search . 2) - (t . 3))) + (let ((standard-search-fn + (if (featurep! +prescient) + #'+ivy-prescient-non-fuzzy + #'ivy--regex-plus)) + (alt-search-fn + (cond ((featurep! +prescient) #'ivy-prescient-re-builder) + ((featurep! +fuzzy) #'ivy--regex-fuzzy) + ;; Ignore order for non-fuzzy searches by default + (#'ivy--regex-ignore-order)))) + (setq ivy-re-builders-alist + `((counsel-rg . ,standard-search-fn) + (swiper . ,standard-search-fn) + (swiper-isearch . ,standard-search-fn) + (t . ,alt-search-fn)) + ivy-more-chars-alist + '((counsel-rg . 1) + (counsel-search . 2) + (t . 3)))) (define-key! [remap switch-to-buffer] #'+ivy/switch-buffer From 4fe24df90f671fa4e5b8de569890599f407ad78d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Jan 2020 03:48:44 -0500 Subject: [PATCH 546/983] Fix #1970: don't count treemacs as a "popup" And remove its popup rule. It isn't being caught by the popup system in the first place, so this is all a charade. --- modules/ui/popup/autoload/popup.el | 3 +-- modules/ui/treemacs/config.el | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/modules/ui/popup/autoload/popup.el b/modules/ui/popup/autoload/popup.el index 4c28b97b1..34279daea 100644 --- a/modules/ui/popup/autoload/popup.el +++ b/modules/ui/popup/autoload/popup.el @@ -181,8 +181,7 @@ and enables `+popup-buffer-mode'." (let ((window (or window (selected-window)))) (and (windowp window) (window-live-p window) - (or (window-parameter window 'popup) - (window-parameter window 'no-other-window)) + (window-parameter window 'popup) window)))) ;;;###autoload diff --git a/modules/ui/treemacs/config.el b/modules/ui/treemacs/config.el index fe1535440..ba969ea33 100644 --- a/modules/ui/treemacs/config.el +++ b/modules/ui/treemacs/config.el @@ -8,12 +8,6 @@ (after! treemacs - (set-popup-rule! "^ \\*Treemacs" - :side treemacs-position - :size treemacs-width - :quit nil - :ttl 0) - ;; Don't follow the cursor (treemacs-follow-mode -1) From 2d97b877ede3c64be730e3023a5742a3ea538032 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Jan 2020 04:49:57 -0500 Subject: [PATCH 547/983] Remove duplicate image-dired-dir setting --- modules/emacs/dired/config.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index f368d3ae1..dd342aa2b 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -75,10 +75,7 @@ only variant that supports --group-directories-first." (use-package! ranger :when (featurep! +ranger) :after dired - :init - ;; set up image-dired to allow picture resize - (setq image-dired-dir (concat doom-cache-dir "image-dir") - ranger-override-dired t) + :init (setq ranger-override-dired t) :config (unless (file-directory-p image-dired-dir) (make-directory image-dired-dir)) From 21c55b0c435f25c038c1517110a55139b9db9a81 Mon Sep 17 00:00:00 2001 From: James Conroy-Finn Date: Mon, 6 Jan 2020 16:57:26 +0000 Subject: [PATCH 548/983] Use newer cider-ns-refresh in Clojure bindings Cider deprecated `cider-refresh` in favour of `cider-ns-refresh` in version 0.18. https://github.com/clojure-emacs/cider/blob/master/CHANGELOG.md#changes-6 --- modules/lang/clojure/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/clojure/config.el b/modules/lang/clojure/config.el index ffcee5334..29ccaa616 100644 --- a/modules/lang/clojure/config.el +++ b/modules/lang/clojure/config.el @@ -112,7 +112,7 @@ (:prefix ("r" . "repl") "n" #'cider-repl-set-ns "q" #'cider-quit - "r" #'cider-refresh + "r" #'cider-ns-refresh "R" #'cider-restart "b" #'cider-switch-to-repl-buffer "B" #'+clojure/cider-switch-to-repl-buffer-and-switch-ns From 36e73aedb6eba6bb03f921241adab9e73f3666e7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Jan 2020 15:06:28 -0500 Subject: [PATCH 549/983] Disable xclip-mode on windows --- core/core-editor.el | 11 ++++++----- core/packages.el | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 8dba9ea79..070a72e49 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -132,11 +132,12 @@ possible." ;; Fixes the clipboard in tty Emacs by piping clipboard I/O through xclip, xsel, ;; pb{copy,paste}, wl-copy, termux-clipboard-get, or getclip (cygwin). -(add-hook! 'tty-setup-hook - (defun doom-init-clipboard-in-tty-emacs-h () - (and (not (getenv "SSH_CONNECTION")) - (require 'xclip nil t) - (xclip-mode +1)))) +(unless IS-WINDOWS + (add-hook! 'tty-setup-hook + (defun doom-init-clipboard-in-tty-emacs-h () + (and (not (getenv "SSH_CONNECTION")) + (require 'xclip nil t) + (xclip-mode +1))))) ;; diff --git a/core/packages.el b/core/packages.el index 19b43c8a6..62a7330e8 100644 --- a/core/packages.el +++ b/core/packages.el @@ -34,7 +34,7 @@ ;; Use my fork of ws-butler, which has a few choice improvements and ;; optimizations (the original has been abandoned). :recipe (:host github :repo "hlissner/ws-butler")) -(package! xclip) +(package! xclip :ignore IS-WINDOWS) ;; core-projects.el (package! projectile) From 0d43159607e57bed580dd5452672bad412afc751 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Jan 2020 15:07:13 -0500 Subject: [PATCH 550/983] Disable ns-auto-titlebar & xclip properly on other OSes --- core/packages.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/packages.el b/core/packages.el index 62a7330e8..89dda2546 100644 --- a/core/packages.el +++ b/core/packages.el @@ -17,7 +17,8 @@ (package! better-jumper) (package! dtrt-indent) (package! helpful) -(package! ns-auto-titlebar :ignore (not IS-MAC)) +(when IS-MAC + (package! ns-auto-titlebar)) (package! pcre2el) (package! smartparens) (package! so-long @@ -34,7 +35,8 @@ ;; Use my fork of ws-butler, which has a few choice improvements and ;; optimizations (the original has been abandoned). :recipe (:host github :repo "hlissner/ws-butler")) -(package! xclip :ignore IS-WINDOWS) +(unless IS-WINDOWS + (package! xclip)) ;; core-projects.el (package! projectile) From 7150631f66cbc6523c744e81d2e416b49542dc7c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Jan 2020 15:22:03 -0500 Subject: [PATCH 551/983] Fix evil-delete-backward-and-join A change upstream causes backspace in evil-buffers to ignore: 1. smartparens pair rules (#2308) 2. delete-selection-mode 3. +default--delete-backward-char-a advice on delete-char-backward (which deletes closing pairs, deletes continuous whitespace in tab-width steps, and closes braces across blank lines) Caused by emacs-evil/evil@1d6ba80 --- modules/editor/evil/config.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 2364d294b..9e212eda4 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -161,12 +161,14 @@ directives. By default, this only recognizes C directives.") (advice-add #'evil-open-above :around #'+evil--insert-newline-above-and-respect-comments-a) (advice-add #'evil-open-below :around #'+evil--insert-newline-below-and-respect-comments-a) - ;; Fix backspace/DEL commands not respecting `delete-selection-mode' + ;; Fix backspace/DEL commands not respecting `delete-selection-mode', + ;; smartparens pairs (in some cases), and ignoring + ;; `+default--delete-backward-char-a' on `delete-char-backward' (defadvice! +evil-delete-region-if-mark-a (orig-fn &rest args) - :around '(evil-delete-backward-word evil-delete-backward-char-and-join) - (if (and (bound-and-true-p delete-selection-mode) mark-active) + :override #'evil-delete-backward-and-join + (if (or evil-backspace-join-lines (not (bolp))) (call-interactively #'backward-delete-char-untabify) - (apply orig-fn args))) + (user-error "Beginning of line"))) ;; Recenter screen after most searches (dolist (fn '(evil-visualstar/begin-search-forward From b7c5152f3aeac3856f874eba731d2fa961c4d97f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Jan 2020 16:21:22 -0500 Subject: [PATCH 552/983] lang/org: C-M-RET = org-insert-subheading --- modules/lang/org/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 4281dd23b..fd83be021 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -587,6 +587,7 @@ between the two." ;; textmate-esque newline insertion [C-return] #'+org/insert-item-below [C-S-return] #'+org/insert-item-above + [C-M-return] #'org-insert-subheading ;; Org-aware C-a/C-e [remap doom/backward-to-bol-or-indent] #'org-beginning-of-line [remap doom/forward-to-last-non-comment-or-eol] #'org-end-of-line From c6ebf4b4be9d555fb2ae71143a71444b0fa7fe11 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Jan 2020 22:44:31 -0500 Subject: [PATCH 553/983] Fix embrace/evil-surround rules for angular brackets This fixes surround keys for <>'s in languages that support type, like rust, c++, c#, etc. --- modules/editor/evil/config.el | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 9e212eda4..6520efdaa 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -241,7 +241,7 @@ directives. By default, this only recognizes C directives.") :hook ((lisp-mode emacs-lisp-mode clojure-mode racket-mode) . +evil-embrace-lisp-mode-hook-h) :hook ((org-mode LaTeX-mode) . +evil-embrace-latex-mode-hook-h) - :hook ((c++-mode rust-mode rustic-mode csharp-mode java-mode swift-mode typescript-mode) + :hook ((c++-mode rustic-mode csharp-mode java-mode swift-mode typescript-mode) . +evil-embrace-angle-bracket-modes-hook-h) :init (after! evil-surround @@ -253,6 +253,8 @@ directives. By default, this only recognizes C directives.") (embrace-add-pair-regexp ?l "\\[a-z]+{" "}" #'+evil--embrace-latex)) (defun +evil-embrace-lisp-mode-hook-h () + ;; Avoid `embrace-add-pair-regexp' because it would overwrite the default + ;; `f' rule, which we want for other modes (push (cons ?f (make-embrace-pair-struct :key ?f :read-function #'+evil--embrace-elisp-fn @@ -261,14 +263,11 @@ directives. By default, this only recognizes C directives.") embrace--pairs-list)) (defun +evil-embrace-angle-bracket-modes-hook-h () - (set (make-local-variable 'evil-embrace-evil-surround-keys) - (delq ?< evil-embrace-evil-surround-keys)) - (push (cons ?< (make-embrace-pair-struct - :key ?< - :read-function #'+evil--embrace-angle-brackets - :left-regexp "\\[a-z]+<" - :right-regexp ">")) - embrace--pairs-list)) + (let ((var (make-local-variable 'evil-embrace-evil-surround-keys))) + (set var (delq ?< evil-embrace-evil-surround-keys)) + (set var (delq ?> evil-embrace-evil-surround-keys))) + (embrace-add-pair-regexp ?< "\\_<[a-z0-9-_]+<" ">" #'+evil--embrace-angle-brackets) + (embrace-add-pair ?> "<" ">")) ;; Add escaped-sequence support to embrace (setf (alist-get ?\\ (default-value 'embrace--pairs-list)) From 062cc4aea5398914c3d9ed170bfe3014bf0cf738 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Jan 2020 22:49:54 -0500 Subject: [PATCH 554/983] Notify straight that package was modified When you edit its files. --- modules/lang/emacs-lisp/config.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/lang/emacs-lisp/config.el b/modules/lang/emacs-lisp/config.el index 2623a04ab..bedc8c0f0 100644 --- a/modules/lang/emacs-lisp/config.el +++ b/modules/lang/emacs-lisp/config.el @@ -59,6 +59,13 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.") ;; initialization #'+emacs-lisp-extend-imenu-h) + (autoload 'straight-register-file-modification "straight") + (add-hook! 'emacs-lisp-mode-hook + (defun +emacs-lisp-init-straight-h () + (when (file-in-directory-p (or buffer-file-name default-directory) doom-local-dir) + (add-hook 'after-save-hook #'straight-register-file-modification + nil 'local)))) + ;; Flycheck's two emacs-lisp checkers produce a *lot* of false positives in ;; emacs configs, so we disable `emacs-lisp-checkdoc' and reduce the ;; `emacs-lisp' checker's verbosity. From 310e6573b94bacb1297a912e6900e491651c69fe Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Jan 2020 22:55:09 -0500 Subject: [PATCH 555/983] evil-ex-interactive-search-highlight = 'all-windows Temporary fix until emacs-evil/evil#1233 is resolved. --- modules/editor/evil/config.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 6520efdaa..d59892bce 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -54,7 +54,9 @@ directives. By default, this only recognizes C directives.") evil-want-keybinding (not (featurep! +everywhere)) ;; Only do highlighting in selected window so that Emacs has less work ;; to do highlighting them all. - evil-ex-interactive-search-highlight 'selected-window) + ;; TODO Revert this to `selected-windows' once emacs-evil/evil#1233 is + ;; resolved, otherwise we get no highlights on */# + evil-ex-interactive-search-highlight 'all-windows) ;; Slow this down from 0.02 to prevent blocking in large or folded buffers ;; like magit while incrementally highlighting matches. From a52909f5df0674bebb0ce1d476aadee96fdf305d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Jan 2020 23:27:21 -0500 Subject: [PATCH 556/983] Toggle {magit-refresh,use-package}-verbose on debug mode --- core/autoload/debug.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/autoload/debug.el b/core/autoload/debug.el index 25414bc78..51ead07a9 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -339,7 +339,9 @@ will be automatically appended to the result." ((> (prefix-numeric-value arg) 0))))) (setq doom-debug-mode value debug-on-error value + use-package-verbose value jka-compr-verbose value lsp-log-io value - gcmh-verbose value) + gcmh-verbose value + magit-refresh-verbose value) (message "Debug mode %s" (if value "on" "off")))) From aad79616477f18fac6a51b043ee685dad4d32466 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Jan 2020 23:29:11 -0500 Subject: [PATCH 557/983] Fix #2258: update for new and old repo, and only if they are repos --- core/autoload/files.el | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/core/autoload/files.el b/core/autoload/files.el index 5471f5f06..5ca012234 100644 --- a/core/autoload/files.el +++ b/core/autoload/files.el @@ -203,16 +203,14 @@ single file or nested compound statement of `and' and `or' statements." ;; ;;; Helpers -(defun doom--forget-file (old-path &optional new-path) +(defun doom--forget-file (path) "Ensure `recentf', `projectile' and `save-place' forget OLD-PATH." (when (bound-and-true-p recentf-mode) - (when new-path - (recentf-add-file new-path)) - (recentf-remove-if-non-kept old-path)) + (recentf-remove-if-non-kept path)) (when (and (bound-and-true-p projectile-mode) (doom-project-p) - (projectile-file-cached-p old-path (doom-project-root))) - (projectile-purge-file-from-cache old-path)) + (projectile-file-cached-p path (doom-project-root))) + (projectile-purge-file-from-cache path)) (when (bound-and-true-p save-place-mode) (save-place-forget-unreadable-files))) @@ -221,7 +219,8 @@ single file or nested compound statement of `and' and `or' statements." (vc-file-clearprops path) (vc-resynch-buffer path nil t)) (when (featurep 'magit) - (magit-refresh))) + (when-let (default-directory (magit-toplevel (file-name-directory path))) + (magit-refresh)))) (defun doom--copy-file (old-path new-path &optional force-p) (let* ((new-path (expand-file-name new-path)) @@ -307,11 +306,17 @@ file if it exists, without confirmation." (let ((old-path (buffer-file-name)) (new-path (expand-file-name new-path))) (when-let (dest (doom--copy-file old-path new-path force-p)) + (doom--forget-file old-path) (when (file-exists-p old-path) (delete-file old-path)) + (mapc #'doom--update-file + (delq + nil (list (or (ignore-errors + (file-equal-p (doom-project-root old-path) + (doom-project-root new-path))) + old-path) + new-path))) (kill-current-buffer) - (doom--forget-file old-path new-path) - (doom--update-file new-path) (find-file new-path) (message "File successfully moved to %s" dest)))) (`overwrite-self (error "Cannot overwrite self")) From af0139e974b2e01893a9242b474259fb78b3816f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Jan 2020 23:46:33 -0500 Subject: [PATCH 558/983] Fix void-function browse-at-remote-get-url error When 'SPC g y' is used before browse-at-remote has loaded. --- modules/emacs/vc/autoload/vc.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/emacs/vc/autoload/vc.el b/modules/emacs/vc/autoload/vc.el index ccc68c9dc..38557719e 100644 --- a/modules/emacs/vc/autoload/vc.el +++ b/modules/emacs/vc/autoload/vc.el @@ -1,5 +1,6 @@ ;;; emacs/vc/autoload/vc.el -*- lexical-binding: t; -*- +(autoload 'browse-at-remote-get-url "browse-at-remote") (autoload 'browse-at-remote--file-url "browse-at-remote") ;;;###autoload From b5a279311cfec3d1e66678bf3bff47f4118a62a9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 7 Jan 2020 00:14:46 -0500 Subject: [PATCH 559/983] Fix #2317: helm-mode-handle-completion-in-region = t It turns out that helm can handle completing ex constructs (e.g. globs), so this setting is no longer needed. --- modules/completion/helm/config.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/completion/helm/config.el b/modules/completion/helm/config.el index 84b68f738..f92e982d6 100644 --- a/modules/completion/helm/config.el +++ b/modules/completion/helm/config.el @@ -57,8 +57,6 @@ be negative.") helm-mode-line-string nil helm-ff-auto-update-initial-value nil helm-find-files-doc-header nil - ;; Don't override evil-ex's completion - helm-mode-handle-completion-in-region nil ;; Default helm window sizes helm-display-buffer-default-width nil helm-display-buffer-default-height 0.25 From 3a90529c1138104200420ddbeec99eb4ab812cd4 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 7 Jan 2020 14:21:07 +0700 Subject: [PATCH 560/983] Add lispy to evil collection disabled list Signed-off-by: Rudi Grinberg --- modules/editor/evil/+everywhere.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/editor/evil/+everywhere.el b/modules/editor/evil/+everywhere.el index 369c26cea..cc7dcd116 100644 --- a/modules/editor/evil/+everywhere.el +++ b/modules/editor/evil/+everywhere.el @@ -35,7 +35,8 @@ package-menu ruby-mode simple - slime) + slime + lispy) "A list of `evil-collection' modules to ignore. See the definition of this variable for an explanation of the defaults (in comments). See `evil-collection-mode-list' for a list of available options.") From 3530f19ef5f4ae19b088aed668d2201b8e311ec0 Mon Sep 17 00:00:00 2001 From: Dinko Date: Tue, 7 Jan 2020 14:50:13 +0200 Subject: [PATCH 561/983] Add lsp support to sh-mode. --- modules/lang/sh/README.org | 4 ++++ modules/lang/sh/config.el | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/modules/lang/sh/README.org b/modules/lang/sh/README.org index b2821e7bf..eb20a541a 100644 --- a/modules/lang/sh/README.org +++ b/modules/lang/sh/README.org @@ -9,6 +9,7 @@ This module adds support for shell scripting languages. * Table of Contents :TOC: - [[#install][Install]] - [[#dependencies][Dependencies]] + - [[#module-flags][Module Flags]] * Install ** Dependencies @@ -17,3 +18,6 @@ This module has several soft dependencies: + ~shellcheck~ Enables shell script linting. + ~bashdb~ Enables debugging for bash scripts. + ~zshdb~ Enables debugging for zsh scripts. ++ ~bash-language-server~ Enables LSP support. +** Module Flags ++ ~+lsp~ to add support Language server protocol. diff --git a/modules/lang/sh/config.el b/modules/lang/sh/config.el index f8853aa37..395cca3ac 100755 --- a/modules/lang/sh/config.el +++ b/modules/lang/sh/config.el @@ -17,6 +17,9 @@ (set-electric! 'sh-mode :words '("else" "elif" "fi" "done" "then" "do" "esac" ";;")) (set-repl-handler! 'sh-mode #'+sh/open-repl) + (when (featurep! +lsp) + (add-hook 'sh-mode-hook #'lsp!)) + (setq sh-indent-after-continuation 'always) ;; [pedantry intensifies] @@ -52,6 +55,7 @@ (use-package! company-shell :when (featurep! :completion company) + :unless (featurep! +lsp) :after sh-script :config (set-company-backend! 'sh-mode '(company-shell company-files)) From 345479c29eb4ee9e193baf22fe3b53e0792ed747 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 7 Jan 2020 14:27:02 -0500 Subject: [PATCH 562/983] Always display evaluated result in popup buffer If +eval isn't enabled --- modules/tools/eval/autoload/eval.el | 43 +++++++++++------------------ 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/modules/tools/eval/autoload/eval.el b/modules/tools/eval/autoload/eval.el index e1cd7b018..6ccfdcb3b 100644 --- a/modules/tools/eval/autoload/eval.el +++ b/modules/tools/eval/autoload/eval.el @@ -3,33 +3,22 @@ ;;;###autoload (defun +eval-display-results-in-popup (output &optional _source-buffer) "Display OUTPUT in a popup buffer." - (if (with-temp-buffer - (insert output) - (or (>= (count-lines (point-min) (point-max)) - +eval-popup-min-lines) - (> (string-width - (buffer-substring (point-min) - (save-excursion - (goto-char (point-min)) - (line-end-position)))) - (window-width)))) - (let ((output-buffer (get-buffer-create "*doom eval*")) - (origin (selected-window))) - (with-current-buffer output-buffer - (setq-local scroll-margin 0) - (erase-buffer) - (insert output) - (goto-char (point-min)) - (if (fboundp '+word-wrap-mode) - (+word-wrap-mode +1) - (visual-line-mode +1))) - (when-let (win (display-buffer output-buffer)) - (fit-window-to-buffer - win (/ (frame-height) 2) - nil (/ (frame-width) 2))) - (select-window origin) - output-buffer) - (message "%s" output))) + (let ((output-buffer (get-buffer-create "*doom eval*")) + (origin (selected-window))) + (with-current-buffer output-buffer + (setq-local scroll-margin 0) + (erase-buffer) + (insert output) + (goto-char (point-min)) + (if (fboundp '+word-wrap-mode) + (+word-wrap-mode +1) + (visual-line-mode +1))) + (when-let (win (display-buffer output-buffer)) + (fit-window-to-buffer + win (/ (frame-height) 2) + nil (/ (frame-width) 2))) + (select-window origin) + output-buffer)) ;;;###autoload (defun +eval-display-results-in-overlay (output &optional source-buffer) From 90096239aff520e035f4aebadce8a7e7f34973cf Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Tue, 7 Jan 2020 16:06:51 -0600 Subject: [PATCH 563/983] fix: use org-capture-projects-file --- modules/lang/org/autoload/org-capture.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/lang/org/autoload/org-capture.el b/modules/lang/org/autoload/org-capture.el index 5302b714a..c15484b14 100644 --- a/modules/lang/org/autoload/org-capture.el +++ b/modules/lang/org/autoload/org-capture.el @@ -148,16 +148,16 @@ project." (defun +org-capture-central-project-todo-file () "TODO" (+org--capture-central-file - +org-capture-todo-file (projectile-project-name))) + +org-capture-projects-file (projectile-project-name))) ;;;###autoload (defun +org-capture-central-project-notes-file () "TODO" (+org--capture-central-file - +org-capture-notes-file (projectile-project-name))) + +org-capture-projects-file (projectile-project-name))) ;;;###autoload (defun +org-capture-central-project-changelog-file () "TODO" (+org--capture-central-file - +org-capture-changelog-file (projectile-project-name))) + +org-capture-projects-file (projectile-project-name))) From dfbaccca90c08c914daa2947cb5d38913b7a8377 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 8 Jan 2020 00:34:41 -0500 Subject: [PATCH 564/983] Fix browse-at-remote commands in magit --- modules/emacs/vc/autoload/vc.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/emacs/vc/autoload/vc.el b/modules/emacs/vc/autoload/vc.el index 38557719e..9bf08402f 100644 --- a/modules/emacs/vc/autoload/vc.el +++ b/modules/emacs/vc/autoload/vc.el @@ -9,7 +9,7 @@ If a selection is active, highlight them. Otherwise omits the #L suffix in the URL." (interactive) - (if (doom-region-active-p) + (if (or (doom-region-active-p) (not buffer-file-name)) (browse-at-remote) (browse-url (browse-at-remote--file-url (buffer-file-name))))) @@ -20,7 +20,7 @@ If a selection is active, highlight them. Otherwise omits the #L suffix in the URL." (interactive) (let ((url - (if (doom-region-active-p) + (if (or (doom-region-active-p) (not buffer-file-name)) (browse-at-remote-get-url) (browse-at-remote--file-url (buffer-file-name))))) (kill-new url) From dc228152271a2f4767e7cb9a151dc092bee8fd1e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 8 Jan 2020 00:46:45 -0500 Subject: [PATCH 565/983] Fix #2234 (temporarily) Due to breaking changes in undo-tree. --- core/core-editor.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/core-editor.el b/core/core-editor.el index 070a72e49..e8efb7a77 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -527,7 +527,7 @@ files, so we replace calls to `pp' with the much faster `prin1'." :after-call doom-switch-buffer-hook after-find-file :config (setq undo-tree-visualizer-diff t - undo-tree-auto-save-history t + undo-tree-auto-save-history nil ;; Increase undo-limits by a factor of ten to avoid emacs prematurely ;; truncating the undo history and corrupting the tree. See ;; https://github.com/syl20bnr/spacemacs/issues/12110 @@ -558,6 +558,9 @@ files, so we replace calls to `pp' with the much faster `prin1'." (stringp (car item)) (setcar item (substring-no-properties (car item)))))) + ;; Undo-tree is too chatty about saving its history files. + (advice-add #'undo-tree-save-history :around #'doom-shut-up-a) + (global-undo-tree-mode +1)) From 4bd59f5ed935d560b09d4173623446dff4878366 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 8 Jan 2020 22:07:03 -0500 Subject: [PATCH 566/983] Dump *straight-process* buffer after straight errors --- bin/doom | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/doom b/bin/doom index b28411199..8d23b15e3 100755 --- a/bin/doom +++ b/bin/doom @@ -99,7 +99,11 @@ with a different private module." (if (cdr e) (dolist (item (cdr e)) (print! "%S" item)) - (print! "n/a")))) + (print! "n/a"))) + (when (string-match-p (regexp-quote straight-process-buffer) + (error-message-string e)) + (print! (bold "Straight output:")) + (print-group! (print! "%s" (straight--process-get-output))))) (unless debug-on-error (terpri) (print! From 309e322037fedeed70f648ce47523d44e04386a0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 8 Jan 2020 22:07:34 -0500 Subject: [PATCH 567/983] Add (Recommended) after certain straight prompts When a package's worktree is dirty (or its recipe was changed), straight prompts you with options to deal with it. To make it easier for less git savvy folks, the recommended option has been marked. --- core/core-packages.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/core-packages.el b/core/core-packages.el index b6cdf3105..84e691cbc 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -138,6 +138,11 @@ missing) and shouldn't be deleted.") (y-or-n-p (format! "%s" (or prompt ""))) (funcall orig-fn prompt))) +(defvar doom--straight-recommended-options + '("^Delete remote \"[^\"]+\", re-create it with correct " + "^Reset branch " + "^Abort merge$")) + (defadvice! doom--straight-fallback-to-tty-prompt-a (orig-fn prompt actions) "Modifies straight to prompt on the terminal when in noninteractive sessions." :around #'straight--popup-raw @@ -164,6 +169,9 @@ missing) and shouldn't be deleted.") (cl-destructuring-bind (_key desc func) action (when desc (push func options) + (cl-loop for regexp in doom--straight-recommended-options + if (string-match-p regexp desc) + return (setq desc (concat desc " (Recommended)"))) (print! "%2s) %s" (length options) desc))))) (terpri) (let ((options (nreverse options)) From b7dc9c644eb587fd1aeb566fde76f0bb6586d5e4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 8 Jan 2020 22:09:42 -0500 Subject: [PATCH 568/983] Don't use find if find can't be found --- core/cli/packages.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index d834e0432..a5300009f 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -105,7 +105,10 @@ declaration) or dependency thereof that hasn't already been." (straight-check-for-modifications (when (file-directory-p (straight--modified-dir)) '(find-when-checking))) - (straight--allow-find (and straight-check-for-modifications t)) + (straight--allow-find + (and straight-check-for-modifications + (executable-find straight-find-executable) + t)) (straight--packages-not-to-rebuild (or straight--packages-not-to-rebuild (make-hash-table :test #'equal))) (straight--packages-to-rebuild From 46881133808f84765e8d8dc555269a7e535b8427 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 8 Jan 2020 22:39:08 -0500 Subject: [PATCH 569/983] Don't recursively clone editorconfig This was removed in 18edebe due to #2216, but with 125561e it is no longer necessary. --- modules/tools/editorconfig/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/editorconfig/packages.el b/modules/tools/editorconfig/packages.el index 716c3b55e..5fb9c477e 100644 --- a/modules/tools/editorconfig/packages.el +++ b/modules/tools/editorconfig/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/editorconfig/packages.el -(package! editorconfig) +(package! editorconfig :recipe (:nonrecursive t)) From 6d0e60a0245c4082c1d9285ef6c062d9df41ee5d Mon Sep 17 00:00:00 2001 From: Ralf Beckmann Date: Thu, 9 Jan 2020 08:34:41 +0100 Subject: [PATCH 570/983] Make sudo-this-file usable in dired-buffers --- core/autoload/files.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/autoload/files.el b/core/autoload/files.el index 5ca012234..13c10c35d 100644 --- a/core/autoload/files.el +++ b/core/autoload/files.el @@ -345,7 +345,10 @@ file if it exists, without confirmation." (defun doom/sudo-this-file () "Open the current file as root." (interactive) - (find-alternate-file (doom--sudo-file buffer-file-name))) + (find-alternate-file (doom--sudo-file (or buffer-file-name + (when (or (derived-mode-p 'dired-mode) + (derived-mode-p 'wdired-mode)) + default-directory))))) ;;;###autoload (defun doom/sudo-save-buffer () From 87f72c096c5a1a907e4a82cc393248a36fdc653b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 02:45:41 -0500 Subject: [PATCH 571/983] ui/zen: disable fullscreening properly Setting writeroom-fullscreen-effect to nil wasn't the correct way to disable fullscreen. --- modules/ui/zen/config.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ui/zen/config.el b/modules/ui/zen/config.el index ae55cb76c..12cbaac8c 100644 --- a/modules/ui/zen/config.el +++ b/modules/ui/zen/config.el @@ -11,8 +11,10 @@ ;;; Packages (after! writeroom-mode - (setq writeroom-fullscreen-effect nil - writeroom-maximize-window nil) + ;; Users should be able to activate writeroom-mode in one buffer (e.g. an org + ;; buffer) and code in another. Fullscreening/maximizing will be opt-in. + (setq writeroom-maximize-window nil) + (remove-hook 'writeroom-global-effects 'writeroom-set-fullscreen) (add-hook! 'writeroom-mode-hook (defun +zen-enable-mixed-pitch-mode-h () From 67d9ef64f3c5a70b8bcbc7799345e3c373a4e33f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 02:47:06 -0500 Subject: [PATCH 572/983] ui/zen: fix mixed-pitch-mode not activating --- modules/ui/zen/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/zen/config.el b/modules/ui/zen/config.el index 12cbaac8c..fab82d313 100644 --- a/modules/ui/zen/config.el +++ b/modules/ui/zen/config.el @@ -17,7 +17,7 @@ (remove-hook 'writeroom-global-effects 'writeroom-set-fullscreen) (add-hook! 'writeroom-mode-hook - (defun +zen-enable-mixed-pitch-mode-h () + (defun +zen-enable-text-scaling-mode-h () "Enable `mixed-pitch-mode' when in `+zen-mixed-pitch-modes'." (when (/= +zen-text-scale 0) (text-scale-set (if writeroom-mode +zen-text-scale 0))))) From 15f2245b10587f77bc515a452fac1dd6c1f27069 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 03:04:50 -0500 Subject: [PATCH 573/983] Install undo-tree 0.7.1 from emacs-straight/undo-tree I re-enable history persistence, now that it has been fixed. Also, I install it from the emacs-straight/undo-tree mirror, which is fast and reliable. Closes #2339, #2334 --- core/core-editor.el | 6 ++++-- core/packages.el | 5 +---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index e8efb7a77..ae1f5f2a2 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -527,7 +527,7 @@ files, so we replace calls to `pp' with the much faster `prin1'." :after-call doom-switch-buffer-hook after-find-file :config (setq undo-tree-visualizer-diff t - undo-tree-auto-save-history nil + undo-tree-auto-save-history t ;; Increase undo-limits by a factor of ten to avoid emacs prematurely ;; truncating the undo history and corrupting the tree. See ;; https://github.com/syl20bnr/spacemacs/issues/12110 @@ -558,7 +558,9 @@ files, so we replace calls to `pp' with the much faster `prin1'." (stringp (car item)) (setcar item (substring-no-properties (car item)))))) - ;; Undo-tree is too chatty about saving its history files. + ;; Undo-tree is too chatty about saving its history files. This doesn't + ;; totally suppress it logging to *Messages*, it only stops it from appearing + ;; in the echo-area. (advice-add #'undo-tree-save-history :around #'doom-shut-up-a) (global-undo-tree-mode +1)) diff --git a/core/packages.el b/core/packages.el index 89dda2546..d8bc3c210 100644 --- a/core/packages.el +++ b/core/packages.el @@ -27,10 +27,7 @@ ;; I've created my own mirror for it because git.savannah.gnu.org runs on a ;; potato. :recipe (:host github :repo "hlissner/emacs-so-long")) -(package! undo-tree - ;; Version 0.6.5 is on ELPA which lacks a fix we need, so we install 0.6.6 - ;; from emacsmirror/undo-tree instead. - :recipe (:host github :repo "emacsmirror/undo-tree")) +(package! undo-tree) (package! ws-butler ;; Use my fork of ws-butler, which has a few choice improvements and ;; optimizations (the original has been abandoned). From f6852a2c9f9d8bf5e71085a38f7fee7cece903d2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 03:31:05 -0500 Subject: [PATCH 574/983] Add --discard switch to 'doom upgrade' #2224 Also rewrites straight prompt-in-batch-Emacs hack, and move it to core-cli.el. --- core/cli/packages.el | 12 +++-- core/core-cli.el | 123 +++++++++++++++++++++++++++++++++++++----- core/core-packages.el | 78 --------------------------- 3 files changed, 118 insertions(+), 95 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index a5300009f..c598da5b2 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -1,7 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; core/cli/packages.el -(defcli! (update u) () +(defcli! (update u) + ((discard-p ["--discard"] "All local changes to packages are discarded")) "Updates packages. This works by fetching all installed package repos and checking the distance @@ -10,10 +11,11 @@ between HEAD and FETCH_HEAD. This can take a while. This excludes packages whose `package!' declaration contains a non-nil :freeze or :ignore property." (straight-check-all) - (doom-cli-reload-core-autoloads) - (when (doom-cli-packages-update) - (doom-cli-reload-package-autoloads)) - t) + (let ((doom-auto-discard discard-p)) + (doom-cli-reload-core-autoloads) + (when (doom-cli-packages-update) + (doom-cli-reload-package-autoloads)) + t)) (defcli! (build b) ((rebuild-p ["-r"] "Only rebuild packages that need rebuilding")) diff --git a/core/core-cli.el b/core/core-cli.el index 38cee2ffb..7e4dc5c2e 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -1,17 +1,5 @@ ;;; -*- lexical-binding: t; no-byte-compile: t; -*- -(require 'seq) - -;; Eagerly load these libraries because we may be in a session that hasn't been -;; fully initialized (e.g. where autoloads files haven't been generated or -;; `load-path' populated). -(load! "autoload/cli") -(load! "autoload/debug") -(load! "autoload/files") -(load! "autoload/format") -(load! "autoload/plist") - - ;; ;;; Variables @@ -20,6 +8,9 @@ commands like `doom-cli-packages-install', `doom-cli-packages-update' and `doom-packages-autoremove'.") +(defvar doom-auto-discard (getenv "FORCE") + "If non-nil, discard all local changes while updating.") + (defvar doom--cli-p nil) (defvar doom--cli-commands (make-hash-table :test 'equal)) (defvar doom--cli-groups (make-hash-table :test 'equal)) @@ -213,6 +204,114 @@ BODY will be run when this dispatcher is called." ,@body)) +;; +;;; Straight hacks + +(defvar doom--cli-straight-discard-options + '("^Delete remote \"[^\"]+\", re-create it with correct " + "^Reset branch " + "^Abort merge$" + "^Discard changes$")) + +;; HACK Remove dired & magit options from prompt, since they're inaccessible in +;; noninteractive sessions. +(advice-add #'straight-vc-git--popup-raw :override #'straight--popup-raw) + +;; HACK Replace GUI popup prompts (which hang indefinitely in tty Emacs) with +;; simple prompts. +(defadvice! doom--straight-fallback-to-y-or-n-prompt-a (orig-fn &optional prompt) + :around #'straight-are-you-sure + (or doom-auto-accept + (if noninteractive + (y-or-n-p (format! "%s" (or prompt ""))) + (funcall orig-fn prompt)))) + +(defadvice! doom--straight-fallback-to-tty-prompt-a (orig-fn prompt actions) + "Modifies straight to prompt on the terminal when in noninteractive sessions." + :around #'straight--popup-raw + (if (not noninteractive) + (funcall orig-fn prompt actions) + ;; We can't intercept C-g, so no point displaying any options for this key + ;; when C-c is the proper way to abort batch Emacs. + (delq! "C-g" actions 'assoc) + ;; HACK These are associated with opening dired or magit, which isn't + ;; possible in tty Emacs, so... + (delq! "e" actions 'assoc) + (delq! "g" actions 'assoc) + (if doom-auto-discard + (cl-loop with doom-auto-accept = t + for (_key desc func) in actions + when desc + when (cl-find-if (doom-rpartial #'string-match-p desc) + doom--cli-straight-discard-options) + return (funcall func)) + (print! (start "%s") (red prompt)) + (print-group! + (terpri) + (let (options) + (print-group! + (print! " 1) Abort") + (cl-loop for (_key desc func) in actions + when desc + do (push func options) + and do + (print! "%2s) %s" (1+ (length options)) + (if (cl-find-if (doom-rpartial #'string-match-p desc) + doom--cli-straight-discard-options) + (concat desc " (Recommended)") + desc)))) + (terpri) + (let* ((options + (cons (lambda () + (let ((doom-format-indent 0)) + (terpri) + (print! (warn "Aborted"))) + (kill-emacs 1)) + (nreverse options))) + (prompt + (format! "How to proceed? (%s) " + (mapconcat #'number-to-string + (number-sequence 1 (length options)) + ", "))) + answer fn) + (while (null (nth (setq answer (1- (read-number prompt))) + options)) + (print! (warn "%s is not a valid answer, try again.") + answer)) + (funcall (nth answer options)))))))) + +(defadvice! doom--straight-respect-print-indent-a (args) + "Indent straight progress messages to respect `doom-format-indent', so we +don't have to pass whitespace to `straight-use-package's fourth argument +everywhere we use it (and internally)." + :filter-args #'straight-use-package + (cl-destructuring-bind + (melpa-style-recipe &optional no-clone no-build cause interactive) + args + (list melpa-style-recipe no-clone no-build + (if (and (not cause) + (boundp 'doom-format-indent) + (> doom-format-indent 0)) + (make-string (1- (or doom-format-indent 1)) 32) + cause) + interactive))) + + +;; +;;; Dependencies + +(require 'seq) + +;; Eagerly load these libraries because we may be in a session that hasn't been +;; fully initialized (e.g. where autoloads files haven't been generated or +;; `load-path' populated). +(load! "autoload/cli") +(load! "autoload/debug") +(load! "autoload/files") +(load! "autoload/format") +(load! "autoload/plist") + + ;; ;;; CLI Commands diff --git a/core/core-packages.el b/core/core-packages.el index 84e691cbc..eb3596f6b 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -124,84 +124,6 @@ missing) and shouldn't be deleted.") ;; We handle it ourselves straight-fix-org nil) -;;; Getting straight to behave in batch mode -(when noninteractive - ;; HACK Remove dired & magit options from prompt, since they're inaccessible - ;; in noninteractive sessions. - (advice-add #'straight-vc-git--popup-raw :override #'straight--popup-raw)) - -;; HACK Replace GUI popup prompts (which hang indefinitely in tty Emacs) with -;; simple prompts. -(defadvice! doom--straight-fallback-to-y-or-n-prompt-a (orig-fn &optional prompt) - :around #'straight-are-you-sure - (if noninteractive - (y-or-n-p (format! "%s" (or prompt ""))) - (funcall orig-fn prompt))) - -(defvar doom--straight-recommended-options - '("^Delete remote \"[^\"]+\", re-create it with correct " - "^Reset branch " - "^Abort merge$")) - -(defadvice! doom--straight-fallback-to-tty-prompt-a (orig-fn prompt actions) - "Modifies straight to prompt on the terminal when in noninteractive sessions." - :around #'straight--popup-raw - (if (not noninteractive) - (funcall orig-fn prompt actions) - ;; We can't intercept C-g, so no point displaying any options for this key - ;; Just use C-c - (delq! "C-g" actions 'assoc) - ;; HACK These are associated with opening dired or magit, which isn't - ;; possible in tty Emacs, so... - (delq! "e" actions 'assoc) - (delq! "g" actions 'assoc) - (let ((options (list (lambda () - (let ((doom-format-indent 0)) - (terpri) - (print! (error "Aborted"))) - (kill-emacs))))) - (print! (start "%s") (red prompt)) - (terpri) - (print-group! - (print-group! - (print! " 1) Abort") - (dolist (action actions) - (cl-destructuring-bind (_key desc func) action - (when desc - (push func options) - (cl-loop for regexp in doom--straight-recommended-options - if (string-match-p regexp desc) - return (setq desc (concat desc " (Recommended)"))) - (print! "%2s) %s" (length options) desc))))) - (terpri) - (let ((options (nreverse options)) - answer fn) - (while - (not - (setq - fn (ignore-errors - (nth (1- (setq answer - (read-number - (format! "How to proceed? (%s) " - (mapconcat #'number-to-string - (number-sequence 1 (length options)) - ", "))))) - options)))) - (print! (warn "%s is not a valid answer, try again.") answer)) - (funcall fn)))))) - -(defadvice! doom--straight-respect-print-indent-a (args) - :filter-args #'straight-use-package - (cl-destructuring-bind - (melpa-style-recipe &optional no-clone no-build cause interactive) - args - (list melpa-style-recipe no-clone no-build - (if (and (not cause) - (boundp 'doom-format-indent) - (> doom-format-indent 0)) - (make-string (1- (or doom-format-indent 1)) 32) - cause) - interactive))) ;; From 44fb8ab5944d3582e93eb411351df3ed163757cb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 03:40:02 -0500 Subject: [PATCH 575/983] undo-tree-enable-undo-in-region = t --- core/core-editor.el | 1 + 1 file changed, 1 insertion(+) diff --git a/core/core-editor.el b/core/core-editor.el index ae1f5f2a2..635d89520 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -528,6 +528,7 @@ files, so we replace calls to `pp' with the much faster `prin1'." :config (setq undo-tree-visualizer-diff t undo-tree-auto-save-history t + undo-tree-enable-undo-in-region t ;; Increase undo-limits by a factor of ten to avoid emacs prematurely ;; truncating the undo history and corrupting the tree. See ;; https://github.com/syl20bnr/spacemacs/issues/12110 From 3fe6f7f3d9303cff23c77ec2388622ee86c3e5d5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 15:19:52 -0500 Subject: [PATCH 576/983] tools/direnv: update lorri setup instructions It is now available under services.lorri in 19.09. --- modules/tools/direnv/README.org | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/modules/tools/direnv/README.org b/modules/tools/direnv/README.org index 20530ae92..75e5e6ae4 100644 --- a/modules/tools/direnv/README.org +++ b/modules/tools/direnv/README.org @@ -67,27 +67,8 @@ Or ~nix-env -i direnv~ * Troubleshooting ** direnv + nix is slow Consider augmenting direnv with [[https://github.com/target/lorri][lorri]], which will cache nix builds and speed up -direnv tremendously. - -At the time of writing, the lorri package in nixpkgs simply emits an error -message, telling you to install it manually. You can get around this with: +direnv tremendously: #+BEGIN_SRC nix -nixpkgs.overlays = [ - (self: super: { - lorri = - let src = (super.fetchFromGitHub { - owner = "target"; - repo = "lorri"; - rev = "38eae3d487526ece9d1b8c9bb0d27fb45cf60816"; - sha256 = "11k9lxg9cv6dlxj4haydvw4dhcfyszwvx7jx9p24jadqsy9jmbj4"; - }); - in import src { inherit src; }; - }) -]; - -environment.systemPackages = [ pkgs.lorri ]; +services.lorri.enable = true; #+END_SRC - -Otherwise, follow [[https://github.com/target/lorri#installing-lorri][the instructions in lorri's README]] on how to install it -manually. From 1fd18b88ddd5e0693033bf4fc6e76c5e0422957d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 15:26:08 -0500 Subject: [PATCH 577/983] Bind C-j/C-k to forward/backward history for eshell --- modules/term/eshell/config.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/term/eshell/config.el b/modules/term/eshell/config.el index 5e185b60a..4a65e231b 100644 --- a/modules/term/eshell/config.el +++ b/modules/term/eshell/config.el @@ -132,6 +132,8 @@ You should use `set-eshell-alias!' to change this.") :n "C" #'+eshell/evil-change-line :n "d" #'+eshell/evil-delete :n "D" #'+eshell/evil-delete-line + :ni "C-j" #'eshell-next-matching-input-from-input + :ni "C-k" #'eshell-previous-matching-input-from-input :ig "C-d" #'+eshell/quit-or-delete-char "TAB" #'+eshell/pcomplete [tab] #'+eshell/pcomplete From 558e906b2bf3b4349e8c221a71400758348754b1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 15:59:58 -0500 Subject: [PATCH 578/983] Add 'SPC m r f' for refiling to specific org file --- modules/lang/org/autoload/org-refile.el | 16 ++++++++++++++-- modules/lang/org/config.el | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/modules/lang/org/autoload/org-refile.el b/modules/lang/org/autoload/org-refile.el index ba4aa4101..a9ac3aaf9 100644 --- a/modules/lang/org/autoload/org-refile.el +++ b/modules/lang/org/autoload/org-refile.el @@ -3,15 +3,27 @@ ;; REVIEW These are all proof-of-concept. Refactor me! ;;;###autoload -(defun +org/refile-to-current-file (arg) +(defun +org/refile-to-current-file (arg &optional file) "TODO" (interactive "P") - (let ((org-refile-targets `((nil :maxlevel . 10))) + (let ((org-refile-targets `((,file :maxlevel . 10))) (org-refile-use-outline-path nil) (org-refile-keep arg) current-prefix-arg) (call-interactively #'org-refile))) +;;;###autoload +(defun +org/refile-to-file (arg file) + "Refile current heading to a particular org file." + (interactive + (list current-prefix-arg + (read-file-name "Select file to refile to: " + default-directory + buffer-file-name + t nil + (lambda (f) (string-match-p "\\.org$" f))))) + (+org/refile-to-current-file arg file)) + ;;;###autoload (defun +org/refile-to-other-window (arg) "TODO" diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index fd83be021..d2bd4feac 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -679,6 +679,7 @@ between the two." "." #'+org/refile-to-current-file "c" #'+org/refile-to-running-clock "l" #'+org/refile-to-last-location + "f" #'+org/refile-to-file "o" #'+org/refile-to-other-window "O" #'+org/refile-to-other-buffers "v" #'+org/refile-to-visible From dedcd5496a27467c130869f69b5155fe2f0f2dce Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 16:01:02 -0500 Subject: [PATCH 579/983] ui/modeline: mention +light in readme --- modules/ui/modeline/README.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ui/modeline/README.org b/modules/ui/modeline/README.org index 376f290ed..e27ad8371 100644 --- a/modules/ui/modeline/README.org +++ b/modules/ui/modeline/README.org @@ -30,7 +30,8 @@ This module provides an Atom-inspired, minimalistic modeline for Doom Emacs, powered by [[https://github.com/seagle0128/doom-modeline][the doom-modeline package]] (where you can find screenshots). ** Module Flags -This module provides no flags. ++ =+light= Enables a lighter, less featureful version of the modeline that does + not depend on ~doom-modeline~, which has performances issues in some cases. ** Plugins + [[https://github.com/seagle0128/doom-modeline][doom-modeline]] From 8ac4320e0b781281c1e50ad09274c28951435867 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 16:41:12 -0500 Subject: [PATCH 580/983] Update readme file template --- .../templates/org-mode/__doom-readme | 42 +++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/modules/editor/file-templates/templates/org-mode/__doom-readme b/modules/editor/file-templates/templates/org-mode/__doom-readme index 23b967bd3..ca0dd707c 100644 --- a/modules/editor/file-templates/templates/org-mode/__doom-readme +++ b/modules/editor/file-templates/templates/org-mode/__doom-readme @@ -1,5 +1,5 @@ # -*- mode: snippet -*- -# name: Doom module readme +# name: Doom module readme # -- #+TITLE: ${1:`(if (string-match "modules/\\([^/]+\\)/\\([^/]+\\)/.+" buffer-file-name) (format "%s/%s" @@ -13,30 +13,58 @@ * Table of Contents :TOC_3:noexport: * Description -${3:A summary of what this module does.} +${3:# A summary of what this module does.} + If possible, include a brief list of feature highlights here + Like code completion, syntax checking or available snippets + Include links to packages & external things where possible +** Maintainers ++ @username_linked_to_gihub (Author) ++ @username_linked_to_gihub ++ @username_linked_to_gihub + +# If this module has no maintainers, then... +This module has no dedicated maintainers. + ** Module Flags ++ =+flag1= A short description of what this flag does and what it might need + when enabled. ++ =+flag2= A short description of what this flag does and what it might need + when enabled. ++ =+flag3= A short description of what this flag does and what it might need + when enabled. + +# If this module has no flags, then... This module provides no flags. ** Plugins -{A list of linked plugins} +# A list of linked plugins ++ [[https://orgmode.org/][org-plus-contrib]] ++ [[https://github.com/sabof/org-bullets][org-bullets]] ++ [[https://github.com/TobiasZawada/org-yt][org-yt]] ++ [[https://github.com/sebastiencs/company-box][company-box]]* (=+childframe=) ++ =:lang crystal= + + [[https://github.com/brantou/ob-crystal][ob-crystal]] ++ =:lang go= + + [[https://github.com/pope/ob-go][ob-go]] ++ =+present= + + [[https://github.com/anler/centered-window-mode][centered-window]] + + [[https://github.com/takaxp/org-tree-slide][org-tree-slide]] + + [[https://gitlab.com/oer/org-re-reveal][org-re-reveal]] ** Hacks -{A list of internal modifications to included packages} +# A list of internal modifications to included packages; omit if unneeded * Prerequisites This module has no prereqisites. * Features -An in-depth list of features, how to use them, and their dependencies. +# An in-depth list of features, how to use them, and their dependencies. * Configuration -How to configure this module, including common problems and how to address them. +# How to configure this module, including common problems and how to address them. * Troubleshooting -Common issues and their solution, or places to look for help. +# Common issues and their solution, or places to look for help. $0 \ No newline at end of file From a680a4c96d2b57fcb75635bd1a918e1235e72890 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 16:43:03 -0500 Subject: [PATCH 581/983] Replace :app write with :checkers grammar --- init.example.el | 4 +- modules/app/write/README.org | 131 --------------------------- modules/app/write/autoload.el | 43 --------- modules/app/write/config.el | 56 ------------ modules/app/write/doctor.el | 7 -- modules/app/write/packages.el | 12 --- modules/checkers/grammar/README.org | 68 ++++++++++++++ modules/checkers/grammar/config.el | 28 ++++++ modules/checkers/grammar/packages.el | 5 + 9 files changed, 104 insertions(+), 250 deletions(-) delete mode 100644 modules/app/write/README.org delete mode 100644 modules/app/write/autoload.el delete mode 100644 modules/app/write/config.el delete mode 100644 modules/app/write/doctor.el delete mode 100644 modules/app/write/packages.el create mode 100644 modules/checkers/grammar/README.org create mode 100644 modules/checkers/grammar/config.el create mode 100644 modules/checkers/grammar/packages.el diff --git a/init.example.el b/init.example.el index b25f89e30..f542b4e91 100644 --- a/init.example.el +++ b/init.example.el @@ -76,6 +76,9 @@ ;;term ; terminals in Emacs ;;vterm ; another terminals in Emacs + :checkers + ;;grammar + :tools ;;ansible ;;debugger ; FIXME stepping through code, to help you add bugs @@ -171,7 +174,6 @@ ;;irc ; how neckbeards socialize ;;(rss +org) ; emacs as an RSS reader ;;twitter ; twitter client https://twitter.com/vnought - ;;write ; emacs for writers (fiction, notes, papers, etc.) :config ;;literate diff --git a/modules/app/write/README.org b/modules/app/write/README.org deleted file mode 100644 index dc8159fff..000000000 --- a/modules/app/write/README.org +++ /dev/null @@ -1,131 +0,0 @@ -#+TITLE: app/write -#+DATE: October 10, 2019 -#+SINCE: v1.3 -#+STARTUP: inlineimages - -* Table of Contents :TOC_3:noexport: -- [[#description][Description]] - - [[#module-flags][Module Flags]] - - [[#plugins][Plugins]] -- [[#prerequisites][Prerequisites]] - - [[#language-tool][Language Tool]] - - [[#wordnut][Wordnut]] -- [[#features][Features]] - - [[#m-x-write-mode][~M-x +write-mode~]] - - [[#language-tool-langtool][Language Tool ~+langtool~]] - - [[#commands][Commands]] - - [[#wordnut-wordnut][Wordnut ~+wordnut~]] - - [[#commands-1][Commands]] - - [[#synosaurus][Synosaurus]] - - [[#commands-2][Commands]] -- [[#configuration][Configuration]] - - [[#mixed-pitch-mode][mixed-pitch-mode]] -- [[#appendix][Appendix]] - - [[#minor-modes][Minor modes]] - - [[#commands-3][Commands]] - -* Description -Adds word processing tools and the ~+write-mode~ minor mode, which converts -Emacs into a more comfortable writing environment. - -** Module Flags -This module provides two module flags: - -- ~+langtool~ Enables language tool integration. -- ~+wordnut~ Enables wordnet integration. - -** Plugins -+ [[https://github.com/hpdeifel/synosaurus][synosaurus]] -+ [[https://gitlab.com/jabranham/mixed-pitch][mixed-pitch]] -+ [[https://github.com/joostkremers/visual-fill-column][visual-fill-column]] -+ [[https://github.com/mhayashi1120/Emacs-langtool][langtool]]* (=+langtool=) -+ [[https://github.com/gromnitsky/wordnut][wordnut]]* (=+wordnut=) - -* Prerequisites -** Language Tool -Either download and deploy it from https://languagetool.org/ or install it -through your OS package manager: - -#+BEGIN_SRC sh -# MacOS/Homebrew users: -brew install languagetool - -# Arch Linux users: -sudo pacman -S languagetool -#+END_SRC - -This module tries to guess the location of languagetool-commandline.jar. If you -get a warning that Doom =couldn't find languagetool-commandline.jar=, you will -need to find langaugetool-commandline.jar and set ~langtool-language-tool-jar~ -to its path. - -** Wordnut -This requires =wordnet= to be installed, which should be available through your -OS package manager: - -#+BEGIN_SRC sh -# MacOS/Homebrew users: -brew install wordnet - -# Arch Linux users: -sudo pacaur -S wordnet # on the AUR -#+END_SRC - -* Features -** ~M-x +write-mode~ -Write mode makes Emacs a more comfortable writing environment by: - -- Centering the buffer (with ~visual-fill-column-mode~), ala distraction-free - mode from other text editors. -- Soft-wrapping long text lines with ~visual-line-mode~. -- Enabling ~mixed-pitch-mode~, allowing fixed-width and variable-pitch fonts to - co-exist in one buffer. For example, a monospace font for SRC blocks and Arial - for everything else. -- In org-mode: - - Turns on ~org-indent-mode~ - - Turns on ~+org-pretty-mode~ - -** Language Tool ~+langtool~ -[[https://www.languagetool.org/][Language Tool]] is a polyglot proofreader service that checks for grammar and -stylistic issues in your writing. This requires Java 1.8+. - -#+begin_quote -This requires Java 1.8+ -#+end_quote - -*** Commands -- ~langtool-check~ -- ~langtool-correct-buffer~ - -** Wordnut ~+wordnut~ -Wordnut provides a searchable dictionary frontend for Emacs. This requires -~wordnet~, which should be available in your OS's package manager. - -*** Commands -- ~wordnut-search~ -- ~wordnut-lookup-curent-word~ - -** Synosaurus -Synosaurus provides a service for looking up synonyms. It requires an internet -connection. - -*** Commands -- ~synosaurus-lookup~ -- ~synosaurus-choose-and-replace~ - -* Configuration -** mixed-pitch-mode -To configure which faces are displayed with fixed-pitch fonts in -~mixed-pitch-mode~, look into ~mixed-pitch-fixed-pitch-faces~. - -* Appendix -** Minor modes -- ~+write-mode~ -- ~mixed-pitch-mode~ -** Commands -- ~langtool-check~ -- ~langtool-correct-buffer~ -- ~synosaurus-choose-and-replace~ -- ~synosaurus-lookup~ -- ~wordnut-lookup-curent-word~ -- ~wordnut-search~ diff --git a/modules/app/write/autoload.el b/modules/app/write/autoload.el deleted file mode 100644 index f1fa84601..000000000 --- a/modules/app/write/autoload.el +++ /dev/null @@ -1,43 +0,0 @@ -;;; app/write/autoload.el -*- lexical-binding: t; -*- - -;;;###autoload -(defvar +write-mode-map (make-sparse-keymap) - "TODO") - -;;;###autoload -(define-minor-mode +write-mode - "Turns Emacs into a more comfortable writing environment and word processor." - :init-value nil - :keymap +write-mode-map - (setq-local visual-fill-column-center-text t) - (when +write-text-scale - (text-scale-set (if +write-mode 2 0))) - (when +write-line-spacing - (setq-local line-spacing +write-line-spacing))) - -;;;###autoload -(defun +write-init-org-mode-h () - "Initializes `org-mode' specific settings for `+write-mode'." - (when (eq major-mode 'org-mode) - (+org-pretty-mode (if +write-mode +1 -1)))) - -;;;###autoload -(defun +write-init-line-numbers-h () - (display-line-numbers-mode (if +write-mode +1 -1))) - -;;;###autoload -(defun +write-init-mixed-pitch-h () - (mixed-pitch-mode (if +write-mode +1 -1))) - -;;;###autoload -(defun +write-init-visual-fill-column-h () - (visual-fill-column-mode (if +write-mode +1 -1))) - -;;;###autoload -(add-hook! '+write-mode-hook - #'(flyspell-mode - visual-line-mode - +write-init-mixed-pitch-h - +write-init-visual-fill-column-h - +write-init-line-numbers-h - +write-init-org-mode-h)) diff --git a/modules/app/write/config.el b/modules/app/write/config.el deleted file mode 100644 index e42620df0..000000000 --- a/modules/app/write/config.el +++ /dev/null @@ -1,56 +0,0 @@ -;;; app/write/config.el -*- lexical-binding: t; -*- - -(defvar +write-text-scale nil - "What to scale the text up to in `+write-mode'. Uses `text-scale-set'.") - -(defvar +write-line-spacing nil - "What to set `line-spacing' in `+write-mode'.") - -;; -;; Packages - -(use-package! langtool - :when (featurep! +langtool) - :commands (langtool-check - langtool-check-done - langtool-show-message-at-point - langtool-correct-buffer) - :init (setq langtool-default-language "en-US") - :config - (unless langtool-language-tool-jar - (setq langtool-language-tool-jar - (cond (IS-MAC - (locate-file "libexec/languagetool-commandline.jar" - (doom-files-in "/usr/local/Cellar/languagetool" - :type 'dirs - :depth 2))) - (IS-LINUX - "/usr/share/java/languagetool/languagetool-commandline.jar"))))) - - -;; `synosaurus' -(setq synosaurus-choose-method 'default) - - -;; `mixed-pitch' -(after! mixed-pitch - (setq mixed-pitch-fixed-pitch-faces - (append mixed-pitch-fixed-pitch-faces - '(org-todo-keyword-todo - org-todo-keyword-habt - org-todo-keyword-done - org-todo-keyword-wait - org-todo-keyword-kill - org-todo-keyword-outd - org-todo - org-indent - line-number - line-number-current-line - org-special-keyword - org-date - org-property-value - org-special-keyword - org-property-value - org-ref-cite-face - org-tag - font-lock-comment-face)))) diff --git a/modules/app/write/doctor.el b/modules/app/write/doctor.el deleted file mode 100644 index 655adea7d..000000000 --- a/modules/app/write/doctor.el +++ /dev/null @@ -1,7 +0,0 @@ -;; -*- lexical-binding: t; no-byte-compile: t; -*- -;;; app/write/doctor.el - -(when (featurep! +langtool) - (require 'langtool) - (unless (file-exists-p langtool-language-tool-jar) - (warn! "Couldn't find languagetool-commandline.jar"))) diff --git a/modules/app/write/packages.el b/modules/app/write/packages.el deleted file mode 100644 index 4827e984c..000000000 --- a/modules/app/write/packages.el +++ /dev/null @@ -1,12 +0,0 @@ -;; -*- no-byte-compile: t; -*- -;;; app/write/packages.el - -(package! synosaurus) -(package! mixed-pitch) - -(when (featurep! +langtool) - (package! langtool)) -(when (featurep! +wordnut) - (package! wordnut)) - -(package! visual-fill-column) diff --git a/modules/checkers/grammar/README.org b/modules/checkers/grammar/README.org new file mode 100644 index 000000000..1f51b3e03 --- /dev/null +++ b/modules/checkers/grammar/README.org @@ -0,0 +1,68 @@ +#+TITLE: checkers/grammar +#+DATE: January 9, 2020 +#+SINCE: v3.0.0 +#+STARTUP: inlineimages nofold + +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#maintainers][Maintainers]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] +- [[#prerequisites][Prerequisites]] +- [[#features][Features]] + - [[#language-tool][Language Tool]] + - [[#commands][Commands]] + - [[#writegood-mode][writegood-mode]] +- [[#configuration][Configuration]] +- [[#troubleshooting][Troubleshooting]] + +* Description +This module adds grammar checking to Emacs to aid your writing by combining +=lang-tool= and =writegood-mode=. + +** Maintainers +This module has no dedicated maintainers. + +** Module Flags +This module provides no flags. + +** Plugins ++ [[https://github.com/mhayashi1120/Emacs-langtool][langtool]] ++ [[https://github.com/bnbeckwith/writegood-mode][writegood-mode]] + +* Prerequisites +This module requires langtool (which requires =Java 1.8+=). + +It can be acquired either from https://languagetool.org/ or your OS's package +manager: + ++ macOS: ~brew install languagetool~ ++ Arch Linux: ~pacman -S languagetool~ + +This module tries to guess the location of languagetool-commandline.jar. If you +get a warning that Doom =couldn't find languagetool-commandline.jar=, you will +need to set ~langtool-language-tool-jar~ to its location. + +* Features +An in-depth list of features, how to use them, and their dependencies. + +** Language Tool +[[https://www.languagetool.org/][Language Tool]] is a polyglot proofreader service that checks for grammar and +stylistic issues in your writing. This requires Java 1.8+. + +#+begin_quote +This requires Java 1.8+ +#+end_quote + +*** Commands +- ~langtool-check~ +- ~langtool-correct-buffer~ + +** writegood-mode +This minor mode highlights weasel words, duplication and passive voice. + +* Configuration +How to configure this module, including common problems and how to address them. + +* Troubleshooting +Common issues and their solution, or places to look for help. diff --git a/modules/checkers/grammar/config.el b/modules/checkers/grammar/config.el new file mode 100644 index 000000000..830854261 --- /dev/null +++ b/modules/checkers/grammar/config.el @@ -0,0 +1,28 @@ +;;; checkers/grammar/config.el -*- lexical-binding: t; -*- + +(use-package! langtool + :commands (langtool-check + langtool-check-done + langtool-show-message-at-point + langtool-correct-buffer) + :init (setq langtool-default-language "en-US") + :config + (unless langtool-language-tool-jar + (setq langtool-language-tool-jar + (cond (IS-MAC + (locate-file "libexec/languagetool-commandline.jar" + (doom-files-in "/usr/local/Cellar/languagetool" + :type 'dirs + :depth 2))) + (IS-LINUX + "/usr/share/java/languagetool/languagetool-commandline.jar"))))) + + +;; Detects weasel words, passive voice and duplicates +(use-package! writegood-mode + :hook (org-mode markdown-mode rst-mode asciidoc-mode latex-mode) + :config + (map! :localleader + :map writegood-mode-map + "g" #'writegood-grade-level + "r" #'writegood-reading-ease)) diff --git a/modules/checkers/grammar/packages.el b/modules/checkers/grammar/packages.el new file mode 100644 index 000000000..1676cae55 --- /dev/null +++ b/modules/checkers/grammar/packages.el @@ -0,0 +1,5 @@ +;; -*- no-byte-compile: t; -*- +;;; checkers/grammar/packages.el + +(package! langtool) +(package! writegood-mode) From b89992624b95400a6023bb27030d56a9f58d6bd6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 18:41:48 -0500 Subject: [PATCH 582/983] Move :tools fly{check,spell} to :checkers {syntax,spell} These modules were renamed so we can later generalize their implementations, such as adding flymake support to the syntax checker. --- core/core-modules.el | 4 ++- docs/index.org | 11 +++++--- init.example.el | 6 ++--- modules/checkers/spell/autoload.el | 27 +++++++++++++++++++ .../flyspell => checkers/spell}/config.el | 13 ++++----- .../flyspell => checkers/spell}/packages.el | 2 +- modules/checkers/syntax/autoload.el | 25 +++++++++++++++++ .../flycheck => checkers/syntax}/config.el | 19 +++++++------ .../flycheck => checkers/syntax}/packages.el | 4 ++- modules/tools/flycheck/autoload.el | 13 --------- modules/tools/flyspell/autoload.el | 27 ------------------- modules/tools/flyspell/doctor.el | 4 --- 12 files changed, 83 insertions(+), 72 deletions(-) create mode 100644 modules/checkers/spell/autoload.el rename modules/{tools/flyspell => checkers/spell}/config.el (89%) rename modules/{tools/flyspell => checkers/spell}/packages.el (89%) create mode 100644 modules/checkers/syntax/autoload.el rename modules/{tools/flycheck => checkers/syntax}/config.el (88%) rename modules/{tools/flycheck => checkers/syntax}/packages.el (74%) delete mode 100644 modules/tools/flycheck/autoload.el delete mode 100644 modules/tools/flyspell/autoload.el delete mode 100644 modules/tools/flyspell/doctor.el diff --git a/core/core-modules.el b/core/core-modules.el index 63be64585..b77a2a8f0 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -24,7 +24,9 @@ (debugger (:tools debugger))) (:tools (rotate-text (:editor rotate-text)) (vterm (:term vterm)) - (password-store (:tools pass))) + (password-store (:tools pass)) + (flycheck (:checker syntax)) + (flyspell (:checker spell))) (:emacs (electric-indent (:emacs electric)) (hideshow (:editor fold)) (eshell (:term eshell)) diff --git a/docs/index.org b/docs/index.org index 32a4b7737..2f5f9104b 100644 --- a/docs/index.org +++ b/docs/index.org @@ -107,8 +107,13 @@ loaded last, before =:config= modules. + [[file:../modules/app/irc/README.org][irc]] - how neckbeards socialize + rss =+org= - an RSS client in Emacs + [[file:../modules/app/twitter/README.org][twitter]] - A twitter client for Emacs -+ [[file:../modules/app/write/README.org][write]] =+wordnut +langtool= - Transforms emacs into an IDE for writers, and for - writing fiction, notes, papers and so on. + +** :checkers +Modules dedicated to linting or checking your code or writing for issues. + ++ syntax =+childframe= - Live error/warning highlights ++ spell =+everywhere= - Spell checking ++ grammar - TODO ** :completion Modules that provide new interfaces or frameworks for completion, including code @@ -234,8 +239,6 @@ Small modules that give Emacs access to external tools & services. + [[file:../modules/tools/editorconfig/README.org][editorconfig]] - TODO + [[file:../modules/tools/ein/README.org][ein]] - TODO + [[file:../modules/tools/eval/README.org][eval]] =+overlay= - REPL & code evaluation support for a variety of languages -+ flycheck - Live error/warning highlights -+ flyspell =+everywhere= - Spell checking + gist - TODO + [[file:../modules/tools/lookup/README.org][lookup]] =+dictionary +docsets= - Universal jump-to & documentation lookup backend diff --git a/init.example.el b/init.example.el index f542b4e91..7fc2f63f9 100644 --- a/init.example.el +++ b/init.example.el @@ -77,7 +77,9 @@ ;;vterm ; another terminals in Emacs :checkers - ;;grammar + syntax ; tasing you for every semicolon you forget + ;;spell ; tasing you for misspelling mispelling + ;;grammar ; tasing grammar mistake every you make :tools ;;ansible @@ -87,8 +89,6 @@ ;;editorconfig ; let someone else argue about tabs vs spaces ;;ein ; tame Jupyter notebooks with emacs (eval +overlay) ; run code, run (also, repls) - flycheck ; tasing you for every semicolon you forget - ;;flyspell ; tasing you for misspelling mispelling ;;gist ; interacting with github gists (lookup ; helps you navigate your code and documentation +docsets) ; ...or in Dash docsets locally diff --git a/modules/checkers/spell/autoload.el b/modules/checkers/spell/autoload.el new file mode 100644 index 000000000..0674dc5c1 --- /dev/null +++ b/modules/checkers/spell/autoload.el @@ -0,0 +1,27 @@ +;;; checkers/spell/autoload.el -*- lexical-binding: t; -*- + +;;;###autodef +(defalias 'flyspell-mode! #'flyspell-mode) + +(defvar +spell--flyspell-predicate-alist nil + "TODO") + +;;;###autodef +(defun set-flyspell-predicate! (modes predicate) + "TODO" + (declare (indent defun)) + (dolist (mode (doom-enlist modes) +spell--flyspell-predicate-alist) + (add-to-list '+spell--flyspell-predicate-alist (cons mode predicate)))) + +;;;###autoload +(defun +spell-init-flyspell-predicate-h () + "TODO" + (when-let (pred (assq major-mode +spell--flyspell-predicate-alist)) + (setq-local flyspell-generic-check-word-predicate (cdr pred)))) + +;;;###autoload +(defun +spell-correction-at-point-p (&optional point) + "TODO" + (cl-loop for ov in (overlays-at (or point (point))) + if (overlay-get ov 'flyspell-overlay) + return t)) diff --git a/modules/tools/flyspell/config.el b/modules/checkers/spell/config.el similarity index 89% rename from modules/tools/flyspell/config.el rename to modules/checkers/spell/config.el index 3636d8c0c..b1a95e747 100644 --- a/modules/tools/flyspell/config.el +++ b/modules/checkers/spell/config.el @@ -1,7 +1,4 @@ -;;; tools/flyspell/config.el -*- lexical-binding: t; -*- - -;; -;;; Packages +;;; checkers/spell/config.el -*- lexical-binding: t; -*- (defvar ispell-dictionary "en_US") @@ -28,10 +25,10 @@ ispell-extra-args '("--sug-mode=ultra" "--run-together")) (add-hook! 'text-mode-hook - (defun +flyspell-remove-run-together-switch-for-aspell-h () + (defun +spell-remove-run-together-switch-for-aspell-h () (setq-local ispell-extra-args (remove "--run-together" ispell-extra-args)))) - (defun +flyspell-setup-ispell-extra-args-a (orig-fun &rest args) + (defun +spell-init-ispell-extra-args-a (orig-fun &rest args) :around '(ispell-word flyspell-auto-correct-word) (let ((ispell-extra-args (remove "--run-together" ispell-extra-args))) (ispell-kill-ispell t) @@ -57,7 +54,7 @@ #'flyspell-prog-mode)) (add-hook! 'flyspell-mode-hook - (defun +flyspell-inhibit-duplicate-detection-maybe-h () + (defun +spell-inhibit-duplicate-detection-maybe-h () "Don't mark duplicates when style/grammar linters are present. e.g. proselint and langtool." (when (or (and (bound-and-true-p flycheck-mode) @@ -67,7 +64,7 @@ e.g. proselint and langtool." ;; Ensure mode-local predicates declared with `set-flyspell-predicate!' are ;; used in their respective major modes. - (add-hook 'flyspell-mode-hook #'+flyspell-init-predicate-h) + (add-hook 'flyspell-mode-hook #'+spell-init-flyspell-predicate-h) (map! :map flyspell-mouse-map "RET" #'flyspell-correct-at-point diff --git a/modules/tools/flyspell/packages.el b/modules/checkers/spell/packages.el similarity index 89% rename from modules/tools/flyspell/packages.el rename to modules/checkers/spell/packages.el index efb81d804..a60738087 100644 --- a/modules/tools/flyspell/packages.el +++ b/modules/checkers/spell/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- -;;; tools/flyspell/packages.el +;;; checkers/spell/packages.el (package! flyspell-correct) (cond ((featurep! :completion ivy) diff --git a/modules/checkers/syntax/autoload.el b/modules/checkers/syntax/autoload.el new file mode 100644 index 000000000..4dc963572 --- /dev/null +++ b/modules/checkers/syntax/autoload.el @@ -0,0 +1,25 @@ +;;; checkers/syntax/autoload.el -*- lexical-binding: t; -*- + +;;;###autodef +(defun set-next-checker! (mode checker next &optional append) + "TODO" + (let ((fn (intern (format "+syntax--init-checkers-for-%s-h" mode)))) + (fset fn + (lambda () + (if (not (bound-and-true-p flycheck-mode)) + (add-hook 'flycheck-mode-hook fn 'append 'local) + (flycheck-add-next-checker checker next append) + (remove-hook 'flycheck-mode-hook fn 'local)))) + (add-hook (intern (format "%s-hook" mode)) fn))) + +;;;###autoload +(defun +syntax-init-popups-h () + "Activate `flycheck-posframe-mode' if available and in GUI Emacs. +Activate `flycheck-popup-tip-mode' otherwise. +Do nothing if `lsp-ui-mode' is active and `lsp-ui-sideline-enable' is non-nil." + (unless (and (bound-and-true-p lsp-ui-mode) + lsp-ui-sideline-enable) + (if (and (fboundp 'flycheck-posframe-mode) + (display-graphic-p)) + (flycheck-posframe-mode +1) + (flycheck-popup-tip-mode +1)))) diff --git a/modules/tools/flycheck/config.el b/modules/checkers/syntax/config.el similarity index 88% rename from modules/tools/flycheck/config.el rename to modules/checkers/syntax/config.el index 060f971cc..b91df9195 100644 --- a/modules/tools/flycheck/config.el +++ b/modules/checkers/syntax/config.el @@ -1,12 +1,7 @@ -;;; tools/flycheck/config.el -*- lexical-binding: t; -*- - -(defvar +flycheck-lazy-idle-delay 3.0 - "The delay before flycheck checks the buffer, after a check that produces no -errors.") - +;;; checkers/syntax/config.el -*- lexical-binding: t; -*- ;; -;;; Packages +;;; Flycheck (use-package! flycheck :commands flycheck-list-errors flycheck-buffer @@ -27,7 +22,7 @@ errors.") (set-popup-rule! "^\\*Flycheck error messages\\*" :select nil) (add-hook! 'doom-escape-hook :append - (defun +flycheck-buffer-h () + (defun +syntax-check-buffer-h () "Flycheck buffer on ESC in normal mode." (when flycheck-mode (ignore-errors (flycheck-buffer)) @@ -46,7 +41,7 @@ errors.") (use-package! flycheck-popup-tip :commands flycheck-popup-tip-show-popup flycheck-popup-tip-delete-popup - :init (add-hook 'flycheck-mode-hook #'+flycheck-init-popups-h) + :init (add-hook 'flycheck-mode-hook #'+syntax-init-popups-h) :config (setq flycheck-popup-tip-error-prefix "✕ ") (after! evil @@ -54,7 +49,7 @@ errors.") ;; the cursor's position or cause disruptive input delays. (add-hook! '(evil-insert-state-entry-hook evil-replace-state-entry-hook) #'flycheck-popup-tip-delete-popup) - (defadvice! +flycheck--disable-popup-tip-maybe-a (&rest _) + (defadvice! +syntax--disable-flycheck-popup-tip-maybe-a (&rest _) :before-while #'flycheck-popup-tip-show-popup (if evil-local-mode (eq evil-state 'normal) @@ -78,3 +73,7 @@ errors.") (add-hook! 'flycheck-posframe-inhibit-functions #'evil-insert-state-p #'evil-replace-state-p))) + + +;; +;;; TODO Flymake diff --git a/modules/tools/flycheck/packages.el b/modules/checkers/syntax/packages.el similarity index 74% rename from modules/tools/flycheck/packages.el rename to modules/checkers/syntax/packages.el index b9bcdfd82..5ce8c3f0f 100644 --- a/modules/tools/flycheck/packages.el +++ b/modules/checkers/syntax/packages.el @@ -1,7 +1,9 @@ ;; -*- no-byte-compile: t; -*- -;;; tools/flycheck/packages.el +;;; checkers/syntax/packages.el (package! flycheck) (package! flycheck-popup-tip) (when (featurep! +childframe) (package! flycheck-posframe)) + +;; TODO flymake? diff --git a/modules/tools/flycheck/autoload.el b/modules/tools/flycheck/autoload.el deleted file mode 100644 index 4f3ea2929..000000000 --- a/modules/tools/flycheck/autoload.el +++ /dev/null @@ -1,13 +0,0 @@ -;;; tools/flycheck/autoload.el -*- lexical-binding: t; -*- - -;;;###autoload -(defun +flycheck-init-popups-h () - "Activate `flycheck-posframe-mode' if available and in GUI Emacs. -Activate `flycheck-popup-tip-mode' otherwise. -Do nothing if `lsp-ui-mode' is active and `lsp-ui-sideline-enable' is non-nil." - (unless (and (bound-and-true-p lsp-ui-mode) - lsp-ui-sideline-enable) - (if (and (fboundp 'flycheck-posframe-mode) - (display-graphic-p)) - (flycheck-posframe-mode +1) - (flycheck-popup-tip-mode +1)))) diff --git a/modules/tools/flyspell/autoload.el b/modules/tools/flyspell/autoload.el deleted file mode 100644 index e33ab0df4..000000000 --- a/modules/tools/flyspell/autoload.el +++ /dev/null @@ -1,27 +0,0 @@ -;;; tools/flyspell/autoload.el -*- lexical-binding: t; -*- - -;;;###autodef -(defalias 'flyspell-mode! #'flyspell-mode) - -(defvar +flyspell--predicate-alist nil - "TODO") - -;;;###autodef -(defun set-flyspell-predicate! (modes predicate) - "TODO" - (declare (indent defun)) - (dolist (mode (doom-enlist modes) +flyspell--predicate-alist) - (add-to-list '+flyspell--predicate-alist (cons mode predicate)))) - -;;;###autoload -(defun +flyspell-init-predicate-h () - "TODO" - (when-let (pred (assq major-mode +flyspell--predicate-alist)) - (setq-local flyspell-generic-check-word-predicate (cdr pred)))) - -;;;###autoload -(defun +flyspell-correction-at-point-p (&optional point) - "TODO" - (cl-loop for ov in (overlays-at (or point (point))) - if (overlay-get ov 'flyspell-overlay) - return t)) diff --git a/modules/tools/flyspell/doctor.el b/modules/tools/flyspell/doctor.el deleted file mode 100644 index 9d1cb3286..000000000 --- a/modules/tools/flyspell/doctor.el +++ /dev/null @@ -1,4 +0,0 @@ - -(unless (or (executable-find "aspell") - (executable-find "hunspell")) - (warn! "Could not find aspell or hunspell. Flyspell will fall back to ispell, which may not work.")) From 27599f308dcb4b3066a7527242bfbb7cec569f72 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 19:11:49 -0500 Subject: [PATCH 583/983] Add Doom Emacs issue tracker to search engine providers --- modules/tools/lookup/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/tools/lookup/config.el b/modules/tools/lookup/config.el index f441031ea..9116fb83e 100644 --- a/modules/tools/lookup/config.el +++ b/modules/tools/lookup/config.el @@ -13,7 +13,8 @@ ;; `dumb-jump' to find what you want. (defvar +lookup-provider-url-alist - (append '(("Google" +lookup--online-backend-google "https://google.com/search?q=%s") + (append '(("Doom Emacs issues" "https://github.com/hlissner/doom-emacs/issues?q=is%%3Aissue+%s") + ("Google" +lookup--online-backend-google "https://google.com/search?q=%s") ("Google images" "https://www.google.com/images?q=%s") ("Google maps" "https://maps.google.com/maps?q=%s") ("Project Gutenberg" "http://www.gutenberg.org/ebooks/search/?query=%s") From 9c594d3f42b5bd104f8843d9d68f174efb8823cc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 19:18:13 -0500 Subject: [PATCH 584/983] delete-by-moving-to-trash = t on macOS --- core/core.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/core.el b/core/core.el index 8a39f30bf..8dda3010f 100644 --- a/core/core.el +++ b/core/core.el @@ -265,6 +265,10 @@ users).") (unless IS-MAC (setq command-line-ns-option-alist nil)) (unless IS-LINUX (setq command-line-x-option-alist nil)) +;; Delete files to trash on macOS, as an extra layer of precaution against +;; accidentally deleting wanted files. +(setq delete-by-moving-to-trash IS-MAC) + ;; Adopt a sneaky garbage collection strategy of waiting until idle time to ;; collect; staving off the collector while the user is working. (when doom-interactive-mode From 59a6cb72be1d5f706590208d2ca5213f5a837deb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 19:31:47 -0500 Subject: [PATCH 585/983] Fix maximize/enlargen commands around dedicated windows #2337 --- core/autoload/ui.el | 60 ++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/core/autoload/ui.el b/core/autoload/ui.el index af5ef34f1..d4c0ea2f8 100644 --- a/core/autoload/ui.el +++ b/core/autoload/ui.el @@ -103,6 +103,7 @@ See `display-line-numbers' for what these values mean." (delete-frame)) (save-buffers-kill-emacs))) +(defvar doom--maximize-last-wconf nil) ;;;###autoload (defun doom/window-maximize-buffer () "Close other windows to focus on this one. Activate again to undo this. If the @@ -110,41 +111,40 @@ window changes before then, the undo expires. Alternatively, use `doom/window-enlargen'." (interactive) - (if (and (one-window-p) - (assq ?_ register-alist)) - (jump-to-register ?_) - (when (and (bound-and-true-p +popup-mode) - (+popup-window-p)) - (user-error "Cannot maximize a popup, use `+popup/raise' first or use `doom/window-enlargen' instead")) - (window-configuration-to-register ?_) - (delete-other-windows))) + (setq doom--maximize-last-wconf + (if (and (null (cdr (cl-remove-if #'window-dedicated-p (window-list)))) + doom--maximize-last-wconf) + (ignore (set-window-configuration doom--maximize-last-wconf)) + (when (and (bound-and-true-p +popup-mode) + (+popup-window-p)) + (user-error "Cannot maximize a popup, use `+popup/raise' first or use `doom/window-enlargen' instead")) + (prog1 (current-window-configuration) + (delete-other-windows))))) -(defvar doom--window-enlargened nil) +(defvar doom--enlargen-last-wconf nil) ;;;###autoload (defun doom/window-enlargen () "Enlargen the current window to focus on this one. Does not close other -windows (unlike `doom/window-maximize-buffer') Activate again to undo." +windows (unlike `doom/window-maximize-buffer'). Activate again to undo." (interactive) - (setq doom--window-enlargened - (if (and doom--window-enlargened - (assq ?_ register-alist)) - (ignore (ignore-errors (jump-to-register ?_))) - (window-configuration-to-register ?_) - (let* ((window (selected-window)) - (dedicated-p (window-dedicated-p window)) - (preserved-p (window-parameter window 'window-preserved-size)) - (ignore-window-parameters t)) - (unwind-protect - (progn - (when dedicated-p - (set-window-dedicated-p window nil)) - (when preserved-p - (set-window-parameter window 'window-preserved-size nil)) - (maximize-window window)) - (set-window-dedicated-p window dedicated-p) - (when preserved-p - (set-window-parameter window 'window-preserved-size preserved-p))) - t)))) + (setq doom--enlargen-last-wconf + (if doom--enlargen-last-wconf + (ignore (set-window-configuration doom--enlargen-last-wconf)) + (prog1 (current-window-configuration) + (let* ((window (selected-window)) + (dedicated-p (window-dedicated-p window)) + (preserved-p (window-parameter window 'window-preserved-size)) + (ignore-window-parameters t)) + (unwind-protect + (progn + (when dedicated-p + (set-window-dedicated-p window nil)) + (when preserved-p + (set-window-parameter window 'window-preserved-size nil)) + (maximize-window window)) + (set-window-dedicated-p window dedicated-p) + (when preserved-p + (set-window-parameter window 'window-preserved-size preserved-p)))))))) ;;;###autoload (defun doom/window-maximize-horizontally () From 18be6cd37bbfddeec13aedc13901241b11a14575 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 19:46:48 -0500 Subject: [PATCH 586/983] Add test/shell.nix files for Emacs 26 & HEAD --- test/shell.head.nix | 24 +++++++++++++++++++++++ test/shell.nix | 47 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 test/shell.head.nix create mode 100644 test/shell.nix diff --git a/test/shell.head.nix b/test/shell.head.nix new file mode 100644 index 000000000..dd5e47ea1 --- /dev/null +++ b/test/shell.head.nix @@ -0,0 +1,24 @@ +# Builds an sandbox for Doom Emacs with Emacs HEAD (27/28). Warning: it compiles +# Emacs; this takes a while! +# +# To create a doom environment w/ Emacs 27/28 with the test config: +# +# nix-shell shell.head.nix +# +# Or from a custom DOOMDIR: +# +# nix-shell --argstr doomdir ~/.config/doom + +{ emacsdir ? "$(pwd)/../" +, doomdir ? "$(pwd)" +, doomlocaldir ? "$(pwd)/.local.nix.head" }: + +import ./shell.nix rec { + pkgs = import { + overlays = [ + (import (builtins.fetchTarball https://github.com/nix-community/emacs-overlay/archive/master.tar.gz)) + ]; + }; + emacs = pkgs.emacsGit; + inherit emacsdir doomdir doomlocaldir; +} diff --git a/test/shell.nix b/test/shell.nix new file mode 100644 index 000000000..fb00ab446 --- /dev/null +++ b/test/shell.nix @@ -0,0 +1,47 @@ +# Builds a sandbox for Doom Emacs with the latest stable Emacs (26.3). Use this +# as a basis for module shell.nix's. +# +# Usage examples: +# +# To create a doom environment with the test config: +# +# nix-shell +# +# With your own DOOMDIR: +# +# nix-shell --argstr doomdir ~/.config/doom + +{ pkgs ? (import {}) +, emacs ? pkgs.emacs +, emacsdir ? "$(pwd)/.." +, doomdir ? "$(pwd)" +, doomlocaldir ? "$(pwd)/.local.nix" }: + +pkgs.stdenv.mkDerivation { + name = "doom-emacs"; + buildInputs = with pkgs; [ + emacs + git + (ripgrep.override {withPCRE2 = true;}) + ]; + shellHook = '' + export EMACSDIR="$(readlink -f "${emacsdir}")/" + export DOOMDIR="$(readlink -f "${doomdir}")/" + export DOOMLOCALDIR="$(readlink -f "${doomlocaldir}")/" + export PATH="$EMACSDIR/bin:$PATH" + echo "EMACSDIR=$EMACSDIR" + echo "DOOMDIR=$DOOMDIR" + echo "DOOMLOCALDIR=$DOOMLOCALDIR" + + # Copy your existing repos over to optimize on install times (but not the + # builds, because that may contain stale bytecode). + mkdir -p "$DOOMLOCALDIR/straight" + pushd "$DOOMLOCALDIR/straight" >/dev/null + if [[ -d "$EMACSDIR/.local/straight/repos" && ! -d ./repos ]]; then + cp -r "$EMACSDIR/.local/straight/repos" ./repos + fi + popd >/dev/null + + doom sync + ''; +} From cffa3caac4b6f0c3b00192341255bd20d28fc4d1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 21:41:00 -0500 Subject: [PATCH 587/983] Fix 'SPC m r O' keybind in org-mode --- modules/lang/org/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index d2bd4feac..216089531 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -681,7 +681,7 @@ between the two." "l" #'+org/refile-to-last-location "f" #'+org/refile-to-file "o" #'+org/refile-to-other-window - "O" #'+org/refile-to-other-buffers + "O" #'+org/refile-to-other-buffer "v" #'+org/refile-to-visible "r" #'org-refile)) ; to all `org-refile-targets' From 911673fbb9780c7dd7be018c2c79bd797a6ad8bd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 21:41:35 -0500 Subject: [PATCH 588/983] Add test/.local*/ to gitignore Created by nix files in test/ --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3e7eda3d5..246426a5b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ modules/private .cask/ cask/ elpa/ -test/.local* +test/.local*/ # emacs tempfiles that shouldn't be there .mc-lists.el From ad1d16834971cec4d5625dc73bba0a21bda862cd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 21:41:56 -0500 Subject: [PATCH 589/983] +zen-text-scale = 2 by default --- modules/ui/zen/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/zen/config.el b/modules/ui/zen/config.el index fab82d313..f604690f6 100644 --- a/modules/ui/zen/config.el +++ b/modules/ui/zen/config.el @@ -3,7 +3,7 @@ (defvar +zen-mixed-pitch-modes '(markdown-mode org-mode) "What major-modes to enable `mixed-pitch-mode' in with `writeroom-mode'.") -(defvar +zen-text-scale 1 +(defvar +zen-text-scale 2 "The text-scaling level for `writeroom-mode'.") From c97f63beb8bcb0698a5a131ab142eb2eef66b474 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 22:55:40 -0500 Subject: [PATCH 590/983] Add text-scale fix for mixed-pitch-mode At least until https://gitlab.com/jabranham/mixed-pitch/issues/6 is dealt with. --- modules/ui/zen/config.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/ui/zen/config.el b/modules/ui/zen/config.el index f604690f6..487b11d6a 100644 --- a/modules/ui/zen/config.el +++ b/modules/ui/zen/config.el @@ -50,4 +50,14 @@ 'org-indent 'font-lock-comment-face 'line-number - 'line-number-current-line)) + 'line-number-current-line) + + ;; See https://gitlab.com/jabranham/mixed-pitch/issues/6#note_79691741 + (defadvice! +zen--fix-scaled-fixed-pitch-faces-a (orig-fn &rest args) + :around #'mixed-pitch-mode + (cl-letf* ((old-face-remap-add-relative (symbol-function #'face-remap-add-relative)) + ((symbol-function #'face-remap-add-relative) + (lambda (face &rest specs) + (funcall old-face-remap-add-relative + face (doom-plist-delete specs :height))))) + (apply orig-fn args)))) From c9b54ad279b8771fbd4d2a837b9db248723f21de Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 23:17:49 -0500 Subject: [PATCH 591/983] ui/zen: revise readme --- modules/ui/zen/README.org | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/ui/zen/README.org b/modules/ui/zen/README.org index 8ad06abce..44bc719ab 100644 --- a/modules/ui/zen/README.org +++ b/modules/ui/zen/README.org @@ -7,6 +7,7 @@ - [[#description][Description]] - [[#module-flags][Module Flags]] - [[#plugins][Plugins]] + - [[#hacks][Hacks]] - [[#prerequisites][Prerequisites]] - [[#features][Features]] - [[#distractions-free-mode][Distractions-free mode]] @@ -14,11 +15,12 @@ - [[#enable-fullscreen-on-activation][Enable fullscreen on activation]] * Description -This module provides a distraction-free mode that: +This module provides ~writeroom-mode~, which transforms Emacs into a +comfortable writing or coding space by centering the buffer, removing +superfluous UI elements, and turning on variable-pitch fonts (but keeps certain +elements fixed-pitch, where it makes sense to). -+ Centers the buffer -+ Enables variable pitch for text (but keeps certain elements fixed-pitch). -+ Reduces UI clutter (e.g. the modeline; fullscreens the frame -- off by default) +If you've used olivetti, sublimity, or tabula-rasa, you will feel right at home. ** Module Flags This module provides no flags. @@ -27,6 +29,11 @@ This module provides no flags. + [[https://github.com/joostkremers/writeroom-mode][writeroom-mode]] + [[https://gitlab.com/jabranham/mixed-pitch][mixed-pitch]] +** Hacks ++ =mixed-pitch= has been modified not to override ~:height~ properties on the + faces it remaps. This means text-scale can affect the ~fixed-pitch~ faces as + well; See https://gitlab.com/jabranham/mixed-pitch/issues/6#note_79691741. + * Prerequisites This module has no prereqisites. From 780100131d60a56fc9ce3e33280183513dede6f2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 10 Jan 2020 04:22:49 -0500 Subject: [PATCH 592/983] Fix #2346: reference to removed function --- modules/tools/lookup/autoload/docsets.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/lookup/autoload/docsets.el b/modules/tools/lookup/autoload/docsets.el index 0e20f061b..fffbe58a5 100644 --- a/modules/tools/lookup/autoload/docsets.el +++ b/modules/tools/lookup/autoload/docsets.el @@ -90,7 +90,7 @@ installed with `dash-docs-install-docset'." (if arg (dash-docs-installed-docsets) (cl-remove-if-not #'dash-docs-docset-path (or docsets dash-docs-docsets)))) - (query (or query (+lookup-symbol-or-region) ""))) + (query (doom-thing-at-point-or-region query))) (doom-log "Searching docsets %s" dash-docs-docsets) (cond ((featurep! :completion helm) (helm-dash query)) From 4acd60aba31d84662416e21ef7530710be257ec3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 10 Jan 2020 04:39:22 -0500 Subject: [PATCH 593/983] Update lsp-python-ms config to reflect changes upstream mspyls should be installed with M-x lsp-install-server from now on. --- modules/lang/python/README.org | 20 ++++++-------------- modules/lang/python/config.el | 17 ++--------------- 2 files changed, 8 insertions(+), 29 deletions(-) diff --git a/modules/lang/python/README.org b/modules/lang/python/README.org index b0eff6697..78b140771 100644 --- a/modules/lang/python/README.org +++ b/modules/lang/python/README.org @@ -7,7 +7,6 @@ - [[#description][Description]] - [[#module-flags][Module Flags]] - [[#plugins][Plugins]] - - [[#hacks][Hacks]] - [[#prerequisites][Prerequisites]] - [[#language-server-protocol-support][Language Server Protocol Support]] - [[#features][Features]] @@ -49,11 +48,6 @@ Adds Python support to Doom Emacs. + [[https://github.com/cython/cython/blob/master/Tools/cython-mode.el][Cython-mode]] + ~:tools flycheck~ [[https://github.com/lbolla/emacs-flycheck-cython/tree/master][Flycheck-cython]] -** Hacks -+ As per our "your system your rules" mantra, lsp-python-ms has been modified to - *not* automatically install its server if it cannot find it. Install it with - ~M-x lsp-python-ms-setup~. - * Prerequisites This module has no direct prerequisites. Here are some of its soft dependencies. @@ -79,16 +73,14 @@ This module has no direct prerequisites. Here are some of its soft dependencies. + ~cython~ requires [[https://cython.org/][Cython]] ** Language Server Protocol Support -Requires the ~+lsp~ flag and ~:tools lsp~ module to be enabled. -By default LSP will use Microsoft's language server if installed. +This module must be enabled with the =+lsp= flag, and the =:tools lsp= module +must be enabled. LSP will try mspyls, then pyls; whichever is available. -To install the language server: -~M-x lsp-python-ms-setup~ -To update the server: -~M-x lsp-python-ms-update-server~ +mypyls can be installed with ~M-x lsp-install-server~ after opening a python +buffer. -Alternatively you can use the [[https://pypi.org/project/python-language-server/][Python Language Server]] instead. -~pip install 'python-language-server[all]'~ +Alternatively, use the [[https://pypi.org/project/python-language-server/][Python Language Server]] instead. ~pip install +'python-language-server[all]'~ * Features This module supports LSP. It requires installation of [[https://pypi.org/project/python-language-server/][Python Language diff --git a/modules/lang/python/config.el b/modules/lang/python/config.el index e68bf692a..f75675109 100644 --- a/modules/lang/python/config.el +++ b/modules/lang/python/config.el @@ -282,15 +282,11 @@ called.") (use-package! lsp-python-ms :when (featurep! +lsp) - :after (python lsp-clients) + :after lsp-clients :preface - (autoload 'lsp-python-ms-update-server "lsp-python-ms" nil t) - (autoload 'lsp-python-ms-setup "lsp-python-ms" nil t) (after! python (setq lsp-python-ms-python-executable-cmd python-shell-interpreter)) :init - (setq lsp-python-ms-dir (concat doom-etc-dir "mspyls/")) - ;; HACK If you don't have python installed, then opening python buffers with ;; this on causes a "wrong number of arguments: nil 0" error, because of ;; careless usage of `cl-destructuring-bind'. This silences that error, @@ -298,16 +294,7 @@ called.") ;; python installed! (defadvice! +python--silence-errors-a (orig-fn &rest args) :around #'lsp-python-ms--extra-init-params - (ignore-errors (apply orig-fn args))) - - ;; HACK lsp-python-ms shouldn't install itself if it isn't present. This - ;; circumvents LSP falling back to pyls when lsp-python-ms is absent. - ;; Installing the server should be a deliberate act; either 'M-x - ;; lsp-python-ms-setup' or setting `lsp-python-ms-executable' to an - ;; existing install will do. - (defadvice! +python--dont-auto-install-server-a () - :override #'lsp-python-ms--command-string - lsp-python-ms-executable)) + (ignore-errors (apply orig-fn args)))) (use-package! cython-mode From 46aaeee81872c18d30305f488438cfa5093340d7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 10 Jan 2020 04:42:54 -0500 Subject: [PATCH 594/983] Update tools/lsp to reflect upstream changes LSP has taken it upon themselves to aggressively install servers if they are missing. No thanks. Promote deliberate use of lsp-install-server where we can and load lsp-clients sooner. --- modules/tools/lsp/config.el | 53 +++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/modules/tools/lsp/config.el b/modules/tools/lsp/config.el index fb43788a1..23c0791ab 100644 --- a/modules/tools/lsp/config.el +++ b/modules/tools/lsp/config.el @@ -11,7 +11,7 @@ This can be a single company backend or a list thereof. It can be anything ;;; Packages (use-package! lsp-mode - :defer t + :commands lsp-install-server :init (setq lsp-session-file (concat doom-etc-dir "lsp-session")) ;; Don't prompt the user for the project root every time we open a new @@ -27,6 +27,9 @@ This can be a single company backend or a list thereof. It can be anything lsp-intelephense-storage-path (concat doom-cache-dir "lsp-intelephense/")) :config + (when (and lsp-auto-configure lsp-auto-require-clients) + (require 'lsp-clients)) + (set-lookup-handlers! 'lsp-mode :async t :documentation 'lsp-describe-thing-at-point :definition 'lsp-find-definition @@ -64,39 +67,35 @@ auto-killed (which is usually an expensive process)." nil) ((lsp--find-root-interactively session)))) - (defadvice! +lsp-init-a (&optional arg) + (defadvice! +lsp-init-a (orig-fn &optional arg) "Enable `lsp-mode' in the current buffer. -Meant to be a lighter alternative to `lsp', which is too eager about -initializing lsp-ui-mode, company, yasnippet and flycheck. Instead, these have -been moved out to their respective modules, or these hooks: +Meant to gimp `lsp', which is too eager about installing LSP servers, +initializing lsp-ui-mode, company, yasnippet and flycheck. Instead, these are +handled by our modules. Also see: + `+lsp-init-company-h' (on `lsp-mode-hook') + `+lsp-init-ui-flycheck-or-flymake-h' (on `lsp-ui-mode-hook') -Also logs the resolved project root, if found." - :override #'lsp +This also logs the resolved project root, if found, so we know where we are." + :around #'lsp (interactive "P") (require 'lsp-mode) - (when lsp-auto-configure - (require 'lsp-clients)) - (and (buffer-file-name) - (setq-local - lsp--buffer-workspaces - (or (lsp--try-open-in-library-workspace) - (lsp--try-project-root-workspaces - (equal arg '(4)) - (and arg (not (equal arg 1)))))) - (prog1 (lsp-mode 1) - ;; Announce what project root we're using, for diagnostic purposes - (if-let (root (lsp--calculate-root (lsp-session) (buffer-file-name))) - (lsp--info "Guessed project root is %s" (abbreviate-file-name root)) - (lsp--info "Could not guess project root.")) - (lsp--info "Connected to %s." - (apply #'concat - (mapcar - (lambda (it) (format "[%s]" (lsp--workspace-print it))) - lsp--buffer-workspaces)))))) + (cl-letf + (;; Our system, our rules. Don't install things on it without our + ;; permission. Use `lsp-install-server' deliberately, instead. + ((symbol-function #'lsp--client-download-server-fn) + (lambda (&rest _) nil)) + ;; Don't set up company, lsp-ui, yasnippet, or flycheck. We have + ;; modules dedicated to these things already. + ((symbol-function #'lsp--auto-configure) + (lambda (&rest _) + ;; Announce what project root we're using, for diagnostic + ;; purposes + (if-let (root (lsp--calculate-root (lsp-session) (buffer-file-name))) + (lsp--info "Guessed project root is %s" (abbreviate-file-name root)) + (lsp--info "Could not guess project root.")))))) + (apply orig-fn args)) ;; Don't prompt to restart LSP servers while quitting Emacs (add-hook! 'kill-emacs-hook (setq lsp-restart 'ignore))) @@ -149,10 +148,12 @@ Also logs the resolved project root, if found." :config (setq company-lsp-cache-candidates 'auto)) ;; cache candidates for better performance + (use-package! helm-lsp :when (featurep! :completion helm) :commands helm-lsp-workspace-symbol helm-lsp-global-workspace-symbol) + (use-package! lsp-ivy :when (featurep! :completion ivy) :commands lsp-ivy-workspace-symbol lsp-ivy-global-workspace-symbol) From 24652f26dea4517af0119e357b938b004b04c555 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 10 Jan 2020 05:00:08 -0500 Subject: [PATCH 595/983] Bind s-RET/s-S-RET/s-M-RET for mac users --- modules/lang/org/config.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 216089531..31fb7283d 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -588,6 +588,10 @@ between the two." [C-return] #'+org/insert-item-below [C-S-return] #'+org/insert-item-above [C-M-return] #'org-insert-subheading + (:when IS-MAC + [s-return] #'+org/insert-item-below + [s-S-return] #'+org/insert-item-above + [s-M-return] #'org-insert-subheading) ;; Org-aware C-a/C-e [remap doom/backward-to-bol-or-indent] #'org-beginning-of-line [remap doom/forward-to-last-non-comment-or-eol] #'org-end-of-line From 3eb61601e5f4047dd1daae022107a54afe696f6e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 10 Jan 2020 05:09:34 -0500 Subject: [PATCH 596/983] Fix void-variable args error starting up lsp-mode --- modules/tools/lsp/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/lsp/config.el b/modules/tools/lsp/config.el index 23c0791ab..017f8289a 100644 --- a/modules/tools/lsp/config.el +++ b/modules/tools/lsp/config.el @@ -95,7 +95,7 @@ This also logs the resolved project root, if found, so we know where we are." (if-let (root (lsp--calculate-root (lsp-session) (buffer-file-name))) (lsp--info "Guessed project root is %s" (abbreviate-file-name root)) (lsp--info "Could not guess project root.")))))) - (apply orig-fn args)) + (funcall orig-fn arg)) ;; Don't prompt to restart LSP servers while quitting Emacs (add-hook! 'kill-emacs-hook (setq lsp-restart 'ignore))) From 844a2369498c4137133cd8772ccc30675e794671 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 10 Jan 2020 05:15:23 -0500 Subject: [PATCH 597/983] Half-revert & rewrite +lsp-init-a The original lsp is just too opinionated to delegate to. Better we just initialize lsp entirely by hand, instead. --- modules/tools/lsp/config.el | 47 +++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/modules/tools/lsp/config.el b/modules/tools/lsp/config.el index 017f8289a..a88592461 100644 --- a/modules/tools/lsp/config.el +++ b/modules/tools/lsp/config.el @@ -67,35 +67,42 @@ auto-killed (which is usually an expensive process)." nil) ((lsp--find-root-interactively session)))) - (defadvice! +lsp-init-a (orig-fn &optional arg) + (defadvice! +lsp-init-a (&optional arg) "Enable `lsp-mode' in the current buffer. -Meant to gimp `lsp', which is too eager about installing LSP servers, -initializing lsp-ui-mode, company, yasnippet and flycheck. Instead, these are -handled by our modules. Also see: +Meant to gimp `lsp', which is too eager about installing LSP servers, or +prompting to do so, or complaining about no LSP servers, or initializing +lsp-ui-mode, company, yasnippet and flycheck. We want LSP to work only if the +server is present, and for server installation to be a deliberate act by the +end-user. Also, setting up these other packages are handled by their respective +modules. +Also see: + `+lsp-init-company-h' (on `lsp-mode-hook') + `+lsp-init-ui-flycheck-or-flymake-h' (on `lsp-ui-mode-hook') This also logs the resolved project root, if found, so we know where we are." - :around #'lsp + :override #'lsp (interactive "P") (require 'lsp-mode) - (cl-letf - (;; Our system, our rules. Don't install things on it without our - ;; permission. Use `lsp-install-server' deliberately, instead. - ((symbol-function #'lsp--client-download-server-fn) - (lambda (&rest _) nil)) - ;; Don't set up company, lsp-ui, yasnippet, or flycheck. We have - ;; modules dedicated to these things already. - ((symbol-function #'lsp--auto-configure) - (lambda (&rest _) - ;; Announce what project root we're using, for diagnostic - ;; purposes - (if-let (root (lsp--calculate-root (lsp-session) (buffer-file-name))) - (lsp--info "Guessed project root is %s" (abbreviate-file-name root)) - (lsp--info "Could not guess project root.")))))) - (funcall orig-fn arg)) + (and (buffer-file-name) + (setq-local + lsp--buffer-workspaces + (or (lsp--try-open-in-library-workspace) + (lsp--try-project-root-workspaces + (equal arg '(4)) + (and arg (not (equal arg 1)))))) + (prog1 (lsp-mode 1) + (setq-local lsp-buffer-uri (lsp--buffer-uri)) + ;; Announce what project root we're using, for diagnostic purposes + (if-let (root (lsp--calculate-root (lsp-session) (buffer-file-name))) + (lsp--info "Guessed project root is %s" (abbreviate-file-name root)) + (lsp--info "Could not guess project root.")) + (lsp--info "Connected to %s." + (apply #'concat + (mapcar + (lambda (it) (format "[%s]" (lsp--workspace-print it))) + lsp--buffer-workspaces)))))) ;; Don't prompt to restart LSP servers while quitting Emacs (add-hook! 'kill-emacs-hook (setq lsp-restart 'ignore))) From ca3920e5b7a9b9b6360cd709392b67de83d0d6e2 Mon Sep 17 00:00:00 2001 From: Gerry Agbobada <10496163+gagbo@users.noreply.github.com> Date: Fri, 10 Jan 2020 11:56:19 +0100 Subject: [PATCH 598/983] Fix flycheck migration void-function --- modules/checkers/syntax/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/checkers/syntax/config.el b/modules/checkers/syntax/config.el index b91df9195..268fe2bc9 100644 --- a/modules/checkers/syntax/config.el +++ b/modules/checkers/syntax/config.el @@ -59,7 +59,7 @@ (use-package! flycheck-posframe :when (featurep! +childframe) :defer t - :init (add-hook 'flycheck-mode-hook #'+flycheck-init-popups-h) + :init (add-hook 'flycheck-mode-hook #'+syntax-init-popups-h) :config (setq flycheck-posframe-warning-prefix "⚠ " flycheck-posframe-info-prefix "··· " From 9b5835504ee80f6078292ee325155f780a95414e Mon Sep 17 00:00:00 2001 From: Janfel <33464477+Janfel@users.noreply.github.com> Date: Fri, 10 Jan 2020 21:14:03 +0100 Subject: [PATCH 599/983] Fix #2349: Make +format-completing-read return symbol Currently `+format-completing-read` returns a cons cell like `(symbol . t)`, where `+format/buffer` expects a symbol. This commit makes `+format-completing-read` return a symbol instead. Fixes #2349. --- modules/editor/format/autoload/format.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/format/autoload/format.el b/modules/editor/format/autoload/format.el index 8b6a19441..49345bf5c 100644 --- a/modules/editor/format/autoload/format.el +++ b/modules/editor/format/autoload/format.el @@ -95,7 +95,7 @@ Stolen shamelessly from go-mode" (require 'format-all) (let* ((fmtlist (mapcar #'symbol-name (hash-table-keys format-all--format-table))) (fmt (completing-read "Formatter: " fmtlist))) - (if fmt (cons (intern fmt) t)))) + (if fmt (intern fmt)))) ;;;###autoload (defun +format-probe-a (orig-fn) From 18c50cbe1c5dea05b9f394be44babc3010fde890 Mon Sep 17 00:00:00 2001 From: nam3less Date: Sat, 11 Jan 2020 00:42:18 +0100 Subject: [PATCH 600/983] Added evil integration to haskell-mode Overwrite the 'o' and 'O' normal mode commands to correctly indent new lines. Code was adapted from: https://github.com/haskell/haskell-mode/issues/1265 --- modules/lang/haskell/autoload.el | 17 +++++++++++++++++ modules/lang/haskell/config.el | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/modules/lang/haskell/autoload.el b/modules/lang/haskell/autoload.el index cfcd12be0..ccb5033c8 100644 --- a/modules/lang/haskell/autoload.el +++ b/modules/lang/haskell/autoload.el @@ -12,3 +12,20 @@ (haskell-session-interactive-buffer (haskell-session)))))) (window-buffer window) (error "Failed to display Haskell REPL"))) + +;;;###autoload +(defun +haskell/evil-open-above + "Opens a line above the current mode" + (interactive) + (evil-digit-argument-or-evil-beginning-of-line) + (haskell-indentation-newline-and-indent) + (evil-previous-line) + (haskell-indentation-indent-line) + (evil-append-line nil)) + +;;;###autoload +(defun +haskell/evil-open-below () + "Opens a line below the current mode" + (interactive) + (evil-append-line nil) + (haskell-indentation-newline-and-indent)) diff --git a/modules/lang/haskell/config.el b/modules/lang/haskell/config.el index 515a7c00b..bd0d6661a 100644 --- a/modules/lang/haskell/config.el +++ b/modules/lang/haskell/config.el @@ -32,6 +32,10 @@ (add-to-list 'completion-ignored-extensions ".hi") + (map! :map haskell-mode-map + "o" #'+haskell/evil-open-below + "O" #'+haskell/evil-open-above) + (map! :localleader :map haskell-mode-map ;; this is set to use cabal for dante users and stack for intero users: From d990cd9bd57fccdf19a2f78038b8203b7b97447e Mon Sep 17 00:00:00 2001 From: nam3less Date: Sat, 11 Jan 2020 01:08:28 +0100 Subject: [PATCH 601/983] Added evil integration to haskell-mode Overwrite the 'o' and 'O' normal mode commands to correctly indent new lines. Code was adapted from: https://github.com/haskell/haskell-mode/issues/1265 --- modules/lang/haskell/autoload.el | 2 +- modules/lang/haskell/config.el | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/lang/haskell/autoload.el b/modules/lang/haskell/autoload.el index ccb5033c8..370e5ed91 100644 --- a/modules/lang/haskell/autoload.el +++ b/modules/lang/haskell/autoload.el @@ -14,7 +14,7 @@ (error "Failed to display Haskell REPL"))) ;;;###autoload -(defun +haskell/evil-open-above +(defun +haskell/evil-open-above () "Opens a line above the current mode" (interactive) (evil-digit-argument-or-evil-beginning-of-line) diff --git a/modules/lang/haskell/config.el b/modules/lang/haskell/config.el index bd0d6661a..b4615e621 100644 --- a/modules/lang/haskell/config.el +++ b/modules/lang/haskell/config.el @@ -33,8 +33,8 @@ (add-to-list 'completion-ignored-extensions ".hi") (map! :map haskell-mode-map - "o" #'+haskell/evil-open-below - "O" #'+haskell/evil-open-above) + :n "o" #'+haskell/evil-open-below + :n "O" #'+haskell/evil-open-above) (map! :localleader :map haskell-mode-map From 20bc70096fa28c773ea0672ae3bfca26db61887b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 10 Jan 2020 22:58:10 -0500 Subject: [PATCH 602/983] Fix deprecation warnings for fly{check,spell} modules --- core/core-modules.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/core-modules.el b/core/core-modules.el index b77a2a8f0..ebafdff0f 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -13,8 +13,8 @@ (defconst doom-obsolete-modules '((:feature (version-control (:emacs vc) (:ui vc-gutter)) - (spellcheck (:tools flyspell)) - (syntax-checker (:tools flycheck)) + (spellcheck (:checkers spell)) + (syntax-checker (:checkers syntax)) (evil (:editor evil)) (snippets (:editor snippets)) (file-templates (:editor file-templates)) @@ -25,8 +25,8 @@ (:tools (rotate-text (:editor rotate-text)) (vterm (:term vterm)) (password-store (:tools pass)) - (flycheck (:checker syntax)) - (flyspell (:checker spell))) + (flycheck (:checkers syntax)) + (flyspell (:checkers spell))) (:emacs (electric-indent (:emacs electric)) (hideshow (:editor fold)) (eshell (:term eshell)) From fd130a9c2e5030220f5c955815fd07c58cdba747 Mon Sep 17 00:00:00 2001 From: Clement Busschaert Date: Sat, 11 Jan 2020 18:39:14 +0100 Subject: [PATCH 603/983] [ocaml] support eliom files Eliom/eliomi is ocsigen's extensions for its files using the eliom ppx. More info at http://ocsigen.org/eliom/6.6/manual/ppx-syntax --- modules/lang/ocaml/config.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/lang/ocaml/config.el b/modules/lang/ocaml/config.el index 69ce17737..7772ef630 100644 --- a/modules/lang/ocaml/config.el +++ b/modules/lang/ocaml/config.el @@ -113,4 +113,9 @@ (setq +format-with 'ocp-indent) (when (and (executable-find "ocamlformat") (locate-dominating-file default-directory ".ocamlformat")) + (let ((ext (file-name-extension buffer-file-name t))) + (cond ((equal ext ".eliom") + (setq-local ocamlformat-file-kind 'implementation)) + ((equal ext ".eliomi") + (setq-local ocamlformat-file-kind 'interface)))) (setq +format-with 'ocamlformat)))) From 52b69ec7eb504aa1eb2596cacc9801b325688345 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 11 Jan 2020 17:07:51 -0500 Subject: [PATCH 604/983] Fix #2308: DEL not deleting closing sp pairs --- modules/editor/evil/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index d59892bce..cb174425b 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -167,7 +167,7 @@ directives. By default, this only recognizes C directives.") ;; smartparens pairs (in some cases), and ignoring ;; `+default--delete-backward-char-a' on `delete-char-backward' (defadvice! +evil-delete-region-if-mark-a (orig-fn &rest args) - :override #'evil-delete-backward-and-join + :override #'evil-delete-backward-char-and-join (if (or evil-backspace-join-lines (not (bolp))) (call-interactively #'backward-delete-char-untabify) (user-error "Beginning of line"))) From 29250133e8e6b18f895573f38c0e44d95f9833da Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 11 Jan 2020 17:21:35 -0500 Subject: [PATCH 605/983] Replace doom/describe-symbol w/ helpful-symbol And helpful-at-point. --- core/autoload/help.el | 15 --------------- core/core-editor.el | 2 +- modules/lang/emacs-lisp/autoload.el | 4 ++-- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 0ca4fb9d9..10ccd8e07 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -105,21 +105,6 @@ selection of all minor-modes, active or not." (helpful-function symbol) (helpful-variable symbol)))) -;;;###autoload -(defun doom/describe-symbol (symbol) - "Show help for SYMBOL, a variable, function or macro." - (interactive - (list (helpful--read-symbol "Symbol: " #'helpful--bound-p))) - (let* ((sym (intern-soft symbol)) - (bound (boundp sym)) - (fbound (fboundp sym))) - (cond ((and sym bound (not fbound)) - (helpful-variable sym)) - ((and sym fbound (not bound)) - (helpful-callable sym)) - ((apropos (format "^%s\$" symbol))) - ((apropos (format "%s" symbol)))))) - ;; ;;; Documentation commands diff --git a/core/core-editor.el b/core/core-editor.el index 635d89520..a6a64cc4b 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -389,7 +389,7 @@ files, so we replace calls to `pp' with the much faster `prin1'." (global-set-key [remap describe-command] #'helpful-command) (global-set-key [remap describe-variable] #'helpful-variable) (global-set-key [remap describe-key] #'helpful-key) - (global-set-key [remap describe-symbol] #'doom/describe-symbol) + (global-set-key [remap describe-symbol] #'helpful-symbol) (defun doom-use-helpful-a (orig-fn &rest args) "Force ORIG-FN to use helpful instead of the old describe-* commands." diff --git a/modules/lang/emacs-lisp/autoload.el b/modules/lang/emacs-lisp/autoload.el index 94f0221e1..7b211e87b 100644 --- a/modules/lang/emacs-lisp/autoload.el +++ b/modules/lang/emacs-lisp/autoload.el @@ -123,8 +123,8 @@ if it's callable, `apropos' otherwise." (when (invisible-p (point)) (org-show-hidden-entry)))) t)) - (thing (doom/describe-symbol thing)) - ((call-interactively #'doom/describe-symbol)))) + (thing (helpful-symbol (intern thing))) + ((call-interactively #'helpful-at-point)))) ;; FIXME ;; (defun +emacs-lisp-lookup-file (thing) From 0c9f1b1a9c10ebac7655e2be0ae993d58cd0af00 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 11 Jan 2020 17:27:04 -0500 Subject: [PATCH 606/983] Minor refactors & comment revision --- core/autoload/packages.el | 1 + core/cli/packages.el | 2 +- core/packages.el | 4 ++-- modules/editor/file-templates/config.el | 2 +- modules/lang/org/config.el | 1 + modules/ui/modeline/autoload.el | 10 +++++----- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/core/autoload/packages.el b/core/autoload/packages.el index 224009a2b..5a813da1c 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -155,6 +155,7 @@ was installed with." ((debug error) (signal 'doom-package-error (list (doom-module-from-path file) + file e)))))) ;;;###autoload diff --git a/core/cli/packages.el b/core/cli/packages.el index c598da5b2..f7067ef0a 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -91,7 +91,7 @@ declaration) or dependency thereof that hasn't already been." (cl-incf n)) (error (signal 'doom-package-error - (list e (straight--process-get-output)))))))) + (list package e (straight--process-get-output)))))))) (if (= n 0) (ignore (print! (success "No packages need to be installed"))) (print! (success "Installed & built %d packages") n) diff --git a/core/packages.el b/core/packages.el index d8bc3c210..b8573dc0c 100644 --- a/core/packages.el +++ b/core/packages.el @@ -24,8 +24,8 @@ (package! so-long :built-in 'prefer ; included in Emacs 27+ ;; REVIEW so-long is slated to be published to ELPA eventually, but until then - ;; I've created my own mirror for it because git.savannah.gnu.org runs on a - ;; potato. + ;; I've created my own mirror for it because git.savannah.gnu.org runs + ;; on a potato. :recipe (:host github :repo "hlissner/emacs-so-long")) (package! undo-tree) (package! ws-butler diff --git a/modules/editor/file-templates/config.el b/modules/editor/file-templates/config.el index 46248b5c7..8f1e00d30 100644 --- a/modules/editor/file-templates/config.el +++ b/modules/editor/file-templates/config.el @@ -9,7 +9,7 @@ don't have a :trigger property in `+file-templates-alist'.") (defvar +file-templates-alist - `(;; General + '(;; General (gitignore-mode) (dockerfile-mode) ("/docker-compose\\.yml$" :mode yaml-mode) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 31fb7283d..25356c36f 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -220,6 +220,7 @@ path too.") (or (cdr (assoc lang org-src-lang-modes)) (+org--babel-lazy-load lang))) + ;; This also works for tangling and exporting (defadvice! +org--babel-lazy-load-library-a (info) "Load babel libraries lazily when babel blocks are executed." :after-while #'org-babel-confirm-evaluate diff --git a/modules/ui/modeline/autoload.el b/modules/ui/modeline/autoload.el index 7162bd069..8f3eb1839 100644 --- a/modules/ui/modeline/autoload.el +++ b/modules/ui/modeline/autoload.el @@ -22,11 +22,11 @@ Meant for `doom-change-font-size-hook'." (let ((default-height +modeline--old-bar-height) (scale (or (frame-parameter nil 'font-scale) 0))) (if (> scale 0) - (let* ((font-size (string-to-number - (aref (doom--font-name (frame-parameter nil 'font) - (selected-frame)) - xlfd-regexp-pixelsize-subnum))) - (scale (frame-parameter nil 'font-scale))) + (let ((font-size (string-to-number + (aref (doom--font-name (frame-parameter nil 'font) + (selected-frame)) + xlfd-regexp-pixelsize-subnum))) + (scale (frame-parameter nil 'font-scale))) (setq doom-modeline-height (+ default-height (* scale doom-font-increment)))) (setq doom-modeline-height default-height)))) From 5802bd7047f2e63852fee1804445490a1b2887aa Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 11 Jan 2020 17:29:16 -0500 Subject: [PATCH 607/983] Refactor browse-at-remote commands --- modules/emacs/vc/autoload/vc.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/emacs/vc/autoload/vc.el b/modules/emacs/vc/autoload/vc.el index 9bf08402f..4b26f41b4 100644 --- a/modules/emacs/vc/autoload/vc.el +++ b/modules/emacs/vc/autoload/vc.el @@ -3,15 +3,18 @@ (autoload 'browse-at-remote-get-url "browse-at-remote") (autoload 'browse-at-remote--file-url "browse-at-remote") +(defun +vc--remote-file-or-region-link () + (if (or (doom-region-active-p) (not buffer-file-name)) + (browse-at-remote-get-url) + (browse-at-remote--file-url (buffer-file-name)))) + ;;;###autoload (defun +vc/browse-at-remote-file-or-region () "Open the current file at remote in your browser. If a selection is active, highlight them. Otherwise omits the #L suffix in the URL." (interactive) - (if (or (doom-region-active-p) (not buffer-file-name)) - (browse-at-remote) - (browse-url (browse-at-remote--file-url (buffer-file-name))))) + (browse-url (+vc--remote-file-or-region-link))) ;;;###autoload (defun +vc/browse-at-remote-kill-file-or-region () @@ -19,10 +22,7 @@ the URL." If a selection is active, highlight them. Otherwise omits the #L suffix in the URL." (interactive) - (let ((url - (if (or (doom-region-active-p) (not buffer-file-name)) - (browse-at-remote-get-url) - (browse-at-remote--file-url (buffer-file-name))))) + (let ((url (+vc--remote-file-or-region-link))) (kill-new url) (message "Copied to clipboard: %S" url))) From 51bb3a2b354771c1e5b43b0496073070399d4580 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 12 Jan 2020 02:09:01 -0500 Subject: [PATCH 608/983] Fix #2357: C-a moves across lines --- core/autoload/text.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/autoload/text.el b/core/autoload/text.el index 5f33f468b..edfb2997b 100644 --- a/core/autoload/text.el +++ b/core/autoload/text.el @@ -159,6 +159,10 @@ beginning of the line. The opposite of (cond ((> pt bot) (goto-char bot)) ((= pt bol) + (or (and doom--last-backward-pt + (= (line-number-at-pos doom--last-backward-pt) + (line-number-at-pos pt))) + (setq doom--last-backward-pt nil)) (goto-char (or doom--last-backward-pt bot)) (setq doom--last-backward-pt nil)) ((<= pt bot) From 1018dea7b7f912721b38fe2c390bddbd7cf2589f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 12 Jan 2020 02:20:12 -0500 Subject: [PATCH 609/983] Fix wrong-type-arg stringp t from doom/move-this-file --- core/autoload/files.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/autoload/files.el b/core/autoload/files.el index 13c10c35d..727b95db3 100644 --- a/core/autoload/files.el +++ b/core/autoload/files.el @@ -311,10 +311,11 @@ file if it exists, without confirmation." (delete-file old-path)) (mapc #'doom--update-file (delq - nil (list (or (ignore-errors + nil (list (if (ignore-errors (file-equal-p (doom-project-root old-path) (doom-project-root new-path))) - old-path) + nil + old-path) new-path))) (kill-current-buffer) (find-file new-path) From 8c6efb71cbdf351c2dd4b15a96244fb0b36beb94 Mon Sep 17 00:00:00 2001 From: How Si Wei Date: Sun, 12 Jan 2020 15:38:03 +0800 Subject: [PATCH 610/983] Fix pdf-outline error --- modules/tools/pdf/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/pdf/config.el b/modules/tools/pdf/config.el index d1385d5d6..a7d862f2a 100644 --- a/modules/tools/pdf/config.el +++ b/modules/tools/pdf/config.el @@ -45,7 +45,7 @@ ;; Handle PDF-tools related popups better (set-popup-rules! - '(("^\\*Outline*" :side 'right :size 40 :select nil) + '(("^\\*Outline*" :side right :size 40 :select nil) ("\\(?:^\\*Contents\\|'s annots\\*$\\)" :ignore t))) ;; The mode-line does serve any useful purpose is annotation windows From 25eb9176adf3c9353581f5e4cec5fb47a6294e2c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 12 Jan 2020 03:07:35 -0500 Subject: [PATCH 611/983] Fix ivy-prescient disabling fuzzy search It can set up itself. --- modules/completion/ivy/config.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index fe18263c7..9939b625c 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -26,10 +26,10 @@ results buffer.") #'+ivy-prescient-non-fuzzy #'ivy--regex-plus)) (alt-search-fn - (cond ((featurep! +prescient) #'ivy-prescient-re-builder) - ((featurep! +fuzzy) #'ivy--regex-fuzzy) - ;; Ignore order for non-fuzzy searches by default - (#'ivy--regex-ignore-order)))) + (if (featurep! +fuzzy) + #'ivy--regex-fuzzy + ;; Ignore order for non-fuzzy searches by default + #'ivy--regex-ignore-order))) (setq ivy-re-builders-alist `((counsel-rg . ,standard-search-fn) (swiper . ,standard-search-fn) @@ -344,7 +344,6 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." (if (featurep! +fuzzy) '(literal regexp initialism fuzzy) '(literal regexp initialism)) - ivy-prescient-enable-filtering nil ; we do this ourselves ivy-prescient-retain-classic-highlighting t) :config From 2fcb74dead186fec52bcc0a597773ce81b30336b Mon Sep 17 00:00:00 2001 From: Harri Taylor Date: Sun, 12 Jan 2020 15:03:24 +0000 Subject: [PATCH 612/983] Fix for issue 2343 --- modules/lang/org/config.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 25356c36f..631bff9f8 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -263,6 +263,8 @@ I like: vimperator, dmenu or a global keybinding." (setq org-default-notes-file (expand-file-name +org-capture-notes-file org-directory) + +org-capture-journal-file + (expand-file-name +org-capture-journal-file org-directory) org-capture-templates '(("t" "Personal todo" entry (file+headline +org-capture-todo-file "Inbox") From 6731833f24fc15b644df536a946577dd1cff83dc Mon Sep 17 00:00:00 2001 From: niklascarlsson Date: Sun, 12 Jan 2020 22:27:41 +0100 Subject: [PATCH 613/983] Update lsp-server-install-dir location Update the lsp-server-install-dir to doom-etc-dir install of the default which is directly at the root of the emacs dir. --- modules/tools/lsp/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/tools/lsp/config.el b/modules/tools/lsp/config.el index a88592461..7333863dc 100644 --- a/modules/tools/lsp/config.el +++ b/modules/tools/lsp/config.el @@ -22,7 +22,8 @@ This can be a single company backend or a list thereof. It can be anything (setq lsp-keep-workspace-alive nil) ;; For `lsp-clients' - (setq lsp-fsharp-server-install-dir (concat doom-etc-dir "lsp-fsharp/") + (setq lsp-server-install-dir (concat doom-etc-dir "lsp") + lsp-fsharp-server-install-dir (concat doom-etc-dir "lsp-fsharp/") lsp-groovy-server-install-dir (concat doom-etc-dir "lsp-groovy/") lsp-intelephense-storage-path (concat doom-cache-dir "lsp-intelephense/")) From 24c65b1a22349d864d5871842e122244276478c9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 12 Jan 2020 17:00:13 -0500 Subject: [PATCH 614/983] Update lsp server install dirs Follow-up of #2361 --- modules/tools/lsp/config.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/tools/lsp/config.el b/modules/tools/lsp/config.el index 7333863dc..ab5a1817b 100644 --- a/modules/tools/lsp/config.el +++ b/modules/tools/lsp/config.el @@ -22,9 +22,8 @@ This can be a single company backend or a list thereof. It can be anything (setq lsp-keep-workspace-alive nil) ;; For `lsp-clients' - (setq lsp-server-install-dir (concat doom-etc-dir "lsp") - lsp-fsharp-server-install-dir (concat doom-etc-dir "lsp-fsharp/") - lsp-groovy-server-install-dir (concat doom-etc-dir "lsp-groovy/") + (setq lsp-server-install-dir (concat doom-etc-dir "lsp/") + lsp-groovy-server-install-dir (concat lsp-server-install-dir "lsp-groovy/") lsp-intelephense-storage-path (concat doom-cache-dir "lsp-intelephense/")) :config From bf60a2a7c63ff95d4e72254d055cc56545cf305f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 12 Jan 2020 18:12:01 -0500 Subject: [PATCH 615/983] Don't sort counsel-imenu --- modules/completion/ivy/config.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 9939b625c..e7b22c477 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -225,6 +225,9 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." ;; Persist `counsel-compile' history (add-to-list 'savehist-additional-variables 'counsel-compile-history)) + ;; `counsel-imenu' -- no sorting for imenu. Sort it by appearance in page. + (add-to-list 'ivy-sort-functions-alist '(counsel-imenu)) + ;; `counsel-locate' (when IS-MAC ;; Use spotlight on mac by default since it doesn't need any additional setup From 520fefbd0fefa0ba6abd0f3a3de218a72de42f54 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 12 Jan 2020 20:05:26 -0500 Subject: [PATCH 616/983] Prevent premature h-scrolling in vterm buffers --- modules/term/vterm/config.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/term/vterm/config.el b/modules/term/vterm/config.el index 4d7ec4923..df6d150f3 100644 --- a/modules/term/vterm/config.el +++ b/modules/term/vterm/config.el @@ -7,12 +7,16 @@ :config (set-popup-rule! "^vterm" :size 0.25 :vslot -4 :select t :quit nil :ttl 0) + (setq-hook! 'vterm-mode-hook + ;; Don't prompt about processes when killing vterm + confirm-kill-processes nil + ;; Prevent premature horizontal scrolling + hscroll-margin 0) + (add-hook 'vterm-mode-hook #'doom-mark-buffer-as-real-h) ;; Automatically kill buffer when vterm exits. (add-hook! 'vterm-exit-functions (defun +vterm-kill-buffer-on-quit-fn (buffer event) (if buffer (kill-buffer buffer)))) ;; Modeline serves no purpose in vterm - (add-hook 'vterm-mode-hook #'hide-mode-line-mode) - ;; Don't prompt about processes when killing vterm - (setq-hook! 'vterm-mode-hook confirm-kill-processes nil)) + (add-hook 'vterm-mode-hook #'hide-mode-line-mode)) From d47bc06ab4541da6aafb0676d9c9607ce99a6855 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 12 Jan 2020 22:35:03 -0500 Subject: [PATCH 617/983] Fix K on modules with no readme --- modules/lang/emacs-lisp/autoload.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/emacs-lisp/autoload.el b/modules/lang/emacs-lisp/autoload.el index 7b211e87b..cdbf89ff2 100644 --- a/modules/lang/emacs-lisp/autoload.el +++ b/modules/lang/emacs-lisp/autoload.el @@ -122,7 +122,7 @@ if it's callable, `apropos' otherwise." nil t)) (when (invisible-p (point)) (org-show-hidden-entry)))) - t)) + 'deferred)) (thing (helpful-symbol (intern thing))) ((call-interactively #'helpful-at-point)))) From b320075c5b5db05e5c2ce3fa5b81d20dc6378cb0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 13 Jan 2020 00:08:59 -0500 Subject: [PATCH 618/983] Add company-box scrollbar "fix" & refactor config --- modules/completion/company/config.el | 90 +++++++++++++++------------- 1 file changed, 49 insertions(+), 41 deletions(-) diff --git a/modules/completion/company/config.el b/modules/completion/company/config.el index a98bcca9c..1555d6d25 100644 --- a/modules/completion/company/config.el +++ b/modules/completion/company/config.el @@ -70,47 +70,42 @@ company-box-max-candidates 50 company-box-icons-alist 'company-box-icons-all-the-icons company-box-icons-functions - '(+company-box-icons--yasnippet-fn - company-box-icons--lsp - +company-box-icons--elisp-fn - company-box-icons--acphp) + (cons #'+company-box-icons--elisp-fn + (delq 'company-box-icons--elisp + company-box-icons-functions)) company-box-icons-all-the-icons - `((Unknown . ,(all-the-icons-material "find_in_page" :height 0.8 :face 'all-the-icons-purple)) - (Text . ,(all-the-icons-material "text_fields" :height 0.8 :face 'all-the-icons-green)) - (Method . ,(all-the-icons-material "functions" :height 0.8 :face 'all-the-icons-red)) - (Function . ,(all-the-icons-material "functions" :height 0.8 :face 'all-the-icons-red)) - (Constructor . ,(all-the-icons-material "functions" :height 0.8 :face 'all-the-icons-red)) - (Field . ,(all-the-icons-material "functions" :height 0.8 :face 'all-the-icons-red)) - (Variable . ,(all-the-icons-material "adjust" :height 0.8 :face 'all-the-icons-blue)) - (Class . ,(all-the-icons-material "class" :height 0.8 :face 'all-the-icons-red)) - (Interface . ,(all-the-icons-material "settings_input_component" :height 0.8 :face 'all-the-icons-red)) - (Module . ,(all-the-icons-material "view_module" :height 0.8 :face 'all-the-icons-red)) - (Property . ,(all-the-icons-material "settings" :height 0.8 :face 'all-the-icons-red)) - (Unit . ,(all-the-icons-material "straighten" :height 0.8 :face 'all-the-icons-red)) - (Value . ,(all-the-icons-material "filter_1" :height 0.8 :face 'all-the-icons-red)) - (Enum . ,(all-the-icons-material "plus_one" :height 0.8 :face 'all-the-icons-red)) - (Keyword . ,(all-the-icons-material "filter_center_focus" :height 0.8 :face 'all-the-icons-red)) - (Snippet . ,(all-the-icons-material "short_text" :height 0.8 :face 'all-the-icons-red)) - (Color . ,(all-the-icons-material "color_lens" :height 0.8 :face 'all-the-icons-red)) - (File . ,(all-the-icons-material "insert_drive_file" :height 0.8 :face 'all-the-icons-red)) - (Reference . ,(all-the-icons-material "collections_bookmark" :height 0.8 :face 'all-the-icons-red)) - (Folder . ,(all-the-icons-material "folder" :height 0.8 :face 'all-the-icons-red)) - (EnumMember . ,(all-the-icons-material "people" :height 0.8 :face 'all-the-icons-red)) - (Constant . ,(all-the-icons-material "pause_circle_filled" :height 0.8 :face 'all-the-icons-red)) - (Struct . ,(all-the-icons-material "streetview" :height 0.8 :face 'all-the-icons-red)) - (Event . ,(all-the-icons-material "event" :height 0.8 :face 'all-the-icons-red)) - (Operator . ,(all-the-icons-material "control_point" :height 0.8 :face 'all-the-icons-red)) - (TypeParameter . ,(all-the-icons-material "class" :height 0.8 :face 'all-the-icons-red)) - ;; (Template . ,(company-box-icons-image "Template.png")))) - (Yasnippet . ,(all-the-icons-material "short_text" :height 0.8 :face 'all-the-icons-green)) - (ElispFunction . ,(all-the-icons-material "functions" :height 0.8 :face 'all-the-icons-red)) - (ElispVariable . ,(all-the-icons-material "check_circle" :height 0.8 :face 'all-the-icons-blue)) - (ElispFeature . ,(all-the-icons-material "stars" :height 0.8 :face 'all-the-icons-orange)) - (ElispFace . ,(all-the-icons-material "format_paint" :height 0.8 :face 'all-the-icons-pink)))) - - (defun +company-box-icons--yasnippet-fn (candidate) - (when (get-text-property 0 'yas-annotation candidate) - 'Yasnippet)) + (let ((all-the-icons-scale-factor 0.8)) + `((Unknown . ,(all-the-icons-material "find_in_page" :face 'all-the-icons-purple)) + (Text . ,(all-the-icons-material "text_fields" :face 'all-the-icons-green)) + (Method . ,(all-the-icons-material "functions" :face 'all-the-icons-red)) + (Function . ,(all-the-icons-material "functions" :face 'all-the-icons-red)) + (Constructor . ,(all-the-icons-material "functions" :face 'all-the-icons-red)) + (Field . ,(all-the-icons-material "functions" :face 'all-the-icons-red)) + (Variable . ,(all-the-icons-material "adjust" :face 'all-the-icons-blue)) + (Class . ,(all-the-icons-material "class" :face 'all-the-icons-red)) + (Interface . ,(all-the-icons-material "settings_input_component" :face 'all-the-icons-red)) + (Module . ,(all-the-icons-material "view_module" :face 'all-the-icons-red)) + (Property . ,(all-the-icons-material "settings" :face 'all-the-icons-red)) + (Unit . ,(all-the-icons-material "straighten" :face 'all-the-icons-red)) + (Value . ,(all-the-icons-material "filter_1" :face 'all-the-icons-red)) + (Enum . ,(all-the-icons-material "plus_one" :face 'all-the-icons-red)) + (Keyword . ,(all-the-icons-material "filter_center_focus" :face 'all-the-icons-red)) + (Snippet . ,(all-the-icons-material "short_text" :face 'all-the-icons-red)) + (Color . ,(all-the-icons-material "color_lens" :face 'all-the-icons-red)) + (File . ,(all-the-icons-material "insert_drive_file" :face 'all-the-icons-red)) + (Reference . ,(all-the-icons-material "collections_bookmark" :face 'all-the-icons-red)) + (Folder . ,(all-the-icons-material "folder" :face 'all-the-icons-red)) + (EnumMember . ,(all-the-icons-material "people" :face 'all-the-icons-red)) + (Constant . ,(all-the-icons-material "pause_circle_filled" :face 'all-the-icons-red)) + (Struct . ,(all-the-icons-material "streetview" :face 'all-the-icons-red)) + (Event . ,(all-the-icons-material "event" :face 'all-the-icons-red)) + (Operator . ,(all-the-icons-material "control_point" :face 'all-the-icons-red)) + (TypeParameter . ,(all-the-icons-material "class" :face 'all-the-icons-red)) + (Template . ,(all-the-icons-material "short_text" :face 'all-the-icons-green)) + (ElispFunction . ,(all-the-icons-material "functions" :face 'all-the-icons-red)) + (ElispVariable . ,(all-the-icons-material "check_circle" :face 'all-the-icons-blue)) + (ElispFeature . ,(all-the-icons-material "stars" :face 'all-the-icons-orange)) + (ElispFace . ,(all-the-icons-material "format_paint" :face 'all-the-icons-pink))))) (defun +company-box-icons--elisp-fn (candidate) (when (derived-mode-p 'emacs-lisp-mode) @@ -118,7 +113,20 @@ (cond ((fboundp sym) 'ElispFunction) ((boundp sym) 'ElispVariable) ((featurep sym) 'ElispFeature) - ((facep sym) 'ElispFace)))))) + ((facep sym) 'ElispFace))))) + + (defadvice! +company-remove-scrollbar-a (orig-fn &rest args) + "This restrains the scrollbar to a width of ~32px. See +https://github.com/sebastiencs/company-box/issues/44" + :around #'company-box--update-scrollbar + (cl-letf* ((old-display-buffer-in-side-window + (symbol-function #'display-buffer-in-side-window)) + ((symbol-function #'display-buffer-in-side-window) + (lambda (buffer alist) + (setf (alist-get 'window-width alist) 0.1) + (funcall old-display-buffer-in-side-window + buffer alist)))) + (apply orig-fn args)))) (use-package! company-dict From e7de8118ceb8a3069369cd8b7250a4783ac347f4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 13 Jan 2020 01:08:49 -0500 Subject: [PATCH 619/983] Fix #1706: Make doom-big-font-mode affect all frames --- core/autoload/fonts.el | 83 ++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 43 deletions(-) diff --git a/core/autoload/fonts.el b/core/autoload/fonts.el index f7e5f1105..f1d9f1b58 100644 --- a/core/autoload/fonts.el +++ b/core/autoload/fonts.el @@ -20,56 +20,48 @@ acceptable values for this variable.") ;; ;;; Library -(defun doom--font-name (fontname frame) +(defun doom--font-name (fontname) (when (query-fontset fontname) - (when-let (ascii (assq 'ascii (aref (fontset-info fontname frame) 2))) + (when-let (ascii (assq 'ascii (aref (fontset-info fontname) 2))) (setq fontname (nth 2 ascii)))) (or (x-decompose-font-name fontname) (error "Cannot decompose font name"))) -(defun doom--frame-list (&optional frame) - "Return a list consisting of FRAME and all of FRAME's child frames." - (let ((frame (or frame (selected-frame)))) - (cons (selected-frame) - (cl-loop for fr in (frame-list) - if (eq (frame-parameter fr 'parent-frame) frame) - collect fr)))) - +(defvar doom--font-scale nil) ;;;###autoload -(defun doom-adjust-font-size (increment &optional frame) +(defun doom-adjust-font-size (increment) "Increase size of font in FRAME by INCREMENT. FRAME parameter defaults to current frame." (if (null increment) - (let ((frames (doom--frame-list frame))) - (dolist (frame frames) - (when (frame-parameter frame 'font-scale) - (set-frame-parameter frame 'font-scale nil))) - (set-frame-font doom-font 'keep-size frames) - (and frames t)) - (let (success) - (dolist (frame (doom--frame-list frame)) - (let* ((font (frame-parameter frame 'font)) - (font (doom--font-name font frame)) - (increment (* increment doom-font-increment)) - (zoom-factor (or (frame-parameter frame 'font-scale) 0))) - (let ((new-size (+ (string-to-number (aref font xlfd-regexp-pixelsize-subnum)) - increment))) - (unless (> new-size 0) - (error "Font is too small at %d" new-size)) - (aset font xlfd-regexp-pixelsize-subnum (number-to-string new-size))) - ;; Set point size & width to "*", so frame width will adjust to new font size - (aset font xlfd-regexp-pointsize-subnum "*") - (aset font xlfd-regexp-avgwidth-subnum "*") - (setq font (x-compose-font-name font)) - (unless (x-list-fonts font) - (error "Cannot change font size")) - (set-frame-parameter frame 'font font) - (set-frame-parameter frame 'font-scale (+ zoom-factor increment)) - (setq success t))) - (when success - ;; Unlike `set-frame-font', `set-frame-parameter' won't trigger this - (run-hooks 'after-setting-font-hook) - t)))) + (progn + (set-frame-font doom-font 'keep-size t) + (setf (alist-get 'font default-frame-alist) + (cond ((stringp doom-font) doom-font) + ((fontp doom-font) (font-xlfd-name doom-font)) + ((signal 'wrong-type-argument (list '(fontp stringp) + doom-font))))) + t) + (let* ((font (frame-parameter nil 'font)) + (font (doom--font-name font)) + (increment (* increment doom-font-increment)) + (zoom-factor (or doom--font-scale 0)) + success) + (let ((new-size (+ (string-to-number (aref font xlfd-regexp-pixelsize-subnum)) + increment))) + (unless (> new-size 0) + (error "Font is too small at %d" new-size)) + (aset font xlfd-regexp-pixelsize-subnum (number-to-string new-size))) + ;; Set point size & width to "*", so frame width will adjust to new font size + (aset font xlfd-regexp-pointsize-subnum "*") + (aset font xlfd-regexp-avgwidth-subnum "*") + (setq font (x-compose-font-name font)) + (unless (x-list-fonts font) + (error "Cannot change font size")) + (set-frame-font font 'keep-size t) + (setf (alist-get 'font default-frame-alist) font) + (setq doom--font-scale (+ zoom-factor increment)) + ;; Unlike `set-frame-font', `set-frame-parameter' won't trigger this + (run-hooks 'after-setting-font-hook)))) ;; @@ -127,8 +119,13 @@ This uses `doom/increase-font-size' under the hood, and enlargens the font by (unless doom-font (user-error "`doom-font' must be set to a valid font")) (if doom-big-font - (set-frame-font (if doom-big-font-mode doom-big-font doom-font) - 'keep-size (doom--frame-list)) + (let ((font (if doom-big-font-mode doom-big-font doom-font))) + (set-frame-font font 'keep-size t) + (setf (alist-get 'font default-frame-alist) + (cond ((stringp doom-font) font) + ((fontp font) (font-xlfd-name font)) + ((signal 'wrong-type-argument (list '(fontp stringp) + font)))))) (doom-adjust-font-size (and doom-big-font-mode (integerp doom-big-font-increment) From 6f273ffc253e5e2f863fe1c7dd1684238a21d03f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 13 Jan 2020 01:43:42 -0500 Subject: [PATCH 620/983] Totally disable company-box scrollbar Since the problem persists despite the earlier window-width fix. Fixes sebastiencs/company-box#44 --- modules/completion/company/config.el | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/completion/company/config.el b/modules/completion/company/config.el index 1555d6d25..a4e53da2d 100644 --- a/modules/completion/company/config.el +++ b/modules/completion/company/config.el @@ -116,16 +116,11 @@ ((facep sym) 'ElispFace))))) (defadvice! +company-remove-scrollbar-a (orig-fn &rest args) - "This restrains the scrollbar to a width of ~32px. See + "This disables the company-box scrollbar, because: https://github.com/sebastiencs/company-box/issues/44" :around #'company-box--update-scrollbar - (cl-letf* ((old-display-buffer-in-side-window - (symbol-function #'display-buffer-in-side-window)) - ((symbol-function #'display-buffer-in-side-window) - (lambda (buffer alist) - (setf (alist-get 'window-width alist) 0.1) - (funcall old-display-buffer-in-side-window - buffer alist)))) + (cl-letf (((symbol-function #'display-buffer-in-side-window) + (symbol-function #'ignore))) (apply orig-fn args)))) From 3308fb37181e9d8cbcbd814e9078aedd96835636 Mon Sep 17 00:00:00 2001 From: Niklas Carlsson Date: Mon, 13 Jan 2020 09:54:22 +0100 Subject: [PATCH 621/983] Minor updates to documentation - Update the keybinding for +doom/help-autodefs - Remove silver_search from the lookup module. Ripgrep is the supported dependency. --- docs/getting_started.org | 2 +- modules/tools/lookup/README.org | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/getting_started.org b/docs/getting_started.org index ec0aa41d4..495ef2828 100644 --- a/docs/getting_started.org +++ b/docs/getting_started.org @@ -944,7 +944,7 @@ a module. For example: *** Module settings Some modules expose settings that can be configured from other modules. Use ~M-x -doom/help-autdefs~ (=SPC h d a= or =C-h d a=) to see what is available and how +doom/help-autdefs~ (=SPC h d u= or =C-h d u=) to see what is available and how to use them. An example would be the ~set-company-backend!~ function that the =:completion diff --git a/modules/tools/lookup/README.org b/modules/tools/lookup/README.org index c541cba8b..05fdda993 100644 --- a/modules/tools/lookup/README.org +++ b/modules/tools/lookup/README.org @@ -46,13 +46,13 @@ up definitions, references and documentation. * Prerequisites This module has several soft dependencies: -+ ~the_silver_searcher~ or ~ripgrep~ (recommended) as a last-resort fallback for ++ ~ripgrep~ as a last-resort fallback for jump-to-definition/find-references. + ~sqlite3~ for Dash docset support. ** MacOS #+BEGIN_SRC sh -brew install the_silver_searcher ripgrep +brew install ripgrep # An older version of sqlite is included in MacOS. If it causes you problems (and # folks have reported it will), install it through homebrew: @@ -64,7 +64,7 @@ export PATH="/usr/local/opt/sqlite/bin:$PATH" ** Arch Linux #+BEGIN_SRC sh -sudo pacman -S sqlite the_silver_searcher ripgrep +sudo pacman -S sqlite ripgrep #+END_SRC * Features @@ -79,7 +79,7 @@ following sources before giving up: ~:lookup~ setting (see "Configuration" section). 2. Any available xref backends. 3. ~dumb-jump~ (a text search with aides to reduce false positives). -3. An ordinary project-wide text search with ripgrep or the_silver_searcher. +3. An ordinary project-wide text search with ripgrep. 5. If ~evil-mode~ is active, use ~evil-goto-definition~, which preforms a simple text search within the current buffer. @@ -95,7 +95,7 @@ will try: 1. Whatever ~:references~ function is registered for the current buffer with the ~:lookup~ setting (see "Configuration" section). 2. Any available xref backends. -3. An ordinary project-wide text search with ripgrep or the_silver_searcher. +3. An ordinary project-wide text search with ripgrep. If there are multiple results, you will be prompted to select one. From 1cf402926beec3bc13c7c947304a1662e5ff23f4 Mon Sep 17 00:00:00 2001 From: Niklas Carlsson Date: Mon, 13 Jan 2020 12:49:53 +0100 Subject: [PATCH 622/983] Update feature check of flycheck in evil-bindings This patch updates the check for enabling flycheck bindings to the new module location. --- modules/config/default/+evil-bindings.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 29fee16e2..2e3b61fff 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -372,7 +372,7 @@ :desc "Delete trailing whitespace" "w" #'delete-trailing-whitespace :desc "Delete trailing newlines" "W" #'doom/delete-trailing-newlines :desc "List errors" "x" #'flymake-show-diagnostics-buffer - (:when (featurep! :tools flycheck) + (:when (featurep! :checkers syntax) :desc "List errors" "x" #'flycheck-list-errors)) ;;; f --- file @@ -606,7 +606,7 @@ (:prefix-map ("t" . "toggle") :desc "Big mode" "b" #'doom-big-font-mode :desc "Flymake" "f" #'flymake-mode - (:when (featurep! :tools flycheck) + (:when (featurep! :checkers syntax) :desc "Flycheck" "f" #'flycheck-mode) :desc "Frame fullscreen" "F" #'toggle-frame-fullscreen :desc "Evil goggles" "g" #'evil-goggles-mode From 5a07e8f655a83a485c989f45d48329113835ad25 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 13 Jan 2020 16:03:22 -0500 Subject: [PATCH 623/983] Add treemacs-persp package #1348 --- modules/ui/treemacs/config.el | 5 +++++ modules/ui/treemacs/packages.el | 2 ++ 2 files changed, 7 insertions(+) diff --git a/modules/ui/treemacs/config.el b/modules/ui/treemacs/config.el index ba969ea33..df1c70996 100644 --- a/modules/ui/treemacs/config.el +++ b/modules/ui/treemacs/config.el @@ -37,3 +37,8 @@ (use-package! treemacs-magit :when (featurep! :tools magit) :after treemacs magit) + + +(use-package! treemacs-persp + :when (featurep! :ui workspaces) + :after treemacs) diff --git a/modules/ui/treemacs/packages.el b/modules/ui/treemacs/packages.el index 929b95f43..61553daa3 100644 --- a/modules/ui/treemacs/packages.el +++ b/modules/ui/treemacs/packages.el @@ -7,3 +7,5 @@ (package! treemacs-projectile) (when (featurep! :tools magit) (package! treemacs-magit)) +(when (featurep! :ui workspaces) + (package! treemacs-persp)) From 5276762daa2338bd49edf4d3ebd935e549b74015 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Tue, 14 Jan 2020 08:53:30 +0100 Subject: [PATCH 624/983] Update feature check of flycheck in elixir mode This patch updates the check for enabling flycheck bindings to the new module location. --- modules/lang/elixir/config.el | 2 +- modules/lang/elixir/packages.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/elixir/config.el b/modules/lang/elixir/config.el index ce19d9e1d..20915990d 100644 --- a/modules/lang/elixir/config.el +++ b/modules/lang/elixir/config.el @@ -40,7 +40,7 @@ (add-hook 'elixir-mode-local-vars-hook #'lsp!)) (use-package! flycheck-credo - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :config (flycheck-credo-setup))) diff --git a/modules/lang/elixir/packages.el b/modules/lang/elixir/packages.el index a50e54ce7..73a4c64be 100644 --- a/modules/lang/elixir/packages.el +++ b/modules/lang/elixir/packages.el @@ -4,5 +4,5 @@ ;; +elixir.el (package! elixir-mode) (package! alchemist) -(when (featurep! :tools flycheck) +(when (featurep! :checkers syntax) (package! flycheck-credo)) From 9eb3a74a570c5fa3713207b09a4b63b54847dacc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 13 Jan 2020 22:55:02 -0500 Subject: [PATCH 625/983] Save interpreter-mode-alist to autoloads --- core/cli/autoloads.el | 1 + 1 file changed, 1 insertion(+) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 28834aaf8..e7373ed10 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -10,6 +10,7 @@ one wants that.") (defvar doom-autoload-cached-vars '(load-path auto-mode-alist + interpreter-mode-alist Info-directory-list doom-disabled-packages) "A list of variables to be cached in `doom-package-autoload-file'.") From 920b5115912b2d8824f7c3833985c7db4bb9970f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 13 Jan 2020 23:09:09 -0500 Subject: [PATCH 626/983] org-agenda-dim-blocked-tasks = t (default) #2365 This way, parent todos are at least displayed, but dimmed. --- modules/lang/org/config.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 25356c36f..b2265e602 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -78,8 +78,6 @@ path too.") (setq-default ;; Don't monopolize the whole frame just for the agenda org-agenda-window-setup 'current-window - ;; Hide blocked tasks in the agenda view. - org-agenda-dim-blocked-tasks 'invisible org-agenda-inhibit-startup t org-agenda-skip-unavailable-files t ;; Move the agenda to show the previous 3 days and the next 7 days for a bit From 12094788d7ee3c2132852694e19b9cafa5a1c7d3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 14 Jan 2020 03:04:26 -0500 Subject: [PATCH 627/983] Fix references to :tools fly{spell,check} --- core/core-modules.el | 2 +- modules/app/irc/config.el | 2 +- modules/config/default/+evil-bindings.el | 2 +- modules/email/mu4e/config.el | 2 +- modules/lang/cc/config.el | 2 +- modules/lang/cc/packages.el | 2 +- modules/lang/clojure/config.el | 2 +- modules/lang/clojure/packages.el | 2 +- modules/lang/crystal/config.el | 4 ++-- modules/lang/crystal/packages.el | 2 +- modules/lang/elixir/README.org | 4 ++-- modules/lang/elm/config.el | 2 +- modules/lang/elm/packages.el | 2 +- modules/lang/emacs-lisp/config.el | 2 +- modules/lang/emacs-lisp/packages.el | 2 +- modules/lang/erlang/config.el | 2 +- modules/lang/erlang/packages.el | 2 +- modules/lang/ess/config.el | 2 +- modules/lang/go/README.org | 2 +- modules/lang/go/config.el | 2 +- modules/lang/go/packages.el | 2 +- modules/lang/haskell/+dante.el | 2 +- modules/lang/haskell/+intero.el | 2 +- modules/lang/haskell/config.el | 2 +- modules/lang/java/+meghanada.el | 2 +- modules/lang/javascript/config.el | 2 +- modules/lang/kotlin/config.el | 2 +- modules/lang/kotlin/packages.el | 2 +- modules/lang/ledger/config.el | 2 +- modules/lang/ledger/packages.el | 2 +- modules/lang/lua/config.el | 2 +- modules/lang/lua/packages.el | 2 +- modules/lang/nim/config.el | 2 +- modules/lang/nim/packages.el | 2 +- modules/lang/ocaml/README.org | 4 ++-- modules/lang/ocaml/config.el | 4 ++-- modules/lang/ocaml/packages.el | 2 +- modules/lang/perl/config.el | 2 +- modules/lang/perl/packages.el | 2 +- modules/lang/plantuml/config.el | 2 +- modules/lang/plantuml/packages.el | 2 +- modules/lang/python/README.org | 2 +- modules/lang/python/config.el | 2 +- modules/lang/python/packages.el | 2 +- modules/lang/sh/doctor.el | 2 +- modules/lang/solidity/config.el | 2 +- modules/lang/swift/config.el | 2 +- modules/lang/swift/packages.el | 2 +- 48 files changed, 52 insertions(+), 52 deletions(-) diff --git a/core/core-modules.el b/core/core-modules.el index ebafdff0f..79b16cb32 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -42,7 +42,7 @@ Each entry is a three-level tree. For example: (:feature (version-control (:emacs vc) (:ui vc-gutter)) - (spellcheck (:tools flyspell)) + (spellcheck (:checkers spell)) (syntax-checker (:tools flycheck))) This marks :feature version-control, :feature spellcheck and :feature diff --git a/modules/app/irc/config.el b/modules/app/irc/config.el index 96c099aa9..38f910a0c 100644 --- a/modules/app/irc/config.el +++ b/modules/app/irc/config.el @@ -176,7 +176,7 @@ playback.") (define-key lui-mode-map "\C-u" #'lui-kill-to-beginning-of-line) (setq lui-fill-type nil) - (when (featurep! :tools flyspell) + (when (featurep! :checkers spell) (setq lui-flyspell-p t)) (after! evil diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 2e3b61fff..8bf7742be 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -617,7 +617,7 @@ (:when (featurep! :lang org +present) :desc "org-tree-slide mode" "p" #'+org-present/start) :desc "Read-only mode" "r" #'read-only-mode - (:when (featurep! :tools flyspell) + (:when (featurep! :checkers spell) :desc "Flyspell" "s" #'flyspell-mode) (:when (featurep! :lang org +pomodoro) :desc "Pomodoro timer" "t" #'org-pomodoro) diff --git a/modules/email/mu4e/config.el b/modules/email/mu4e/config.el index 1a4adb51f..3b980d191 100644 --- a/modules/email/mu4e/config.el +++ b/modules/email/mu4e/config.el @@ -91,7 +91,7 @@ (defadvice! +mu4e--refresh-current-view-a (&rest _) :after #'mu4e-mark-execute-all (mu4e-headers-rerun-search)) - (when (featurep! :tools flyspell) + (when (featurep! :checkers spell) (add-hook 'mu4e-compose-mode-hook #'flyspell-mode)) ;; Wrap text in messages diff --git a/modules/lang/cc/config.el b/modules/lang/cc/config.el index 4d6e428e0..09d03513f 100644 --- a/modules/lang/cc/config.el +++ b/modules/lang/cc/config.el @@ -141,7 +141,7 @@ This is ignored by ccls.") :hook (irony-mode . irony-eldoc)) (use-package! flycheck-irony - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :config (flycheck-irony-setup)) (use-package! company-irony diff --git a/modules/lang/cc/packages.el b/modules/lang/cc/packages.el index ae5401fc5..28e121ab3 100644 --- a/modules/lang/cc/packages.el +++ b/modules/lang/cc/packages.el @@ -16,7 +16,7 @@ (package! ccls) (when (package! irony) (package! irony-eldoc) - (when (featurep! :tools flycheck) + (when (featurep! :checkers syntax) (package! flycheck-irony)) (when (featurep! :completion company) (package! company-irony) diff --git a/modules/lang/clojure/config.el b/modules/lang/clojure/config.el index 29ccaa616..55f52738b 100644 --- a/modules/lang/clojure/config.el +++ b/modules/lang/clojure/config.el @@ -158,5 +158,5 @@ (use-package! flycheck-joker - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :after flycheck) diff --git a/modules/lang/clojure/packages.el b/modules/lang/clojure/packages.el index e289c1e81..b6eb1d017 100644 --- a/modules/lang/clojure/packages.el +++ b/modules/lang/clojure/packages.el @@ -4,5 +4,5 @@ (package! cider) (package! clj-refactor) -(when (featurep! :tools flycheck) +(when (featurep! :checkers syntax) (package! flycheck-joker)) diff --git a/modules/lang/crystal/config.el b/modules/lang/crystal/config.el index be955030f..07df73ccb 100644 --- a/modules/lang/crystal/config.el +++ b/modules/lang/crystal/config.el @@ -11,12 +11,12 @@ (use-package! flycheck-crystal - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :after crystal-mode) (use-package! flycheck-ameba - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :after crystal-mode :config (flycheck-ameba-setup)) diff --git a/modules/lang/crystal/packages.el b/modules/lang/crystal/packages.el index 0df4c86b9..5a5567281 100644 --- a/modules/lang/crystal/packages.el +++ b/modules/lang/crystal/packages.el @@ -3,6 +3,6 @@ (package! crystal-mode) (package! inf-crystal) -(when (featurep! :tools flycheck) +(when (featurep! :checkers syntax) (package! flycheck-crystal) (package! flycheck-ameba)) diff --git a/modules/lang/elixir/README.org b/modules/lang/elixir/README.org index 2fbbac114..1ae98cf91 100644 --- a/modules/lang/elixir/README.org +++ b/modules/lang/elixir/README.org @@ -33,7 +33,7 @@ manager or a version management tool such as [[https://github.com/asdf-vm/asdf-e If you want to add support for LSP ([[modules/tools/lsp][:tools lsp]]), be sure to install [[https://github.com/JakeBecker/elixir-ls/][elixir-ls]] and enable ~:tools lsp~ in your ~init.el~. -To support linting with [[https://github.com/rrrene/credo][credo]], add ~:tools flycheck~ to your ~init.el~ +To support linting with [[https://github.com/rrrene/credo][credo]], add ~:checkers syntax~ to your ~init.el~ ** Install Elixir *** With ~asdf~ #+BEGIN_SRC sh @@ -59,4 +59,4 @@ sudo zypper install elixir - Mix integration - Phoenix support - ~iex~ integration (~:tools eval~) -- Syntax checking (~:tools flycheck~, using [[https://github.com/aaronjensen/flycheck-credo][flycheck-credo]]~) +- Syntax checking (~:checkers syntax~, using [[https://github.com/aaronjensen/flycheck-credo][flycheck-credo]]~) diff --git a/modules/lang/elm/config.el b/modules/lang/elm/config.el index 479800eed..695a596f7 100644 --- a/modules/lang/elm/config.el +++ b/modules/lang/elm/config.el @@ -17,6 +17,6 @@ (use-package! flycheck-elm - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :after elm-mode :config (add-to-list 'flycheck-checkers 'elm nil #'eq)) diff --git a/modules/lang/elm/packages.el b/modules/lang/elm/packages.el index 23bf4d45d..7f27aa3f0 100644 --- a/modules/lang/elm/packages.el +++ b/modules/lang/elm/packages.el @@ -2,6 +2,6 @@ ;;; lang/elm/packages.el (package! elm-mode) -(when (featurep! :tools flycheck) +(when (featurep! :checkers syntax) (package! flycheck-elm)) diff --git a/modules/lang/emacs-lisp/config.el b/modules/lang/emacs-lisp/config.el index bedc8c0f0..5aebdf93d 100644 --- a/modules/lang/emacs-lisp/config.el +++ b/modules/lang/emacs-lisp/config.el @@ -129,7 +129,7 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.") (use-package! flycheck-cask - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :defer t :init (add-hook! 'emacs-lisp-mode-hook diff --git a/modules/lang/emacs-lisp/packages.el b/modules/lang/emacs-lisp/packages.el index 5f7405ac1..8bd841a2c 100644 --- a/modules/lang/emacs-lisp/packages.el +++ b/modules/lang/emacs-lisp/packages.el @@ -9,7 +9,7 @@ (package! elisp-def) (package! elisp-demos) -(when (featurep! :tools flycheck) +(when (featurep! :checkers syntax) (package! flycheck-cask)) (package! buttercup) diff --git a/modules/lang/erlang/config.el b/modules/lang/erlang/config.el index 6324785fc..5c6779aad 100644 --- a/modules/lang/erlang/config.el +++ b/modules/lang/erlang/config.el @@ -7,7 +7,7 @@ (use-package! flycheck-rebar3 - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :after flycheck :config (flycheck-rebar3-setup)) diff --git a/modules/lang/erlang/packages.el b/modules/lang/erlang/packages.el index 00a871c99..a40b52568 100644 --- a/modules/lang/erlang/packages.el +++ b/modules/lang/erlang/packages.el @@ -3,7 +3,7 @@ (package! erlang) -(when (featurep! :tools flycheck) +(when (featurep! :checkers syntax) (package! flycheck-rebar3)) (when (featurep! :completion ivy) diff --git a/modules/lang/ess/config.el b/modules/lang/ess/config.el index 2d9c2eb98..b38b09a4e 100644 --- a/modules/lang/ess/config.el +++ b/modules/lang/ess/config.el @@ -14,7 +14,7 @@ (add-to-list 'auto-mode-alist '("\\.jl\\'" . ess-julia-mode))) :config (setq ess-offset-continued 'straight - ess-use-flymake (not (featurep! :tools flycheck)) + ess-use-flymake (not (featurep! :checkers syntax)) ess-nuke-trailing-whitespace-p t ess-style 'DEFAULT ess-history-directory (expand-file-name "ess-history/" doom-cache-dir)) diff --git a/modules/lang/go/README.org b/modules/lang/go/README.org index df0dbf48a..664e4742d 100644 --- a/modules/lang/go/README.org +++ b/modules/lang/go/README.org @@ -40,7 +40,7 @@ This module adds [[https://golang.org][Go]] support. + [[https://github.com/brantou/emacs-go-tag][go-tag]] + [[https://github.com/mdempsky/gocode][company-go]]* + [[https://github.com/s-kostyaev/go-gen-test][go-gen-test]] -+ [[https://github.com/weijiangan/flycheck-golangci-lint][flycheck-golangci-lint]] (if =:tools flycheck= is enabled) ++ [[https://github.com/weijiangan/flycheck-golangci-lint][flycheck-golangci-lint]] (if =:checkers syntax= is enabled) * Prerequisites ** Go diff --git a/modules/lang/go/config.el b/modules/lang/go/config.el index b5605a83b..05947af45 100644 --- a/modules/lang/go/config.el +++ b/modules/lang/go/config.el @@ -71,5 +71,5 @@ (setq company-go-show-annotation t)) (use-package! flycheck-golangci-lint - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :hook (go-mode . flycheck-golangci-lint-setup)) diff --git a/modules/lang/go/packages.el b/modules/lang/go/packages.el index 64a72ea6b..80b3f5c63 100644 --- a/modules/lang/go/packages.el +++ b/modules/lang/go/packages.el @@ -11,5 +11,5 @@ (when (featurep! :completion company) (package! company-go)) -(when (featurep! :tools flycheck) +(when (featurep! :checkers syntax) (package! flycheck-golangci-lint)) diff --git a/modules/lang/haskell/+dante.el b/modules/lang/haskell/+dante.el index c5474bb32..698c2e1d7 100644 --- a/modules/lang/haskell/+dante.el +++ b/modules/lang/haskell/+dante.el @@ -14,7 +14,7 @@ "-fdefer-typed-holes" "-fdefer-type-errors")) :config - (when (featurep! :tools flycheck) + (when (featurep! :checkers syntax) (flycheck-add-next-checker 'haskell-dante '(warning . haskell-hlint))) (set-company-backend! 'dante-mode #'dante-company) diff --git a/modules/lang/haskell/+intero.el b/modules/lang/haskell/+intero.el index 309a92aac..2986dd2bd 100644 --- a/modules/lang/haskell/+intero.el +++ b/modules/lang/haskell/+intero.el @@ -16,7 +16,7 @@ This is necessary because `intero-mode' doesn't do its own error checks." (setq haskell-compile-cabal-build-command "stack build --fast") (set-lookup-handlers! 'intero-mode :definition #'intero-goto-definition) (set-company-backend! 'intero-mode 'intero-company) - (when (featurep! :tools flycheck) + (when (featurep! :checkers syntax) (flycheck-add-next-checker 'intero '(warning . haskell-hlint))) (when (featurep 'evil) diff --git a/modules/lang/haskell/config.el b/modules/lang/haskell/config.el index 515a7c00b..65a14d85d 100644 --- a/modules/lang/haskell/config.el +++ b/modules/lang/haskell/config.el @@ -15,7 +15,7 @@ (after! haskell-mode (setq haskell-process-suggest-remove-import-lines t ; warnings for redundant imports etc haskell-process-auto-import-loaded-modules t - haskell-process-show-overlays (not (featurep! :tools flycheck))) ; redundant with flycheck + haskell-process-show-overlays (not (featurep! :checkers syntax))) ; redundant with flycheck (set-lookup-handlers! 'haskell-mode :definition #'haskell-mode-jump-to-def-or-tag) diff --git a/modules/lang/java/+meghanada.el b/modules/lang/java/+meghanada.el index 4c33f652e..f45007cff 100644 --- a/modules/lang/java/+meghanada.el +++ b/modules/lang/java/+meghanada.el @@ -6,7 +6,7 @@ :init (setq meghanada-server-install-dir (concat doom-etc-dir "meghanada-server/") meghanada-use-company (featurep! :completion company) - meghanada-use-flycheck (featurep! :tools flycheck) + meghanada-use-flycheck (featurep! :checkers syntax) meghanada-use-eldoc t meghanada-use-auto-start t) :config diff --git a/modules/lang/javascript/config.el b/modules/lang/javascript/config.el index 02f513175..6baffcc41 100644 --- a/modules/lang/javascript/config.el +++ b/modules/lang/javascript/config.el @@ -79,7 +79,7 @@ (add-to-list 'magic-mode-alist '(+javascript-jsx-file-p . rjsx-mode)) :config (set-electric! 'rjsx-mode :chars '(?\} ?\) ?. ?>)) - (when (featurep! :tools flycheck) + (when (featurep! :checkers syntax) (add-hook! 'rjsx-mode-hook ;; jshint doesn't know how to deal with jsx (push 'javascript-jshint flycheck-disabled-checkers))) diff --git a/modules/lang/kotlin/config.el b/modules/lang/kotlin/config.el index fb26af8fc..d5eda36af 100644 --- a/modules/lang/kotlin/config.el +++ b/modules/lang/kotlin/config.el @@ -14,5 +14,5 @@ (use-package! flycheck-kotlin - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :hook (kotlin-mode . flycheck-kotlin-setup)) diff --git a/modules/lang/kotlin/packages.el b/modules/lang/kotlin/packages.el index f7c3361dc..771f80755 100644 --- a/modules/lang/kotlin/packages.el +++ b/modules/lang/kotlin/packages.el @@ -3,5 +3,5 @@ (package! kotlin-mode) -(when (featurep! :tools flycheck) +(when (featurep! :checkers syntax) (package! flycheck-kotlin)) diff --git a/modules/lang/ledger/config.el b/modules/lang/ledger/config.el index 35f6b83dd..bd87308af 100644 --- a/modules/lang/ledger/config.el +++ b/modules/lang/ledger/config.el @@ -21,7 +21,7 @@ (use-package! flycheck-ledger - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :after ledger-mode) diff --git a/modules/lang/ledger/packages.el b/modules/lang/ledger/packages.el index 7142c61b2..2c2179e12 100644 --- a/modules/lang/ledger/packages.el +++ b/modules/lang/ledger/packages.el @@ -6,5 +6,5 @@ (when (featurep! :editor evil) (package! evil-ledger)) -(when (featurep! :tools flycheck) +(when (featurep! :checkers syntax) (package! flycheck-ledger)) diff --git a/modules/lang/lua/config.el b/modules/lang/lua/config.el index b69e286e5..e54bf0c73 100644 --- a/modules/lang/lua/config.el +++ b/modules/lang/lua/config.el @@ -28,7 +28,7 @@ (add-hook! 'moonscript-mode-hook #'+lua-moonscript-fix-single-quotes-h #'+lua-moonscript-fontify-interpolation-h) - (when (featurep! :tools flycheck) + (when (featurep! :checkers syntax) (require 'flycheck-moonscript nil t))) diff --git a/modules/lang/lua/packages.el b/modules/lang/lua/packages.el index c4e8e4f7b..8c7d8c99a 100644 --- a/modules/lang/lua/packages.el +++ b/modules/lang/lua/packages.el @@ -5,7 +5,7 @@ (when (featurep! +moonscript) (package! moonscript) - (when (featurep! :tools flycheck) + (when (featurep! :checkers syntax) (package! flycheck-moonscript :recipe (:host github :repo "hlissner/emacs-flycheck-moonscript")))) diff --git a/modules/lang/nim/config.el b/modules/lang/nim/config.el index 4d05f63fe..fbf169299 100644 --- a/modules/lang/nim/config.el +++ b/modules/lang/nim/config.el @@ -25,6 +25,6 @@ windows." (use-package! flycheck-nim - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :after nim-mode) diff --git a/modules/lang/nim/packages.el b/modules/lang/nim/packages.el index ba994148a..7084efad3 100644 --- a/modules/lang/nim/packages.el +++ b/modules/lang/nim/packages.el @@ -5,5 +5,5 @@ (package! nim-mode) -(when (featurep! :tools flycheck) +(when (featurep! :checkers syntax) (package! flycheck-nim)) diff --git a/modules/lang/ocaml/README.org b/modules/lang/ocaml/README.org index 9f6755935..ce5b47645 100644 --- a/modules/lang/ocaml/README.org +++ b/modules/lang/ocaml/README.org @@ -55,10 +55,10 @@ opam install merlin utop ocp-indent dune ocamlformat * Configuration + If =:completion company= is enabled then autocomplete is provided by =merlin= -+ When =:tools flycheck= is enabled then =flycheck-ocaml= is activated to do ++ When =:checkers syntax= is enabled then =flycheck-ocaml= is activated to do on-the-fly syntax/type checking via =merlin=, otherwise this is only done when the file is saved. -+ Spell checking is activated in comments if =:tools flyspell= is active ++ Spell checking is activated in comments if =:checkers spell= is active + A REPL is provided if =utop= is installed and =:tools eval= is active + If =:editor format= is enabled, the =ocamlformat= executable is available and there is an =.ocamlformat= file present then =format-all-buffer= is bound to diff --git a/modules/lang/ocaml/config.el b/modules/lang/ocaml/config.el index 69ce17737..c9b0ebc1d 100644 --- a/modules/lang/ocaml/config.el +++ b/modules/lang/ocaml/config.el @@ -18,7 +18,7 @@ (tuareg-opam-update-env (tuareg-opam-current-compiler)) ;; Spell-check comments - (when (featurep! :tools flyspell) + (when (featurep! :checkers spell) (add-hook 'tuareg-mode-local-vars-hook #'flyspell-prog-mode)) ;; Ensure asterixes in block comments have at least one space of indentation @@ -65,7 +65,7 @@ "t" #'merlin-type-enclosing) (use-package! flycheck-ocaml - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :hook (merlin-mode . +ocaml-init-flycheck-h) :config (defun +ocaml-init-flycheck-h () diff --git a/modules/lang/ocaml/packages.el b/modules/lang/ocaml/packages.el index a3e38a112..a4d54b3ec 100644 --- a/modules/lang/ocaml/packages.el +++ b/modules/lang/ocaml/packages.el @@ -6,7 +6,7 @@ (unless (featurep! +lsp) (package! merlin) (package! merlin-eldoc) - (when (featurep! :tools flycheck) + (when (featurep! :checkers syntax) (package! flycheck-ocaml))) (package! ocp-indent) diff --git a/modules/lang/perl/config.el b/modules/lang/perl/config.el index 1e433ee1e..9301646b7 100644 --- a/modules/lang/perl/config.el +++ b/modules/lang/perl/config.el @@ -6,5 +6,5 @@ (use-package! flycheck-perl6 - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :after perl6-mode) diff --git a/modules/lang/perl/packages.el b/modules/lang/perl/packages.el index e00de4f19..4d5b56d67 100644 --- a/modules/lang/perl/packages.el +++ b/modules/lang/perl/packages.el @@ -3,5 +3,5 @@ (package! perl6-mode) -(when (featurep! :tools flycheck) +(when (featurep! :checkers syntax) (package! flycheck-perl6)) diff --git a/modules/lang/plantuml/config.el b/modules/lang/plantuml/config.el index 4c7d1e749..45a18a685 100644 --- a/modules/lang/plantuml/config.el +++ b/modules/lang/plantuml/config.el @@ -15,7 +15,7 @@ (use-package! flycheck-plantuml - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :after plantuml-mode :config (flycheck-plantuml-setup)) diff --git a/modules/lang/plantuml/packages.el b/modules/lang/plantuml/packages.el index 0335841a7..3f2ed51c0 100644 --- a/modules/lang/plantuml/packages.el +++ b/modules/lang/plantuml/packages.el @@ -2,5 +2,5 @@ ;;; lang/plantuml/packages.el (package! plantuml-mode) -(when (featurep! :tools flycheck) +(when (featurep! :checkers syntax) (package! flycheck-plantuml)) diff --git a/modules/lang/python/README.org b/modules/lang/python/README.org index 78b140771..b64c7c6ec 100644 --- a/modules/lang/python/README.org +++ b/modules/lang/python/README.org @@ -46,7 +46,7 @@ Adds Python support to Doom Emacs. + [[https://github.com/emacs-lsp/lsp-python-ms][lsp-python-ms]]* + ~+cython~ + [[https://github.com/cython/cython/blob/master/Tools/cython-mode.el][Cython-mode]] - + ~:tools flycheck~ [[https://github.com/lbolla/emacs-flycheck-cython/tree/master][Flycheck-cython]] + + ~:checkers syntax~ [[https://github.com/lbolla/emacs-flycheck-cython/tree/master][Flycheck-cython]] * Prerequisites This module has no direct prerequisites. Here are some of its soft dependencies. diff --git a/modules/lang/python/config.el b/modules/lang/python/config.el index f75675109..f7cf2d73e 100644 --- a/modules/lang/python/config.el +++ b/modules/lang/python/config.el @@ -310,5 +310,5 @@ called.") (use-package! flycheck-cython :when (featurep! +cython) - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :after cython-mode) diff --git a/modules/lang/python/packages.el b/modules/lang/python/packages.el index 053f1fb94..0a67b2a80 100644 --- a/modules/lang/python/packages.el +++ b/modules/lang/python/packages.el @@ -5,7 +5,7 @@ (package! pip-requirements) (when (featurep! +cython) (package! cython-mode) - (when (featurep! :tools flycheck) + (when (featurep! :checkers syntax) (package! flycheck-cython))) ;; LSP diff --git a/modules/lang/sh/doctor.el b/modules/lang/sh/doctor.el index e85643b71..a25f3dfbc 100644 --- a/modules/lang/sh/doctor.el +++ b/modules/lang/sh/doctor.el @@ -1,5 +1,5 @@ ;;; lang/sh/doctor.el -*- lexical-binding: t; -*- -(when (featurep! :tools flycheck) +(when (featurep! :checkers syntax) (unless (executable-find "shellcheck") (warn! "Couldn't find shellcheck. Shell script linting will not work"))) diff --git a/modules/lang/solidity/config.el b/modules/lang/solidity/config.el index 7921df560..8552c3982 100644 --- a/modules/lang/solidity/config.el +++ b/modules/lang/solidity/config.el @@ -8,7 +8,7 @@ (use-package! solidity-flycheck ; included with solidity-mode - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :after solidity-mode :config (setq flycheck-solidity-solc-addstd-contracts t) diff --git a/modules/lang/swift/config.el b/modules/lang/swift/config.el index 68470f3c7..5a31b95d6 100644 --- a/modules/lang/swift/config.el +++ b/modules/lang/swift/config.el @@ -5,7 +5,7 @@ (use-package! flycheck-swift - :when (featurep! :tools flycheck) + :when (featurep! :checkers syntax) :unless (featurep! +lsp) :after swift-mode :config (flycheck-swift-setup)) diff --git a/modules/lang/swift/packages.el b/modules/lang/swift/packages.el index 6dd3244f0..3c1d15d90 100644 --- a/modules/lang/swift/packages.el +++ b/modules/lang/swift/packages.el @@ -7,5 +7,5 @@ (package! lsp-sourcekit) (when (featurep! :completion company) (package! company-sourcekit)) - (when (featurep! :tools flycheck) + (when (featurep! :checkers syntax) (package! flycheck-swift))) From bdb12cb75b530e4ca87fd016a6de4f0a6af53874 Mon Sep 17 00:00:00 2001 From: Niklas Carlsson Date: Tue, 14 Jan 2020 12:33:05 +0100 Subject: [PATCH 628/983] Use Docker docset for dockerfile-mode This patch setups the appropriate docset to use in dockerfile-mode. Similar to how it is done for other major-modes that have associated docsets. --- modules/tools/docker/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/tools/docker/config.el b/modules/tools/docker/config.el index cf3c8a32f..9c14b77e9 100644 --- a/modules/tools/docker/config.el +++ b/modules/tools/docker/config.el @@ -1,6 +1,7 @@ ;;; tools/docker/config.el -*- lexical-binding: t; -*- (after! docker + (set-docsets! 'dockerfile-mode "Docker") (set-evil-initial-state! '(docker-container-mode docker-image-mode From 89dd2f98a420e7ce45904e2f59f73de197c32fdf Mon Sep 17 00:00:00 2001 From: Peter Steidel Date: Tue, 14 Jan 2020 14:18:52 -0500 Subject: [PATCH 629/983] Add LSP Support to Erlang --- modules/lang/erlang/config.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/lang/erlang/config.el b/modules/lang/erlang/config.el index 5c6779aad..1934344c2 100644 --- a/modules/lang/erlang/config.el +++ b/modules/lang/erlang/config.el @@ -22,4 +22,8 @@ (use-package! company-erlang :when (featurep! :completion company) + :unless (featurep! +lsp) :hook (erlang-mode . company-erlang-init)) + +(when (featurep! +lsp) + (add-hook 'erlang-mode-hook #'lsp!)) From 1d91d9c6d6415502c93d75b28692b688f541ba25 Mon Sep 17 00:00:00 2001 From: Peter Steidel Date: Tue, 14 Jan 2020 19:09:38 -0500 Subject: [PATCH 630/983] Erlang LSP module improvements - Add README.org - Make it so other completion frameworks don't compete with the lsp module - load lsp via erlang-local-vars-hook --- modules/lang/erlang/README.org | 39 +++++++++++++++++++++++++++++++++ modules/lang/erlang/config.el | 2 +- modules/lang/erlang/packages.el | 6 +++-- 3 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 modules/lang/erlang/README.org diff --git a/modules/lang/erlang/README.org b/modules/lang/erlang/README.org new file mode 100644 index 000000000..b5b540c97 --- /dev/null +++ b/modules/lang/erlang/README.org @@ -0,0 +1,39 @@ +#+TITLE: lang/erlang +#+DATE: January 14, 2020 +#+SINCE: {replace with next tagged release version} +#+STARTUP: inlineimages nofold + +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#maintainers][Maintainers]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] +- [[#prerequisites][Prerequisites]] +- [[#features][Features]] + +* Description + +This module provides support [[https://www.erlang.org/][Erlang programming language]]. Support for the +[[https://github.com/erlang/sourcer][sourcer]] language server is optional. + +** Maintainers +This module has no dedicated maintainers. + +** Module Flags ++ ~+lsp~ Enable LSP Support. Requires [[https://github.com/erlang/sourcer][sourcer]]. + + +** Plugins ++ Erlang Mode (bundled with Erlang installations) ++ [[https://github.com/joedevivo/flycheck-rebar3][flycheck-rebar3]] ++ [[https://github.com/s-kostyaev/ivy-erlang-complete][ivy-erlang-complete]] + +* Prerequisites +You should have Erlang installed. Check your distribution's package manager or a +version management tool such as [[https://github.com/kerl/kerl][kerl]]. + +If you want LSP support, install [[https://github.com/erlang/sourcer][sourcer]]. + +* Features +- Code completion (~+lsp~, ~:completion company~, and ~:completion ivy~) +- Syntax checking (~:checkers syntax~) diff --git a/modules/lang/erlang/config.el b/modules/lang/erlang/config.el index 1934344c2..2c0773b5d 100644 --- a/modules/lang/erlang/config.el +++ b/modules/lang/erlang/config.el @@ -26,4 +26,4 @@ :hook (erlang-mode . company-erlang-init)) (when (featurep! +lsp) - (add-hook 'erlang-mode-hook #'lsp!)) + (add-hook 'erlang-mode-local-vars-hook #'lsp!)) diff --git a/modules/lang/erlang/packages.el b/modules/lang/erlang/packages.el index a40b52568..b519fa358 100644 --- a/modules/lang/erlang/packages.el +++ b/modules/lang/erlang/packages.el @@ -6,8 +6,10 @@ (when (featurep! :checkers syntax) (package! flycheck-rebar3)) -(when (featurep! :completion ivy) +(when (and (featurep! :completion ivy) + (not (featurep! +lsp))) (package! ivy-erlang-complete)) -(when (featurep! :completion company) +(when (and (featurep! :completion company) + (not (featurep! +lsp))) (package! company-erlang)) From 4161014cfcbfbf44ed8193d8c3622acfab1342d1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 14 Jan 2020 16:59:34 -0500 Subject: [PATCH 631/983] doom/toggle-debug-mode: toggle garbage-collection-messages --- core/autoload/debug.el | 1 + 1 file changed, 1 insertion(+) diff --git a/core/autoload/debug.el b/core/autoload/debug.el index 51ead07a9..6afbf31fa 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -339,6 +339,7 @@ will be automatically appended to the result." ((> (prefix-numeric-value arg) 0))))) (setq doom-debug-mode value debug-on-error value + garbage-collection-messages value use-package-verbose value jka-compr-verbose value lsp-log-io value From 9f97c13bf11023bdc67b734779548a3838598d12 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 14 Jan 2020 18:27:39 -0500 Subject: [PATCH 632/983] Remove issue title prefixes Use labels to categorize them instead. --- .github/ISSUE_TEMPLATE/bug_report.md | 2 -- .github/ISSUE_TEMPLATE/feature_request.md | 2 -- .github/ISSUE_TEMPLATE/how_to.md | 2 -- 3 files changed, 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 2285f116b..02bd78ae1 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,8 +2,6 @@ name: Bug report about: Doom might be misbehaving labels: is:bug -title: "[BUG] " -assignees: '' --- **What did you expect to happen?** diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 4ba9dc351..f39feedc1 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,8 +2,6 @@ name: Feature request about: It'd be cool if Doom did/had/would... labels: is:new -title: "[REQUEST] " -assignees: '' --- **Describe the feature** diff --git a/.github/ISSUE_TEMPLATE/how_to.md b/.github/ISSUE_TEMPLATE/how_to.md index ceedfaacf..c4dd58329 100644 --- a/.github/ISSUE_TEMPLATE/how_to.md +++ b/.github/ISSUE_TEMPLATE/how_to.md @@ -2,8 +2,6 @@ name: How do I... about: How to get Doom/Emacs to behave a certain way labels: is:question -title: "[HOWTO] " -assignees: '' --- **What are you trying to achieve?** From 9745f41ded25ec434b2c91c1c2c9d2e9645604af Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 14 Jan 2020 19:21:26 -0500 Subject: [PATCH 633/983] Add :no-byte-compile & :no-autoloads support to package! :recipe #2370 --- core/core-packages.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core-packages.el b/core/core-packages.el index eb3596f6b..a14e01c85 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -274,7 +274,8 @@ elsewhere." (condition-case e (when-let (recipe (plist-get plist :recipe)) (cl-destructuring-bind - (&key local-repo _files _flavor _no-build + (&key local-repo _files _flavor + _no-build _no-byte-compile _no-autoloads _type _repo _host _branch _remote _nonrecursive _fork _depth) recipe ;; Expand :local-repo from current directory From b8b0f73edcb7674871baf4b1a997f2304eaea905 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 14 Jan 2020 20:36:42 -0500 Subject: [PATCH 634/983] Resolve packages to repo for pinned packages - Allow :pin SHA's to be abbreviated. - Print out the repo being updated, rather than the package. --- core/cli/packages.el | 14 ++++++++------ core/core-packages.el | 8 ++++++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index f7067ef0a..19d4bc29c 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -79,7 +79,7 @@ declaration) or dependency thereof that hasn't already been." (and (straight-use-package (intern package)) (not existed-p) (file-directory-p (straight--repos-dir package)) - (if-let (commit (cdr (assoc package versions-alist))) + (if-let (commit (cdr (assoc (or local-repo package) versions-alist))) (progn (print! "Checking out %s commit %s" package (substring commit 0 7)) @@ -154,7 +154,7 @@ declaration) or dependency thereof that hasn't already been." (throw 'skip t)) (condition-case-unless-debug e (let ((commit (straight-vc-get-commit type local-repo)) - (newcommit (cdr (assoc package versions-alist))) + (newcommit (cdr (assoc (or local-repo package) versions-alist))) fetch-p) (unless (or (and (stringp newcommit) (straight-vc-commit-present-p recipe newcommit) @@ -164,16 +164,17 @@ declaration) or dependency thereof that hasn't already been." i total package) (straight-vc-fetch-from-remote recipe) (setq fetch t))) - (print! (warn "\033[K(%d/%d) Failed to fetch %s" i total package)) + (print! (warn "\033[K(%d/%d) Failed to fetch %s") + i total (or local-repo package)) (throw 'skip t)) (let ((output (straight--process-get-output))) (if newcommit (straight-vc-check-out-commit recipe newcommit) (straight-merge-package package) (setq newcommit (straight-vc-get-commit type local-repo))) - (when (string= commit newcommit) + (when (string-match-p (concat "^" newcommit) commit) (throw 'skip t)) - (print! (info "\033[K(%d/%d) Updating %s...") i total package) + (print! (info "\033[K(%d/%d) Updating %s...") i total local-repo) (puthash package t straight--packages-to-rebuild) (ignore-errors (delete-directory (straight--build-dir package) 'recursive)) @@ -185,7 +186,8 @@ declaration) or dependency thereof that hasn't already been." (straight--call "git" "log" "--oneline" newcommit (concat "^" commit)) (print-group! (print! "%s" (straight--process-get-output))))) - (print! (success "(%d/%d) %s updated (%s -> %s)") i total package + (print! (success "(%d/%d) %s updated (%s -> %s)") i total + (or local-repo package) (substring commit 0 7) (substring newcommit 0 7)))) (user-error diff --git a/core/core-packages.el b/core/core-packages.el index a14e01c85..21bdbe2a0 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -171,8 +171,12 @@ necessary package metadata is initialized and available for them." (doom-log "Ignoring package %S" name) (when pin (doom-log "Pinning package %S to %S" name pin) - (setf (alist-get (symbol-name name) doom-pinned-packages - nil nil #'equal) + (setf (alist-get + (if-let* ((recipe (cdr (straight-recipes-retrieve name))) + (repo (straight-vc-local-repo-name recipe))) + repo + (symbol-name name)) + doom-pinned-packages nil nil #'equal) pin)) (if (not disable) (with-demoted-errors "Package error: %s" From 7326d2b4dc852d80906876bf4f69c8ecf6b71c0c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 14 Jan 2020 21:39:19 -0500 Subject: [PATCH 635/983] Add unpin! macro for easy package unpinning --- core/core-packages.el | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/core/core-packages.el b/core/core-packages.el index 21bdbe2a0..b51570202 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -303,5 +303,30 @@ Only use this macro in a module's (or your private) packages.el file." (cl-loop for p in packages collect `(package! ,p :disable t)))) +(defmacro unpin! (&rest targets) + "Unpin packages in TARGETS. +Elements in TARGETS can be package names (symbols), a list consisting of +(CATEGORY MODULE) where MODULE is optional, or the boolean `t'. + +Each package in this list is unpinned, which means its latest version will be +installed next time you run 'doom upgrade'. If you specify a (CATEGORY), all +packages in all modules in that category will be unpinned. If you specify +(CATEGORY MODULE), only packages in that particular module will be unpinned. + +Lastly, a value of `t' means unpin all packages." + (dolist (target targets) + (cond + ((eq target t) + (setq doom-pinned-packages nil)) + ((listp target) + (cl-destructuring-bind (category &optional module) target + (dolist (pkg doom-packages) + (when-let (mod (assq category (plist-get (cdr pkg) :modules))) + (and (or (null module) + (eq (cdr mod) module)) + (assq-delete-all (car pkg) doom-pinned-packages)))))) + ((symbolp target) + (assq-delete-all target doom-pinned-packages))))) + (provide 'core-packages) ;;; core-packages.el ends here From b7e81bc042bc3639886f269d629374aa703aafe3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 14 Jan 2020 21:46:09 -0500 Subject: [PATCH 636/983] Add doom/update-pinned-package-declaration command This may be renamed later, or rewritten to jump to the user's `packages.el` and entering it there. Or something. For now it's useful for its niche. --- core/autoload/packages.el | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/core/autoload/packages.el b/core/autoload/packages.el index 5a813da1c..0743e29d9 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -201,3 +201,35 @@ ones." (message "Reloading packages") (doom-initialize-packages t) (message "Reloading packages...DONE")) + +;;;###autoload +(defun doom/update-pinned-package-declaration () + "Inserts or updates a `:pin' for the `package!' statement at point. + +Grabs the latest commit id of the package using 'git'." + (interactive) + ;; REVIEW Better error handling + ;; TODO Insert a new `package!' if no `package!' at poin + (ignore-errors + (while (atom (sexp-at-point)) + (forward-sexp -1))) + (when (eq (sexp-at-point) 'package!) + (backward-char) + (let* ((recipe (cdr (sexp-at-point))) + (name (car recipe)) + (id + (cdr (doom-call-process + "git" "ls-remote" + (straight-vc-git--destructure + (doom-plist-merge (plist-get (cdr recipe) :recipe) + (cdr (straight-recipes-retrieve name))) + (upstream-repo upstream-host) + (straight-vc-git--encode-url upstream-repo upstream-host)))))) + (unless id + (user-error "No id for %S package" name)) + (let ((id (car (split-string id)))) + (if (re-search-forward ":pin +\"\\([^\"]+\\)\"" (cdr (bounds-of-thing-at-point 'sexp)) t) + (replace-match id t t nil 1) + (thing-at-point--end-of-sexp) + (backward-char) + (insert " :pin " (prin1-to-string id))))))) From f3a9d0c03cb06bbd78bf466f8bef1eb5f0d6c1fa Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 14 Jan 2020 21:57:04 -0500 Subject: [PATCH 637/983] Resolve pinned packages based on overridden recipes And rearrange "Checking out ..." message during 'doom upgrade' to display package first, then commit (and abbreviated), rather than the other around. It's easier to read. --- core/cli/packages.el | 4 ++-- core/core-packages.el | 21 +++++++++++---------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 19d4bc29c..625ab25ad 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -158,8 +158,8 @@ declaration) or dependency thereof that hasn't already been." fetch-p) (unless (or (and (stringp newcommit) (straight-vc-commit-present-p recipe newcommit) - (print! (start "\033[K(%d/%d) Checking out %s for %s...\033[1A") - i total newcommit package)) + (print! (start "\033[K(%d/%d) Checking out %s (%s)...\033[1A") + i total package (substring newcommit 0 7))) (and (print! (start "\033[K(%d/%d) Fetching %s...\033[1A") i total package) (straight-vc-fetch-from-remote recipe) diff --git a/core/core-packages.el b/core/core-packages.el index b51570202..7802ab1fc 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -169,15 +169,6 @@ necessary package metadata is initialized and available for them." (with-plist! (cdr package) (recipe modules disable ignore pin) (if ignore (doom-log "Ignoring package %S" name) - (when pin - (doom-log "Pinning package %S to %S" name pin) - (setf (alist-get - (if-let* ((recipe (cdr (straight-recipes-retrieve name))) - (repo (straight-vc-local-repo-name recipe))) - repo - (symbol-name name)) - doom-pinned-packages nil nil #'equal) - pin)) (if (not disable) (with-demoted-errors "Package error: %s" (when recipe @@ -190,7 +181,17 @@ necessary package metadata is initialized and available for them." (print! (warn "%s\n%s") (format "You've disabled %S" name) (indent 2 (concat "This is a core package. Disabling it will cause errors, as Doom assumes\n" - "core packages are always available. Disable their minor-modes or hooks instead."))))))))))) + "core packages are always available. Disable their minor-modes or hooks instead."))))) + (when pin + (let ((realname + (if-let* ((recipe (cdr (straight-recipes-retrieve name))) + (repo (straight-vc-local-repo-name recipe))) + repo + (symbol-name name)))) + (doom-log "Pinning package %S to %S" realname pin) + (setf (alist-get realname doom-pinned-packages + nil nil #'equal) + pin))))))))) (defun doom-ensure-straight () "Ensure `straight' is installed and was compiled with this version of Emacs." From 4cc14389e84937c52c248e740190e2697bfcd389 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 14 Jan 2020 22:32:11 -0500 Subject: [PATCH 638/983] PIN ALL THE PACKAGES --- core/packages.el | 43 +++++------ modules/app/calendar/packages.el | 6 +- modules/app/irc/packages.el | 4 +- modules/app/rss/packages.el | 4 +- modules/app/twitter/packages.el | 4 +- modules/checkers/grammar/packages.el | 4 +- modules/checkers/spell/packages.el | 2 +- modules/checkers/syntax/packages.el | 6 +- modules/completion/company/packages.el | 8 +- modules/completion/helm/packages.el | 22 +++--- modules/completion/ido/packages.el | 8 +- modules/completion/ivy/packages.el | 21 +++--- modules/config/default/packages.el | 8 +- modules/editor/evil/packages.el | 38 +++++----- modules/editor/file-templates/packages.el | 3 +- modules/editor/fold/packages.el | 2 +- modules/editor/format/packages.el | 2 +- modules/editor/god/packages.el | 2 +- modules/editor/lispy/packages.el | 4 +- modules/editor/multiple-cursors/packages.el | 10 +-- modules/editor/objed/packages.el | 2 +- modules/editor/parinfer/packages.el | 2 +- modules/editor/rotate-text/packages.el | 4 +- modules/editor/snippets/packages.el | 7 +- modules/editor/word-wrap/packages.el | 2 +- modules/emacs/dired/packages.el | 14 ++-- modules/emacs/ibuffer/packages.el | 4 +- modules/emacs/vc/packages.el | 8 +- modules/email/mu4e/packages.el | 2 +- modules/email/notmuch/packages.el | 8 +- modules/email/wanderlust/packages.el | 8 +- modules/input/chinese/packages.el | 10 +-- modules/input/japanese/packages.el | 8 +- modules/lang/agda/packages.el | 6 +- modules/lang/assembly/packages.el | 6 +- modules/lang/cc/packages.el | 38 +++++----- modules/lang/clojure/packages.el | 6 +- modules/lang/common-lisp/packages.el | 6 +- modules/lang/coq/packages.el | 4 +- modules/lang/crystal/packages.el | 8 +- modules/lang/csharp/packages.el | 6 +- modules/lang/data/packages.el | 15 ++-- modules/lang/elixir/packages.el | 6 +- modules/lang/elm/packages.el | 5 +- modules/lang/emacs-lisp/packages.el | 14 ++-- modules/lang/erlang/packages.el | 18 ++--- modules/lang/ess/packages.el | 4 +- modules/lang/factor/packages.el | 2 +- modules/lang/faust/packages.el | 2 +- modules/lang/fsharp/packages.el | 2 +- modules/lang/go/packages.el | 16 ++-- modules/lang/haskell/packages.el | 10 +-- modules/lang/hy/packages.el | 2 +- modules/lang/idris/packages.el | 2 +- modules/lang/java/packages.el | 12 +-- modules/lang/javascript/packages.el | 22 +++--- modules/lang/julia/packages.el | 4 +- modules/lang/kotlin/packages.el | 4 +- modules/lang/latex/packages.el | 19 +++-- modules/lang/lean/packages.el | 4 +- modules/lang/ledger/packages.el | 6 +- modules/lang/lua/packages.el | 9 +-- modules/lang/markdown/packages.el | 10 +-- modules/lang/nim/packages.el | 4 +- modules/lang/nix/packages.el | 8 +- modules/lang/ocaml/packages.el | 16 ++-- modules/lang/org/packages.el | 82 ++++++++++++--------- modules/lang/perl/packages.el | 4 +- modules/lang/php/packages.el | 21 +++--- modules/lang/plantuml/packages.el | 4 +- modules/lang/purescript/packages.el | 7 +- modules/lang/python/packages.el | 28 +++---- modules/lang/qt/packages.el | 4 +- modules/lang/racket/packages.el | 2 +- modules/lang/rest/packages.el | 5 +- modules/lang/rst/packages.el | 2 +- modules/lang/ruby/packages.el | 24 +++--- modules/lang/rust/packages.el | 4 +- modules/lang/scala/packages.el | 4 +- modules/lang/scheme/packages.el | 2 +- modules/lang/sh/packages.el | 4 +- modules/lang/solidity/packages.el | 6 +- modules/lang/swift/packages.el | 8 +- modules/lang/terra/packages.el | 6 +- modules/lang/web/packages.el | 26 +++---- modules/term/eshell/packages.el | 8 +- modules/term/term/packages.el | 2 +- modules/term/vterm/packages.el | 4 +- modules/tools/ansible/packages.el | 11 +-- modules/tools/debugger/packages.el | 6 +- modules/tools/direnv/packages.el | 2 +- modules/tools/docker/packages.el | 6 +- modules/tools/editorconfig/packages.el | 4 +- modules/tools/ein/packages.el | 4 +- modules/tools/eval/packages.el | 4 +- modules/tools/gist/packages.el | 2 +- modules/tools/lookup/packages.el | 22 +++--- modules/tools/lsp/packages.el | 10 +-- modules/tools/magit/packages.el | 12 +-- modules/tools/make/packages.el | 2 +- modules/tools/pass/packages.el | 13 ++-- modules/tools/pdf/packages.el | 2 +- modules/tools/prodigy/packages.el | 2 +- modules/tools/rgb/packages.el | 4 +- modules/tools/terraform/packages.el | 4 +- modules/tools/upload/packages.el | 3 +- modules/ui/deft/packages.el | 2 +- modules/ui/doom/packages.el | 5 +- modules/ui/fill-column/packages.el | 2 +- modules/ui/hl-todo/packages.el | 2 +- modules/ui/hydra/packages.el | 2 +- modules/ui/indent-guides/packages.el | 2 +- modules/ui/modeline/packages.el | 6 +- modules/ui/nav-flash/packages.el | 2 +- modules/ui/neotree/packages.el | 2 +- modules/ui/ophints/packages.el | 4 +- modules/ui/tabs/packages.el | 2 +- modules/ui/treemacs/packages.el | 8 +- modules/ui/unicode/packages.el | 2 +- modules/ui/vc-gutter/packages.el | 2 +- modules/ui/vi-tilde-fringe/packages.el | 2 +- modules/ui/window-select/packages.el | 6 +- modules/ui/workspaces/packages.el | 3 +- modules/ui/zen/packages.el | 4 +- 124 files changed, 515 insertions(+), 489 deletions(-) diff --git a/core/packages.el b/core/packages.el index b8573dc0c..62eeba4cc 100644 --- a/core/packages.el +++ b/core/packages.el @@ -2,42 +2,43 @@ ;;; core/packages.el ;; core.el -(package! auto-minor-mode) -(package! async) -(package! gcmh) +(package! auto-minor-mode :pin "17cfa1b54800fdef2975c0c0531dad34846a5065") +(package! gcmh :pin "f542908b9ae4405d70fa70f42bd62618c5de4b95") ;; core-ui.el -(package! all-the-icons) -(package! hide-mode-line) -(package! highlight-numbers) -(package! rainbow-delimiters) -(package! restart-emacs) +(package! all-the-icons :pin "1416f37984486a44c6c0cbe0a2c985e82f965b6b") +(package! hide-mode-line :pin "88888825b5b27b300683e662fa3be88d954b1cea") +(package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307") +(package! rainbow-delimiters :pin "5125f4e47604ad36c3eb4706310fcafac729ca8c") +(package! restart-emacs :pin "9aa90d3df9e08bc420e1c9845ee3ff568e911bd9") ;; core-editor.el -(package! better-jumper) -(package! dtrt-indent) -(package! helpful) +(package! better-jumper :pin "6d240032ca213ccb3347e25f26c29b6822bf03a7") +(package! dtrt-indent :pin "48221c928b72746d18c1e284c45748a0c2f1691f") +(package! helpful :pin "e511e8dbd32a8b8423f07178f0ea7c1ecfc63935") (when IS-MAC - (package! ns-auto-titlebar)) -(package! pcre2el) -(package! smartparens) + (package! ns-auto-titlebar :pin "1efc30d38509647b417f05587fd7003457719256")) +(package! pcre2el :pin "0b5b2a2c173aab3fd14aac6cf5e90ad3bf58fa7d") +(package! smartparens :pin "9449ae08593180ba99e4517897e8e825d3c422a8") (package! so-long :built-in 'prefer ; included in Emacs 27+ ;; REVIEW so-long is slated to be published to ELPA eventually, but until then ;; I've created my own mirror for it because git.savannah.gnu.org runs ;; on a potato. - :recipe (:host github :repo "hlissner/emacs-so-long")) -(package! undo-tree) + :recipe (:host github :repo "hlissner/emacs-so-long") + :pin "ed666b0716f60e8988c455804de24b55919e71ca") +(package! undo-tree :pin "1d91157366d1dcae889057d58526a5bd36e3febe") (package! ws-butler ;; Use my fork of ws-butler, which has a few choice improvements and ;; optimizations (the original has been abandoned). - :recipe (:host github :repo "hlissner/ws-butler")) + :recipe (:host github :repo "hlissner/ws-butler") + :pin "e4430d3778a1a11cc4d4770ce8d070ba71d38f07") (unless IS-WINDOWS - (package! xclip)) + (package! xclip :pin "88003b782e0a60eab1c8a2fd8b7f140fb2328271")) ;; core-projects.el -(package! projectile) +(package! projectile :pin "1e7b37f0ae07a6b4ac1b1a5f0e5422cfcb8e1c55") ;; core-keybinds.el -(package! general) -(package! which-key) +(package! general :pin "f6e928622d78d927c7043da904782ed7160ea803") +(package! which-key :pin "1e3640e48c31f8062f018b5fc84acad696a0ea2a") diff --git a/modules/app/calendar/packages.el b/modules/app/calendar/packages.el index 41bd347ec..cde3a8212 100644 --- a/modules/app/calendar/packages.el +++ b/modules/app/calendar/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; app/calendar/packages.el -(package! calfw) -(package! calfw-org) -(package! org-gcal) +(package! calfw :pin "03abce97620a4a7f7ec5f911e669da9031ab9088") +(package! calfw-org :pin "03abce97620a4a7f7ec5f911e669da9031ab9088") +(package! org-gcal :pin "6821e349673e9ba8d7ae7b84789f931889273dc0") diff --git a/modules/app/irc/packages.el b/modules/app/irc/packages.el index 58b486c76..1d05b5bda 100644 --- a/modules/app/irc/packages.el +++ b/modules/app/irc/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; app/irc/packages.el -(package! circe) -(package! circe-notifications) +(package! circe :pin "0c79138fb2d37940654649787cb17cb619268748") +(package! circe-notifications :pin "291149ac12877bbd062da993479d3533a26862b0") diff --git a/modules/app/rss/packages.el b/modules/app/rss/packages.el index b1356ab8d..ba34c5f50 100644 --- a/modules/app/rss/packages.el +++ b/modules/app/rss/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; app/rss/packages.el -(package! elfeed) -(package! elfeed-org) +(package! elfeed :pin "fb7de7b6d299bb4190fed3cab541dbf5a5a1bbcd") +(package! elfeed-org :pin "77b6bbf222487809813de260447d31c4c59902c9") diff --git a/modules/app/twitter/packages.el b/modules/app/twitter/packages.el index 85b1da56d..373b92adb 100644 --- a/modules/app/twitter/packages.el +++ b/modules/app/twitter/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; app/twitter/packages.el -(package! twittering-mode) -(package! avy) +(package! twittering-mode :pin "114891e8fdb4f06b1326a6cf795e49c205cf9e29") +(package! avy :pin "cf95ba9582121a1c2249e3c5efdc51acd566d190") diff --git a/modules/checkers/grammar/packages.el b/modules/checkers/grammar/packages.el index 1676cae55..4bf213172 100644 --- a/modules/checkers/grammar/packages.el +++ b/modules/checkers/grammar/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; checkers/grammar/packages.el -(package! langtool) -(package! writegood-mode) +(package! langtool :pin "37e1e007e80fc01b040b7da21be5a628fbddfb1a") +(package! writegood-mode :pin "b71757ec337e226909fb0422f0224e31acc71733") diff --git a/modules/checkers/spell/packages.el b/modules/checkers/spell/packages.el index a60738087..acd4e246c 100644 --- a/modules/checkers/spell/packages.el +++ b/modules/checkers/spell/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; checkers/spell/packages.el -(package! flyspell-correct) +(package! flyspell-correct :pin "7b4cf8c9ba5ac65e3bb2b62f5b72d45f4c9cf7b6") (cond ((featurep! :completion ivy) (package! flyspell-correct-ivy)) ((featurep! :completion helm) diff --git a/modules/checkers/syntax/packages.el b/modules/checkers/syntax/packages.el index 5ce8c3f0f..e8d89bff0 100644 --- a/modules/checkers/syntax/packages.el +++ b/modules/checkers/syntax/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; checkers/syntax/packages.el -(package! flycheck) -(package! flycheck-popup-tip) +(package! flycheck :pin "269237f6529a4ad7db5bbbc5a40c1f038accf3cd") +(package! flycheck-popup-tip :pin "ef86aad907f27ca076859d8d9416f4f7727619c6") (when (featurep! +childframe) - (package! flycheck-posframe)) + (package! flycheck-posframe :pin "2b3e94c2e427ec9831c513007460c5ea9e2225a3")) ;; TODO flymake? diff --git a/modules/completion/company/packages.el b/modules/completion/company/packages.el index 91b9e88a7..0d89695b6 100644 --- a/modules/completion/company/packages.el +++ b/modules/completion/company/packages.el @@ -1,8 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; completion/company/packages.el -(package! company) -(package! company-dict) -(package! company-prescient) +(package! company :pin "d5053561cb166e03051c60e5c1e05a8a926dfee5") +(package! company-dict :pin "cd7b8394f6014c57897f65d335d6b2bd65dab1f4") +(package! company-prescient :pin "7fd8c3b8028da4733434940c4aac1209281bef58") (when (featurep! +childframe) - (package! company-box)) + (package! company-box :pin "8fc6168f2d3a0275156dd3fdf46ba496adbab226")) diff --git a/modules/completion/helm/packages.el b/modules/completion/helm/packages.el index 4bfb434f0..b736709a7 100644 --- a/modules/completion/helm/packages.el +++ b/modules/completion/helm/packages.el @@ -1,16 +1,18 @@ ;; -*- no-byte-compile: t; -*- ;;; completion/helm/packages.el -(package! helm) -(package! helm-rg) -(package! helm-c-yasnippet) -(package! helm-company) -(package! helm-describe-modes :recipe (:host github :repo "emacs-helm/helm-describe-modes")) -(package! helm-projectile) -(package! swiper-helm) +(package! helm :pin "05d70ff116a696f5c18e5ad569573d8936ff01da") +(package! helm-rg :pin "785a80fe5cc87e27c5ea3d00a70049028d9e2847") +(package! helm-c-yasnippet :pin "65ca732b510bfc31636708aebcfe4d2d845b59b0") +(package! helm-company :pin "6eb5c2d730a60e394e005b47c1db018697094dde") +(package! helm-describe-modes + :recipe (:host github :repo "emacs-helm/helm-describe-modes") + :pin "11fb36af119b784539d31c6160002de1957408aa") +(package! helm-projectile :pin "5328b74dddcee8d1913803ca8167868831a07463") +(package! swiper-helm :pin "93fb6db87bc6a5967898b5fd3286954cc72a0008") (when (featurep! +fuzzy) - (package! helm-flx)) + (package! helm-flx :pin "6640fac5cb16bee73c95b8ed1248a4e5e113690e")) (when (featurep! +childframe) - (package! posframe)) + (package! posframe :pin "c25077158980d8322f67fc59d999c2f6e8a020b2")) (when (featurep! :lang org) - (package! helm-org)) + (package! helm-org :pin "8457e1e46227bf87726e05c42cec5a4b51c2ef7b")) diff --git a/modules/completion/ido/packages.el b/modules/completion/ido/packages.el index 368665425..cfa3db8c3 100644 --- a/modules/completion/ido/packages.el +++ b/modules/completion/ido/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; completion/ido/packages.el -(package! flx-ido) -(package! ido-completing-read+) -(package! ido-vertical-mode) -(package! crm-custom) +(package! flx-ido :pin "17f5c9cb2af18aa6f52910ff4a5a63591261ced5") +(package! ido-completing-read+ :pin "74861eabd0a2619be9efc4c91fe0c5e69db5f263") +(package! ido-vertical-mode :pin "16c4c1a112796ee0bcf401ea39d3e2643a89feaf") +(package! crm-custom :pin "f1aaccf64306a5f99d9bf7ba815d7ea41c15518d") diff --git a/modules/completion/ivy/packages.el b/modules/completion/ivy/packages.el index 5571641fd..6d9b41aaf 100644 --- a/modules/completion/ivy/packages.el +++ b/modules/completion/ivy/packages.el @@ -1,22 +1,23 @@ ;; -*- no-byte-compile: t; -*- ;;; completion/ivy/packages.el -(package! amx) +(package! swiper :pin "e22c8dfd28ab1874b71b68628666c22e1112495f") (package! ivy) -(package! counsel) -(package! counsel-projectile) -(package! swiper) (package! ivy-hydra) -(package! ivy-rich) -(package! wgrep) +(package! counsel) + +(package! amx :pin "3af93ca066aa42dd1342f1ee0ab0d02360075613") +(package! counsel-projectile :pin "cadc6de7070458781a373b052adddf102bbed302") +(package! ivy-rich :pin "7bfc7262fda46c38636eac3080980024b5881a64") +(package! wgrep :pin "379afd89ebd76f63842c8589127d66096a8bb595") (if (featurep! +prescient) - (package! ivy-prescient) + (package! ivy-prescient :pin "7fd8c3b8028da4733434940c4aac1209281bef58") (when (featurep! +fuzzy) - (package! flx))) + (package! flx :pin "17f5c9cb2af18aa6f52910ff4a5a63591261ced5"))) (when (featurep! +childframe) - (package! ivy-posframe)) + (package! ivy-posframe :pin "6d697ff00ac406b919eba8665b1bc18a2b423cda")) (when (featurep! +icons) - (package! all-the-icons-ivy)) + (package! all-the-icons-ivy :pin "babea626db20773de4c408acb2788e2b9c8277e3")) diff --git a/modules/config/default/packages.el b/modules/config/default/packages.el index 901090656..3c44c8386 100644 --- a/modules/config/default/packages.el +++ b/modules/config/default/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; config/default/packages.el -(package! avy) -(package! drag-stuff) -(package! link-hint) +(package! avy :pin "cf95ba9582121a1c2249e3c5efdc51acd566d190") +(package! drag-stuff :pin "6d06d846cd37c052d79acd0f372c13006aa7e7c8") +(package! link-hint :pin "8d8f9505f87dc8a3b3baee7cb516f091072893a7") (unless (featurep! :editor evil) - (package! expand-region)) + (package! expand-region :pin "0fa7c2d349e40c0e1de0965acf0f0b77b7070451")) diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index a05949c77..537a10e20 100644 --- a/modules/editor/evil/packages.el +++ b/modules/editor/evil/packages.el @@ -1,22 +1,26 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/evil/packages.el -(package! evil) -(package! evil-args) -(package! evil-easymotion) -(package! evil-embrace) -(package! evil-escape) -(package! evil-exchange) -(package! evil-indent-plus) -(package! evil-nerd-commenter) -(package! evil-numbers :recipe (:host github :repo "janpath/evil-numbers")) -(package! evil-snipe) -(package! evil-surround) -(package! evil-textobj-anyblock) -(package! evil-traces) -(package! evil-visualstar) -(package! exato) -(package! evil-quick-diff :recipe (:host github :repo "rgrinberg/evil-quick-diff")) +(package! evil :pin "d14e9e2cac539f388a1f4699eb3ffab0834aa3e4") +(package! evil-args :pin "758ad5ae54ad34202064fec192c88151c08cb387") +(package! evil-easymotion :pin "79c13ed3bce018ac09d358e642e5bd7025e93603") +(package! evil-embrace :pin "4379adea032b25e359d01a36301b4a5afdd0d1b7") +(package! evil-escape :pin "f4e9116bfbaac8c9d210c17ad488e0982291245f") +(package! evil-exchange :pin "35dd0f0662789f043bd89a9f9801ffaf4318123f") +(package! evil-indent-plus :pin "0c7501e6efed661242c3a20e0a6c79a6455c2c40") +(package! evil-nerd-commenter :pin "a5555ff02a43ddc4b54ba38e19c5a233c3a0b304") +(package! evil-numbers + :recipe (:host github :repo "janpath/evil-numbers") + :pin "d988041c1fe6e941dc8d591390750b237f71f524") +(package! evil-snipe :pin "3ec8adfd4990f95fa0fab2b7019ead3596857673") +(package! evil-surround :pin "9b0b17f06cef9bac81ee4800d121265e54718a17") +(package! evil-textobj-anyblock :pin "ff00980f0634f95bf2ad9956b615a155ea8743be") +(package! evil-traces :pin "257c66bd7a9162caef3b04137af0dc9360fe3d53") +(package! evil-visualstar :pin "06c053d8f7381f91c53311b1234872ca96ced752") +(package! exato :pin "88266fa7fcfbef704032f671b94f756f2f98bd4f") +(package! evil-quick-diff + :recipe (:host github :repo "rgrinberg/evil-quick-diff") + :pin "69c883720b30a892c63bc89f49d4f0e8b8028908") ;; (when (featurep! +everywhere) @@ -26,4 +30,4 @@ (package! neotree) (autoload 'neotree-make-executor "neotree" nil nil 'macro)) - (package! evil-collection)) + (package! evil-collection :pin "8532282e6492ce92d8c54e43ce9e9ce616d8ab5f")) diff --git a/modules/editor/file-templates/packages.el b/modules/editor/file-templates/packages.el index 7a059ca3d..ca8ef567f 100644 --- a/modules/editor/file-templates/packages.el +++ b/modules/editor/file-templates/packages.el @@ -1,5 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/file-templates/packages.el -(package! yasnippet) - +(package! yasnippet :pin "3bf9a3b1af37174a004798b7195826af0123fa6a") diff --git a/modules/editor/fold/packages.el b/modules/editor/fold/packages.el index bb672122e..e582a306f 100644 --- a/modules/editor/fold/packages.el +++ b/modules/editor/fold/packages.el @@ -2,4 +2,4 @@ ;;; editor/fold/packages.el (when (featurep! :editor evil) - (package! evil-vimish-fold)) + (package! evil-vimish-fold :pin "c617fecb91303f8c63f85a6101a503fdc88aae84")) diff --git a/modules/editor/format/packages.el b/modules/editor/format/packages.el index 858b6d9ee..cb39bfba3 100644 --- a/modules/editor/format/packages.el +++ b/modules/editor/format/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/format/packages.el -(package! format-all) +(package! format-all :pin "d126830a739a565f858ae3e31887881bc07e8fe6") diff --git a/modules/editor/god/packages.el b/modules/editor/god/packages.el index a62830687..f3b109a27 100644 --- a/modules/editor/god/packages.el +++ b/modules/editor/god/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/god/packages.el -(package! god-mode) +(package! god-mode :pin "344167ed9b4c212273dd056e7481cf1373b461d0") diff --git a/modules/editor/lispy/packages.el b/modules/editor/lispy/packages.el index a423e54a6..34010ffc1 100644 --- a/modules/editor/lispy/packages.el +++ b/modules/editor/lispy/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/lispyville/packages.el -(package! lispy) +(package! lispy :pin "8db042d40bccc628dd406c1fe712431fb76b3288") (when (featurep! :editor evil) - (package! lispyville)) + (package! lispyville :pin "56198f1c4488a52a0d0512c717dff36e8b9fbfd0")) diff --git a/modules/editor/multiple-cursors/packages.el b/modules/editor/multiple-cursors/packages.el index 470ebbea6..60f21134f 100644 --- a/modules/editor/multiple-cursors/packages.el +++ b/modules/editor/multiple-cursors/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/multiple-cursors/packages.el -(cond ((featurep! :editor evil) - (package! evil-multiedit) - (package! evil-mc)) - - ((package! multiple-cursors))) +(cond + ((featurep! :editor evil) + (package! evil-multiedit :pin "c3d43b1a65c193755dae2c41ce5c072c4c01b35d") + (package! evil-mc :pin "007d471e26b44e692250804f82f06ebbd27b6ec4")) + ((package! multiple-cursors :pin "b880554d04b8f61165afba7d4de19ac9e39bb7ab"))) diff --git a/modules/editor/objed/packages.el b/modules/editor/objed/packages.el index 56bc61702..e83a2f1a0 100644 --- a/modules/editor/objed/packages.el +++ b/modules/editor/objed/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/objed/packages.el -(package! objed) +(package! objed :pin "8dc17701d1dc65b5d2113e7ca406136bf612bc9e") diff --git a/modules/editor/parinfer/packages.el b/modules/editor/parinfer/packages.el index 377bb70b1..a3badc94c 100644 --- a/modules/editor/parinfer/packages.el +++ b/modules/editor/parinfer/packages.el @@ -11,4 +11,4 @@ ;; separate session: (autoload 'evil-define-key "evil-core" nil nil 'macro)) -(package! parinfer) +(package! parinfer :pin "eaad857ae4351f72a561ee3dec8943713510003f") diff --git a/modules/editor/rotate-text/packages.el b/modules/editor/rotate-text/packages.el index 5d6486109..846641da6 100644 --- a/modules/editor/rotate-text/packages.el +++ b/modules/editor/rotate-text/packages.el @@ -1,4 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/rotate-text/packages.el -(package! rotate-text :recipe (:host github :repo "debug-ito/rotate-text.el")) +(package! rotate-text + :recipe (:host github :repo "debug-ito/rotate-text.el") + :pin "48f193697db996855aee1ad2bc99b38c6646fe76") diff --git a/modules/editor/snippets/packages.el b/modules/editor/snippets/packages.el index b131860bb..9dda3d424 100644 --- a/modules/editor/snippets/packages.el +++ b/modules/editor/snippets/packages.el @@ -1,10 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/snippets/packages.el -(package! yasnippet) -(package! auto-yasnippet) +(package! yasnippet :pin "3bf9a3b1af37174a004798b7195826af0123fa6a") +(package! auto-yasnippet :pin "db9e0dd4335b2202cd5dac95bbbc87a1032d9bbe") (package! doom-snippets :recipe (:host github :repo "hlissner/doom-snippets" - :files ("*.el" "*"))) + :files ("*.el" "*")) + :pin "30a78a2da2b514e8da15b4c5df2df48356cfe4d8") diff --git a/modules/editor/word-wrap/packages.el b/modules/editor/word-wrap/packages.el index 85d7b2c55..1e31f226e 100644 --- a/modules/editor/word-wrap/packages.el +++ b/modules/editor/word-wrap/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/word-wrap/packages.el -(package! adaptive-wrap) +(package! adaptive-wrap :pin "1810c0ee8d827dd502ddeaae5bd759d4811fcbce") diff --git a/modules/emacs/dired/packages.el b/modules/emacs/dired/packages.el index 32126d7c3..f36bbb78c 100644 --- a/modules/emacs/dired/packages.el +++ b/modules/emacs/dired/packages.el @@ -1,12 +1,12 @@ ;; -*- no-byte-compile: t; -*- ;;; emacs/dired/packages.el -(package! diredfl) -(package! dired-git-info) -(package! diff-hl) -(package! dired-rsync) +(package! diredfl :pin "83567d00affce66a4e501563eddd0bd436ac48d0") +(package! dired-git-info :pin "b47f2b0c3a6cb9b7a62a4ee2605a492e512d40a9") +(package! diff-hl :pin "fb9eb1cd3c4c6ed24b93de1a7cfb369d2983be74") +(package! dired-rsync :pin "698294cbd4b731abcb617f29aa133bc9c60b2651") (when (featurep! +ranger) - (package! ranger)) + (package! ranger :pin "c3f349e52f5c50926dc0f285c97676934f50bc18")) (when (featurep! +icons) - (package! all-the-icons-dired)) -(package! fd-dired) + (package! all-the-icons-dired :pin "980b7747d6c4a7992a1ec56afad908956db0a519")) +(package! fd-dired :pin "fd4c3f490b0b6727592b85f1635e57638dec8f91") diff --git a/modules/emacs/ibuffer/packages.el b/modules/emacs/ibuffer/packages.el index 5328e5d93..5aa8b6381 100644 --- a/modules/emacs/ibuffer/packages.el +++ b/modules/emacs/ibuffer/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; emacs/ibuffer/packages.el -(package! ibuffer-projectile) -(package! ibuffer-vc) +(package! ibuffer-projectile :pin "76496214144687cee0b5139be2e61b1e400cac87") +(package! ibuffer-vc :pin "64cb03887bcae6127e80f0d9342c33206e21d2d2") diff --git a/modules/emacs/vc/packages.el b/modules/emacs/vc/packages.el index a8a174152..86a55777b 100644 --- a/modules/emacs/vc/packages.el +++ b/modules/emacs/vc/packages.el @@ -5,7 +5,7 @@ (package! vc-annotate :built-in t) (package! smerge-mode :built-in t) -(package! browse-at-remote) -(package! git-timemachine) -(package! gitconfig-mode) -(package! gitignore-mode) +(package! browse-at-remote :pin "1a9392e9d1fad4e1aafb25b68b4e6857fde8f564") +(package! git-timemachine :pin "391eb61050de321101e631fcf373fc70ec6e7700") +(package! gitconfig-mode :pin "55468314a5f6b77d2c96be62c7005ac94545e217") +(package! gitignore-mode :pin "55468314a5f6b77d2c96be62c7005ac94545e217") diff --git a/modules/email/mu4e/packages.el b/modules/email/mu4e/packages.el index d999fbc5c..7a1d07291 100644 --- a/modules/email/mu4e/packages.el +++ b/modules/email/mu4e/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; email/mu4e/packages.el -(package! mu4e-maildirs-extension) +(package! mu4e-maildirs-extension :pin "3ef4c48516be66e73d24fe764aadbcfc126b7964") diff --git a/modules/email/notmuch/packages.el b/modules/email/notmuch/packages.el index 72474420b..4c55641da 100644 --- a/modules/email/notmuch/packages.el +++ b/modules/email/notmuch/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; email/notmuch/packages.el -(package! notmuch) -(package! org-mime) +(package! notmuch :pin "0a0413f5142b578ee6c5ba45e1dfcdc522f57e42") +(package! org-mime :pin "b1899762170eaa656555ce62c58e613ca3509ec4") (when (featurep! :completion ivy) - (package! counsel-notmuch)) + (package! counsel-notmuch :pin "a4a1562935e4180c42524c51609d1283e9be0688")) (when (featurep! :completion helm) - (package! helm-notmuch)) + (package! helm-notmuch :pin "97a01497e079a7b6505987e9feba6b603bbec288")) diff --git a/modules/email/wanderlust/packages.el b/modules/email/wanderlust/packages.el index c49dc6c54..21a52d463 100644 --- a/modules/email/wanderlust/packages.el +++ b/modules/email/wanderlust/packages.el @@ -4,7 +4,9 @@ ;; HACK These are wanderlust's dependencies (wanderlust depends on semi, semi ;; depends on flim, flim on apel), but both flim and apel have non-standard ;; default branches, which straight cannot detect without our help. -(package! flim :recipe (:branch "flim-1_14-wl")) -(package! apel :recipe (:branch "semi-1_14-wl")) +(package! flim :recipe (:branch "flim-1_14-wl") + :pin "e4bd54fd7d335215b54f7ef27ed974c8cd68d472") +(package! apel :recipe (:branch "semi-1_14-wl") + :pin "d146ddbf8818e81d3577d5eee7825d377bec0c73") -(package! wanderlust) +(package! wanderlust :pin "7a919e422a48f5021576e68282703de430558879") diff --git a/modules/input/chinese/packages.el b/modules/input/chinese/packages.el index e2f11169c..29b31c858 100644 --- a/modules/input/chinese/packages.el +++ b/modules/input/chinese/packages.el @@ -1,8 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; input/chinese/packages.el -(package! pyim) -(package! fcitx) -(package! ace-pinyin) -(package! pangu-spacing) -(package! pyim) +(package! pyim :pin "bbeb68605eed6f0863d27558c42258416c7ada55") +(package! fcitx :pin "12dc2638ddd15c8f6cfaecb20e1f428ab2bb5624") +(package! ace-pinyin :pin "8b2e9335b02486730ea4ceee790130cc5328f9ea") +(package! pangu-spacing :pin "f92898949ba3bf991fd229416f3bbb54e9c6c223") +(package! pyim :pin "bbeb68605eed6f0863d27558c42258416c7ada55") diff --git a/modules/input/japanese/packages.el b/modules/input/japanese/packages.el index 32afb1631..765587543 100644 --- a/modules/input/japanese/packages.el +++ b/modules/input/japanese/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; input/japanese/packages.el -(package! migemo) -(package! avy-migemo) -(package! ddskk) -(package! pangu-spacing) +(package! migemo :pin "f42832c8ac462ecbec9a16eb781194f876fba64a") +(package! avy-migemo :pin "922a6dd82c0bfa316b0fbb56a9d4dd4ffa5707e7") +(package! ddskk :pin "51747f7afb5b66675bd9e1e812c93a8aba4d8249") +(package! pangu-spacing :pin "f92898949ba3bf991fd229416f3bbb54e9c6c223") diff --git a/modules/lang/agda/packages.el b/modules/lang/agda/packages.el index 49278f745..ad7731eff 100644 --- a/modules/lang/agda/packages.el +++ b/modules/lang/agda/packages.el @@ -5,10 +5,12 @@ (package! agda-input :recipe (:host github :repo "agda/agda" :files ("src/data/emacs-mode/agda-input.el") - :nonrecursive t)) + :nonrecursive t) + :pin "4f02b991d6d5eb6dd132591b90d839118e2ab30a") (package! agda2-mode :recipe (:host github :repo "agda/agda" :files ("src/data/emacs-mode/*.el" (:exclude "agda-input.el")) - :nonrecursive t))) + :nonrecursive t) + :pin "4f02b991d6d5eb6dd132591b90d839118e2ab30a")) diff --git a/modules/lang/assembly/packages.el b/modules/lang/assembly/packages.el index df770051e..7b87e79ff 100644 --- a/modules/lang/assembly/packages.el +++ b/modules/lang/assembly/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/assembly/packages.el -(package! mips-mode) -(package! haxor-mode) -(package! nasm-mode) +(package! mips-mode :pin "75152fc78baa762af4f83602f6cb3c8b9bcebca3") +(package! haxor-mode :pin "6fa25a8e6b6a59481bc0354c2fe1e0ed53cbdc91") +(package! nasm-mode :pin "65ca6546fc395711fac5b3b4299e76c2303d43a8") diff --git a/modules/lang/cc/packages.el b/modules/lang/cc/packages.el index 28e121ab3..2b76755a5 100644 --- a/modules/lang/cc/packages.el +++ b/modules/lang/cc/packages.el @@ -1,28 +1,32 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/cc/packages.el -(package! cmake-mode :recipe (:host github :repo "emacsmirror/cmake-mode" :files (:defaults "*"))) -(package! cuda-mode) -(package! demangle-mode) -(package! disaster) -(package! modern-cpp-font-lock) -(package! opencl-mode) +(package! cmake-mode + :recipe (:host github :repo "emacsmirror/cmake-mode" :files (:defaults "*")) + :pin "bfe85bc009c4778b44e246d5c27d0f888f0bfc0c") +(package! cuda-mode :pin "9ae9eacfdba3559b5456342d0d03296290df8ff5") +(package! demangle-mode :pin "06903d731dfde110e10b979dcc7624ef6dbb5ac8") +(package! disaster :pin "10a785facc60d89d78e0d5177985ab1af1741bb4") +(package! modern-cpp-font-lock :pin "02f104701bc34c146d22e3143ae59ef362999098") +(package! opencl-mode :pin "55cb49c8243e6420961d719faced035bc547c1ef") -(when (package! glsl-mode) +(when (package! glsl-mode :pin "43d906688a8e2fe650005806eb69bea131d9321a") (when (featurep! :completion company) - (package! company-glsl :recipe (:host github :repo "Kaali/company-glsl")))) + (package! company-glsl + :recipe (:host github :repo "Kaali/company-glsl") + :pin "404cd0694ab34971f9c01eb22126cd2e7d3f9dc4"))) (if (featurep! +lsp) - (package! ccls) - (when (package! irony) - (package! irony-eldoc) + (package! ccls :pin "aab3e31fd716daf59f9794e62d473357263e8cc0") + (when (package! irony :pin "8387098286132abd6472a8f49750e38ddb8096b6") + (package! irony-eldoc :pin "0df5831eaae264a25422b061eb2792aadde8b3f2") (when (featurep! :checkers syntax) - (package! flycheck-irony)) + (package! flycheck-irony :pin "42dbecd4a865cabeb301193bb4d660e26ae3befe")) (when (featurep! :completion company) - (package! company-irony) - (package! company-irony-c-headers))) - (when (package! rtags) + (package! company-irony :pin "b44711dfce445610c1ffaec4951c6ff3882b216a") + (package! company-irony-c-headers :pin "72c386aeb079fb261d9ec02e39211272f76bbd97"))) + (when (package! rtags :pin "5f1eaf4355e2093afb2b7828f3ebddfcad1234be") (when (featurep! :completion ivy) - (package! ivy-rtags)) + (package! ivy-rtags :pin "5f1eaf4355e2093afb2b7828f3ebddfcad1234be")) (when (featurep! :completion helm) - (package! helm-rtags)))) + (package! helm-rtags :pin "5f1eaf4355e2093afb2b7828f3ebddfcad1234be")))) diff --git a/modules/lang/clojure/packages.el b/modules/lang/clojure/packages.el index b6eb1d017..5207810ec 100644 --- a/modules/lang/clojure/packages.el +++ b/modules/lang/clojure/packages.el @@ -1,8 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/clojure/packages.el -(package! cider) -(package! clj-refactor) +(package! cider :pin "ba5680b066121a06bbf9442e54d555de38bdefb2") +(package! clj-refactor :pin "e24ba6284317dbb3e678fcad325044c628da56da") (when (featurep! :checkers syntax) - (package! flycheck-joker)) + (package! flycheck-joker :pin "51e99e697761ee8dab863930910abdba7607c1bd")) diff --git a/modules/lang/common-lisp/packages.el b/modules/lang/common-lisp/packages.el index cc0549ea0..c75b1ea8c 100644 --- a/modules/lang/common-lisp/packages.el +++ b/modules/lang/common-lisp/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/common-lisp/packages.el -(package! sly) -(package! sly-macrostep) -(package! sly-repl-ansi-color) +(package! sly :pin "cfecd21410e48a111b8d470c911598b270882921") +(package! sly-macrostep :pin "5113e4e926cd752b1d0bcc1508b3ebad5def5fad") +(package! sly-repl-ansi-color :pin "b9cd52d1cf927bf7e08582d46ab0bcf1d4fb5048") diff --git a/modules/lang/coq/packages.el b/modules/lang/coq/packages.el index 78a5c61be..eee3809ee 100644 --- a/modules/lang/coq/packages.el +++ b/modules/lang/coq/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/coq/packages.el -(package! proof-general) +(package! proof-general :pin "bee3f802ada921fb8988edb96a8b41429f7c622c") -(package! company-coq) +(package! company-coq :pin "6e8bc2e367e8184079b7f4b4ab359b64ab884d7c") diff --git a/modules/lang/crystal/packages.el b/modules/lang/crystal/packages.el index 5a5567281..86a66b855 100644 --- a/modules/lang/crystal/packages.el +++ b/modules/lang/crystal/packages.el @@ -1,8 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/crystal/packages.el -(package! crystal-mode) -(package! inf-crystal) +(package! crystal-mode :pin "2428b016243e78a0312cf6b3ba6939e7169a1405") +(package! inf-crystal :pin "02007b2a2a3bea44902d7c83c4acba1e39d278e3") (when (featurep! :checkers syntax) - (package! flycheck-crystal) - (package! flycheck-ameba)) + (package! flycheck-crystal :pin "2428b016243e78a0312cf6b3ba6939e7169a1405") + (package! flycheck-ameba :pin "0c4925ae0e998818326adcb47ed27ddf9761c7dc")) diff --git a/modules/lang/csharp/packages.el b/modules/lang/csharp/packages.el index 07db938df..dd42ac526 100644 --- a/modules/lang/csharp/packages.el +++ b/modules/lang/csharp/packages.el @@ -1,10 +1,10 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/csharp/packages.el -(package! csharp-mode) +(package! csharp-mode :pin "57bd21bda4edc16671a85c7d6d51484e40a6e640") (unless (featurep! +lsp) - (package! omnisharp)) + (package! omnisharp :pin "e658a18a762438c3e1737612737b05d02a21ca2a")) (when (featurep! +unity) - (package! shader-mode)) + (package! shader-mode :pin "d7dc8d0d6fe8914e8b6d5cf2081ad61e6952359c")) diff --git a/modules/lang/data/packages.el b/modules/lang/data/packages.el index 9cb3322eb..80aab8218 100644 --- a/modules/lang/data/packages.el +++ b/modules/lang/data/packages.el @@ -1,11 +1,12 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/data/packages.el -(package! graphql-mode) -(package! json-mode) -(package! jsonnet-mode) -(package! yaml-mode) -(package! csv-mode) -(package! dhall-mode) +(package! graphql-mode :pin "7c37aee28bf8c8ffb3da73df5571c4e1e352562b") +(package! json-mode :pin "0e819e519ae17a2686e0881c4ca51fa873fa9b83") +(package! jsonnet-mode :pin "2b90b4e12a11c42df0f1e5db327a50555b6ff023") +(package! yaml-mode :pin "cecf4b106b0c4236931b14919fdf87ff3546e2c9") +(package! csv-mode :pin "fbf942e127e68ac8cfcd08a53500ca554fcac079") +(package! dhall-mode :pin "ef4d33debe224c6ba37e51a29b9dc8b74f20f1c2") (package! protobuf-mode - :recipe (:host github :repo "emacsmirror/protobuf-mode" :files (:defaults "*"))) + :recipe (:host github :repo "emacsmirror/protobuf-mode" :files (:defaults "*")) + :pin "94b7bd7e8b87ff100c603153d2f8d7a2a08ab50b") diff --git a/modules/lang/elixir/packages.el b/modules/lang/elixir/packages.el index 73a4c64be..78b423811 100644 --- a/modules/lang/elixir/packages.el +++ b/modules/lang/elixir/packages.el @@ -2,7 +2,7 @@ ;;; lang/elixir/packages.el ;; +elixir.el -(package! elixir-mode) -(package! alchemist) +(package! elixir-mode :pin "5920edcf19f0526bbee97b01435c4b8bf3b59c36") +(package! alchemist :pin "6f99367511ae209f8fe2c990779764bbb4ccb6ed") (when (featurep! :checkers syntax) - (package! flycheck-credo)) + (package! flycheck-credo :pin "e88f11ead53805c361ec7706e44c3dfee1daa19f")) diff --git a/modules/lang/elm/packages.el b/modules/lang/elm/packages.el index 7f27aa3f0..8d67916b0 100644 --- a/modules/lang/elm/packages.el +++ b/modules/lang/elm/packages.el @@ -1,7 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/elm/packages.el -(package! elm-mode) +(package! elm-mode :pin "5df694e307cf8fa5a3555d800984aa4ebb40664f") (when (featurep! :checkers syntax) - (package! flycheck-elm)) - + (package! flycheck-elm :pin "debd0af563cb6c2944367a691c7fa3021d9378c1")) diff --git a/modules/lang/emacs-lisp/packages.el b/modules/lang/emacs-lisp/packages.el index 8bd841a2c..e3431f349 100644 --- a/modules/lang/emacs-lisp/packages.el +++ b/modules/lang/emacs-lisp/packages.el @@ -3,13 +3,13 @@ (package! elisp-mode :built-in t) -(package! highlight-quoted) -(package! macrostep) -(package! overseer) -(package! elisp-def) -(package! elisp-demos) +(package! highlight-quoted :pin "24103478158cd19fbcfb4339a3f1fa1f054f1469") +(package! macrostep :pin "424e3734a1ee526a1bd7b5c3cd1d3ef19d184267") +(package! overseer :pin "02d49f582e80e36b4334c9187801c5ecfb027789") +(package! elisp-def :pin "368b04da68783601b52e3169312183381871cf9e") +(package! elisp-demos :pin "bec206bf1b2ccc899120ec4ca2fcdcf30dcf0da8") (when (featurep! :checkers syntax) - (package! flycheck-cask)) + (package! flycheck-cask :pin "3457ae553c4feaf8168008f063d78fdde8fb5f94")) -(package! buttercup) +(package! buttercup :pin "b297b1dbfa21c87ffbcfc12d19262765387848de") diff --git a/modules/lang/erlang/packages.el b/modules/lang/erlang/packages.el index b519fa358..0a6f74a5e 100644 --- a/modules/lang/erlang/packages.el +++ b/modules/lang/erlang/packages.el @@ -1,15 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; private/erlang/packages.el -(package! erlang) - +(package! erlang :pin "cf6cf5e5f82e348ecb9bb02d70027fc4961aee3d") (when (featurep! :checkers syntax) - (package! flycheck-rebar3)) - -(when (and (featurep! :completion ivy) - (not (featurep! +lsp))) - (package! ivy-erlang-complete)) - -(when (and (featurep! :completion company) - (not (featurep! +lsp))) - (package! company-erlang)) + (package! flycheck-rebar3 :pin "3cca1268c54643204b5bae52e3f0bf5bc921018c")) +(unless (featurep! +lsp) + (when (featurep! :completion ivy) + (package! ivy-erlang-complete :pin "7d60ed111dbfd34ab6ec1b07c06e2d16a5380b9a")) + (when (featurep! :completion company) + (package! company-erlang :pin "bc0524a16f17b66c7397690e4ca0e004f09ea6c5"))) diff --git a/modules/lang/ess/packages.el b/modules/lang/ess/packages.el index dc9e8a9f8..2456cbaa7 100644 --- a/modules/lang/ess/packages.el +++ b/modules/lang/ess/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/ess/packages.el -(package! ess) -(package! ess-R-data-view) +(package! ess :pin "2812b85880807e5da35dbf2e69fc1b577f2ad7f4") +(package! ess-R-data-view :pin "d6e98d3ae1e2a2ea39a56eebcdb73e99d29562e9") diff --git a/modules/lang/factor/packages.el b/modules/lang/factor/packages.el index 50fec36be..9538471e0 100644 --- a/modules/lang/factor/packages.el +++ b/modules/lang/factor/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/factor/packages.el -(package! fuel) +(package! fuel :pin "b3582dd323e5db3cd19efaae3a071578086d244b") diff --git a/modules/lang/faust/packages.el b/modules/lang/faust/packages.el index 30734e5e4..60c373be7 100644 --- a/modules/lang/faust/packages.el +++ b/modules/lang/faust/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/faust/packages.el -(package! faustine) +(package! faustine :pin "07a38963111518f86123802f9d477be0d4689a3f") diff --git a/modules/lang/fsharp/packages.el b/modules/lang/fsharp/packages.el index 1a303123f..37f18531a 100644 --- a/modules/lang/fsharp/packages.el +++ b/modules/lang/fsharp/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/fsharp/packages.el -(package! fsharp-mode) +(package! fsharp-mode :pin "0415c45489fa7d83e9a7c94530aa1943682aabf9") diff --git a/modules/lang/go/packages.el b/modules/lang/go/packages.el index 80b3f5c63..0b7657817 100644 --- a/modules/lang/go/packages.el +++ b/modules/lang/go/packages.el @@ -1,15 +1,15 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/go/packages.el -(package! go-eldoc) -(package! go-guru) -(package! go-mode) -(package! gorepl-mode) -(package! go-tag) -(package! go-gen-test) +(package! go-eldoc :pin "cbbd2ea1e94a36004432a9ac61414cb5a95a39bd") +(package! go-guru :pin "53c76cddf54638dea5e4cae99ce0181de28e1064") +(package! go-mode :pin "53c76cddf54638dea5e4cae99ce0181de28e1064") +(package! gorepl-mode :pin "6a73bf352e8d893f89cad36c958c4db2b5e35e07") +(package! go-tag :pin "59b243f2fa079d9de9d56f6e2d94397e9560310a") +(package! go-gen-test :pin "44c202ac97e728e93a35cee028a0ea8dd6e4292c") (when (featurep! :completion company) - (package! company-go)) + (package! company-go :pin "939b4a677f2f843ea13d9dd90206d57111f0ceb9")) (when (featurep! :checkers syntax) - (package! flycheck-golangci-lint)) + (package! flycheck-golangci-lint :pin "8e446c68311048f0b87febf8ef0379e29d358851")) diff --git a/modules/lang/haskell/packages.el b/modules/lang/haskell/packages.el index a1b2f2c89..ddf384dfb 100644 --- a/modules/lang/haskell/packages.el +++ b/modules/lang/haskell/packages.el @@ -1,13 +1,13 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/haskell/packages.el -(package! haskell-mode) +(package! haskell-mode :pin "1ac4de398f9e19f322fa168ebf58527458e43df5") (when (featurep! +dante) - (package! dante) - (package! attrap)) + (package! dante :pin "3e532e8d7ea02d6045345d1175e05b616882112a") + (package! attrap :pin "4cf3e4a16255997e7c3c39682a72866a0a37dd4b")) (when (featurep! +lsp) - (package! lsp-haskell)) + (package! lsp-haskell :pin "6d481f97e62b0fd2455e8f7a36429981277445b1")) ;; DEPRECATED (when (featurep! +intero) - (package! intero)) + (package! intero :pin "30d8e7330c9b20c2905035bc417fa8645e7b4b85")) diff --git a/modules/lang/hy/packages.el b/modules/lang/hy/packages.el index 0b232824d..5e559dc2b 100644 --- a/modules/lang/hy/packages.el +++ b/modules/lang/hy/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/hy/packages.el -(package! hy-mode) +(package! hy-mode :pin "e2d5fecdaec602788aa7123ed13651c888b8d94b") diff --git a/modules/lang/idris/packages.el b/modules/lang/idris/packages.el index d600f1309..721192b51 100644 --- a/modules/lang/idris/packages.el +++ b/modules/lang/idris/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/idris/packages.el -(package! idris-mode) +(package! idris-mode :pin "acc8835449475d7cd205aba213fdd3d41c38ba40") diff --git a/modules/lang/java/packages.el b/modules/lang/java/packages.el index c9a0014a2..6de3c217d 100644 --- a/modules/lang/java/packages.el +++ b/modules/lang/java/packages.el @@ -1,16 +1,16 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/java/packages.el -(package! android-mode) -(package! groovy-mode) +(package! android-mode :pin "d5332e339a1f5e30559a53feffb8442ca79265d6") +(package! groovy-mode :pin "cafdd98e06a3bbff213f3ccb163de2c42d412b66") (when (featurep! +meghanada) - (package! meghanada)) + (package! meghanada :pin "70bfbf553c7b7fb1928672e9a95b7137e02c2d4b")) (when (featurep! +eclim) - (package! eclim) + (package! eclim :pin "23f5b294f833ce58516d7b9ae08a7792d70022a1") (when (featurep! :completion company) - (package! company-emacs-eclim))) + (package! company-emacs-eclim :pin "23f5b294f833ce58516d7b9ae08a7792d70022a1"))) (when (featurep! +lsp) - (package! lsp-java)) + (package! lsp-java :pin "5c3da6cf3a27dc57df1d537bdacbb318ca628bcf")) diff --git a/modules/lang/javascript/packages.el b/modules/lang/javascript/packages.el index 23e891ad6..62f0d4072 100644 --- a/modules/lang/javascript/packages.el +++ b/modules/lang/javascript/packages.el @@ -2,21 +2,21 @@ ;;; lang/javascript/packages.el ;; Major modes -(package! coffee-mode) -(package! js2-mode) -(package! rjsx-mode) -(package! typescript-mode) +(package! coffee-mode :pin "86ab8aae8662e8eff54d3013010b9c693b16eac5") +(package! js2-mode :pin "b3841a7a304d9d1328fdb0868fbbecf0c2f9831f") +(package! rjsx-mode :pin "0e7fa6b4facdec4f85a7a8865bdf59dfd57217b5") +(package! typescript-mode :pin "761f3aec6e192ddf0a9f1cc3d5d2ee77d32cb06c") ;; Tools -(package! eslintd-fix) -(package! js2-refactor) -(package! npm-mode) +(package! eslintd-fix :pin "98c669e3653bf94c236c54946c6faba7f782ef0d") +(package! js2-refactor :pin "d4c40b5fc86d3edd7c6a7d83ac86483ee1cb7a28") +(package! npm-mode :pin "3ee7c0bad5b7a041d4739ef3aaa06a3dc764e5eb") ;; Eval -(package! nodejs-repl) -(package! skewer-mode) +(package! nodejs-repl :pin "8b9094826568485eb0c48d798ae0026cb6962b83") +(package! skewer-mode :pin "123215dd9bfa67ce5cc49cd52dd54c0ba7c7e02c") ;; Programming environment -(package! tide) +(package! tide :pin "1878a097fc41ee81c40c155022c8feaaf8bfaa6d") (when (featurep! :tools lookup) - (package! xref-js2)) + (package! xref-js2 :pin "6f1ed5dae0c2485416196a51f2fa92f32e4b8262")) diff --git a/modules/lang/julia/packages.el b/modules/lang/julia/packages.el index d7d0b2236..80326fee2 100644 --- a/modules/lang/julia/packages.el +++ b/modules/lang/julia/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/julia/packages.el -(package! julia-mode) -(package! julia-repl) +(package! julia-mode :pin "5238f9adb7dd1c161fd6130435ebf0ac3755f33c") +(package! julia-repl :pin "b11a5729709c5ca541db2b6472b6579166723060") diff --git a/modules/lang/kotlin/packages.el b/modules/lang/kotlin/packages.el index 771f80755..9b1517a43 100644 --- a/modules/lang/kotlin/packages.el +++ b/modules/lang/kotlin/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/kotlin/packages.el -(package! kotlin-mode) +(package! kotlin-mode :pin "ab610996820b5cbdb032edbf8747661131603ab8") (when (featurep! :checkers syntax) - (package! flycheck-kotlin)) + (package! flycheck-kotlin :pin "5104ee9a3fdb7f0a0a3d3bcfd8dd3c45a9929310")) diff --git a/modules/lang/latex/packages.el b/modules/lang/latex/packages.el index b181f5785..886e534ba 100644 --- a/modules/lang/latex/packages.el +++ b/modules/lang/latex/packages.el @@ -1,23 +1,22 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/latex/packages.el -(package! auctex) -(package! adaptive-wrap) -(package! latex-preview-pane) +(package! auctex :pin "fafa28d54276a73604e696b51c6a1a36d727d3fb") +(package! adaptive-wrap :pin "1810c0ee8d827dd502ddeaae5bd759d4811fcbce") +(package! latex-preview-pane :pin "5297668a89996b50b2b62f99cba01cc544dbed2e") ;; Optional module features: (when (featurep! +latexmk) - (package! auctex-latexmk)) + (package! auctex-latexmk :pin "4d353522650d7685acbf1d38f7dbc504f734bd84")) ;; Features according to other user selected options (when (featurep! :completion company) - (package! company-auctex) - (package! company-reftex) - (package! company-math)) + (package! company-auctex :pin "48c42c58ce2f0e693301b0cb2d085055410c1b25") + (package! company-reftex :pin "33935e96540201adab43f3a765d62289eba9e286") + (package! company-math :pin "600e49449644f6835f9dc3501bc58461999e8ab9")) (when (featurep! :completion ivy) - (package! ivy-bibtex)) + (package! ivy-bibtex :pin "d4471232be26793fbf56c0ac3690b5f537c378b9")) (when (featurep! :completion helm) - (package! helm-bibtex)) - + (package! helm-bibtex :pin "d4471232be26793fbf56c0ac3690b5f537c378b9")) diff --git a/modules/lang/lean/packages.el b/modules/lang/lean/packages.el index 6061c61f6..f8c4170f1 100644 --- a/modules/lang/lean/packages.el +++ b/modules/lang/lean/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/lean/packages.el -(package! lean-mode) +(package! lean-mode :pin "f26e40daad2c1bd090e440a2b931205ac3b9b613") (when (featurep! :completion company) - (package! company-lean)) + (package! company-lean :pin "f26e40daad2c1bd090e440a2b931205ac3b9b613")) diff --git a/modules/lang/ledger/packages.el b/modules/lang/ledger/packages.el index 2c2179e12..1811a40a5 100644 --- a/modules/lang/ledger/packages.el +++ b/modules/lang/ledger/packages.el @@ -1,10 +1,10 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/ledger/packages.el -(package! ledger-mode) +(package! ledger-mode :pin "a514953d6a25cb29c0ec218e9824ee201c9b904d") (when (featurep! :editor evil) - (package! evil-ledger)) + (package! evil-ledger :pin "7a9f9f5d39c42fffdba8004f8982642351f2b233")) (when (featurep! :checkers syntax) - (package! flycheck-ledger)) + (package! flycheck-ledger :pin "2065beab564c23e6ab380547d19bdb5a9b3b25fc")) diff --git a/modules/lang/lua/packages.el b/modules/lang/lua/packages.el index 8c7d8c99a..89a9a2b30 100644 --- a/modules/lang/lua/packages.el +++ b/modules/lang/lua/packages.el @@ -1,14 +1,13 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/lua/packages.el -(package! lua-mode) +(package! lua-mode :pin "1f596a93b3f1caadd7bba01030f8c179b029600b") (when (featurep! +moonscript) - (package! moonscript) + (package! moonscript :pin "56f90471e2ced2b0a177aed4d8c2f854797e9cc7") (when (featurep! :checkers syntax) (package! flycheck-moonscript - :recipe (:host github :repo "hlissner/emacs-flycheck-moonscript")))) + :recipe (:host github :repo "hlissner/emacs-flycheck-moonscript") :pin "fcb99e5efcf31db05f236f02eaa575986a57172d"))) (when (featurep! :completion company) - (package! company-lua)) - + (package! company-lua :pin "29f6819de4d691e5fd0b62893a9f4fbc1c6fcb52")) diff --git a/modules/lang/markdown/packages.el b/modules/lang/markdown/packages.el index 08a2b1eb3..637a0f32d 100644 --- a/modules/lang/markdown/packages.el +++ b/modules/lang/markdown/packages.el @@ -1,13 +1,13 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/markdown/packages.el -(package! markdown-mode) -(package! markdown-toc) -(package! edit-indirect) +(package! markdown-mode :pin "e9dff50d572caa96b68a7466c18c97a8d6ed651c") +(package! markdown-toc :pin "7038f4f6d5c2bc7e4aea89699a607ac2b7dd16a8") +(package! edit-indirect :pin "935ded353b9ed3da67bc61abf245c21b58d88864") (when (featurep! +grip) - (package! grip-mode)) + (package! grip-mode :pin "0c2fe11f12ec23d5bbfba59ba43b89e87ef3eea8")) (when (featurep! :editor evil +everywhere) (package! evil-markdown - :recipe (:host github :repo "Somelauw/evil-markdown"))) + :recipe (:host github :repo "Somelauw/evil-markdown") :pin "46cd81b37991c4325fc24015a610f832b0ff995d")) diff --git a/modules/lang/nim/packages.el b/modules/lang/nim/packages.el index 7084efad3..c67ba9ec4 100644 --- a/modules/lang/nim/packages.el +++ b/modules/lang/nim/packages.el @@ -3,7 +3,7 @@ ;;; requires nim nimsuggest nimble -(package! nim-mode) +(package! nim-mode :pin "16a245e4974d21a6e9e7163e7fbfb50a0bd89f99") (when (featurep! :checkers syntax) - (package! flycheck-nim)) + (package! flycheck-nim :pin "ddfade51001571c2399f78bcc509e0aa8eb752a4")) diff --git a/modules/lang/nix/packages.el b/modules/lang/nix/packages.el index eb3256b84..5026a9b15 100644 --- a/modules/lang/nix/packages.el +++ b/modules/lang/nix/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/nix/packages.el -(package! nix-mode) -(package! nix-update) +(package! nix-mode :pin "5b5961780f3b1c1b62453d2087f775298980f10d") +(package! nix-update :pin "fc6c39c2da3fcfa62f4796816c084a6389c8b6e7") (when (featurep! :completion company) - (package! company-nixos-options)) + (package! company-nixos-options :pin "977b9a505ffc8b33b70ec7742f90e469b3168297")) (when (featurep! :completion helm) - (package! helm-nixos-options)) + (package! helm-nixos-options :pin "977b9a505ffc8b33b70ec7742f90e469b3168297")) diff --git a/modules/lang/ocaml/packages.el b/modules/lang/ocaml/packages.el index a4d54b3ec..67fb95936 100644 --- a/modules/lang/ocaml/packages.el +++ b/modules/lang/ocaml/packages.el @@ -1,25 +1,25 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/ocaml/packages.el -(package! tuareg) +(package! tuareg :pin "c12061eb80c1487a1963af7cdae268d709a70ca9") (unless (featurep! +lsp) - (package! merlin) - (package! merlin-eldoc) + (package! merlin :pin "f6954e953b4168e6a798a0255d6a2dfbd868a3c6") + (package! merlin-eldoc :pin "db7fab1eddfe34781b7e79694f8923b285698032") (when (featurep! :checkers syntax) - (package! flycheck-ocaml))) + (package! flycheck-ocaml :pin "8707a7bf545a8639a6a5c600a98d9a2ea1487dc9"))) -(package! ocp-indent) +(package! ocp-indent :pin "9e26c0a2699b7076cebc04ece59fb354eb84c11c") (when (featurep! :tools eval) - (package! utop)) + (package! utop :pin "7c99d8c904dbb6fb0daf375f5424a9f6053b9c84")) (when (featurep! :editor format) ;; by default quelpa generated a version 0pre0.20180929.192844, which got ;; parsed into (0 -1 0 ...), which when compared with version nil (0) in ;; package-installed-p always yielded false (package! ocamlformat :recipe - (:host github :repo "ocaml-ppx/ocamlformat" :files ("emacs/*.el")))) + (:host github :repo "ocaml-ppx/ocamlformat" :files ("emacs/*.el")) :pin "c7376847027ec94929fb3e3c42ba76d03c952d6d")) (package! dune :recipe - (:host github :repo "ocaml/dune" :files ("editor-integration/emacs/*.el"))) + (:host github :repo "ocaml/dune" :files ("editor-integration/emacs/*.el")) :pin "19f3a4a3db93702034c5227517b3e96e89fe5d84") diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index 09277f344..cdbbd0163 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -22,70 +22,80 @@ "(provide 'org-version)\n"))))) ;; install cutting-edge version of org-mode -(package! org-plus-contrib) +(package! org-plus-contrib :pin "0ac6a9e1fcb71415df5ce287d4658f6a601b3df3") ;; ...And prevent other packages from pulling org; org-plus-contrib satisfies ;; the dependency already: https://github.com/raxod502/straight.el/issues/352 -(package! org :recipe (:local-repo nil)) +(package! org :recipe (:local-repo nil) :pin "0ac6a9e1fcb71415df5ce287d4658f6a601b3df3") -(package! avy) -(package! htmlize) -(package! org-bullets :recipe (:host github :repo "Kaligule/org-bullets")) -(package! org-fancy-priorities) -(package! org-yt :recipe (:host github :repo "TobiasZawada/org-yt")) -(package! ox-clip) -(package! toc-org) -(package! org-cliplink) -(package! org-bookmark-heading) +(package! avy :pin "cf95ba9582121a1c2249e3c5efdc51acd566d190") +(package! htmlize :pin "86f22f211e9230857197c42a9823d3f05381deed") +(package! org-bullets + :recipe (:host github :repo "Kaligule/org-bullets") + :pin "8b4f0aab6d49b00faa779785b978fdb67e2eb066") +(package! org-fancy-priorities :pin "819bb993b71e7253cefef7047306ab4e0f9d0a86") +(package! org-yt + :recipe (:host github :repo "TobiasZawada/org-yt") + :pin "40cc1ac76d741055cbefa13860d9f070a7ade001") +(package! ox-clip :pin "bd36f9fb4e3b1b9e8686b993b02ccd780ff75a96") +(package! toc-org :pin "379b457fcff091d2fa47223ade58f457fd6eed28") +(package! org-cliplink :pin "82402cae7e118d67de7328417fd018a18f95fac2") +(package! org-bookmark-heading :pin "38a2813f72ff65f3ae91e2ebb23e0bbb42a8d1df") (when (featurep! :editor evil +everywhere) - (package! evil-org :recipe (:host github :repo "hlissner/evil-org-mode"))) + (package! evil-org + :recipe (:host github :repo "hlissner/evil-org-mode") + :pin "4d44e9bbdc3ae35d0050ca298886710f6531f434")) (when (featurep! :tools pdf) - (package! org-pdfview)) + (package! org-pdfview :pin "8b71f313634b95a1fac42fc701934fd796565f3b")) (when (featurep! :tools magit) - (package! orgit)) + (package! orgit :pin "e7cddf39e301c87c36c7de13e429dee74874d5c8")) (when (featurep! +brain) - (package! org-brain)) + (package! org-brain :pin "8cb2efc86026f0dcd19a63aef97044131682eba5")) (when (featurep! +dragndrop) - (package! org-download)) + (package! org-download :pin "a367669384859261bcb11bac4b782f231f972353")) (when (featurep! +gnuplot) - (package! gnuplot) - (package! gnuplot-mode)) + (package! gnuplot :pin "a406143d52618638d908b6b0b1c1c90c045b83ee") + (package! gnuplot-mode :pin "601f6392986f0cba332c87678d31ae0d0a496ce7")) (when (featurep! +ipython) ; DEPRECATED - (package! ob-ipython)) + (package! ob-ipython :pin "7147455230841744fb5b95dcbe03320313a77124")) (when (featurep! +jupyter) - (package! jupyter)) + (package! jupyter :pin "9e3c1633586982e278f072dfaaabd115fa4d19f7")) (when (featurep! +pomodoro) - (package! org-pomodoro)) + (package! org-pomodoro :pin "aa07c11318f91219336197e62c47bc7a3d090479")) (when (featurep! +present) (package! centered-window - :recipe (:host github :repo "anler/centered-window-mode")) - (package! org-tree-slide) - (package! org-re-reveal)) + :recipe (:host github :repo "anler/centered-window-mode") + :pin "24f7c5be9def20879f46659082d497e67b55d7af") + (package! org-tree-slide :pin "7bf09a02bd2d8f1ccfcb5209bfb18fbe02d1f44e") + (package! org-re-reveal :pin "29bc467201220dbf5091fe2d32a2b237c744ff10")) (when (featurep! +journal) - (package! org-journal)) + (package! org-journal :pin "cf0f15386fb52479f3b8f4f494feff71ba0052a4")) ;;; Babel -(package! ob-async) +(package! ob-async :pin "80a30b96a007d419ece12c976a81804ede340311") (when (featurep! :lang crystal) - (package! ob-crystal)) + (package! ob-crystal :pin "d84c1adee4b269cdba06a97caedb8071561a09af")) (when (featurep! :lang go) - (package! ob-go)) + (package! ob-go :pin "2067ed55f4c1d33a43cb3f6948609d240a8915f5")) (when (featurep! :lang nim) - (package! ob-nim)) + (package! ob-nim :pin "bf1642cb93f0a898804dc13fd9408d2964403bd2")) (when (featurep! :lang racket) - (package! ob-racket :recipe (:host github :repo "DEADB17/ob-racket"))) + (package! ob-racket + :recipe (:host github :repo "DEADB17/ob-racket") + :pin "d8fd51bddb019b0eb68755255f88fc800cfe03cb")) (when (featurep! :lang rest) - (package! ob-restclient)) + (package! ob-restclient :pin "c5c22e603531dca48575d0a425fddff16dc0f391")) (when (featurep! :lang rust) - (package! ob-rust)) + (package! ob-rust :pin "6a82587598cd097e9642be916243c31f1231b24a")) (when (featurep! :lang scala) - (package! ob-ammonite)) + (package! ob-ammonite :pin "39937dff395e70aff76a4224fa49cf2ec6c57cca")) ;;; Export (when (featurep! +pandoc) - (package! ox-pandoc)) + (package! ox-pandoc :pin "aa37dc7e94213d4ebedb85c384c1ba35007da18e")) (when (featurep! +hugo) (package! ox-hugo - :recipe (:host github :repo "kaushalmodi/ox-hugo" :nonrecursive t))) + :recipe (:host github :repo "kaushalmodi/ox-hugo" :nonrecursive t) + :pin "d2892b3b5ea19f85063f2fba4a5b7ffa1123a395")) (when (featurep! :lang rst) - (package! ox-rst)) + (package! ox-rst :pin "9158bfd18096c559e0a225ae62ab683f1c98a547")) diff --git a/modules/lang/perl/packages.el b/modules/lang/perl/packages.el index 4d5b56d67..2bfd7e3c1 100644 --- a/modules/lang/perl/packages.el +++ b/modules/lang/perl/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/perl/packages.el -(package! perl6-mode) +(package! perl6-mode :pin "88de065795d6863b23b6042576b9e90f8cbf8798") (when (featurep! :checkers syntax) - (package! flycheck-perl6)) + (package! flycheck-perl6 :pin "b804702305d7a6e26f762ff98cfdeec2e9dd4cb7")) diff --git a/modules/lang/php/packages.el b/modules/lang/php/packages.el index f2fa57243..4a2f41cf5 100644 --- a/modules/lang/php/packages.el +++ b/modules/lang/php/packages.el @@ -1,19 +1,22 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/php/packages.el -(package! php-boris) -(package! php-extras :recipe (:host github :repo "arnested/php-extras")) -(package! php-mode) -(package! php-refactor-mode) -(package! phpunit) +(package! php-boris :pin "f2faebf610c917f7091f7ec0cd97645629c4f819") +(package! php-extras :recipe (:host github :repo "arnested/php-extras") :pin "d410c5af663c30c01d461ac476d1cbfbacb49367") +(package! php-mode :pin "167b35749dbf700543d4a540d098c015af58df2b") +(package! php-refactor-mode :pin "7a794b0618df2882b1bd586fdd698dba0bc5130d") +(package! phpunit :pin "fe6bc91c3bd8b329c6d26ad883a025f06b5121ee") (when (featurep! +hack) - (package! hack-mode :recipe (:host github :repo "hhvm/hack-mode"))) + (package! hack-mode :recipe (:host github :repo "hhvm/hack-mode") :pin "fd6a661b091490920804d043303596f9e60a5dd7")) (unless (featurep! +lsp) - (package! phpactor) + (package! phpactor :pin "19d56b4c62772f6939cf1576c72213bf72fd3eb1") (when (featurep! :completion company) - (package! company-phpactor))) + (package! company-phpactor :pin "19d56b4c62772f6939cf1576c72213bf72fd3eb1"))) (when (featurep! :editor format) - (package! php-cs-fixer)) + (package! php-cs-fixer :pin "6540006710daf2b2d47576968ea826a83a40a6bf")) + +;; For building php-extras +(package! async :pin "86aef2c38e7d35e8509b7feeee3e989d825eba91") diff --git a/modules/lang/plantuml/packages.el b/modules/lang/plantuml/packages.el index 3f2ed51c0..6048a0fa7 100644 --- a/modules/lang/plantuml/packages.el +++ b/modules/lang/plantuml/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/plantuml/packages.el -(package! plantuml-mode) +(package! plantuml-mode :pin "ea45a13707abd2a70df183f1aec6447197fc9ccc") (when (featurep! :checkers syntax) - (package! flycheck-plantuml)) + (package! flycheck-plantuml :pin "183be89e1dbba0b38237dd198dff600e0790309d")) diff --git a/modules/lang/purescript/packages.el b/modules/lang/purescript/packages.el index cab6c3433..df3d86808 100644 --- a/modules/lang/purescript/packages.el +++ b/modules/lang/purescript/packages.el @@ -5,8 +5,7 @@ ;; due to expecting the compiler to be psc rather than purs. However, one of ;; purescript-mode or psc-ide seems to handle flycheck, so it might be ;; unnecessary altogether. -;;(package! flycheck-purescript) - -(package! psc-ide) -(package! purescript-mode) +;;(package! flycheck-purescript :pin "30f0435d5e2715053c8c6170b2bce2ae462ac819") +(package! psc-ide :pin "2a9394422da317b54aa1da021aea6cded19004c1") +(package! purescript-mode :pin "8db1d0243c03da31adac4d7c5287407a4df6aff2") diff --git a/modules/lang/python/packages.el b/modules/lang/python/packages.el index 0a67b2a80..976f94065 100644 --- a/modules/lang/python/packages.el +++ b/modules/lang/python/packages.el @@ -2,33 +2,33 @@ ;;; lang/python/packages.el ;; Major modes -(package! pip-requirements) +(package! pip-requirements :pin "216cd1690f80cc965d4ae47b8753fc185f778ff6") (when (featurep! +cython) - (package! cython-mode) + (package! cython-mode :pin "6d2c3b9372547ce0aefac2babfe48dc1568875b9") (when (featurep! :checkers syntax) - (package! flycheck-cython))) + (package! flycheck-cython :pin "ecc4454d35ab5317ab66a04406f36f0c1dbc0b76"))) ;; LSP (when (featurep! +lsp) - (package! lsp-python-ms)) + (package! lsp-python-ms :pin "83ef84d9a4a942f8882b00d07bb78b15f716e89d")) ;; Programming environment -(package! anaconda-mode) +(package! anaconda-mode :pin "1bc301b2d2bc336988f4a16a891c275a90136ca5") (when (featurep! :completion company) - (package! company-anaconda)) + (package! company-anaconda :pin "398fad19160cc1d0e31dcb1d4a3f88de7a2d355d")) ;; Environment management -(package! pipenv) -(package! pyvenv) +(package! pipenv :pin "b730bb509e8b60af9f5ab1f1e6c3458d1d95d789") +(package! pyvenv :pin "861998b6d157ae73b829f02a5a6c8a9118310831") (when (featurep! +pyenv) - (package! pyenv-mode)) + (package! pyenv-mode :pin "aec6f2aa289f6aed974f053c081143758dd142fb")) (when (featurep! +conda) - (package! conda)) + (package! conda :pin "41e9593cf230a50183a36fa9c0a4853acb2e7505")) ;; Testing frameworks -(package! nose) -(package! python-pytest) +(package! nose :pin "f8528297519eba911696c4e68fa88892de9a7b72") +(package! python-pytest :pin "09ad688df207ee9b02c990d3897a9e2841931d97") ;; Import managements -(package! pyimport) -(package! py-isort) +(package! pyimport :pin "a6f63cf7ed93f0c0f7c207e6595813966f8852b9") +(package! py-isort :pin "e67306f459c47c53a65604e4eea88a3914596560") diff --git a/modules/lang/qt/packages.el b/modules/lang/qt/packages.el index a41b28abb..22f01ef77 100644 --- a/modules/lang/qt/packages.el +++ b/modules/lang/qt/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/qt/packages.el -(package! qml-mode) -(package! qt-pro-mode) +(package! qml-mode :pin "6c5f33ba88ae010bf201a80ee8095e20a724558c") +(package! qt-pro-mode :pin "7a2da323de834294b413cbbb3c92f42f54913643") diff --git a/modules/lang/racket/packages.el b/modules/lang/racket/packages.el index bfab32f65..644884a28 100644 --- a/modules/lang/racket/packages.el +++ b/modules/lang/racket/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/racket/packages.el -(package! racket-mode) +(package! racket-mode :pin "09eba92e846733db1acc8b9e58ff2b5f52c79b23") diff --git a/modules/lang/rest/packages.el b/modules/lang/rest/packages.el index edd0b8fba..0ab4e492c 100644 --- a/modules/lang/rest/packages.el +++ b/modules/lang/rest/packages.el @@ -1,7 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/rest/packages.el -(package! restclient) +(package! restclient :pin "e8ca809ace13549a1ddffb4e4aaa5d5fce750f3d") (when (featurep! :completion company) - (package! company-restclient)) - + (package! company-restclient :pin "e5a3ec54edb44776738c13e13e34c85b3085277b")) diff --git a/modules/lang/rst/packages.el b/modules/lang/rst/packages.el index b4f32ff0b..c915f35e9 100644 --- a/modules/lang/rst/packages.el +++ b/modules/lang/rst/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/rst/packages.el -(package! sphinx-mode) +(package! sphinx-mode :pin "b5ac514e213459dcc57184086f10b5b6be3cecd8") diff --git a/modules/lang/ruby/packages.el b/modules/lang/ruby/packages.el index d7708caef..3cbe2a0c3 100644 --- a/modules/lang/ruby/packages.el +++ b/modules/lang/ruby/packages.el @@ -2,28 +2,28 @@ ;;; lang/ruby/packages.el ;; Major modes -(package! enh-ruby-mode) -(package! yard-mode) +(package! enh-ruby-mode :pin "732331b99a0884dd7fc0149658d4090886857656") +(package! yard-mode :pin "ba74a47463b0320ae152bd42a7dd7aeecd7b5748") ;; REPL -(package! inf-ruby) +(package! inf-ruby :pin "fd8d392fefd1d99eb58fc597d537d0d7df29c334") (when (featurep! :completion company) - (package! company-inf-ruby)) + (package! company-inf-ruby :pin "fe3e4863bc971fbb81edad447efad5795ead1b17")) ;; Programming environment -(package! rubocop) -(package! robe) +(package! rubocop :pin "03bf15558a6eb65e4f74000cab29412efd46660e") +(package! robe :pin "8190cb7c7beb8385dd3abf6ea357f33d8981ae8a") ;; Project tools -(package! bundler) -(package! rake) +(package! bundler :pin "05a91d68e21e129b6c4d5462c888ea249c2ea001") +(package! rake :pin "9c204334b03b4e899fadae6e59c20cf105404128") ;; Environment management (when (featurep! +rbenv) - (package! rbenv)) + (package! rbenv :pin "2ea1a5bdc1266caef1dd77700f2c8f42429b03f1")) (when (featurep! +rvm) - (package! rvm)) + (package! rvm :pin "134497bc460990c71ab8fa75431156e62c17da2d")) ;; Testing frameworks -(package! rspec-mode) -(package! minitest) +(package! rspec-mode :pin "c4353a1bff164bccf6c55fda16aa7b9c9ab36685") +(package! minitest :pin "6d9f6233b7ce63c63c96675514c228fd93a2b6a1") diff --git a/modules/lang/rust/packages.el b/modules/lang/rust/packages.el index 8744139fd..06f07c356 100644 --- a/modules/lang/rust/packages.el +++ b/modules/lang/rust/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/rust/packages.el -(package! rustic) +(package! rustic :pin "319e85515918ad8cc5348d945ebdf2a1718e1a64") (unless (featurep! +lsp) - (package! racer)) + (package! racer :pin "a0bdf778f01e8c4b8a92591447257422ac0b455b")) diff --git a/modules/lang/scala/packages.el b/modules/lang/scala/packages.el index 8a331c698..0434865ae 100644 --- a/modules/lang/scala/packages.el +++ b/modules/lang/scala/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/scala/packages.el -(package! sbt-mode) -(package! scala-mode) +(package! sbt-mode :pin "633a315ad453cd963588c9b8fba02d9cf75296b4") +(package! scala-mode :pin "44772cbf1e1ade52bc5066555ff0aed68569aaec") diff --git a/modules/lang/scheme/packages.el b/modules/lang/scheme/packages.el index 20a43e613..35eeb8e19 100644 --- a/modules/lang/scheme/packages.el +++ b/modules/lang/scheme/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/scheme/packages.el -(package! geiser) +(package! geiser :pin "645e4775420c59bb10ef0693ed2631a8df8c0e29") diff --git a/modules/lang/sh/packages.el b/modules/lang/sh/packages.el index b52024fd5..6ca6b213d 100644 --- a/modules/lang/sh/packages.el +++ b/modules/lang/sh/packages.el @@ -2,7 +2,7 @@ ;;; lang/sh/packages.el (when (featurep! :completion company) - (package! company-shell)) + (package! company-shell :pin "52f3bf26b74adc30a275f5f4290a1fc72a6876ff")) (when (featurep! +fish) - (package! fish-mode)) + (package! fish-mode :pin "688c82decad108029b0434e3bce6c3d129ede6f3")) diff --git a/modules/lang/solidity/packages.el b/modules/lang/solidity/packages.el index 7d6e78ff5..7ef68385c 100644 --- a/modules/lang/solidity/packages.el +++ b/modules/lang/solidity/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/solidity/packages.el -(package! solidity-mode) -(package! company-solidity) -(package! solidity-flycheck) +(package! solidity-mode :pin "93412f211fad7dfc3b02aa226856fc52b6a15c22") +(package! company-solidity :pin "93412f211fad7dfc3b02aa226856fc52b6a15c22") +(package! solidity-flycheck :pin "93412f211fad7dfc3b02aa226856fc52b6a15c22") diff --git a/modules/lang/swift/packages.el b/modules/lang/swift/packages.el index 3c1d15d90..dc86a68cf 100644 --- a/modules/lang/swift/packages.el +++ b/modules/lang/swift/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/swift/packages.el -(package! swift-mode) +(package! swift-mode :pin "1268425311ab20f1618df4e52cb1b79e28b553df") (if (featurep! +lsp) - (package! lsp-sourcekit) + (package! lsp-sourcekit :pin "04d75b6a0be5894fea4a55fec0b2ccedf5b3be58") (when (featurep! :completion company) - (package! company-sourcekit)) + (package! company-sourcekit :pin "abf9bc5a0102eb666d3aa6d6bf22f6efcc852781")) (when (featurep! :checkers syntax) - (package! flycheck-swift))) + (package! flycheck-swift :pin "4c5ad401252400a78da395fd56a71e67ff8c2761"))) diff --git a/modules/lang/terra/packages.el b/modules/lang/terra/packages.el index 4a1a1485b..312816fd2 100644 --- a/modules/lang/terra/packages.el +++ b/modules/lang/terra/packages.el @@ -2,8 +2,8 @@ ;;; lang/lua/packages.el (package! terra-mode - :recipe (:host github :repo "StanfordLegion/terra-mode")) + :recipe (:host github :repo "StanfordLegion/terra-mode") + :pin "1e5e82410d60bd0b53fe3e769d9dd36a0d542b71") (when (featurep! :completion company) - (package! company-lua)) - + (package! company-lua :pin "29f6819de4d691e5fd0b62893a9f4fbc1c6fcb52")) diff --git a/modules/lang/web/packages.el b/modules/lang/web/packages.el index d0933030a..d1031f136 100644 --- a/modules/lang/web/packages.el +++ b/modules/lang/web/packages.el @@ -2,23 +2,23 @@ ;;; lang/web/packages.el ;; +html.el -(package! emmet-mode) -(package! haml-mode) -(package! pug-mode) -(package! slim-mode) -(when (package! web-mode) +(package! emmet-mode :pin "1acb821e0142136344ccf40c1e5fb664d7db2e70") +(package! haml-mode :pin "bf5b6c11b1206759d2b28af48765e04882dd1fc4") +(package! pug-mode :pin "685fd3414d89736bf232f5d1a6bed9e0353b98fe") +(package! slim-mode :pin "3636d18ab1c8b316eea71c4732eb44743e2ded87") +(when (package! web-mode :pin "cd000fcfce97152f8b831b7eef4ea0d0b1eed11a") (when (featurep! :completion company) - (package! company-web))) + (package! company-web :pin "f0cc9187c9c34f72ad71f5649a69c74f996bae9a"))) ;; +css.el (package! css-mode :built-in t) -(package! less-css-mode :built-in t) +(package! less-css-mode :built-in t :pin "c7fa3d56d83206b28657f2e56439dc62280a2bf2") -(package! sass-mode) -(package! stylus-mode) -(package! sws-mode) -(package! rainbow-mode) +(package! sass-mode :pin "247a0d4b509f10b28e4687cd8763492bca03599b") +(package! stylus-mode :pin "4dbde92542fc7ad61df38776980905a4721d642e") +(package! sws-mode :pin "4dbde92542fc7ad61df38776980905a4721d642e") +(package! rainbow-mode :pin "3ef813d6377226de0cac1b0ee536b517f45e61ad") (when (featurep! :completion ivy) - (package! counsel-css)) + (package! counsel-css :pin "61a38c9d50fa9d1e38b2fa550d07130eb9322524")) (when (featurep! :completion helm) - (package! helm-css-scss)) + (package! helm-css-scss :pin "48b996f73af1fef8d6e88a1c545d98f8c50b0cf3")) diff --git a/modules/term/eshell/packages.el b/modules/term/eshell/packages.el index 31920f973..33e5af203 100644 --- a/modules/term/eshell/packages.el +++ b/modules/term/eshell/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; term/eshell/packages.el -(package! eshell-up) -(package! eshell-z) -(package! shrink-path) -(package! esh-help) +(package! eshell-up :pin "9c100bae5c3020e8d9307e4332d3b64e7dc28519") +(package! eshell-z :pin "337cb241e17bd472bd3677ff166a0800f684213c") +(package! shrink-path :pin "c14882c8599aec79a6e8ef2d06454254bb3e1e41") +(package! esh-help :pin "417673ed18a983930a66a6692dbfb288a995cb80") diff --git a/modules/term/term/packages.el b/modules/term/term/packages.el index dd7dd9fcc..b55cfc41c 100644 --- a/modules/term/term/packages.el +++ b/modules/term/term/packages.el @@ -2,4 +2,4 @@ ;;; term/term/packages.el (package! term :built-in t) -(package! multi-term) +(package! multi-term :pin "7307ddd456db44045206253e5a905d3d8c143d5c") diff --git a/modules/term/vterm/packages.el b/modules/term/vterm/packages.el index caa33a78e..1cee2773a 100644 --- a/modules/term/vterm/packages.el +++ b/modules/term/vterm/packages.el @@ -1,4 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; term/vterm/packages.el -(package! vterm :built-in 'prefer) +(package! vterm + :built-in 'prefer + :pin "8fbab4b091322dd085b8758fb6655300bfb2e439") diff --git a/modules/tools/ansible/packages.el b/modules/tools/ansible/packages.el index 1d18e47ce..1d1e137f3 100644 --- a/modules/tools/ansible/packages.el +++ b/modules/tools/ansible/packages.el @@ -1,10 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/ansible/packages.el -(package! yaml-mode) -(package! ansible :recipe (:nonrecursive t)) -(package! ansible-doc) -(package! jinja2-mode) +(package! ansible :recipe (:nonrecursive t) + :pin "c6532e52161a381ed3dddfeaa7c92ae636d3f052") +(package! ansible-doc :pin "86083a7bb2ed0468ca64e52076b06441a2f8e9e0") +(package! jinja2-mode :pin "cfaa7bbe7bb290cc500440124ce89686f3e26f86") +(package! yaml-mode :pin "cecf4b106b0c4236931b14919fdf87ff3546e2c9") (when (featurep! :completion company) - (package! company-ansible)) + (package! company-ansible :pin "8d1ffbc357ccb0c307815d0c7f2cbb699f92537b")) diff --git a/modules/tools/debugger/packages.el b/modules/tools/debugger/packages.el index 4d83727f8..1d89ecca6 100644 --- a/modules/tools/debugger/packages.el +++ b/modules/tools/debugger/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/debugger/packages.el -(when (package! realgud) +(when (package! realgud :pin "2cca776d28c4d6ebef033758ef01f2af2e9b3b96") (when (featurep! :lang javascript) - (package! realgud-trepan-ni))) + (package! realgud-trepan-ni :pin "6e9cac5e8097018aadf41c88de541168036cc227"))) (when (featurep! :tools lsp) - (package! dap-mode)) + (package! dap-mode :pin "9d08eaf77d4aeb80880be85bc0591554314d0eb7")) diff --git a/modules/tools/direnv/packages.el b/modules/tools/direnv/packages.el index a0c843e53..969bf2ef7 100644 --- a/modules/tools/direnv/packages.el +++ b/modules/tools/direnv/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/direnv/packages.el -(package! direnv) +(package! direnv :pin "fd0b6bbd5e3eaf6aa48bccd4a1ff3048bfb2c69b") diff --git a/modules/tools/docker/packages.el b/modules/tools/docker/packages.el index 9266beee4..c5a002fc1 100644 --- a/modules/tools/docker/packages.el +++ b/modules/tools/docker/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/docker/packages.el -(package! docker) -(package! docker-tramp) -(package! dockerfile-mode) +(package! docker :pin "baba7f72ea9e642536ca3664c2082722062b046e") +(package! docker-tramp :pin "8e2b671eff7a81af43b76d9dfcf94ddaa8333a23") +(package! dockerfile-mode :pin "d31f7685ebc5832d957e25070a930aa42984327d") diff --git a/modules/tools/editorconfig/packages.el b/modules/tools/editorconfig/packages.el index 5fb9c477e..4febed86d 100644 --- a/modules/tools/editorconfig/packages.el +++ b/modules/tools/editorconfig/packages.el @@ -1,4 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/editorconfig/packages.el -(package! editorconfig :recipe (:nonrecursive t)) +(package! editorconfig + :recipe (:nonrecursive t) + :pin "65f8244ffbeb9bf2720d922d4b5fc74849b9af82") diff --git a/modules/tools/ein/packages.el b/modules/tools/ein/packages.el index 2a449f2cc..d755e9f58 100644 --- a/modules/tools/ein/packages.el +++ b/modules/tools/ein/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/ein/packages.el -(package! ein) -(package! avy) +(package! ein :pin "41d8e61df6f18f5accc341e7ae42e03069501870") +(package! avy :pin "cf95ba9582121a1c2249e3c5efdc51acd566d190") diff --git a/modules/tools/eval/packages.el b/modules/tools/eval/packages.el index ba755f7c2..efdcb60a1 100644 --- a/modules/tools/eval/packages.el +++ b/modules/tools/eval/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/eval/packages.el -(package! quickrun) +(package! quickrun :pin "55bbe5d54b80206ea5a60bf2f58eb6368b2c8201") (when (featurep! +overlay) - (package! eros)) + (package! eros :pin "dd8910279226259e100dab798b073a52f9b4233a")) diff --git a/modules/tools/gist/packages.el b/modules/tools/gist/packages.el index de58b4035..f8a971d9f 100644 --- a/modules/tools/gist/packages.el +++ b/modules/tools/gist/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/gist/packages.el -(package! gist) +(package! gist :pin "314fe6ab80fae35b95f0734eceb82f72813b6f41") diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index 6f82a56eb..1c6f3a13d 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -5,26 +5,26 @@ ;; helm be loaded before `dumb-jump' is byte-compiled during installation. ;; To ensure this, we declare helm before dumb-jump. (when (featurep! :completion helm) - (package! helm)) + (package! helm :pin "05d70ff116a696f5c18e5ad569573d8936ff01da")) ;; -(package! dumb-jump) +(package! dumb-jump :pin "738d40ceb7e2d6a3a26f7f27a31ba93924baaa2d") (when (featurep! :completion ivy) - (package! ivy-xref)) + (package! ivy-xref :pin "3d4c35fe2b243d948d8fe02a1f0d76a249d63de9")) (when (featurep! :completion helm) - (package! helm-xref)) + (package! helm-xref :pin "6b4a8bd91f5eaf82f51bd31b03f6587387fe6983")) (when (featurep! +docsets) - (package! dash-docs) + (package! dash-docs :pin "111fd9b97001f1ad887b45e5308a14ddd68ce70a") (when (featurep! :completion helm) - (package! helm-dash)) + (package! helm-dash :pin "7f853bd34da666f0e9a883011c80f451b06f6c59")) (when (featurep! :completion ivy) - (package! counsel-dash))) + (package! counsel-dash :pin "370d5f6f14b5294d0eb717f7b2a6a8e93df1ed24"))) (when (featurep! +dictionary) (if IS-MAC - (package! osx-dictionary) - (package! define-word)) + (package! osx-dictionary :pin "1b79ff64c72485cb078db9ab7ee3256b11a99f4b") + (package! define-word :pin "d8c76d503be3d561221631067ec5274e7c147248")) ;; Need for Google/DuckDuckGo auto-completion on `+lookup/online' - (package! powerthesaurus) - (package! request)) + (package! powerthesaurus :pin "81a262ec0c9294ad377bafc6cc4e6d91b461acb6") + (package! request :pin "b207ebb298dbf181583ebf56c3e18a52fcbaa165")) diff --git a/modules/tools/lsp/packages.el b/modules/tools/lsp/packages.el index cd4f9e790..b400c3e7c 100644 --- a/modules/tools/lsp/packages.el +++ b/modules/tools/lsp/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/lsp/packages.el -(package! lsp-mode) -(package! lsp-ui) +(package! lsp-mode :pin "e95109b8b84201c299f54d5f22e84e5eb6511ac4") +(package! lsp-ui :pin "01f89e40f473032376f70a90e33831356832f084") (when (featurep! :completion company) - (package! company-lsp)) + (package! company-lsp :pin "f921ffa0cdc542c21dc3dd85f2c93df4288e83bd")) (when (featurep! :completion ivy) - (package! lsp-ivy)) + (package! lsp-ivy :pin "78c1429c62c19006058b89d462657e1448d1e595")) (when (featurep! :completion helm) - (package! helm-lsp)) + (package! helm-lsp :pin "6f62659cc528b7e37ffcc8fb356633acd7031be8")) diff --git a/modules/tools/magit/packages.el b/modules/tools/magit/packages.el index 426dc4d95..efca1c8d2 100644 --- a/modules/tools/magit/packages.el +++ b/modules/tools/magit/packages.el @@ -1,10 +1,10 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/magit/packages.el -(when (package! magit) - (package! forge) - (package! magit-gitflow) - (package! magit-todos) - (package! github-review) +(when (package! magit :pin "5503aa1857e78bb43502261956173a66c9b88c71") + (package! forge :pin "269effb4954071f590954c0e5b4faba3f27d03d0") + (package! magit-gitflow :pin "cc41b561ec6eea947fe9a176349fb4f771ed865b") + (package! magit-todos :pin "a64e36574bcb77a86726922df905307e55ea62ed") + (package! github-review :pin "e8a275939e1a774c84b71ab3df2ce1599445dab0") (when (featurep! :editor evil +everywhere) - (package! evil-magit))) + (package! evil-magit :pin "7223dca89c0b4bca9871c453a30a4d4edfdb444e"))) diff --git a/modules/tools/make/packages.el b/modules/tools/make/packages.el index 422d37597..815c945d3 100644 --- a/modules/tools/make/packages.el +++ b/modules/tools/make/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/make/packages.el -(package! makefile-executor) +(package! makefile-executor :pin "9a7d78f814a4b372d8f8179819cb1b37b83b1973") diff --git a/modules/tools/pass/packages.el b/modules/tools/pass/packages.el index a65e113a8..e189426c7 100644 --- a/modules/tools/pass/packages.el +++ b/modules/tools/pass/packages.el @@ -1,16 +1,17 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/pass/packages.el -(package! pass) -(package! password-store) -(package! password-store-otp) +(package! pass :pin "919d8e3826d556433ab67d4ee21a509d209d1baa") +(package! password-store :pin "88936b11aff49e48f79842e4628c55620e0ad736") +(package! password-store-otp :pin "04998c8578a060ab4a4e8f46f2ee0aafad4ab4d5") ;; an older version of `auto-source-pass' is built into Emacs 26+, so we must ;; install the new version directly from the source and with a psuedonym. (package! auth-source-pass - :recipe (:host github :repo "DamienCassou/auth-password-store")) + :recipe (:host github :repo "DamienCassou/auth-password-store") + :pin "ff4940c647786914b3cbef69103d96a4ea334111") (when (featurep! :completion ivy) - (package! ivy-pass)) + (package! ivy-pass :pin "5b523de1151f2109fdd6a8114d0af12eef83d3c5")) (when (featurep! :completion helm) - (package! helm-pass)) + (package! helm-pass :pin "ed5798f2d83937575e8f23fde33323bca9e85131")) diff --git a/modules/tools/pdf/packages.el b/modules/tools/pdf/packages.el index 59dae0cdd..08972eb01 100644 --- a/modules/tools/pdf/packages.el +++ b/modules/tools/pdf/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/pdf/packages.el -(package! pdf-tools) +(package! pdf-tools :pin "cc29d4c9c2d81fcb1255f7172fd5b9b7851d656c") diff --git a/modules/tools/prodigy/packages.el b/modules/tools/prodigy/packages.el index bf9396134..57dc56a4f 100644 --- a/modules/tools/prodigy/packages.el +++ b/modules/tools/prodigy/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/prodigy/packages.el -(package! prodigy) +(package! prodigy :pin "6ae71f27b09b172f03fb55b9eeef001206baacd3") diff --git a/modules/tools/rgb/packages.el b/modules/tools/rgb/packages.el index e42264f13..01b2679b0 100644 --- a/modules/tools/rgb/packages.el +++ b/modules/tools/rgb/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/rgb/packages.el -(package! rainbow-mode) -(package! kurecolor) +(package! rainbow-mode :pin "3ef813d6377226de0cac1b0ee536b517f45e61ad") +(package! kurecolor :pin "3fc84840cbbd75e646cafa2fd3a00004b55e37ec") diff --git a/modules/tools/terraform/packages.el b/modules/tools/terraform/packages.el index 9c9217ad1..6c1d3de2f 100644 --- a/modules/tools/terraform/packages.el +++ b/modules/tools/terraform/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/terraform/packages.el -(package! terraform-mode) +(package! terraform-mode :pin "6973d1acaba2835dfdf174f5a5e27de6366002e1") (when (featurep! :completion company) - (package! company-terraform)) + (package! company-terraform :pin "2d11a21fee2f298e48968e479ddcaeda4d736e12")) diff --git a/modules/tools/upload/packages.el b/modules/tools/upload/packages.el index 13088da1f..22aa62783 100644 --- a/modules/tools/upload/packages.el +++ b/modules/tools/upload/packages.el @@ -1,5 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/upload/packages.el -(package! ssh-deploy) - +(package! ssh-deploy :pin "93a0e189a06d49b03627c65fe77652bee9f129d4") diff --git a/modules/ui/deft/packages.el b/modules/ui/deft/packages.el index 9c4b8f9c1..aa7be392e 100644 --- a/modules/ui/deft/packages.el +++ b/modules/ui/deft/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/deft/packages.el -(package! deft) +(package! deft :pin "f54e8a65a7e75a029657364055420374df45656d") diff --git a/modules/ui/doom/packages.el b/modules/ui/doom/packages.el index 02507e3e7..d60a72f13 100644 --- a/modules/ui/doom/packages.el +++ b/modules/ui/doom/packages.el @@ -1,6 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/doom/packages.el -(package! doom-themes) -(package! solaire-mode) - +(package! doom-themes :pin "2ec6df8905e22586f349290b6f39b320fc2e21be") +(package! solaire-mode :pin "2bfb3efe5a646079389dad6ca60e5e7f2c986829") diff --git a/modules/ui/fill-column/packages.el b/modules/ui/fill-column/packages.el index 0117dad31..b86e8cf12 100644 --- a/modules/ui/fill-column/packages.el +++ b/modules/ui/fill-column/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/fill-column/packages.el -(package! hl-fill-column) +(package! hl-fill-column :pin "612441e69772c24f9ce67ae73e47c84f29ee653d") diff --git a/modules/ui/hl-todo/packages.el b/modules/ui/hl-todo/packages.el index eee0fdb53..046a54c55 100644 --- a/modules/ui/hl-todo/packages.el +++ b/modules/ui/hl-todo/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/hl-todo/packages.el -(package! hl-todo) +(package! hl-todo :pin "5d2ea49f83a7e6953f9d71de94dee478d08f9543") diff --git a/modules/ui/hydra/packages.el b/modules/ui/hydra/packages.el index f92e067e0..708dd18fd 100644 --- a/modules/ui/hydra/packages.el +++ b/modules/ui/hydra/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/hydra/packages.el -(package! hydra) +(package! hydra :pin "9db28034d7d61bfeff89899633b958f22befc53d") diff --git a/modules/ui/indent-guides/packages.el b/modules/ui/indent-guides/packages.el index 210c00e9d..e246304a0 100644 --- a/modules/ui/indent-guides/packages.el +++ b/modules/ui/indent-guides/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/indent-guides/packages.el -(package! highlight-indent-guides) +(package! highlight-indent-guides :pin "0b10f38c54ffc099861ce8463e16a1b07ddbb203") diff --git a/modules/ui/modeline/packages.el b/modules/ui/modeline/packages.el index bd2a2d55b..155dc4ab5 100644 --- a/modules/ui/modeline/packages.el +++ b/modules/ui/modeline/packages.el @@ -2,7 +2,7 @@ ;;; ui/modeline/packages.el (unless (featurep! +light) - (package! doom-modeline)) -(package! anzu) + (package! doom-modeline :pin "dbd9251979de2d94073197b406fe5a72aa593e5d")) +(package! anzu :pin "592f8ee6d0b1bc543943b36a30063c2d1aac4b22") (when (featurep! :editor evil) - (package! evil-anzu)) + (package! evil-anzu :pin "9bca6ca14d865e7e005bc02a28a09b4ae74facc9")) diff --git a/modules/ui/nav-flash/packages.el b/modules/ui/nav-flash/packages.el index 5dfdcaf5b..3cc02ee6e 100644 --- a/modules/ui/nav-flash/packages.el +++ b/modules/ui/nav-flash/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/nav-flash/packages.el -(package! nav-flash) +(package! nav-flash :pin "dbb91216637e0a1e8bfd59aa883c75d45db70daf") diff --git a/modules/ui/neotree/packages.el b/modules/ui/neotree/packages.el index 47aae4652..fa6fd65a4 100644 --- a/modules/ui/neotree/packages.el +++ b/modules/ui/neotree/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/neotree/packages.el -(package! neotree) +(package! neotree :pin "c2420a4b344a9337760981c451783f0ff9df8bbf") diff --git a/modules/ui/ophints/packages.el b/modules/ui/ophints/packages.el index f1ef7d809..3070cc9fb 100644 --- a/modules/ui/ophints/packages.el +++ b/modules/ui/ophints/packages.el @@ -2,5 +2,5 @@ ;;; ui/ophints/packages.el (if (featurep! :editor evil) - (package! evil-goggles) - (package! volatile-highlights)) + (package! evil-goggles :pin "08a22058fd6a167f9f1b684c649008caef571459") + (package! volatile-highlights :pin "9a20091f0ce7fc0a6b3e641a6a46d5f3ac4d8392")) diff --git a/modules/ui/tabs/packages.el b/modules/ui/tabs/packages.el index 1bec6d791..0cabf5fc0 100644 --- a/modules/ui/tabs/packages.el +++ b/modules/ui/tabs/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/tabs/packages.el -(package! centaur-tabs) +(package! centaur-tabs :pin "9b2ae1ace8c0d4ad1fa90047105793274baa1d48") diff --git a/modules/ui/treemacs/packages.el b/modules/ui/treemacs/packages.el index 61553daa3..f638ecce0 100644 --- a/modules/ui/treemacs/packages.el +++ b/modules/ui/treemacs/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/treemacs/packages.el -(package! treemacs) +(package! treemacs :pin "d539f7bfa0cf97383a3e15688d904c14d4d94aa9") (when (featurep! :editor evil +everywhere) - (package! treemacs-evil)) + (package! treemacs-evil :pin "d539f7bfa0cf97383a3e15688d904c14d4d94aa9")) (package! treemacs-projectile) (when (featurep! :tools magit) - (package! treemacs-magit)) + (package! treemacs-magit :pin "d539f7bfa0cf97383a3e15688d904c14d4d94aa9")) (when (featurep! :ui workspaces) - (package! treemacs-persp)) + (package! treemacs-persp :pin "d539f7bfa0cf97383a3e15688d904c14d4d94aa9")) diff --git a/modules/ui/unicode/packages.el b/modules/ui/unicode/packages.el index 987993990..cafa4ae2e 100644 --- a/modules/ui/unicode/packages.el +++ b/modules/ui/unicode/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/unicode/packages.el -(package! unicode-fonts) +(package! unicode-fonts :pin "7b88ae84e589f6c8b9386b2fb5a02ff4ccb91169") diff --git a/modules/ui/vc-gutter/packages.el b/modules/ui/vc-gutter/packages.el index a12b41b8f..3aad609f9 100644 --- a/modules/ui/vc-gutter/packages.el +++ b/modules/ui/vc-gutter/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/vc-gutter/packages.el -(package! git-gutter-fringe) +(package! git-gutter-fringe :pin "16226caab44174301f1659f7bf8cc67a76153445") diff --git a/modules/ui/vi-tilde-fringe/packages.el b/modules/ui/vi-tilde-fringe/packages.el index 10b52d811..36b4004e8 100644 --- a/modules/ui/vi-tilde-fringe/packages.el +++ b/modules/ui/vi-tilde-fringe/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/vi-tilde-fringe/packages.el -(package! vi-tilde-fringe) +(package! vi-tilde-fringe :pin "f1597a8d54535bb1d84b442577b2024e6f910308") diff --git a/modules/ui/window-select/packages.el b/modules/ui/window-select/packages.el index aa9659347..76c855802 100644 --- a/modules/ui/window-select/packages.el +++ b/modules/ui/window-select/packages.el @@ -2,8 +2,8 @@ ;;; ui/window-select/packages.el (if (featurep! +switch-window) - (package! switch-window) - (package! ace-window)) + (package! switch-window :pin "204f9fc1a39868a2d16ab9370a142c8c9c7a0943") + (package! ace-window :pin "edbbb1b77c3fb939e4d9057443bc1897321d0095")) (when (featurep! +numbers) - (package! winum)) + (package! winum :pin "c5455e866e8a5f7eab6a7263e2057aff5f1118b9")) diff --git a/modules/ui/workspaces/packages.el b/modules/ui/workspaces/packages.el index 9b9cb3ffe..3defd308f 100644 --- a/modules/ui/workspaces/packages.el +++ b/modules/ui/workspaces/packages.el @@ -1,5 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/workspaces/packages.el -(package! persp-mode) - +(package! persp-mode :pin "e330e6240bbb82589077f30472b05b95d1ff430d") diff --git a/modules/ui/zen/packages.el b/modules/ui/zen/packages.el index 5088eac0a..d0f4a073c 100644 --- a/modules/ui/zen/packages.el +++ b/modules/ui/zen/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/zen/packages.el -(package! writeroom-mode) -(package! mixed-pitch) +(package! writeroom-mode :pin "fa17eb651102502f60086d62784f1dae15c0630d") +(package! mixed-pitch :pin "fbc566ace3ed7508dab6bec90ba185f21c829aab") From dc4df47842df9e90f9c9aebf8b4f77ff666fd15e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 14 Jan 2020 22:47:38 -0500 Subject: [PATCH 639/983] Don't fetch/checkout packages that are up-to-date --- core/cli/packages.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 625ab25ad..54cd996cb 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -156,6 +156,11 @@ declaration) or dependency thereof that hasn't already been." (let ((commit (straight-vc-get-commit type local-repo)) (newcommit (cdr (assoc (or local-repo package) versions-alist))) fetch-p) + (when (and (stringp newcommit) + (string-match-p (concat "^" (regexp-quote newcommit)) commit)) + (print! (start "\033[K(%d/%d) %s is up-to-date...\033[1A") + i total package) + (throw 'skip t)) (unless (or (and (stringp newcommit) (straight-vc-commit-present-p recipe newcommit) (print! (start "\033[K(%d/%d) Checking out %s (%s)...\033[1A") @@ -168,7 +173,7 @@ declaration) or dependency thereof that hasn't already been." i total (or local-repo package)) (throw 'skip t)) (let ((output (straight--process-get-output))) - (if newcommit + (if (and (stringp newcommit) (straight-vc-commit-present-p recipe newcommit)) (straight-vc-check-out-commit recipe newcommit) (straight-merge-package package) (setq newcommit (straight-vc-get-commit type local-repo))) From 4b2a9c8c38f547aec118c5439b6ebd5f153ed7ed Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 14 Jan 2020 23:05:17 -0500 Subject: [PATCH 640/983] Polish unpin! user story and docstring --- core/core-packages.el | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index 7802ab1fc..e683766b5 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -306,21 +306,24 @@ Only use this macro in a module's (or your private) packages.el file." (defmacro unpin! (&rest targets) "Unpin packages in TARGETS. -Elements in TARGETS can be package names (symbols), a list consisting of -(CATEGORY MODULE) where MODULE is optional, or the boolean `t'. -Each package in this list is unpinned, which means its latest version will be -installed next time you run 'doom upgrade'. If you specify a (CATEGORY), all -packages in all modules in that category will be unpinned. If you specify -(CATEGORY MODULE), only packages in that particular module will be unpinned. +This unpins packages, so that 'doom upgrade' downloads their latest version. It +can be used one of five ways: -Lastly, a value of `t' means unpin all packages." ++ To disable pinning wholesale: (unpin! t) ++ To unpin individual packages: (unpin! packageA packageB ...) ++ To unpin all packages in a group of modules: (unpin! :lang :tools ...) ++ To unpin packages in individual modules: + (unpin! (:lang python) (:tools docker)) + +Or any combination of the above." (dolist (target targets) (cond ((eq target t) (setq doom-pinned-packages nil)) - ((listp target) - (cl-destructuring-bind (category &optional module) target + ((or (keywordp target) + (listp target)) + (cl-destructuring-bind (category &optional module) (doom-enlist target) (dolist (pkg doom-packages) (when-let (mod (assq category (plist-get (cdr pkg) :modules))) (and (or (null module) From 835f3f2c533b425ef25a5525b405b3e683e9d909 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 15 Jan 2020 00:31:12 -0500 Subject: [PATCH 641/983] Eval unpin! logic at runtime --- core/core-packages.el | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index e683766b5..89bd630ad 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -317,20 +317,20 @@ can be used one of five ways: (unpin! (:lang python) (:tools docker)) Or any combination of the above." - (dolist (target targets) - (cond - ((eq target t) - (setq doom-pinned-packages nil)) - ((or (keywordp target) - (listp target)) - (cl-destructuring-bind (category &optional module) (doom-enlist target) - (dolist (pkg doom-packages) - (when-let (mod (assq category (plist-get (cdr pkg) :modules))) - (and (or (null module) - (eq (cdr mod) module)) - (assq-delete-all (car pkg) doom-pinned-packages)))))) - ((symbolp target) - (assq-delete-all target doom-pinned-packages))))) + `(dolist (target ',targets) + (cond + ((eq target t) + (setq doom-pinned-packages nil)) + ((or (keywordp target) + (listp target)) + (cl-destructuring-bind (category &optional module) (doom-enlist target) + (dolist (pkg doom-packages) + (when-let (mod (assq category (plist-get (cdr pkg) :modules))) + (and (or (null module) + (eq (cdr mod) module)) + (assq-delete-all (car pkg) doom-pinned-packages)))))) + ((symbolp target) + (assq-delete-all target doom-pinned-packages))))) (provide 'core-packages) ;;; core-packages.el ends here From d866592beb03beddb55f7aa890408185b7661256 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 15 Jan 2020 00:45:43 -0500 Subject: [PATCH 642/983] Fix unpin! with variadic module lists --- core/core-packages.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index 89bd630ad..29647426c 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -314,7 +314,7 @@ can be used one of five ways: + To unpin individual packages: (unpin! packageA packageB ...) + To unpin all packages in a group of modules: (unpin! :lang :tools ...) + To unpin packages in individual modules: - (unpin! (:lang python) (:tools docker)) + (unpin! (:lang python javascript) (:tools docker)) Or any combination of the above." `(dolist (target ',targets) @@ -323,11 +323,14 @@ Or any combination of the above." (setq doom-pinned-packages nil)) ((or (keywordp target) (listp target)) - (cl-destructuring-bind (category &optional module) (doom-enlist target) + (cl-destructuring-bind (category . modules) (doom-enlist target) (dolist (pkg doom-packages) - (when-let (mod (assq category (plist-get (cdr pkg) :modules))) - (and (or (null module) - (eq (cdr mod) module)) + (let ((pkg-modules (plist-get (cdr pkg) :modules))) + (and (assq category pkg-modules) + (or (null modules) + (cl-loop for module in modules + if (member (cons category module) pkg-modules) + return t)) (assq-delete-all (car pkg) doom-pinned-packages)))))) ((symbolp target) (assq-delete-all target doom-pinned-packages))))) From 2fd7ede0d87a4336f04c72b5af98dba6685f9377 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 15 Jan 2020 00:48:57 -0500 Subject: [PATCH 643/983] Emit error on update-pinned-package if not in a package! call --- core/autoload/packages.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/autoload/packages.el b/core/autoload/packages.el index 0743e29d9..337e49dba 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -211,9 +211,11 @@ Grabs the latest commit id of the package using 'git'." ;; REVIEW Better error handling ;; TODO Insert a new `package!' if no `package!' at poin (ignore-errors - (while (atom (sexp-at-point)) + (while (and (atom (sexp-at-point)) + (not (bolp))) (forward-sexp -1))) - (when (eq (sexp-at-point) 'package!) + (if (not (eq (sexp-at-point) 'package!)) + (user-error "Not on a `package!' call") (backward-char) (let* ((recipe (cdr (sexp-at-point))) (name (car recipe)) From fee7a645c005b7f384fb0ea03ca453c97eceafa9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 15 Jan 2020 00:50:27 -0500 Subject: [PATCH 644/983] Inherit from pre-existing recipe when updating :pin --- core/autoload/packages.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/autoload/packages.el b/core/autoload/packages.el index 337e49dba..35f275a61 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -210,6 +210,7 @@ Grabs the latest commit id of the package using 'git'." (interactive) ;; REVIEW Better error handling ;; TODO Insert a new `package!' if no `package!' at poin + (require 'straight) (ignore-errors (while (and (atom (sexp-at-point)) (not (bolp))) @@ -223,8 +224,10 @@ Grabs the latest commit id of the package using 'git'." (cdr (doom-call-process "git" "ls-remote" (straight-vc-git--destructure - (doom-plist-merge (plist-get (cdr recipe) :recipe) - (cdr (straight-recipes-retrieve name))) + (doom-plist-merge + (plist-get (cdr recipe) :recipe) + (or (cdr (straight-recipes-retrieve name)) + (plist-get (cdr (assq name doom-packages)) :recipe))) (upstream-repo upstream-host) (straight-vc-git--encode-url upstream-repo upstream-host)))))) (unless id From e65b5af709e87faf8db4e8250d5e843a6a16ddd5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 15 Jan 2020 02:04:14 -0500 Subject: [PATCH 645/983] Strip nils from exec-path parse-colon-path will replace some paths with a nil, so we use split-string instead with a non-nil OMIT-NULLS argument instead. --- core/core.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core.el b/core/core.el index 8dda3010f..95fa17048 100644 --- a/core/core.el +++ b/core/core.el @@ -451,7 +451,7 @@ unreadable. Returns the names of envvars that were changed." (append (nreverse environment) process-environment) exec-path (if (member "PATH" envvars) - (append (parse-colon-path (getenv "PATH")) + (append (split-string (getenv "PATH") path-separator t) (list exec-directory)) exec-path) shell-file-name From 12ebc58f2e705917c03378dcf04f48ab50f6ab3d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 15 Jan 2020 02:20:46 -0500 Subject: [PATCH 646/983] Suppress so-long in soft-wrapped text-mode buffers --- core/core-editor.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index a6a64cc4b..81cc7ae10 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -513,12 +513,15 @@ files, so we replace calls to `pp' with the much faster `prin1'." undo-tree-mode highlight-indent-guides-mode hl-fill-column-mode)) - ;; HACK Fix #2183: `so-long-detected-long-line-p' tries to parse comment - ;; syntax, but in some buffers comment state isn't initialized, leading - ;; to a wrong-type-argument: stringp error. (defun doom-buffer-has-long-lines-p () + ;; HACK Fix #2183: `so-long-detected-long-line-p' tries to parse comment + ;; syntax, but in some buffers comment state isn't initialized, leading + ;; to a wrong-type-argument: stringp error. (let ((so-long-skip-leading-comments (bound-and-true-p comment-use-syntax))) - (so-long-detected-long-line-p))) + ;; HACK If visual-line-mode is on in a text-mode, then long lines are + ;; normal and can be ignored. + (unless (and visual-line-mode (derived-mode-p 'text-mode)) + (so-long-detected-long-line-p)))) (setq so-long-predicate #'doom-buffer-has-long-lines-p)) From 453e20534ff80ea29af77ab7226529399e7c939a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 15 Jan 2020 11:16:18 -0500 Subject: [PATCH 647/983] Temporarily disable pinning #2373 I'm swamped today and tomorrow so this will have to do for now --- core/cli/packages.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 54cd996cb..9550c015d 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -69,7 +69,7 @@ declaration) or dependency thereof that hasn't already been." (straight--transaction-finalize) (print! (start "Installing & building packages...")) (print-group! - (let ((versions-alist doom-pinned-packages) + (let ((versions-alist nil) ; FIXME (n 0)) (dolist (recipe (hash-table-values straight--recipe-cache)) (straight--with-plist recipe @@ -78,10 +78,10 @@ declaration) or dependency thereof that hasn't already been." (condition-case-unless-debug e (and (straight-use-package (intern package)) (not existed-p) - (file-directory-p (straight--repos-dir package)) + (file-directory-p (straight--repos-dir (or local-repo package))) (if-let (commit (cdr (assoc (or local-repo package) versions-alist))) (progn - (print! "Checking out %s commit %s" + (print! (start "Checking out %s commit %s") package (substring commit 0 7)) (unless (straight-vc-commit-present-p recipe commit) (straight-vc-fetch-from-remote recipe)) @@ -136,7 +136,7 @@ declaration) or dependency thereof that hasn't already been." (let ((straight--repos-dir (straight--repos-dir)) (straight--packages-to-rebuild (make-hash-table :test #'equal)) (total (hash-table-count straight--repo-cache)) - (versions-alist doom-pinned-packages) + (versions-alist nil) ; FIXME (i 1) errors) ;; TODO Log this somewhere? From 75ad749e109e90fce11fa97c945186089bdf142a Mon Sep 17 00:00:00 2001 From: Ian McCowan Date: Wed, 15 Jan 2020 10:07:49 -0800 Subject: [PATCH 648/983] Check whether rbenv is enabled before complaining --- modules/lang/ruby/doctor.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/ruby/doctor.el b/modules/lang/ruby/doctor.el index fa495022e..26ff01d61 100644 --- a/modules/lang/ruby/doctor.el +++ b/modules/lang/ruby/doctor.el @@ -7,6 +7,6 @@ (unless (executable-find "ruby") (warn! "Ruby isn't installed.")) -(when (executable-find "rbenv") +(when (and (executable-find "rbenv") (featurep! +rbenv)) (unless (split-string (shell-command-to-string "rbenv versions --bare") "\n" t) (warn! "No versions of ruby are available via rbenv, did you forget to install one?"))) From be1e4015d5f50669e8baa2f572b2404415e6311c Mon Sep 17 00:00:00 2001 From: Tianshuo Su Date: Thu, 16 Jan 2020 21:23:35 -0800 Subject: [PATCH 649/983] Fix broken MacOS irony-mode building command. Found same issue described here: https://www.reddit.com/r/emacs/comments/d0kxj4/ironymode_installing_server_help/ --- modules/lang/cc/README.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/lang/cc/README.org b/modules/lang/cc/README.org index ce27d8100..666f25f5d 100644 --- a/modules/lang/cc/README.org +++ b/modules/lang/cc/README.org @@ -76,7 +76,8 @@ mkdir irony-mode/server/build pushd irony-mode/server/build DEST="$HOME/.emacs.d/.local/etc/irony-server/" -cmake -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \ +cmake -DCMAKE_PREFIX_PATH=/usr/local/opt/llvm \ + -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \ -DCMAKE_INSTALL_PREFIX="$DEST" ../ cmake --build . --use-stderr --config Release --target install From bee7798a502499e27eff824c4cc18accf7efdc2e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 18 Jan 2020 20:34:18 -0500 Subject: [PATCH 650/983] Fix default encryption recipient detection --- modules/config/default/config.el | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index afca873d8..bca8cf43c 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -29,16 +29,23 @@ (after! epa - (setq epa-file-encrypt-to - (or epa-file-encrypt-to - ;; Collect all public key IDs with your username - (unless (string-empty-p user-full-name) - (cl-loop for key in (ignore-errors (epg-list-keys (epg-make-context) user-full-name)) - collect (epg-sub-key-id (car (epg-key-sub-key-list key))))) - user-mail-address) - ;; With GPG 2.1, this forces gpg-agent to use the Emacs minibuffer to - ;; prompt for the key passphrase. - epa-pinentry-mode 'loopback)) + ;; With GPG 2.1+, this forces gpg-agent to use the Emacs minibuffer to prompt + ;; for the key passphrase. + (setq epa-pinentry-mode 'loopback) + ;; Default to the first secret key available in your keyring. + (setq-default + epa-file-encrypt-to + (or (default-value 'epa-file-encrypt-to) + (unless (string-empty-p user-full-name) + (cl-loop for key in (ignore-errors (epg-list-keys (epg-make-context) user-full-name)) + collect (epg-sub-key-id (car (epg-key-sub-key-list key))))) + user-mail-address)) + ;; And suppress prompts if epa-file-encrypt-to has a default value (without + ;; overwriting file-local values). + (defadvice! +default--dont-prompt-for-keys-a (&rest _) + :before #'epa-file-write-region + (unless (local-variable-p 'epa-file-encrypt-to) + (setq-local epa-file-encrypt-to (default-value 'epa-file-encrypt-to))))) (use-package! drag-stuff From 8c96e3f78c61273aa1939454f7775ae2a96a504b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 18 Jan 2020 20:34:37 -0500 Subject: [PATCH 651/983] Polish org +journal submodule Fix journal files not opening in org-journal-mode. --- modules/lang/org/contrib/journal.el | 41 +++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/modules/lang/org/contrib/journal.el b/modules/lang/org/contrib/journal.el index f7bc10502..92eff58af 100644 --- a/modules/lang/org/contrib/journal.el +++ b/modules/lang/org/contrib/journal.el @@ -1,16 +1,41 @@ ;;; lang/org/contrib/journal.el -*- lexical-binding: t; -*- ;;;###if (featurep! +journal) +;; HACK org-journal does some file-path magic at load time that creates +;; duplicate `auto-mode-alist' entries, so we suppress it for now, so we +;; can do it properly later. +(advice-add #'org-journal-update-auto-mode-alist :override #'ignore) + (after! org-journal (setq org-journal-dir (expand-file-name "journal/" org-directory) - org-journal-file-pattern - (expand-file-name "\\(?1:[0-9]\\{4\\}\\)\\(?2:[0-9][0-9]\\)\\(?3:[0-9][0-9]\\)\\'" - org-journal-dir)) + org-journal-cache-file (concat doom-cache-dir "org-journal") + org-journal-file-pattern (org-journal-dir-and-format->regex + org-journal-dir org-journal-file-format)) - (map! :localleader + (add-to-list 'auto-mode-alist (cons org-journal-file-pattern 'org-journal-mode)) + + (map! (:map org-journal-mode-map + :n "]f" #'org-journal-open-next-entry + :n "[f" #'org-journal-open-previous-entry + :n "C-n" #'org-journal-open-next-entry + :n "C-p" #'org-journal-open-previous-entry) + (:map org-journal-search-mode-map + "C-n" #'org-journal-search-next + "C-p" #'org-journal-search-previous) + + :localleader + (:map org-journal-mode-map + "c" #'org-journal-new-entry + "d" #'org-journal-new-date-entry + "n" #'org-journal-open-next-entry + "p" #'org-journal-open-previous-entry + (:prefix "s" + "s" #'org-journal-search + "f" #'org-journal-search-forever + "F" #'org-journal-search-future + "w" #'org-journal-search-calendar-week + "m" #'org-journal-search-calendar-month + "y" #'org-journal-search-calendar-year)) (:map org-journal-search-mode-map "n" #'org-journal-search-next - "p" #'org-journal-search-prev) - (:map org-journal-mode-map - "n" #'org-journal-open-next-entry - "p" #'org-journal-open-previous-entry))) + "p" #'org-journal-search-prev))) From 37f15008e79f24c16333d83e36801798b1e27c75 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 18 Jan 2020 20:51:41 -0500 Subject: [PATCH 652/983] Polish deft config & add evil keybinds --- modules/ui/deft/config.el | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/modules/ui/deft/config.el b/modules/ui/deft/config.el index a84a0a6f0..18cbcc79c 100644 --- a/modules/ui/deft/config.el +++ b/modules/ui/deft/config.el @@ -3,21 +3,33 @@ (use-package! deft :commands deft :init - (setq deft-extensions '("org" "md" "tex" "txt") - deft-default-extension "org" + (setq deft-default-extension "org" ;; de-couples filename and note title: deft-use-filename-as-title nil deft-use-filter-string-for-filename t - deft-org-mode-title-prefix t ;; converts the filter string into a readable file-name using kebab-case: deft-file-naming-rules - '((noslash . "-") - (nospace . "-") - (case-fn . downcase))) + '((noslash . "-") + (nospace . "-") + (case-fn . downcase))) :config + (add-to-list 'deft-extensions "tex") + (add-hook 'deft-mode-hook #'doom-mark-buffer-as-real-h) ;; start filtering immediately (set-evil-initial-state! 'deft-mode 'insert) (map! :map deft-mode-map + :n "gr" #'deft-refresh + :n "C-s" #'deft-filter + :i "C-n" #'deft-new-file + :i "C-m" #'deft-new-file-named + :i "C-d" #'deft-delete-file + :i "C-r" #'deft-rename-file + :n "r" #'deft-rename-file + :n "a" #'deft-new-file + :n "A" #'deft-new-file-named + :n "d" #'deft-delete-file + :n "D" #'deft-archive-file + :n "q" #'kill-current-buffer :localleader "RET" #'deft-new-file-named "a" #'deft-archive-file From 4eec1141c1e12200f2baa12fbb47b0b722907ec0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 18 Jan 2020 22:02:17 -0500 Subject: [PATCH 653/983] Ensure anaconda-mode attempts to activate after lsp --- modules/lang/python/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/python/config.el b/modules/lang/python/config.el index f7cf2d73e..63a833029 100644 --- a/modules/lang/python/config.el +++ b/modules/lang/python/config.el @@ -93,7 +93,7 @@ called.") (setq anaconda-mode-installation-directory (concat doom-etc-dir "anaconda/") anaconda-mode-eldoc-as-single-line t) - (add-hook! 'python-mode-local-vars-hook + (add-hook! 'python-mode-local-vars-hook :append (defun +python-init-anaconda-mode-maybe-h () "Enable `anaconda-mode' if `lsp-mode' is absent and `python-shell-interpreter' is present." From bf85a03f5e288679d9c88b0c78150f0762a06cf3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 20 Jan 2020 01:52:21 -0500 Subject: [PATCH 654/983] Don't disable indent-guides in visual-line-mode --- modules/ui/indent-guides/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/indent-guides/config.el b/modules/ui/indent-guides/config.el index 214a90ff4..cd5cb5aeb 100644 --- a/modules/ui/indent-guides/config.el +++ b/modules/ui/indent-guides/config.el @@ -7,7 +7,7 @@ :config (add-hook 'focus-in-hook #'highlight-indent-guides-auto-set-faces) ;; `highlight-indent-guides' breaks in these modes - (add-hook! '(visual-line-mode-hook org-indent-mode-hook) + (add-hook! 'org-indent-mode-hook (defun +indent-guides-disable-maybe-h () (when highlight-indent-guides-mode (highlight-indent-guides-mode -1))))) From dc2b9781ab63f0f0767726136c12d0e7fa053f84 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 20 Jan 2020 01:54:11 -0500 Subject: [PATCH 655/983] Minor refactors & reformatting --- core/core-ui.el | 33 +++++++++++++++--------------- core/core.el | 3 +-- modules/checkers/grammar/config.el | 3 ++- modules/ui/neotree/config.el | 3 ++- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index 26f9b9d70..b76981a04 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -544,22 +544,23 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.") (defun doom-init-fonts-h () "Loads `doom-font'." - (cond (doom-font - (cl-pushnew - ;; Avoiding `set-frame-font' because it does a lot of extra, expensive - ;; work we can avoid by setting the font frame parameter instead. - (cons 'font - (cond ((stringp doom-font) doom-font) - ((fontp doom-font) (font-xlfd-name doom-font)) - ((signal 'wrong-type-argument (list '(fontp stringp) - doom-font))))) - default-frame-alist - :key #'car :test #'eq)) - ((display-graphic-p) - ;; We try our best to record your system font, so `doom-big-font-mode' - ;; can still use it to compute a larger font size with. - (setq font-use-system-font t - doom-font (face-attribute 'default :font))))) + (cond + (doom-font + (cl-pushnew + ;; Avoiding `set-frame-font' because it does a lot of extra, expensive + ;; work we can avoid by setting the font frame parameter instead. + (cons 'font + (cond ((stringp doom-font) doom-font) + ((fontp doom-font) (font-xlfd-name doom-font)) + ((signal 'wrong-type-argument (list '(fontp stringp) + doom-font))))) + default-frame-alist + :key #'car :test #'eq)) + ((display-graphic-p) + ;; We try our best to record your system font, so `doom-big-font-mode' + ;; can still use it to compute a larger font size with. + (setq font-use-system-font t + doom-font (face-attribute 'default :font))))) (defun doom-init-extra-fonts-h (&optional frame) "Loads `doom-variable-pitch-font',`doom-serif-font' and `doom-unicode-font'." diff --git a/core/core.el b/core/core.el index 95fa17048..ca1da38f1 100644 --- a/core/core.el +++ b/core/core.el @@ -456,8 +456,7 @@ unreadable. Returns the names of envvars that were changed." exec-path) shell-file-name (if (member "SHELL" envvars) - (setq shell-file-name - (or (getenv "SHELL") shell-file-name)) + (or (getenv "SHELL") shell-file-name) shell-file-name)) envvars)))) diff --git a/modules/checkers/grammar/config.el b/modules/checkers/grammar/config.el index 830854261..581f207c0 100644 --- a/modules/checkers/grammar/config.el +++ b/modules/checkers/grammar/config.el @@ -18,7 +18,8 @@ "/usr/share/java/languagetool/languagetool-commandline.jar"))))) -;; Detects weasel words, passive voice and duplicates +;; Detects weasel words, passive voice and duplicates. Proselint would be a +;; better choice. (use-package! writegood-mode :hook (org-mode markdown-mode rst-mode asciidoc-mode latex-mode) :config diff --git a/modules/ui/neotree/config.el b/modules/ui/neotree/config.el index af3e2d16c..6d140a672 100644 --- a/modules/ui/neotree/config.el +++ b/modules/ui/neotree/config.el @@ -8,7 +8,7 @@ neotree-find neo-global--with-buffer neo-global--window-exists-p) - :config + :init (setq neo-create-file-auto-open nil neo-auto-indent-point nil neo-autorefresh nil @@ -35,6 +35,7 @@ "~$" "^#.*#$")) + :config (set-popup-rule! "^ ?\\*NeoTree" :ignore t) (after! winner From 522c532893f7d0016dd44befef6eab1068afbcca Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 20 Jan 2020 05:41:42 -0500 Subject: [PATCH 656/983] Correct add-hook!'s docstring --- core/core-lib.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index 53c3cdced..c00642c49 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -217,13 +217,14 @@ If N and M = 1, there's no benefit to using this macro over `add-hook'. This macro accepts, in order: - 1. Optional properties :local and/or :append, which will make the hook + 1. The mode(s) or hook(s) to add to. This is either an unquoted mode, an + unquoted list of modes, a quoted hook variable or a quoted list of hook + variables. + 2. Optional properties :local and/or :append, which will make the hook buffer-local or append to the list of hooks (respectively), - 2. The hook(s) to be added to: either an unquoted mode, an unquoted list of - modes, a quoted hook variable or a quoted list of hook variables. If - unquoted, '-hook' will be appended to each symbol. - 3. The function(s) to be added: this can be one function, a list thereof, a - list of `defun's, or body forms (implicitly wrapped in a closure). + 3. The function(s) to be added: this can be one function, a quoted list + thereof, a list of `defun's, or body forms (implicitly wrapped in a + lambda). \(fn HOOKS [:append :local] FUNCTIONS)" (declare (indent (lambda (indent-point state) From 2e82f297f6ced1b8161714861a4b1e35fac0376d Mon Sep 17 00:00:00 2001 From: Janfel <33464477+Janfel@users.noreply.github.com> Date: Sun, 19 Jan 2020 02:50:44 +0100 Subject: [PATCH 657/983] Fix #2036: Copy local variables into formatting buffer. Make +format-buffer copy all buffer-local variables from the original buffer into the temporary buffer. When resolving a symbol inside of a formatter, the value it is bound to in the formatted buffer will now be used instead of the default value. Fixes #2036. --- modules/editor/format/autoload/format.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/editor/format/autoload/format.el b/modules/editor/format/autoload/format.el index 49345bf5c..77eb0c24c 100644 --- a/modules/editor/format/autoload/format.el +++ b/modules/editor/format/autoload/format.el @@ -131,6 +131,7 @@ See `+format/buffer' for the interactive version of this function, and ;; like `gofmt') widen the buffer, in order to only format a region of ;; text, we must make a copy of the buffer to apply formatting to. (let ((output (buffer-substring-no-properties (point-min) (point-max))) + (origin-buffer (or (buffer-base-buffer) (current-buffer))) (origin-buffer-file-name (buffer-file-name (buffer-base-buffer))) (origin-default-directory default-directory)) (with-temp-buffer @@ -138,8 +139,12 @@ See `+format/buffer' for the interactive version of this function, and (insert output) ;; Ensure this temp buffer _seems_ as much like the origin ;; buffer as possible. - (setq default-directory origin-default-directory - buffer-file-name origin-buffer-file-name) + (cl-loop for (var . val) in (buffer-local-variables origin-buffer) + ;; Making enable-multibyte-characters buffer-local + ;; causes an error. + unless (eq var 'enable-multibyte-characters) + ;; Using setq-local would quote var. + do (set (make-local-variable var) val)) ;; Since we're piping a region of text to the formatter, remove ;; any leading indentation to make it look like a file. (when preserve-indent-p From e34b5decc63158c8d7d54fb545ae446cdf6f262b Mon Sep 17 00:00:00 2001 From: Janfel <33464477+Janfel@users.noreply.github.com> Date: Sun, 19 Jan 2020 03:02:04 +0100 Subject: [PATCH 658/983] Remove unused local bindings Remove the let-clauses binding origin-buffer-file-name and origin-default-directory, as the previous commit renders them obsolete. --- modules/editor/format/autoload/format.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/editor/format/autoload/format.el b/modules/editor/format/autoload/format.el index 77eb0c24c..cdfb87c8e 100644 --- a/modules/editor/format/autoload/format.el +++ b/modules/editor/format/autoload/format.el @@ -131,9 +131,7 @@ See `+format/buffer' for the interactive version of this function, and ;; like `gofmt') widen the buffer, in order to only format a region of ;; text, we must make a copy of the buffer to apply formatting to. (let ((output (buffer-substring-no-properties (point-min) (point-max))) - (origin-buffer (or (buffer-base-buffer) (current-buffer))) - (origin-buffer-file-name (buffer-file-name (buffer-base-buffer))) - (origin-default-directory default-directory)) + (origin-buffer (or (buffer-base-buffer) (current-buffer)))) (with-temp-buffer (with-silent-modifications (insert output) From 2fe3268dc26b8f3f2a2874f7171033761c585531 Mon Sep 17 00:00:00 2001 From: Janfel <33464477+Janfel@users.noreply.github.com> Date: Mon, 20 Jan 2020 17:02:37 +0100 Subject: [PATCH 659/983] Fix cl-loop indentation. --- modules/editor/format/autoload/format.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/editor/format/autoload/format.el b/modules/editor/format/autoload/format.el index cdfb87c8e..5894a7781 100644 --- a/modules/editor/format/autoload/format.el +++ b/modules/editor/format/autoload/format.el @@ -138,11 +138,11 @@ See `+format/buffer' for the interactive version of this function, and ;; Ensure this temp buffer _seems_ as much like the origin ;; buffer as possible. (cl-loop for (var . val) in (buffer-local-variables origin-buffer) - ;; Making enable-multibyte-characters buffer-local - ;; causes an error. - unless (eq var 'enable-multibyte-characters) - ;; Using setq-local would quote var. - do (set (make-local-variable var) val)) + ;; Making enable-multibyte-characters buffer-local + ;; causes an error. + unless (eq var 'enable-multibyte-characters) + ;; Using setq-local would quote var. + do (set (make-local-variable var) val)) ;; Since we're piping a region of text to the formatter, remove ;; any leading indentation to make it look like a file. (when preserve-indent-p From e3187ca8ea7ed67f88a56067c715df93b1c1e60a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 20 Jan 2020 18:12:50 -0500 Subject: [PATCH 660/983] Don't fontify latex natively (use simple highlights) Native fontification is incredibly slow. --- modules/lang/org/config.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index a59cf789b..416c2d462 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -122,8 +122,8 @@ path too.") org-refile-use-outline-path 'file org-outline-path-complete-in-steps nil) - ;; Fontify latex blocks and entities natively - (setq org-highlight-latex-and-related '(native script entities)) + ;; Fontify latex blocks and entities, but not natively -- that's too slow + (setq org-highlight-latex-and-related '(latex script entities)) (plist-put! org-format-latex-options :scale 1.5 ; larger previews :foreground 'auto ; match the theme foreground From 5d155214407a2d818969d8cd86976e3da5de9244 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 20 Jan 2020 18:13:34 -0500 Subject: [PATCH 661/983] Remove org-fancy-priorities package Add unnecessary overhead for little gain. Let the user install it if they want it. --- modules/lang/org/config.el | 5 ----- modules/lang/org/packages.el | 1 - 2 files changed, 6 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 416c2d462..abed7ff69 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -800,11 +800,6 @@ compelling reason, so..." :hook (org-mode . org-bullets-mode)) -(use-package! org-fancy-priorities ; priority icons - :hook (org-mode . org-fancy-priorities-mode) - :config (setq org-fancy-priorities-list '("■" "■" "■"))) - - (use-package! org-crypt ; built-in :commands org-encrypt-entries :hook (org-reveal-start . org-decrypt-entry) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index cdbbd0163..031099894 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -32,7 +32,6 @@ (package! org-bullets :recipe (:host github :repo "Kaligule/org-bullets") :pin "8b4f0aab6d49b00faa779785b978fdb67e2eb066") -(package! org-fancy-priorities :pin "819bb993b71e7253cefef7047306ab4e0f9d0a86") (package! org-yt :recipe (:host github :repo "TobiasZawada/org-yt") :pin "40cc1ac76d741055cbefa13860d9f070a7ade001") From 1b779bf716489afe1d3592edaae436245381da85 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 20 Jan 2020 19:14:25 -0500 Subject: [PATCH 662/983] Fix evil ex fname modifiers consuming char just before #/% ':e test-%:t.el' in filename.el should open test-filename.el, but instead opened testfilename.el. --- modules/editor/evil/autoload/advice.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/editor/evil/autoload/advice.el b/modules/editor/evil/autoload/advice.el index d1aed1b1b..73a56f873 100644 --- a/modules/editor/evil/autoload/advice.el +++ b/modules/editor/evil/autoload/advice.el @@ -17,8 +17,8 @@ See http://vimdoc.sourceforge.net/htmldoc/cmdline.html#filename-modifiers for more information on modifiers." (let* (case-fold-search (regexp (concat "\\(?:^\\|[^\\\\]\\)" - "\\([#%]\\)" - "\\(\\(?::\\(?:[PphtreS~.]\\|g?s[^:\t\n ]+\\)\\)*\\)")) + "\\(\\([#%]\\)" + "\\(\\(?::\\(?:[PphtreS~.]\\|g?s[^:\t\n ]+\\)\\)*\\)\\)")) (matches (cl-loop with i = 0 while (and (< i (length file-name)) @@ -28,9 +28,9 @@ more information on modifiers." (cl-loop for j to (/ (length (match-data)) 2) collect (match-string j file-name))))) (dolist (match matches) - (let ((flags (split-string (car (cdr (cdr match))) ":" t)) + (let ((flags (split-string (cadddr match) ":" t)) (path (and buffer-file-name - (pcase (car (cdr match)) + (pcase (caddr match) ("%" (file-relative-name buffer-file-name)) ("#" (save-excursion (other-window 1) (file-relative-name buffer-file-name)))))) flag global) @@ -82,7 +82,7 @@ more information on modifiers." (setq file-name (replace-regexp-in-string (format "\\(?:^\\|[^\\\\]\\)\\(%s\\)" - (regexp-quote (string-trim-left (car match)))) + (regexp-quote (cadr match))) path file-name t t 1)))) (replace-regexp-in-string regexp "\\1" file-name t))) From e3ff1f25b4f3eeaa3385e7835af02d36ceb77011 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 20 Jan 2020 19:18:50 -0500 Subject: [PATCH 663/983] Update package list in org readme --- modules/lang/org/README.org | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/lang/org/README.org b/modules/lang/org/README.org index 4ae9b5682..ee27165e3 100644 --- a/modules/lang/org/README.org +++ b/modules/lang/org/README.org @@ -69,13 +69,16 @@ https://www.mfoot.com/blog/2015/11/22/literate-emacs-configuration-with-org-mode Emacs can be used for presentations. ** Plugins -+ [[https://orgmode.org/][org-plus-contrib]] -+ [[https://github.com/sabof/org-bullets][org-bullets]] -+ [[https://github.com/TobiasZawada/org-yt][org-yt]] -+ [[https://github.com/snosov1/toc-org][toc-org]] -+ [[https://github.com/jkitchin/ox-clip][ox-clip]] + [[https://github.com/hniksic/emacs-htmlize][htmlize]] + [[https://github.com/astahlman/ob-async][ob-async]] ++ [[https://github.com/alphapapa/org-bookmark-heading][org-bookmark-heading]] ++ [[https://github.com/sabof/org-bullets][org-bullets]] ++ [[https://github.com/rexim/org-cliplink][org-cliplink]] ++ [[https://github.com/magit/orgit][orgit]] ++ [[https://orgmode.org/][org-plus-contrib]] ++ [[https://github.com/TobiasZawada/org-yt][org-yt]] ++ [[https://github.com/jkitchin/ox-clip][ox-clip]] ++ [[https://github.com/snosov1/toc-org][toc-org]] + =:lang crystal= + [[https://github.com/brantou/ob-crystal][ob-crystal]] + =:lang go= From fb24a8deecf1b399466c994da4c7c16fc2de6dcb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 20 Jan 2020 19:20:34 -0500 Subject: [PATCH 664/983] Activate flyspell-mode in specific modes yaml-mode is derived from text-mode, rather than prog or conf-mode. This may be true for other major modes, so we must be more judicious about where we activate flyspell-mode. --- modules/checkers/spell/config.el | 13 +++++++++++-- modules/email/mu4e/config.el | 3 --- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/modules/checkers/spell/config.el b/modules/checkers/spell/config.el index b1a95e747..e0b3d7573 100644 --- a/modules/checkers/spell/config.el +++ b/modules/checkers/spell/config.el @@ -48,9 +48,18 @@ ;; messages for every word when checking the entire buffer flyspell-issue-message-flag nil) - (add-hook 'text-mode-hook #'flyspell-mode) + (add-hook! '(org-mode-hook + markdown-mode-hook + TeX-mode-hook + rst-mode-hook + mu4e-compose-mode-hook + message-mode-hook) + #'flyspell-mode) + (when (featurep! +everywhere) - (add-hook! '(conf-mode-hook prog-mode-hook) + (add-hook! '(yaml-mode-hook + conf-mode-hook + prog-mode-hook) #'flyspell-prog-mode)) (add-hook! 'flyspell-mode-hook diff --git a/modules/email/mu4e/config.el b/modules/email/mu4e/config.el index 3b980d191..17577014a 100644 --- a/modules/email/mu4e/config.el +++ b/modules/email/mu4e/config.el @@ -91,9 +91,6 @@ (defadvice! +mu4e--refresh-current-view-a (&rest _) :after #'mu4e-mark-execute-all (mu4e-headers-rerun-search)) - (when (featurep! :checkers spell) - (add-hook 'mu4e-compose-mode-hook #'flyspell-mode)) - ;; Wrap text in messages (setq-hook! 'mu4e-view-mode-hook truncate-lines nil) From d0b50da2c4e3ff6d35e56cf6281acd7aaa1f6dff Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 20 Jan 2020 19:30:22 -0500 Subject: [PATCH 665/983] Add elisp package file-template --- modules/editor/file-templates/config.el | 2 +- .../templates/emacs-lisp-mode/__initfile | 6 ----- .../templates/emacs-lisp-mode/__package | 25 +++++++++++++++++++ 3 files changed, 26 insertions(+), 7 deletions(-) delete mode 100644 modules/editor/file-templates/templates/emacs-lisp-mode/__initfile create mode 100644 modules/editor/file-templates/templates/emacs-lisp-mode/__package diff --git a/modules/editor/file-templates/config.el b/modules/editor/file-templates/config.el index 8f1e00d30..ca887163e 100644 --- a/modules/editor/file-templates/config.el +++ b/modules/editor/file-templates/config.el @@ -29,7 +29,7 @@ don't have a :trigger property in `+file-templates-alist'.") :trigger "__doom-module" :mode emacs-lisp-mode) ("-test\\.el$" :mode emacs-ert-mode) - (emacs-lisp-mode :trigger "__initfile") + (emacs-lisp-mode :trigger "__package") (snippet-mode) ;; C/C++ ("/main\\.c\\(?:c\\|pp\\)$" :trigger "__main.cpp" :mode c++-mode) diff --git a/modules/editor/file-templates/templates/emacs-lisp-mode/__initfile b/modules/editor/file-templates/templates/emacs-lisp-mode/__initfile deleted file mode 100644 index 23a130181..000000000 --- a/modules/editor/file-templates/templates/emacs-lisp-mode/__initfile +++ /dev/null @@ -1,6 +0,0 @@ -;;; `(file-name-nondirectory buffer-file-name)`${1: --- ${2:description}} -*- lexical-binding: t; -*- - -$0 - -(provide '`(file-name-base buffer-file-name)`) -;;; `(file-name-nondirectory buffer-file-name)` ends here diff --git a/modules/editor/file-templates/templates/emacs-lisp-mode/__package b/modules/editor/file-templates/templates/emacs-lisp-mode/__package new file mode 100644 index 000000000..b040adbb6 --- /dev/null +++ b/modules/editor/file-templates/templates/emacs-lisp-mode/__package @@ -0,0 +1,25 @@ +;;; `(file-name-nondirectory buffer-file-name)`${1: --- ${2:description}} -*- lexical-binding: t; -*- +;; +;; Copyright (C) `(format-time-string "%Y")` `user-full-name` +;; +;; Author: `user-full-name` +;; Maintainer: `user-full-name` <`user-mail-address`> +;; Created: `(format-time-string "%B %d, %Y")` +;; Modified: `(format-time-string "%B %d, %Y")` +;; Version: 0.0.1 +;; Keywords: +;; Homepage: https://github.com/`user-login-name`/`(file-name-base buffer-file-name)` +;; Package-Requires: ((emacs `emacs-version`) (cl-lib "0.5")) +;; +;; This file is not part of GNU Emacs. +;; +;;; Commentary: +;; +;; $2 +;; +;;; Code: + +`%`$0 + +(provide '`(file-name-base buffer-file-name)`) +;;; `(file-name-nondirectory buffer-file-name)` ends here From 8a01ef9082d6ff22b95e5fd4aada9c58e6135684 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 20 Jan 2020 20:17:28 -0500 Subject: [PATCH 666/983] Fix #2394: load the correct evil-collection module --- modules/editor/evil/+everywhere.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/+everywhere.el b/modules/editor/evil/+everywhere.el index cc7dcd116..c519ea0f3 100644 --- a/modules/editor/evil/+everywhere.el +++ b/modules/editor/evil/+everywhere.el @@ -228,7 +228,7 @@ and complains if a module is loaded too early (during startup)." (add-transient-hook! 'emacs-lisp-mode (+evil-collection-init 'elisp-mode)) (add-transient-hook! 'occur-mode - (+evil-collection-init 'replace)) + (+evil-collection-init 'occur)) (evil-define-key* 'normal process-menu-mode-map "q" #'kill-current-buffer From 206d0d9d9233af9038a9d97130dbe19383bb3c10 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 20 Jan 2020 22:23:40 -0500 Subject: [PATCH 667/983] Prevent flycheck-correct if region/insert mode is active --- modules/checkers/spell/config.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/checkers/spell/config.el b/modules/checkers/spell/config.el index e0b3d7573..6c0fc604d 100644 --- a/modules/checkers/spell/config.el +++ b/modules/checkers/spell/config.el @@ -75,10 +75,15 @@ e.g. proselint and langtool." ;; used in their respective major modes. (add-hook 'flyspell-mode-hook #'+spell-init-flyspell-predicate-h) - (map! :map flyspell-mouse-map - "RET" #'flyspell-correct-at-point - [return] #'flyspell-correct-at-point - [mouse-1] #'flyspell-correct-at-point)) + (let ((flyspell-correct + (general-predicate-dispatch nil + (and (not (or mark-active (ignore-errors (evil-insert-state-p)))) + (memq 'flyspell-incorrect (face-at-point nil t))) + #'flyspell-correct-at-point))) + (map! :map flyspell-mouse-map + "RET" flyspell-correct + [return] flyspell-correct + [mouse-1] #'flyspell-correct-at-point))) (use-package! flyspell-correct From 73ad5ddc83939e0606b818147f9a355c57db76a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20M=C3=B8ller?= Date: Wed, 22 Jan 2020 12:06:02 +0100 Subject: [PATCH 668/983] Fixes #2397 --- modules/completion/helm/config.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/completion/helm/config.el b/modules/completion/helm/config.el index f92e982d6..9d744dd27 100644 --- a/modules/completion/helm/config.el +++ b/modules/completion/helm/config.el @@ -67,6 +67,9 @@ be negative.") helm-ff-lynx-style-map nil) (when (featurep! :editor evil +everywhere) + ;; If this is set to 'iconify-top-level then Emacs will be minimized upon + ;; helm completion. + (setq iconify-child-frame 'make-invisible) (setq helm-default-prompt-display-function #'+helm--set-prompt-display)) :init From dc8ad7896ab09ce071cbebcaacb867d1b42b818a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20M=C3=B8ller?= Date: Wed, 22 Jan 2020 12:06:29 +0100 Subject: [PATCH 669/983] Display header line in Helm posframe But only if helm-echo-input-in-header-line is set to true. --- modules/completion/helm/autoload/posframe.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/completion/helm/autoload/posframe.el b/modules/completion/helm/autoload/posframe.el index 25ac3fd09..2c64d5fa8 100644 --- a/modules/completion/helm/autoload/posframe.el +++ b/modules/completion/helm/autoload/posframe.el @@ -10,6 +10,9 @@ bottom, which is easier on the eyes on big displays." (truncate (/ (frame-pixel-height parent-frame) 2))))) +(when helm-echo-input-in-header-line + (add-hook 'helm-minibuffer-set-up-hook #'helm-hide-minibuffer-maybe)) + (defvar +helm--posframe-buffer nil) ;;;###autoload (defun +helm-posframe-display-fn (buffer &optional _resume) @@ -23,6 +26,7 @@ bottom, which is easier on the eyes on big displays." (setq +helm--posframe-buffer buffer) :position (point) :poshandler +helm-posframe-handler + :respect-header-line helm-echo-input-in-header-line :width (max (cl-typecase .width (integer .width) From f6dc8d02022f2e606219f5f8b31f91c07e939c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20M=C3=B8ller?= Date: Wed, 22 Jan 2020 12:19:56 +0100 Subject: [PATCH 670/983] Actually fix #2397 Added the setq to the wrong (when (featurep!)) initially. --- modules/completion/helm/config.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/completion/helm/config.el b/modules/completion/helm/config.el index 9d744dd27..60d238d80 100644 --- a/modules/completion/helm/config.el +++ b/modules/completion/helm/config.el @@ -67,13 +67,13 @@ be negative.") helm-ff-lynx-style-map nil) (when (featurep! :editor evil +everywhere) - ;; If this is set to 'iconify-top-level then Emacs will be minimized upon - ;; helm completion. - (setq iconify-child-frame 'make-invisible) (setq helm-default-prompt-display-function #'+helm--set-prompt-display)) :init (when (featurep! +childframe) + ;; If this is set to 'iconify-top-level then Emacs will be minimized upon + ;; helm completion. + (setq iconify-child-frame 'make-invisible) (setq helm-display-function #'+helm-posframe-display-fn)) (let ((fuzzy (featurep! +fuzzy))) From 964291bb3662ffb19ddc9150c2f4eb0ec05b3af1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 22 Jan 2020 18:36:37 -0500 Subject: [PATCH 671/983] Fix #2409: switch to org mirror --- modules/lang/org/packages.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index 031099894..538fc13cd 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -15,17 +15,18 @@ ;; hassle, so... (add-hook! 'straight-use-package-pre-build-functions (defun +org-fix-package-h (package &rest _) - (when (member package '("org" "org-plus-contrib")) - (with-temp-file (expand-file-name "org-version.el" (straight--repos-dir "org")) + (when (equal package "org-mode") + (with-temp-file (expand-file-name "org-version.el" (straight--repos-dir "org-mode")) (insert "(fset 'org-release (lambda () \"9.3\"))\n" "(fset 'org-git-version #'ignore)\n" "(provide 'org-version)\n"))))) -;; install cutting-edge version of org-mode -(package! org-plus-contrib :pin "0ac6a9e1fcb71415df5ce287d4658f6a601b3df3") +;; Install cutting-edge version of org-mode, and from a mirror, because +;; code.orgmode.org runs on a potato. +(package! org-mode :recipe (:host github :repo "emacs-straight/org-mode")) ;; ...And prevent other packages from pulling org; org-plus-contrib satisfies ;; the dependency already: https://github.com/raxod502/straight.el/issues/352 -(package! org :recipe (:local-repo nil) :pin "0ac6a9e1fcb71415df5ce287d4658f6a601b3df3") +(package! org :recipe (:local-repo nil)) (package! avy :pin "cf95ba9582121a1c2249e3c5efdc51acd566d190") (package! htmlize :pin "86f22f211e9230857197c42a9823d3f05381deed") From fd41b1b55218866dcf5413945b7505119d8ddef1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Jan 2020 00:56:58 -0500 Subject: [PATCH 672/983] Disable more customize* commands --- core/core-ui.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index b76981a04..032097401 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -646,9 +646,16 @@ startup (or theme switch) time, so long as `doom--prefer-theme-elc' is non-nil." ;;; Fixes/hacks ;; Doom doesn't support `customize' and it never will. It's a clumsy interface -;; for something that should be configured from only one place ($DOOMDIR), so we -;; disable them. -(put 'customize 'disabled "Doom doesn't support `customize', configure Emacs from $DOOMDIR/config.el instead") +;; that sets variables at a time where it can be easily and unpredictably +;; overwritten. Configure things from your $DOOMDIR instead. +(dolist (sym '(customize-option customize-browse customize-group customize-face + customize-rogue customize-saved customize-apropos + customize-changed customize-unsaved customize-variable + customize-set-value customize-customized customize-set-variable + customize-apropos-faces customize-save-variable + customize-apropos-groups customize-apropos-options + customize-changed-options customize-save-customized)) + (put sym 'disabled "Doom doesn't support `customize', configure Emacs from $DOOMDIR/config.el instead")) (put 'customize-themes 'disabled "Set `doom-theme' or use `load-theme' in $DOOMDIR/config.el instead") ;; Doesn't exist in terminal Emacs, so we define it to prevent void-function From 1e91c04c040867758f1172ee78e82f3c49499830 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Jan 2020 01:44:43 -0500 Subject: [PATCH 673/983] Fix #2408: wrong-number-of-args error on lsp-workspace-restart Due to a change to lsp--shutdown-workspace upstream. --- modules/tools/lsp/config.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/tools/lsp/config.el b/modules/tools/lsp/config.el index ab5a1817b..12c585ec2 100644 --- a/modules/tools/lsp/config.el +++ b/modules/tools/lsp/config.el @@ -36,14 +36,13 @@ This can be a single company backend or a list thereof. It can be anything :references 'lsp-find-references) (defvar +lsp--deferred-shutdown-timer nil) - (defadvice! +lsp-defer-server-shutdown-a (orig-fn) + (defadvice! +lsp-defer-server-shutdown-a (orig-fn &optional restart) "Defer server shutdown for a few seconds. This gives the user a chance to open other project files before the server is auto-killed (which is usually an expensive process)." :around #'lsp--shutdown-workspace (if (or lsp-keep-workspace-alive - (eq (lsp--workspace-shutdown-action lsp--cur-workspace) - 'restart)) + restart) (funcall orig-fn) (when (timerp +lsp--deferred-shutdown-timer) (cancel-timer +lsp--deferred-shutdown-timer)) From 1f04bc919fb35fd2373917d2a1cb8b1a49ad0ff0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Jan 2020 01:59:20 -0500 Subject: [PATCH 674/983] Fix #2401: erroneous git ref display in eshell prompt --- modules/term/eshell/autoload/prompts.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/term/eshell/autoload/prompts.el b/modules/term/eshell/autoload/prompts.el index 55e01fb62..0c1dd6a40 100644 --- a/modules/term/eshell/autoload/prompts.el +++ b/modules/term/eshell/autoload/prompts.el @@ -12,11 +12,16 @@ (defun +eshell--current-git-branch () + ;; TODO Refactor me (cl-destructuring-bind (status . output) - (doom-call-process "git" "name-rev" "--name-only" "HEAD") + (doom-call-process "git" "symbolic-ref" "-q" "--short" "HEAD") (if (equal status 0) (format " [%s]" output) - ""))) + (cl-destructuring-bind (status . output) + (doom-call-process "git" "describe" "--all" "--always" "HEAD") + (if (equal status 0) + (format " [%s]" output) + ""))))) ;;;###autoload (defun +eshell-default-prompt-fn () From a34cb1656a88056a3c5168bec480fcc632fd1ff6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Jan 2020 02:05:46 -0500 Subject: [PATCH 675/983] Fix #2393: remap org-set-tags-command to counsel-org-tag --- modules/completion/ivy/config.el | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index e7b22c477..5140a721e 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -173,26 +173,27 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." (define-key! [remap apropos] #'counsel-apropos [remap bookmark-jump] #'counsel-bookmark + [remap compile] #'+ivy/compile + [remap describe-bindings] #'counsel-descbinds [remap describe-face] #'counsel-faces [remap describe-function] #'counsel-describe-function [remap describe-variable] #'counsel-describe-variable - [remap describe-bindings] #'counsel-descbinds - [remap set-variable] #'counsel-set-variable + [remap evil-ex-registers] #'counsel-evil-registers + [remap evil-show-marks] #'counsel-mark-ring [remap execute-extended-command] #'counsel-M-x [remap find-file] #'counsel-find-file [remap find-library] #'counsel-find-library - [remap info-lookup-symbol] #'counsel-info-lookup-symbol [remap imenu] #'counsel-imenu - [remap recentf-open-files] #'counsel-recentf - [remap swiper] #'counsel-grep-or-swiper - [remap evil-ex-registers] #'counsel-evil-registers - [remap evil-show-marks] #'counsel-mark-ring - [remap yank-pop] #'counsel-yank-pop + [remap info-lookup-symbol] #'counsel-info-lookup-symbol [remap load-theme] #'counsel-load-theme [remap locate] #'counsel-locate + [remap org-set-tags-command] #'counsel-org-tag + [remap projectile-compile-project] #'+ivy/project-compile + [remap recentf-open-files] #'counsel-recentf + [remap set-variable] #'counsel-set-variable + [remap swiper] #'counsel-grep-or-swiper [remap unicode-chars-list-chars] #'counsel-unicode-char - [remap compile] #'+ivy/compile - [remap projectile-compile-project] #'+ivy/project-compile) + [remap yank-pop] #'counsel-yank-pop) :config (set-popup-rule! "^\\*ivy-occur" :size 0.35 :ttl 0 :quit nil) From 2c9715c5d15b15bfce68e3ed216f36c1070a0915 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Jan 2020 02:13:50 -0500 Subject: [PATCH 676/983] Fix #2398: missing dependency due to wrong branch --- modules/email/wanderlust/packages.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/email/wanderlust/packages.el b/modules/email/wanderlust/packages.el index 21a52d463..6f7eaccba 100644 --- a/modules/email/wanderlust/packages.el +++ b/modules/email/wanderlust/packages.el @@ -4,9 +4,7 @@ ;; HACK These are wanderlust's dependencies (wanderlust depends on semi, semi ;; depends on flim, flim on apel), but both flim and apel have non-standard ;; default branches, which straight cannot detect without our help. -(package! flim :recipe (:branch "flim-1_14-wl") - :pin "e4bd54fd7d335215b54f7ef27ed974c8cd68d472") -(package! apel :recipe (:branch "semi-1_14-wl") - :pin "d146ddbf8818e81d3577d5eee7825d377bec0c73") +(package! flim :recipe (:branch "flim-1_14-wl")) +(package! apel :recipe (:branch "apel-wl")) -(package! wanderlust :pin "7a919e422a48f5021576e68282703de430558879") +(package! wanderlust) From 0bc7fc1ab8f017ace940d86d0ec88e0bfc366e55 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Jan 2020 02:17:51 -0500 Subject: [PATCH 677/983] gcmh-high-cons-threshold = 16mb #2378 In an attempt to fix stuttering after long term interactive use. --- core/core.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core.el b/core/core.el index ca1da38f1..ade8cfefb 100644 --- a/core/core.el +++ b/core/core.el @@ -275,7 +275,8 @@ users).") (add-transient-hook! 'pre-command-hook (gcmh-mode +1)) (with-eval-after-load 'gcmh (setq gcmh-idle-delay 10 - gcmh-verbose doom-debug-mode) + gcmh-verbose doom-debug-mode + gcmh-high-cons-threshold 16777216) ; 16mb (add-hook 'focus-out-hook #'gcmh-idle-garbage-collect))) ;; HACK `tty-run-terminal-initialization' is *tremendously* slow for some From c503e890430021ea7543bd7433a441e39b901bfc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Jan 2020 04:15:26 -0500 Subject: [PATCH 678/983] Fix contrib libs not included with org-mode --- modules/lang/org/packages.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index 538fc13cd..cf1436955 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -17,13 +17,16 @@ (defun +org-fix-package-h (package &rest _) (when (equal package "org-mode") (with-temp-file (expand-file-name "org-version.el" (straight--repos-dir "org-mode")) - (insert "(fset 'org-release (lambda () \"9.3\"))\n" + (insert "(fset 'org-release (lambda () \"9.4\"))\n" "(fset 'org-git-version #'ignore)\n" "(provide 'org-version)\n"))))) ;; Install cutting-edge version of org-mode, and from a mirror, because ;; code.orgmode.org runs on a potato. -(package! org-mode :recipe (:host github :repo "emacs-straight/org-mode")) +(package! org-mode + :recipe (:host github + :repo "emacs-straight/org-mode" + :files ("*.el" "lisp/*.el" "contrib/lisp/*.el"))) ;; ...And prevent other packages from pulling org; org-plus-contrib satisfies ;; the dependency already: https://github.com/raxod502/straight.el/issues/352 (package! org :recipe (:local-repo nil)) From b2e6a069f02a6798b2c8b813834f0f5c620311a1 Mon Sep 17 00:00:00 2001 From: Geographer Date: Thu, 23 Jan 2020 10:52:44 +0000 Subject: [PATCH 679/983] Move an aspell specific argument to appropriate block --- modules/checkers/spell/config.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/checkers/spell/config.el b/modules/checkers/spell/config.el index 6c0fc604d..14fd2912e 100644 --- a/modules/checkers/spell/config.el +++ b/modules/checkers/spell/config.el @@ -3,8 +3,6 @@ (defvar ispell-dictionary "en_US") (after! ispell - (add-to-list 'ispell-extra-args "--dont-tex-check-comments") - ;; Don't spellcheck org blocks (pushnew! ispell-skip-region-alist '(":\\(PROPERTIES\\|LOGBOOK\\):" . ":END:") @@ -22,7 +20,7 @@ ((executable-find "hunspell") 'hunspell)) (`aspell (setq ispell-program-name "aspell" - ispell-extra-args '("--sug-mode=ultra" "--run-together")) + ispell-extra-args '("--sug-mode=ultra" "--run-together" "--dont-tex-check-comments")) (add-hook! 'text-mode-hook (defun +spell-remove-run-together-switch-for-aspell-h () From 93ebe4a4bb7d89ebb2196e813a2a8f31d83e0481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20M=C3=B8ller?= Date: Thu, 23 Jan 2020 12:58:39 +0100 Subject: [PATCH 680/983] Moved adding of helm-hide-minibuffer-maybe hook From a racy when condition in the posframe autoload, into an unconditional hook in the helm config.el file. --- modules/completion/helm/autoload/posframe.el | 3 --- modules/completion/helm/config.el | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/completion/helm/autoload/posframe.el b/modules/completion/helm/autoload/posframe.el index 2c64d5fa8..9ed53bb27 100644 --- a/modules/completion/helm/autoload/posframe.el +++ b/modules/completion/helm/autoload/posframe.el @@ -10,9 +10,6 @@ bottom, which is easier on the eyes on big displays." (truncate (/ (frame-pixel-height parent-frame) 2))))) -(when helm-echo-input-in-header-line - (add-hook 'helm-minibuffer-set-up-hook #'helm-hide-minibuffer-maybe)) - (defvar +helm--posframe-buffer nil) ;;;###autoload (defun +helm-posframe-display-fn (buffer &optional _resume) diff --git a/modules/completion/helm/config.el b/modules/completion/helm/config.el index 60d238d80..5f1666850 100644 --- a/modules/completion/helm/config.el +++ b/modules/completion/helm/config.el @@ -114,6 +114,9 @@ be negative.") (advice-add #'helm-display-mode-line :override #'+helm--hide-mode-line) (advice-add #'helm-ag-show-status-default-mode-line :override #'ignore) + ;; Hide minibuffer if `helm-echo-input-in-header-line' + (add-hook 'helm-minibuffer-set-up-hook #'helm-hide-minibuffer-maybe) + ;; Use helpful instead of describe-* to display documentation (dolist (fn '(helm-describe-variable helm-describe-function)) (advice-add fn :around #'doom-use-helpful-a))) From 7541611863ec2f71b993d4fdf70b77fe6213942b Mon Sep 17 00:00:00 2001 From: Tim Sanders Date: Thu, 23 Jan 2020 10:22:04 -0600 Subject: [PATCH 681/983] Fix garbage minibuffer history when launching debugger https://github.com/hlissner/doom-emacs/commit/9a93aa1df99423c57e08147e3219f059a00b60a5#commitcomment-36934820 --- modules/tools/debugger/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/debugger/config.el b/modules/tools/debugger/config.el index 052c16725..3becc86eb 100644 --- a/modules/tools/debugger/config.el +++ b/modules/tools/debugger/config.el @@ -105,7 +105,7 @@ (if (boundp 'starting-directory) (realgud-cmdbuf-info-starting-directory= starting-directory)) (set minibuffer-history-var - (cl-remove-duplicates (cons cmd-str minibuffer-history) + (cl-remove-duplicates (cons cmd-str (eval minibuffer-history-var)) :from-end t)))))) (t (if cmd-buf (switch-to-buffer cmd-buf)) From 24d804da79a5a909256ea0e283ef470855a81748 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Jan 2020 17:12:46 -0500 Subject: [PATCH 682/983] Fix #2415: install magit-section --- modules/tools/magit/packages.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/tools/magit/packages.el b/modules/tools/magit/packages.el index efca1c8d2..cd3a11f50 100644 --- a/modules/tools/magit/packages.el +++ b/modules/tools/magit/packages.el @@ -7,4 +7,9 @@ (package! magit-todos :pin "a64e36574bcb77a86726922df905307e55ea62ed") (package! github-review :pin "e8a275939e1a774c84b71ab3df2ce1599445dab0") (when (featurep! :editor evil +everywhere) - (package! evil-magit :pin "7223dca89c0b4bca9871c453a30a4d4edfdb444e"))) + (package! evil-magit :pin "7223dca89c0b4bca9871c453a30a4d4edfdb444e")) + + ;; REVIEW magit-section was extracted out of magit into its own package, but + ;; magit doesn't declare it as a dependency. Until it does, we need to + ;; install it manually. + (package! magit-section)) From 49636beb214b24a3a72ff9c53b3151fe6b0db20b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Jan 2020 21:44:30 -0500 Subject: [PATCH 683/983] Update lang/sh readme to new format #1166 --- modules/lang/sh/README.org | 54 +++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 16 deletions(-) diff --git a/modules/lang/sh/README.org b/modules/lang/sh/README.org index eb20a541a..873d4a2a4 100644 --- a/modules/lang/sh/README.org +++ b/modules/lang/sh/README.org @@ -1,23 +1,45 @@ -#+TITLE: :lang sh +#+TITLE: lang/sh +#+DATE: December 19, 2015 +#+SINCE: v0.7 +#+STARTUP: inlineimages +* Table of Contents :TOC: +- [[#description][Description]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] + - [[#hacks][Hacks]] +- [[#prerequisites][Prerequisites]] +- [[#features][Features]] +- [[#configuration][Configuration]] +- [[#troubleshooting][Troubleshooting]] + +* Description This module adds support for shell scripting languages. + Code completion (company-shell) + Syntax Checking (flycheck) -+ Added variable interpolation fontification -* Table of Contents :TOC: -- [[#install][Install]] - - [[#dependencies][Dependencies]] - - [[#module-flags][Module Flags]] - -* Install -** Dependencies -This module has several soft dependencies: - -+ ~shellcheck~ Enables shell script linting. -+ ~bashdb~ Enables debugging for bash scripts. -+ ~zshdb~ Enables debugging for zsh scripts. -+ ~bash-language-server~ Enables LSP support. ** Module Flags -+ ~+lsp~ to add support Language server protocol. ++ =+lsp= Enables LSP support for sh-mode. This requires the =:tools lsp= module + to be enabled and [[https://github.com/mads-hartmann/bash-language-server][bash-language-server]] to be installed on your system. ++ =+fish= Add syntax highlighting for fish script files. + +** Plugins ++ [[https://github.com/Alexander-Miller/company-shell][company-shell]]* (=:completion company=) ++ [[https://github.com/wwwjfy/emacs-fish][fish-mode]]* (=+fish=) + +** Hacks ++ Interpolated variables are fontified. + +* Prerequisites +This module has several optional dependencies: + ++ [[https://github.com/koalaman/shellcheck][shellcheck]]: Enables advanced shell script linting. ++ [[https://github.com/mads-hartmann/bash-language-server][bash-language-server]]: Enables LSP support (with =+lsp= flag). ++ With the =:tools debugger= module + + [[http://bashdb.sourceforge.net/][bashdb]]: Enables debugging for bash scripts + + [[https://github.com/rocky/zshdb][zshdb]]: Enables debugging for zsh scripts + +* TODO Features +* TODO Configuration +* TODO Troubleshooting From 3ebdc513f8b9fb795bd6db00be1de9bc7025920c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Jan 2020 05:15:15 -0500 Subject: [PATCH 684/983] Revert 24d804da7 #2415 It was fixed upstream in magit/magit@6bfe8c0 --- modules/tools/magit/packages.el | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/modules/tools/magit/packages.el b/modules/tools/magit/packages.el index cd3a11f50..efca1c8d2 100644 --- a/modules/tools/magit/packages.el +++ b/modules/tools/magit/packages.el @@ -7,9 +7,4 @@ (package! magit-todos :pin "a64e36574bcb77a86726922df905307e55ea62ed") (package! github-review :pin "e8a275939e1a774c84b71ab3df2ce1599445dab0") (when (featurep! :editor evil +everywhere) - (package! evil-magit :pin "7223dca89c0b4bca9871c453a30a4d4edfdb444e")) - - ;; REVIEW magit-section was extracted out of magit into its own package, but - ;; magit doesn't declare it as a dependency. Until it does, we need to - ;; install it manually. - (package! magit-section)) + (package! evil-magit :pin "7223dca89c0b4bca9871c453a30a4d4edfdb444e"))) From 00e2f2cc6fbb8ed6c9e212434cf442d14ce43c6b Mon Sep 17 00:00:00 2001 From: Dan LaManna Date: Fri, 24 Jan 2020 12:23:45 -0500 Subject: [PATCH 685/983] lang/python: add additional checks --- modules/lang/python/doctor.el | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/modules/lang/python/doctor.el b/modules/lang/python/doctor.el index 2fcb5d7fb..40637a75a 100644 --- a/modules/lang/python/doctor.el +++ b/modules/lang/python/doctor.el @@ -20,6 +20,30 @@ (unless (executable-find "conda") (warn! "Couldn't find conda in your PATH"))) +(when (featurep! +cython) + (unless (executable-find "cython") + (warn! "Couldn't find cython. cython-mode will not work."))) + (when (featurep! +ipython) (unless (executable-find "ipython") (warn! "Couldn't find ipython in your PATH"))) + +(if (and (featurep! :editor format) + (not (executable-find "black"))) + (warn! "Couldn't find black. Code formatting will not work.")) + +(if (not (executable-find "pytest")) + (warn! "Couldn't find pytest. Running tests through pytest will not work.")) + +(if (not (executable-find "nosetests")) + (warn! "Couldn't find nosetests. Running tests through nose will not work.")) + +(if (not (executable-find "pipenv")) + (warn! "Couldn't find pipenv. pipenv support will not work.")) + +(if (not (executable-find "isort")) + (warn! "Couldn't find isort. Import sorting will not work.")) + +(if (and (featurep! :editor format) + (not (executable-find "pyflakes"))) + (warn! "Couldn't find pyflakes. Import management will not work.")) From d1db28f417b354a7676c25612a3b9d49c7693380 Mon Sep 17 00:00:00 2001 From: dive Date: Fri, 24 Jan 2020 21:22:06 +0000 Subject: [PATCH 686/983] make ls aliases work with subdirectories --- modules/term/eshell/config.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/term/eshell/config.el b/modules/term/eshell/config.el index 4a65e231b..6e14d340e 100644 --- a/modules/term/eshell/config.el +++ b/modules/term/eshell/config.el @@ -25,8 +25,8 @@ buffer.") ("d" "dired $1") ("bd" "eshell-up $1") ("rg" "rg --color=always $*") - ("l" "ls -lh") - ("ll" "ls -lah") + ("l" "ls -lh $*") + ("ll" "ls -lah $*") ("clear" "clear-scrollback")) ; more sensible than default "An alist of default eshell aliases, meant to emulate useful shell utilities, like fasd and bd. Note that you may overwrite these in your From d1442a03bf10048ef7a7168c5037d5f0d6505796 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Jan 2020 16:38:44 -0500 Subject: [PATCH 687/983] Expand docstring for setq! --- core/core-lib.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/core-lib.el b/core/core-lib.el index c00642c49..a19726173 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -134,7 +134,11 @@ aliases." (directory-file-name (file-name-directory path)))) (defmacro setq! (&rest settings) - "A stripped-down `customize-set-variable' with the syntax of `setq'." + "A stripped-down `customize-set-variable' with the syntax of `setq'. + +Use this instead of `setq' when you know a variable has a custom setter (a :set +property in its `defcustom' declaration). This trigger setters. `setq' does +not." (macroexp-progn (cl-loop for (var val) on settings by 'cddr collect `(funcall (or (get ',var 'custom-set) #'set) From a681a32efc28d25af6d1db963bc7132fc41eb57b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Jan 2020 17:50:45 -0500 Subject: [PATCH 688/983] docs/api: add setq! demo --- docs/api.org | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/api.org b/docs/api.org index 642fb8f47..7e7efad6e 100644 --- a/docs/api.org +++ b/docs/api.org @@ -470,6 +470,14 @@ These are side-by-side comparisons, showing how to bind keys with and without ;; Removing arbitrary forms (must be exactly the same as the definition) (remove-hook! (one-mode second-mode) (setq v 5) (setq a 2)) #+END_SRC +*** setq! +#+BEGIN_SRC elisp +;; Each of these have a setter associated with them, which must be triggered in +;; order for their new values to have an effect. +(setq! evil-want-Y-yank-to-eol nil + evil-want-C-u-scroll nil + evil-want-C-d-scroll nil) +#+END_SRC *** setq-hook! #+BEGIN_SRC elisp :eval no ;; Set multiple variables after a hook From 14fc65a9fbcd96f6efa7a7299a23bd90e9e2cb38 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Jan 2020 18:13:37 -0500 Subject: [PATCH 689/983] Remove nconcq! macro Unused and unnecessary. --- core/autoload/files.el | 36 ++++++++++++++++++------------------ core/core-lib.el | 4 ---- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/core/autoload/files.el b/core/autoload/files.el index 727b95db3..3e22607e7 100644 --- a/core/autoload/files.el +++ b/core/autoload/files.el @@ -108,26 +108,26 @@ be relative to it. The search recurses up to DEPTH and no further. DEPTH is an integer. MATCH is a string regexp. Only entries that match it will be included." - (let (file-name-handler-alist - result) + (let (result file-name-handler-alist) (dolist (file (mapcan (doom-rpartial #'doom-glob "*") (doom-enlist paths))) (cond ((file-directory-p file) - (nconcq! result - (and (memq type '(t dirs)) - (string-match-p match file) - (not (and filter (funcall filter file))) - (not (and (file-symlink-p file) - (not follow-symlinks))) - (<= mindepth 0) - (list (cond (map (funcall map file)) - (relative-to (file-relative-name file relative-to)) - (file)))) - (and (>= depth 1) - (apply #'doom-files-in file - (append (list :mindepth (1- mindepth) - :depth (1- depth) - :relative-to relative-to) - rest))))) + (appendq! + result + (and (memq type '(t dirs)) + (string-match-p match file) + (not (and filter (funcall filter file))) + (not (and (file-symlink-p file) + (not follow-symlinks))) + (<= mindepth 0) + (list (cond (map (funcall map file)) + (relative-to (file-relative-name file relative-to)) + (file)))) + (and (>= depth 1) + (apply #'doom-files-in file + (append (list :mindepth (1- mindepth) + :depth (1- depth) + :relative-to relative-to) + rest))))) ((and (memq type '(t files)) (string-match-p match file) (not (and filter (funcall filter file))) diff --git a/core/core-lib.el b/core/core-lib.el index a19726173..819f5f99b 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -159,10 +159,6 @@ This is a variadic `cl-pushnew'." "Append LISTS to SYM in place." `(setq ,sym (append ,sym ,@lists))) -(defmacro nconcq! (sym &rest lists) - "Append LISTS to SYM by altering them in place." - `(setq ,sym (nconc ,sym ,@lists))) - (defmacro delq! (elt list &optional fetcher) "`delq' ELT from LIST in-place. From c3734603f5264f592e09ec4cfc0bf5c2bc5a9b2d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Jan 2020 18:15:56 -0500 Subject: [PATCH 690/983] Don't strip out vars from doom module autoloads Doom's autoloads generator will strip out forms that modify variables in doom-autoload-cached-vars (load-path, auto-mode-alist, etc). These are undesireable in package autoloads, but may be desireable in Doom module autoloads. --- core/cli/autoloads.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index e7373ed10..92ef89fe2 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -27,7 +27,8 @@ one wants that.") (defun doom-cli-reload-core-autoloads (&optional file) (print! (start "(Re)generating core autoloads...")) (print-group! - (let ((file (or file doom-autoload-file))) + (let ((file (or file doom-autoload-file)) + doom-autoload-cached-vars) (cl-check-type file string) (and (print! (start "Generating core autoloads...")) (doom-cli--write-autoloads From f1ab3e5cab9e5640afa91248da2694bc646f214a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Jan 2020 18:33:00 -0500 Subject: [PATCH 691/983] Remove redundant evil settings These are already the default. --- modules/editor/evil/config.el | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index cb174425b..b8b8a6662 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -34,9 +34,6 @@ directives. By default, this only recognizes C directives.") :demand t :preface (setq evil-want-visual-char-semi-exclusive t - evil-magic t - evil-echo-state t - evil-indent-convert-tabs t evil-ex-search-vim-style-regexp t evil-ex-substitute-global t evil-ex-visual-char-range t ; column range for ex commands From f39aae4d67db0c55059bfb063d3b3f69b996ee15 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Jan 2020 18:33:14 -0500 Subject: [PATCH 692/983] Fix column-wise edits affecting empty lines The docstring for evil-insert-skip-empty-lines is misleading. --- modules/editor/evil/config.el | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index b8b8a6662..fb1dd534c 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -37,7 +37,6 @@ directives. By default, this only recognizes C directives.") evil-ex-search-vim-style-regexp t evil-ex-substitute-global t evil-ex-visual-char-range t ; column range for ex commands - evil-insert-skip-empty-lines t evil-mode-line-format 'nil ;; more vim-like behavior evil-symbol-word-search t From 87b33c416154141c30783de82389a64bc9173596 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Jan 2020 19:43:26 -0500 Subject: [PATCH 693/983] Fix #2421: replace bundler with fork Until endofunky/bundler.el#25 is merged --- modules/lang/ruby/packages.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/lang/ruby/packages.el b/modules/lang/ruby/packages.el index 3cbe2a0c3..671e0c473 100644 --- a/modules/lang/ruby/packages.el +++ b/modules/lang/ruby/packages.el @@ -15,7 +15,10 @@ (package! robe :pin "8190cb7c7beb8385dd3abf6ea357f33d8981ae8a") ;; Project tools -(package! bundler :pin "05a91d68e21e129b6c4d5462c888ea249c2ea001") +(package! bundler + ;; REVIEW Remove when endofunky/bundler.el#25 is merged + :recipe (:host github :repo "nate/bundler.el") + :pin "05a91d68e21e129b6c4d5462c888ea249c2ea001") (package! rake :pin "9c204334b03b4e899fadae6e59c20cf105404128") ;; Environment management From 26436752ec7c6477e081ff8e8d9fe916a86321fa Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Jan 2020 19:50:29 -0500 Subject: [PATCH 694/983] Mention evil-{want-Y-yank-to-eol,move-cursor-back} in evil readme --- modules/editor/evil/README.org | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/modules/editor/evil/README.org b/modules/editor/evil/README.org index b256b07ec..0549a9316 100644 --- a/modules/editor/evil/README.org +++ b/modules/editor/evil/README.org @@ -16,6 +16,8 @@ - [[#configuration][Configuration]] - [[#removing-evil-mode][Removing evil-mode]] - [[#restoring-old-substitution-behavior-on-ss][Restoring old substitution behavior on s/S]] + - [[#restoring-old-y-behavior-yank-the-whole-line][Restoring old Y behavior (yank the whole line)]] + - [[#disabling-cursor-movement-when-exiting-insert-mode][Disabling cursor movement when exiting insert mode]] * Description This holy module brings the vim experience to Emacs. @@ -171,3 +173,23 @@ To disable evil-snipe on s/S, you can either: added to =$DOOMDIR/packages.el=, but this will also disable incremental highlighting for the f/F/t/T motions keys. 3. Or use =cl= and =cc=, respectively; they do the same thing. +** Restoring old Y behavior (yank the whole line) +Doom changes the behavior of the =Y= key in normal mode to yank-to-EOL +(equivalent to =y$=). This was to make it consistent with the =C= and =D= +capital operators, and because it was redundant with =yy=, which is easier to +type than =y$=. + +If you prefer the old behavior, it can be reversed with: + +#+BEGIN_SRC elisp +;; add to ~/.doom.d/config.el +(setq! evil-want-Y-yank-to-eol nil) +#+END_SRC +** Disabling cursor movement when exiting insert mode +Vim (and evil) move the cursor one character back when exiting insert mode. If +you prefer that it didn't, set: + +#+BEGIN_SRC elisp +;; add to ~/.doom.d/config.el +(setq evil-move-cursor-back nil) +#+END_SRC From d39961b30df1bdccdc40281c3879abecbe1ffdfb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Jan 2020 22:18:24 -0500 Subject: [PATCH 695/983] Replace doom/help-package-homepage w/ straight-visit-package-website No need to reinvent the wheel. --- core/autoload/help.el | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 10ccd8e07..3bf6a5c47 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -600,11 +600,7 @@ config blocks in your private config." (recenter))) ;;;###autoload -(defun doom/help-package-homepage (package) - "Open PACKAGE's repo or homepage in your browser." - (interactive (list (doom--package-list "Open package homepage: "))) - (browse-url (doom--package-url package))) - +(defalias 'doom/help-package-homepage #'straight-visit-package-website) (defun doom--help-search-prompt (prompt) (let ((query (doom-thing-at-point-or-region))) From ea7a51de8bb1b83305a76b2aac2a168b910102f8 Mon Sep 17 00:00:00 2001 From: Konstantin Levinski Date: Sun, 26 Jan 2020 00:49:26 +0800 Subject: [PATCH 696/983] use updated brew package name to get clang --- docs/getting_started.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting_started.org b/docs/getting_started.org index 495ef2828..006b450cb 100644 --- a/docs/getting_started.org +++ b/docs/getting_started.org @@ -153,7 +153,7 @@ Homebrew users have a number of formulas available to them. Before they can be installed, start with Doom's dependencies: #+BEGIN_SRC bash -brew install coreutils git ripgrep fd clang +brew install coreutils git ripgrep fd llvm #+END_SRC For Emacs itself these three are the best options, ordered from most to least From 8332daccee625887f296854351774160ecec28e1 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sat, 25 Jan 2020 19:38:29 +0200 Subject: [PATCH 697/983] make +org--insert-item respect emacs-mode No change of behaviour in non-emacs modes, but in emacs-mode stays there instead of switching to insert-mode. --- modules/lang/org/autoload/org.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/lang/org/autoload/org.el b/modules/lang/org/autoload/org.el index 30d01ff19..4cc2b3617 100644 --- a/modules/lang/org/autoload/org.el +++ b/modules/lang/org/autoload/org.el @@ -82,7 +82,8 @@ (when (org-invisible-p) (org-show-hidden-entry)) - (when (bound-and-true-p evil-local-mode) + (when (and (bound-and-true-p evil-local-mode) + (not (evil-emacs-state-p))) (evil-insert 1)))) (defun +org--get-property (name &optional bound) From a9402cfb55c880b0327bd45b7ae9f1a7088c9514 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Jan 2020 03:49:42 -0500 Subject: [PATCH 698/983] Fix #2373: bring back package pinning This needs some serious refactoring... --- core/cli/packages.el | 298 +++++++++++--------- core/core-cli.el | 15 +- core/core-packages.el | 5 + core/packages.el | 40 +-- docs/api.org | 2 +- modules/app/calendar/packages.el | 6 +- modules/app/irc/packages.el | 4 +- modules/app/rss/packages.el | 4 +- modules/app/twitter/packages.el | 4 +- modules/checkers/grammar/packages.el | 4 +- modules/checkers/spell/packages.el | 8 +- modules/checkers/syntax/packages.el | 6 +- modules/completion/company/packages.el | 8 +- modules/completion/helm/packages.el | 20 +- modules/completion/ido/packages.el | 8 +- modules/completion/ivy/packages.el | 18 +- modules/config/default/packages.el | 8 +- modules/editor/evil/packages.el | 36 +-- modules/editor/file-templates/packages.el | 2 +- modules/editor/fold/packages.el | 2 +- modules/editor/format/packages.el | 2 +- modules/editor/god/packages.el | 2 +- modules/editor/lispy/packages.el | 5 +- modules/editor/multiple-cursors/packages.el | 6 +- modules/editor/objed/packages.el | 2 +- modules/editor/parinfer/packages.el | 2 +- modules/editor/rotate-text/packages.el | 2 +- modules/editor/snippets/packages.el | 7 +- modules/editor/word-wrap/packages.el | 2 +- modules/emacs/dired/packages.el | 14 +- modules/emacs/ibuffer/packages.el | 4 +- modules/emacs/vc/packages.el | 8 +- modules/email/mu4e/packages.el | 2 +- modules/email/notmuch/packages.el | 8 +- modules/email/wanderlust/packages.el | 6 +- modules/input/chinese/packages.el | 10 +- modules/input/japanese/packages.el | 8 +- modules/lang/agda/packages.el | 4 +- modules/lang/assembly/packages.el | 6 +- modules/lang/cc/packages.el | 34 +-- modules/lang/clojure/packages.el | 6 +- modules/lang/common-lisp/packages.el | 6 +- modules/lang/coq/packages.el | 4 +- modules/lang/crystal/packages.el | 8 +- modules/lang/csharp/packages.el | 6 +- modules/lang/data/packages.el | 14 +- modules/lang/elixir/packages.el | 6 +- modules/lang/elm/packages.el | 4 +- modules/lang/emacs-lisp/packages.el | 14 +- modules/lang/erlang/packages.el | 8 +- modules/lang/ess/packages.el | 4 +- modules/lang/factor/packages.el | 2 +- modules/lang/faust/packages.el | 2 +- modules/lang/fsharp/packages.el | 2 +- modules/lang/go/packages.el | 16 +- modules/lang/haskell/packages.el | 10 +- modules/lang/hy/packages.el | 2 +- modules/lang/idris/packages.el | 2 +- modules/lang/java/packages.el | 12 +- modules/lang/javascript/packages.el | 22 +- modules/lang/julia/packages.el | 4 +- modules/lang/kotlin/packages.el | 4 +- modules/lang/latex/packages.el | 18 +- modules/lang/lean/packages.el | 4 +- modules/lang/ledger/packages.el | 6 +- modules/lang/lua/packages.el | 8 +- modules/lang/markdown/packages.el | 10 +- modules/lang/nim/packages.el | 4 +- modules/lang/nix/packages.el | 8 +- modules/lang/ocaml/packages.el | 16 +- modules/lang/org/packages.el | 69 ++--- modules/lang/perl/packages.el | 4 +- modules/lang/php/packages.el | 20 +- modules/lang/plantuml/packages.el | 4 +- modules/lang/purescript/packages.el | 6 +- modules/lang/python/packages.el | 28 +- modules/lang/qt/packages.el | 4 +- modules/lang/racket/packages.el | 2 +- modules/lang/rest/packages.el | 4 +- modules/lang/rst/packages.el | 2 +- modules/lang/ruby/packages.el | 24 +- modules/lang/rust/packages.el | 4 +- modules/lang/scala/packages.el | 4 +- modules/lang/scheme/packages.el | 2 +- modules/lang/sh/packages.el | 4 +- modules/lang/solidity/packages.el | 6 +- modules/lang/swift/packages.el | 8 +- modules/lang/terra/packages.el | 4 +- modules/lang/web/packages.el | 26 +- modules/term/eshell/packages.el | 8 +- modules/term/term/packages.el | 2 +- modules/term/vterm/packages.el | 2 +- modules/tools/ansible/packages.el | 10 +- modules/tools/debugger/packages.el | 6 +- modules/tools/direnv/packages.el | 2 +- modules/tools/docker/packages.el | 6 +- modules/tools/editorconfig/packages.el | 2 +- modules/tools/ein/packages.el | 4 +- modules/tools/eval/packages.el | 4 +- modules/tools/gist/packages.el | 2 +- modules/tools/lookup/packages.el | 22 +- modules/tools/lsp/packages.el | 10 +- modules/tools/magit/packages.el | 12 +- modules/tools/make/packages.el | 2 +- modules/tools/pass/packages.el | 12 +- modules/tools/pdf/packages.el | 2 +- modules/tools/prodigy/packages.el | 2 +- modules/tools/rgb/packages.el | 4 +- modules/tools/terraform/packages.el | 4 +- modules/tools/upload/packages.el | 2 +- modules/ui/deft/packages.el | 2 +- modules/ui/doom/packages.el | 4 +- modules/ui/fill-column/packages.el | 2 +- modules/ui/hl-todo/packages.el | 2 +- modules/ui/hydra/packages.el | 2 +- modules/ui/indent-guides/packages.el | 2 +- modules/ui/modeline/packages.el | 6 +- modules/ui/nav-flash/packages.el | 2 +- modules/ui/neotree/packages.el | 2 +- modules/ui/ophints/packages.el | 4 +- modules/ui/tabs/packages.el | 2 +- modules/ui/treemacs/packages.el | 10 +- modules/ui/unicode/packages.el | 2 +- modules/ui/vc-gutter/packages.el | 2 +- modules/ui/vi-tilde-fringe/packages.el | 2 +- modules/ui/window-select/packages.el | 6 +- modules/ui/workspaces/packages.el | 2 +- modules/ui/zen/packages.el | 4 +- 128 files changed, 647 insertions(+), 620 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 9550c015d..314ac1bdd 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -59,7 +59,29 @@ list remains lean." ;; ;;; Library -;; TODO Refactor all of me to be more functional! +(defun doom--straight-recipes () + (let (recipes) + (dolist (recipe (hash-table-values straight--recipe-cache)) + (straight--with-plist recipe (local-repo type) + (when (and local-repo (not (eq type 'built-in))) + (push recipe recipes)))) + (nreverse recipes))) + +(defmacro doom--map-recipes (recipes binds &rest body) + (declare (indent 2)) + (let ((recipe-var (make-symbol "recipe")) + (recipes-var (make-symbol "recipes"))) + `(let* ((,recipes-var ,recipes) + (built ()) + (straight-use-package-pre-build-functions + (cons (lambda (pkg) (cl-pushnew pkg built :test #'equal)) + straight-use-package-pre-build-functions))) + (dolist (,recipe-var ,recipes-var) + (cl-block nil + (straight--with-plist (append (list :recipe ,recipe-var) ,recipe-var) + ,(doom-enlist binds) + ,@body))) + (nreverse built)))) (defun doom-cli-packages-install () "Installs missing packages. @@ -67,35 +89,35 @@ list remains lean." This function will install any primary package (i.e. a package with a `package!' declaration) or dependency thereof that hasn't already been." (straight--transaction-finalize) - (print! (start "Installing & building packages...")) + (print! (start "Installing packages...")) (print-group! - (let ((versions-alist nil) ; FIXME - (n 0)) - (dolist (recipe (hash-table-values straight--recipe-cache)) - (straight--with-plist recipe - (package local-repo) - (let ((existed-p (file-directory-p (straight--repos-dir package)))) - (condition-case-unless-debug e - (and (straight-use-package (intern package)) - (not existed-p) - (file-directory-p (straight--repos-dir (or local-repo package))) - (if-let (commit (cdr (assoc (or local-repo package) versions-alist))) - (progn - (print! (start "Checking out %s commit %s") - package (substring commit 0 7)) - (unless (straight-vc-commit-present-p recipe commit) - (straight-vc-fetch-from-remote recipe)) - (straight-vc-check-out-commit recipe commit) - t) - t) - (cl-incf n)) - (error - (signal 'doom-package-error - (list package e (straight--process-get-output)))))))) - (if (= n 0) - (ignore (print! (success "No packages need to be installed"))) - (print! (success "Installed & built %d packages") n) - t)))) + (if-let (built + (doom--map-recipes (doom--straight-recipes) + (recipe package type local-repo) + (condition-case-unless-debug e + (progn + (straight-use-package (intern package)) + (when-let* ((newcommit (cdr (assoc local-repo doom-pinned-packages))) + (oldcommit (straight-vc-get-commit type local-repo))) + (unless (string-match-p (concat "^" newcommit) oldcommit) + (unless (straight-vc-commit-present-p recipe newcommit) + (straight-vc-fetch-from-remote recipe)) + (if (straight-vc-commit-present-p recipe newcommit) + (progn + (print! (success "Checking out %s to %s") + package (substring newcommit 0 8)) + (straight-vc-check-out-commit recipe newcommit) + (straight-rebuild-package package t)) + (ignore-errors + (delete-directory (straight--repos-dir package) 'recursive)) + (straight-use-package (intern package)))))) + (error + (signal 'doom-package-error + (list package e (straight--process-get-output))))))) + (print! (success "Installed %d packages") + (length built)) + (print! (info "No packages need to be installed")) + nil))) (defun doom-cli-packages-build (&optional force-p) @@ -103,122 +125,128 @@ declaration) or dependency thereof that hasn't already been." (straight--transaction-finalize) (print! (start "(Re)building %spackages...") (if force-p "all " "")) (print-group! - (let* ((n 0) - (straight-check-for-modifications - (when (file-directory-p (straight--modified-dir)) - '(find-when-checking))) - (straight--allow-find - (and straight-check-for-modifications - (executable-find straight-find-executable) - t)) - (straight--packages-not-to-rebuild - (or straight--packages-not-to-rebuild (make-hash-table :test #'equal))) - (straight--packages-to-rebuild - (or (if force-p :all straight--packages-to-rebuild) - (make-hash-table :test #'equal))) - (straight-use-package-pre-build-functions - (cons (lambda (&rest _) (cl-incf n)) - straight-use-package-pre-build-functions))) + (let ((straight-check-for-modifications + (when (file-directory-p (straight--modified-dir)) + '(find-when-checking))) + (straight--allow-find + (and straight-check-for-modifications + (executable-find straight-find-executable) + t)) + (straight--packages-not-to-rebuild + (or straight--packages-not-to-rebuild (make-hash-table :test #'equal))) + (straight--packages-to-rebuild + (or (if force-p :all straight--packages-to-rebuild) + (make-hash-table :test #'equal)))) (unless force-p (straight--make-package-modifications-available)) - (dolist (package (hash-table-keys straight--recipe-cache)) - (straight-use-package (intern package))) - (if (= n 0) - (ignore (print! (success "No packages need rebuilding"))) - (print! (success "Rebuilt %d package(s)" n)) - t)))) + (if-let (built + (doom--map-recipes (doom--straight-recipes) (package) + (straight-use-package (intern package)))) + (print! (success "Rebuilt %d package(s)") (length built)) + (print! (success "No packages need rebuilding")) + nil)))) (defun doom-cli-packages-update () "Updates packages." (straight--transaction-finalize) (print! (start "Updating packages (this may take a while)...")) - (let ((straight--repos-dir (straight--repos-dir)) - (straight--packages-to-rebuild (make-hash-table :test #'equal)) - (total (hash-table-count straight--repo-cache)) - (versions-alist nil) ; FIXME - (i 1) - errors) + (let* ((straight--repos-dir (straight--repos-dir)) + (straight--packages-to-rebuild (make-hash-table :test 'equal)) + (updated-repos (make-hash-table :test 'equal)) + (recipes (doom--straight-recipes)) + (total (length recipes)) + (i 0) + errors) ;; TODO Log this somewhere? - (print-group! - (dolist (recipe (hash-table-values straight--repo-cache)) - (catch 'skip - (straight--with-plist recipe (package type local-repo) - (unless (straight--repository-is-available-p recipe) - (print! (error "(%d/%d) Couldn't find local repo for %s!") - i total package)) - (let ((default-directory (straight--repos-dir local-repo))) - (unless (file-in-directory-p default-directory straight--repos-dir) - (print! (warn "(%d/%d) Skipping %s because it is local") - i total package) - (throw 'skip t)) - (condition-case-unless-debug e - (let ((commit (straight-vc-get-commit type local-repo)) - (newcommit (cdr (assoc (or local-repo package) versions-alist))) - fetch-p) - (when (and (stringp newcommit) - (string-match-p (concat "^" (regexp-quote newcommit)) commit)) - (print! (start "\033[K(%d/%d) %s is up-to-date...\033[1A") - i total package) - (throw 'skip t)) - (unless (or (and (stringp newcommit) - (straight-vc-commit-present-p recipe newcommit) - (print! (start "\033[K(%d/%d) Checking out %s (%s)...\033[1A") - i total package (substring newcommit 0 7))) - (and (print! (start "\033[K(%d/%d) Fetching %s...\033[1A") - i total package) - (straight-vc-fetch-from-remote recipe) - (setq fetch t))) - (print! (warn "\033[K(%d/%d) Failed to fetch %s") - i total (or local-repo package)) - (throw 'skip t)) - (let ((output (straight--process-get-output))) - (if (and (stringp newcommit) (straight-vc-commit-present-p recipe newcommit)) + (doom--map-recipes recipes (recipe package type local-repo) + (cl-incf i) + (print-group! + (unless (straight--repository-is-available-p recipe) + (print! (error "(%d/%d) Couldn't find local repo for %s!") + i total package) + (cl-return)) + (when (gethash local-repo updated-repos) + (puthash package t straight--packages-to-rebuild) + (ignore-errors (delete-directory (straight--build-dir package) 'recursive)) + (print! (success "(%d/%d) %s was updated indirectly (with %s)") + i total package local-repo) + (cl-return)) + (let ((default-directory (straight--repos-dir local-repo)) + (esc (if doom-debug-mode "" "\033[1A"))) + (unless (file-in-directory-p default-directory straight--repos-dir) + (print! (warn "(%d/%d) Skipping %s because it is local") + i total package) + (cl-return)) + ;; FIXME Dear lord refactor me + (condition-case-unless-debug e + (let ((commit (straight-vc-get-commit type local-repo)) + (newcommit (cdr (assoc local-repo doom-pinned-packages)))) + (and (stringp newcommit) + (string-match-p (concat "^" newcommit) commit) + (print! (success "\033[K(%d/%d) %s is up-to-date...%s") + i total package esc) + (cl-return)) + (unless (or (and (stringp newcommit) + (straight-vc-commit-present-p recipe newcommit) + (print! (start "\033[K(%d/%d) Checking out %s (%s)...%s") + i total package (substring newcommit 0 7) esc)) + (and (print! (start "\033[K(%d/%d) Fetching %s...%s") + i total package esc) + (straight-vc-fetch-from-remote recipe))) + (print! (warn "\033[K(%d/%d) Failed to fetch %s") + i total (or local-repo package)) + (cl-return)) + (let ((output (straight--process-get-output))) + (if (stringp newcommit) + (if (straight-vc-commit-present-p recipe newcommit) (straight-vc-check-out-commit recipe newcommit) - (straight-merge-package package) - (setq newcommit (straight-vc-get-commit type local-repo))) - (when (string-match-p (concat "^" newcommit) commit) - (throw 'skip t)) - (print! (info "\033[K(%d/%d) Updating %s...") i total local-repo) - (puthash package t straight--packages-to-rebuild) - (ignore-errors - (delete-directory (straight--build-dir package) 'recursive)) - (print-group! - (unless (string-empty-p output) - (print! (info "%s") output)) - (when (eq type 'git) - ;; TODO Truncate long logs - (straight--call "git" "log" "--oneline" newcommit (concat "^" commit)) - (print-group! - (print! "%s" (straight--process-get-output))))) - (print! (success "(%d/%d) %s updated (%s -> %s)") i total - (or local-repo package) - (substring commit 0 7) - (substring newcommit 0 7)))) - (user-error - (signal 'user-error (error-message-string e))) - (error - (print! (warn "\033[K(%d/%d) Encountered error with %s" i total package)) - (print-group! - (print! (error "%s" e)) - (print-group! (print! (info "%s" (straight--process-get-output))))) - (push package errors)))))) - (cl-incf i)) - (princ "\033[K") - (when errors - (print! (error "Encountered %d error(s), the offending packages: %s") - (length errors) (string-join errors ", "))) - (if (hash-table-empty-p straight--packages-to-rebuild) - (ignore - (print! (success "All %d packages are up-to-date") - (hash-table-count straight--repo-cache))) - (let ((count (hash-table-count straight--packages-to-rebuild)) - (packages (hash-table-keys straight--packages-to-rebuild))) - (sort packages #'string-lessp) - (print! (success "Updated %d package(s): %s") - count (string-join packages ", ")) - (doom-cli-packages-build)) - t)))) + (print! (start "\033[K(%d/%d) Re-cloning %s...%s") i total local-repo esc) + (ignore-errors + (delete-directory (straight--repos-dir package) 'recursive)) + (straight-use-package (intern package) nil 'no-build)) + (straight-merge-package package) + (setq newcommit (straight-vc-get-commit type local-repo))) + (when (string-match-p (concat "^" newcommit) commit) + (cl-return)) + (print! (start "\033[K(%d/%d) Updating %s...%s") i total local-repo esc) + (puthash local-repo t updated-repos) + (puthash package t straight--packages-to-rebuild) + (ignore-errors + (delete-directory (straight--build-dir package) 'recursive)) + (print-group! + (unless (string-empty-p output) + (print! (info "%s") output)) + (when (eq type 'git) + (straight--call + "git" "log" "--oneline" "--no-merges" + newcommit (concat "^" commit)) + (print-group! + (print! "%s" (straight--process-get-output))))) + (print! (success "(%d/%d) %s updated (%s -> %s)") i total + (or local-repo package) + (substring commit 0 7) + (substring newcommit 0 7)))) + (user-error + (signal 'user-error (error-message-string e))) + (error + (print! (warn "\033[K(%d/%d) Encountered error with %s" i total package)) + (print-group! + (print! (error "%s" e)) + (print-group! (print! (info "%s" (straight--process-get-output))))) + (push package errors))))) + (princ "\033[K") + (when errors + (print! (error "Encountered %d error(s), the offending packages: %s") + (length errors) (string-join errors ", "))) + (if (hash-table-empty-p straight--packages-to-rebuild) + (ignore + (print! (success "All %d packages are up-to-date") + (hash-table-count straight--repo-cache))) + (print! (success "Updated %d package(s)") + (hash-table-count straight--packages-to-rebuild)) + (doom-cli-packages-build) + t)))) ;;; PURGE (for the emperor) diff --git a/core/core-cli.el b/core/core-cli.el index 7e4dc5c2e..d0149f3cb 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -355,16 +355,11 @@ stale." (doom-cli-reload-env-file 'force)) (doom-cli-reload-core-autoloads) - (unwind-protect - (progn - (and (doom-cli-packages-install) - (setq success t)) - (and (doom-cli-packages-build) - (setq success t)) - (and (doom-cli-packages-purge prune-p 'builds-p prune-p prune-p) - (setq success t))) - (doom-cli-reload-package-autoloads) - (doom-cli-byte-compile nil 'recompile)) + (doom-cli-packages-install) + (doom-cli-packages-build) + (doom-cli-packages-purge prune-p 'builds-p prune-p prune-p) + (doom-cli-reload-package-autoloads) + (doom-cli-byte-compile nil 'recompile) t))) (load! "cli/env") diff --git a/core/core-packages.el b/core/core-packages.el index 29647426c..171fdbdab 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -124,6 +124,11 @@ missing) and shouldn't be deleted.") ;; We handle it ourselves straight-fix-org nil) +(defadvice! doom--read-pinned-packages-a (orig-fn &rest args) + "Read from `doom-pinned-packages' on top of straight's lockfiles." + :around #'straight--lockfile-read-all + (append (apply orig-fn args) doom-pinned-packages)) + ;; diff --git a/core/packages.el b/core/packages.el index 62eeba4cc..55808d597 100644 --- a/core/packages.el +++ b/core/packages.el @@ -2,43 +2,43 @@ ;;; core/packages.el ;; core.el -(package! auto-minor-mode :pin "17cfa1b54800fdef2975c0c0531dad34846a5065") -(package! gcmh :pin "f542908b9ae4405d70fa70f42bd62618c5de4b95") +(package! auto-minor-mode :pin "17cfa1b548") +(package! gcmh :pin "f542908b9a") ;; core-ui.el -(package! all-the-icons :pin "1416f37984486a44c6c0cbe0a2c985e82f965b6b") -(package! hide-mode-line :pin "88888825b5b27b300683e662fa3be88d954b1cea") -(package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307") -(package! rainbow-delimiters :pin "5125f4e47604ad36c3eb4706310fcafac729ca8c") -(package! restart-emacs :pin "9aa90d3df9e08bc420e1c9845ee3ff568e911bd9") +(package! all-the-icons :pin "1416f37984") +(package! hide-mode-line :pin "88888825b5") +(package! highlight-numbers :pin "8b4744c7f4") +(package! rainbow-delimiters :pin "5125f4e476") +(package! restart-emacs :pin "9aa90d3df9") ;; core-editor.el -(package! better-jumper :pin "6d240032ca213ccb3347e25f26c29b6822bf03a7") -(package! dtrt-indent :pin "48221c928b72746d18c1e284c45748a0c2f1691f") -(package! helpful :pin "e511e8dbd32a8b8423f07178f0ea7c1ecfc63935") +(package! better-jumper :pin "6d240032ca") +(package! dtrt-indent :pin "48221c928b") +(package! helpful :pin "e511e8dbd3") (when IS-MAC - (package! ns-auto-titlebar :pin "1efc30d38509647b417f05587fd7003457719256")) -(package! pcre2el :pin "0b5b2a2c173aab3fd14aac6cf5e90ad3bf58fa7d") -(package! smartparens :pin "9449ae08593180ba99e4517897e8e825d3c422a8") + (package! ns-auto-titlebar :pin "1efc30d385")) +(package! pcre2el :pin "0b5b2a2c17") +(package! smartparens :pin "9449ae0859") (package! so-long :built-in 'prefer ; included in Emacs 27+ ;; REVIEW so-long is slated to be published to ELPA eventually, but until then ;; I've created my own mirror for it because git.savannah.gnu.org runs ;; on a potato. :recipe (:host github :repo "hlissner/emacs-so-long") - :pin "ed666b0716f60e8988c455804de24b55919e71ca") -(package! undo-tree :pin "1d91157366d1dcae889057d58526a5bd36e3febe") + :pin "ed666b0716") +(package! undo-tree :pin "1d91157366") (package! ws-butler ;; Use my fork of ws-butler, which has a few choice improvements and ;; optimizations (the original has been abandoned). :recipe (:host github :repo "hlissner/ws-butler") - :pin "e4430d3778a1a11cc4d4770ce8d070ba71d38f07") + :pin "e4430d3778") (unless IS-WINDOWS - (package! xclip :pin "88003b782e0a60eab1c8a2fd8b7f140fb2328271")) + (package! xclip :pin "88003b782e")) ;; core-projects.el -(package! projectile :pin "1e7b37f0ae07a6b4ac1b1a5f0e5422cfcb8e1c55") +(package! projectile :pin "27a0da9cdc") ;; core-keybinds.el -(package! general :pin "f6e928622d78d927c7043da904782ed7160ea803") -(package! which-key :pin "1e3640e48c31f8062f018b5fc84acad696a0ea2a") +(package! general :pin "f6e928622d") +(package! which-key :pin "db3d003e90") diff --git a/docs/api.org b/docs/api.org index 7e7efad6e..a363d2add 100644 --- a/docs/api.org +++ b/docs/api.org @@ -405,7 +405,7 @@ These are side-by-side comparisons, showing how to bind keys with and without (package! ansible :recipe (:nonrecursive t)) ;; To pin a package to a specific commit: -(package! evil :pin "e7bc39de2f961505e8e112da8c1b315ae8afce52") +(package! evil :pin "e7bc39de2f9") ;; ...or branch: (package! evil :recipe (:branch "stable")) ;; To unpin a pinned package: diff --git a/modules/app/calendar/packages.el b/modules/app/calendar/packages.el index cde3a8212..9f10dc730 100644 --- a/modules/app/calendar/packages.el +++ b/modules/app/calendar/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; app/calendar/packages.el -(package! calfw :pin "03abce97620a4a7f7ec5f911e669da9031ab9088") -(package! calfw-org :pin "03abce97620a4a7f7ec5f911e669da9031ab9088") -(package! org-gcal :pin "6821e349673e9ba8d7ae7b84789f931889273dc0") +(package! calfw :pin "03abce9762") +(package! calfw-org :pin "03abce9762") +(package! org-gcal :pin "6821e34967") diff --git a/modules/app/irc/packages.el b/modules/app/irc/packages.el index 1d05b5bda..fe52975f8 100644 --- a/modules/app/irc/packages.el +++ b/modules/app/irc/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; app/irc/packages.el -(package! circe :pin "0c79138fb2d37940654649787cb17cb619268748") -(package! circe-notifications :pin "291149ac12877bbd062da993479d3533a26862b0") +(package! circe :pin "0c79138fb2") +(package! circe-notifications :pin "291149ac12") diff --git a/modules/app/rss/packages.el b/modules/app/rss/packages.el index ba34c5f50..1d33be22a 100644 --- a/modules/app/rss/packages.el +++ b/modules/app/rss/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; app/rss/packages.el -(package! elfeed :pin "fb7de7b6d299bb4190fed3cab541dbf5a5a1bbcd") -(package! elfeed-org :pin "77b6bbf222487809813de260447d31c4c59902c9") +(package! elfeed :pin "3f0edb1737") +(package! elfeed-org :pin "77b6bbf222") diff --git a/modules/app/twitter/packages.el b/modules/app/twitter/packages.el index 373b92adb..d5ef4732c 100644 --- a/modules/app/twitter/packages.el +++ b/modules/app/twitter/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; app/twitter/packages.el -(package! twittering-mode :pin "114891e8fdb4f06b1326a6cf795e49c205cf9e29") -(package! avy :pin "cf95ba9582121a1c2249e3c5efdc51acd566d190") +(package! twittering-mode :pin "114891e8fd") +(package! avy :pin "cf95ba9582") diff --git a/modules/checkers/grammar/packages.el b/modules/checkers/grammar/packages.el index 4bf213172..052e9207c 100644 --- a/modules/checkers/grammar/packages.el +++ b/modules/checkers/grammar/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; checkers/grammar/packages.el -(package! langtool :pin "37e1e007e80fc01b040b7da21be5a628fbddfb1a") -(package! writegood-mode :pin "b71757ec337e226909fb0422f0224e31acc71733") +(package! langtool :pin "a71ed02ce0") +(package! writegood-mode :pin "b71757ec33") diff --git a/modules/checkers/spell/packages.el b/modules/checkers/spell/packages.el index acd4e246c..21f2a534d 100644 --- a/modules/checkers/spell/packages.el +++ b/modules/checkers/spell/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; checkers/spell/packages.el -(package! flyspell-correct :pin "7b4cf8c9ba5ac65e3bb2b62f5b72d45f4c9cf7b6") +(package! flyspell-correct :pin "b0353a41a7") (cond ((featurep! :completion ivy) - (package! flyspell-correct-ivy)) + (package! flyspell-correct-ivy :pin "b0353a41a7")) ((featurep! :completion helm) - (package! flyspell-correct-helm)) - ((package! flyspell-correct-popup))) + (package! flyspell-correct-helm :pin "b0353a41a7")) + ((package! flyspell-correct-popup :pin "b0353a41a7"))) diff --git a/modules/checkers/syntax/packages.el b/modules/checkers/syntax/packages.el index e8d89bff0..968f75a84 100644 --- a/modules/checkers/syntax/packages.el +++ b/modules/checkers/syntax/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; checkers/syntax/packages.el -(package! flycheck :pin "269237f6529a4ad7db5bbbc5a40c1f038accf3cd") -(package! flycheck-popup-tip :pin "ef86aad907f27ca076859d8d9416f4f7727619c6") +(package! flycheck :pin "269237f652") +(package! flycheck-popup-tip :pin "ef86aad907") (when (featurep! +childframe) - (package! flycheck-posframe :pin "2b3e94c2e427ec9831c513007460c5ea9e2225a3")) + (package! flycheck-posframe :pin "2b3e94c2e4")) ;; TODO flymake? diff --git a/modules/completion/company/packages.el b/modules/completion/company/packages.el index 0d89695b6..eda8b3c16 100644 --- a/modules/completion/company/packages.el +++ b/modules/completion/company/packages.el @@ -1,8 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; completion/company/packages.el -(package! company :pin "d5053561cb166e03051c60e5c1e05a8a926dfee5") -(package! company-dict :pin "cd7b8394f6014c57897f65d335d6b2bd65dab1f4") -(package! company-prescient :pin "7fd8c3b8028da4733434940c4aac1209281bef58") +(package! company :pin "d5053561cb") +(package! company-dict :pin "cd7b8394f6") +(package! company-prescient :pin "7fd8c3b802") (when (featurep! +childframe) - (package! company-box :pin "8fc6168f2d3a0275156dd3fdf46ba496adbab226")) + (package! company-box :pin "8fc6168f2d")) diff --git a/modules/completion/helm/packages.el b/modules/completion/helm/packages.el index b736709a7..ba150610e 100644 --- a/modules/completion/helm/packages.el +++ b/modules/completion/helm/packages.el @@ -1,18 +1,18 @@ ;; -*- no-byte-compile: t; -*- ;;; completion/helm/packages.el -(package! helm :pin "05d70ff116a696f5c18e5ad569573d8936ff01da") -(package! helm-rg :pin "785a80fe5cc87e27c5ea3d00a70049028d9e2847") -(package! helm-c-yasnippet :pin "65ca732b510bfc31636708aebcfe4d2d845b59b0") -(package! helm-company :pin "6eb5c2d730a60e394e005b47c1db018697094dde") +(package! helm :pin "c17f1c76e4") +(package! helm-rg :pin "785a80fe5c") +(package! helm-c-yasnippet :pin "65ca732b51") +(package! helm-company :pin "6eb5c2d730") (package! helm-describe-modes :recipe (:host github :repo "emacs-helm/helm-describe-modes") - :pin "11fb36af119b784539d31c6160002de1957408aa") -(package! helm-projectile :pin "5328b74dddcee8d1913803ca8167868831a07463") -(package! swiper-helm :pin "93fb6db87bc6a5967898b5fd3286954cc72a0008") + :pin "11fb36af11") +(package! helm-projectile :pin "5328b74ddd") +(package! swiper-helm :pin "93fb6db87b") (when (featurep! +fuzzy) - (package! helm-flx :pin "6640fac5cb16bee73c95b8ed1248a4e5e113690e")) + (package! helm-flx :pin "6640fac5cb")) (when (featurep! +childframe) - (package! posframe :pin "c25077158980d8322f67fc59d999c2f6e8a020b2")) + (package! posframe :pin "c250771589")) (when (featurep! :lang org) - (package! helm-org :pin "8457e1e46227bf87726e05c42cec5a4b51c2ef7b")) + (package! helm-org :pin "8457e1e462")) diff --git a/modules/completion/ido/packages.el b/modules/completion/ido/packages.el index cfa3db8c3..e90c485bd 100644 --- a/modules/completion/ido/packages.el +++ b/modules/completion/ido/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; completion/ido/packages.el -(package! flx-ido :pin "17f5c9cb2af18aa6f52910ff4a5a63591261ced5") -(package! ido-completing-read+ :pin "74861eabd0a2619be9efc4c91fe0c5e69db5f263") -(package! ido-vertical-mode :pin "16c4c1a112796ee0bcf401ea39d3e2643a89feaf") -(package! crm-custom :pin "f1aaccf64306a5f99d9bf7ba815d7ea41c15518d") +(package! flx-ido :pin "17f5c9cb2a") +(package! ido-completing-read+ :pin "74861eabd0") +(package! ido-vertical-mode :pin "16c4c1a112") +(package! crm-custom :pin "f1aaccf643") diff --git a/modules/completion/ivy/packages.el b/modules/completion/ivy/packages.el index 6d9b41aaf..484e3ed6e 100644 --- a/modules/completion/ivy/packages.el +++ b/modules/completion/ivy/packages.el @@ -1,23 +1,23 @@ ;; -*- no-byte-compile: t; -*- ;;; completion/ivy/packages.el -(package! swiper :pin "e22c8dfd28ab1874b71b68628666c22e1112495f") +(package! swiper :pin "098f8fe5ba") (package! ivy) (package! ivy-hydra) (package! counsel) -(package! amx :pin "3af93ca066aa42dd1342f1ee0ab0d02360075613") -(package! counsel-projectile :pin "cadc6de7070458781a373b052adddf102bbed302") -(package! ivy-rich :pin "7bfc7262fda46c38636eac3080980024b5881a64") -(package! wgrep :pin "379afd89ebd76f63842c8589127d66096a8bb595") +(package! amx :pin "3af93ca066") +(package! counsel-projectile :pin "cadc6de707") +(package! ivy-rich :pin "7bfc7262fd") +(package! wgrep :pin "379afd89eb") (if (featurep! +prescient) - (package! ivy-prescient :pin "7fd8c3b8028da4733434940c4aac1209281bef58") + (package! ivy-prescient :pin "7fd8c3b802") (when (featurep! +fuzzy) - (package! flx :pin "17f5c9cb2af18aa6f52910ff4a5a63591261ced5"))) + (package! flx :pin "17f5c9cb2a"))) (when (featurep! +childframe) - (package! ivy-posframe :pin "6d697ff00ac406b919eba8665b1bc18a2b423cda")) + (package! ivy-posframe :pin "6d697ff00a")) (when (featurep! +icons) - (package! all-the-icons-ivy :pin "babea626db20773de4c408acb2788e2b9c8277e3")) + (package! all-the-icons-ivy :pin "babea626db")) diff --git a/modules/config/default/packages.el b/modules/config/default/packages.el index 3c44c8386..8207564a5 100644 --- a/modules/config/default/packages.el +++ b/modules/config/default/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; config/default/packages.el -(package! avy :pin "cf95ba9582121a1c2249e3c5efdc51acd566d190") -(package! drag-stuff :pin "6d06d846cd37c052d79acd0f372c13006aa7e7c8") -(package! link-hint :pin "8d8f9505f87dc8a3b3baee7cb516f091072893a7") +(package! avy :pin "cf95ba9582") +(package! drag-stuff :pin "6d06d846cd") +(package! link-hint :pin "8d8f9505f8") (unless (featurep! :editor evil) - (package! expand-region :pin "0fa7c2d349e40c0e1de0965acf0f0b77b7070451")) + (package! expand-region :pin "0fa7c2d349")) diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index 537a10e20..2298900c0 100644 --- a/modules/editor/evil/packages.el +++ b/modules/editor/evil/packages.el @@ -1,33 +1,33 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/evil/packages.el -(package! evil :pin "d14e9e2cac539f388a1f4699eb3ffab0834aa3e4") -(package! evil-args :pin "758ad5ae54ad34202064fec192c88151c08cb387") -(package! evil-easymotion :pin "79c13ed3bce018ac09d358e642e5bd7025e93603") -(package! evil-embrace :pin "4379adea032b25e359d01a36301b4a5afdd0d1b7") -(package! evil-escape :pin "f4e9116bfbaac8c9d210c17ad488e0982291245f") -(package! evil-exchange :pin "35dd0f0662789f043bd89a9f9801ffaf4318123f") -(package! evil-indent-plus :pin "0c7501e6efed661242c3a20e0a6c79a6455c2c40") -(package! evil-nerd-commenter :pin "a5555ff02a43ddc4b54ba38e19c5a233c3a0b304") +(package! evil :pin "e00626d9fd") +(package! evil-args :pin "758ad5ae54") +(package! evil-easymotion :pin "79c13ed3bc") +(package! evil-embrace :pin "4379adea03") +(package! evil-escape :pin "f4e9116bfb") +(package! evil-exchange :pin "3030e21ee1") +(package! evil-indent-plus :pin "0c7501e6ef") +(package! evil-nerd-commenter :pin "bed56ecb88") (package! evil-numbers :recipe (:host github :repo "janpath/evil-numbers") - :pin "d988041c1fe6e941dc8d591390750b237f71f524") -(package! evil-snipe :pin "3ec8adfd4990f95fa0fab2b7019ead3596857673") -(package! evil-surround :pin "9b0b17f06cef9bac81ee4800d121265e54718a17") -(package! evil-textobj-anyblock :pin "ff00980f0634f95bf2ad9956b615a155ea8743be") -(package! evil-traces :pin "257c66bd7a9162caef3b04137af0dc9360fe3d53") -(package! evil-visualstar :pin "06c053d8f7381f91c53311b1234872ca96ced752") -(package! exato :pin "88266fa7fcfbef704032f671b94f756f2f98bd4f") + :pin "d988041c1f") +(package! evil-snipe :pin "3ec8adfd49") +(package! evil-surround :pin "9b0b17f06c") +(package! evil-textobj-anyblock :pin "ff00980f06") +(package! evil-traces :pin "257c66bd7a") +(package! evil-visualstar :pin "06c053d8f7") +(package! exato :pin "88266fa7fc") (package! evil-quick-diff :recipe (:host github :repo "rgrinberg/evil-quick-diff") - :pin "69c883720b30a892c63bc89f49d4f0e8b8028908") + :pin "69c883720b") ;; (when (featurep! +everywhere) ;; `evil-collection-neotree' uses the `neotree-make-executor' macro, but this ;; requires neotree be available during byte-compilation (while installing). (when (featurep! :ui neotree) - (package! neotree) + (package! neotree :pin "c2420a4b34") (autoload 'neotree-make-executor "neotree" nil nil 'macro)) - (package! evil-collection :pin "8532282e6492ce92d8c54e43ce9e9ce616d8ab5f")) + (package! evil-collection :pin "e9a592e5ee")) diff --git a/modules/editor/file-templates/packages.el b/modules/editor/file-templates/packages.el index ca8ef567f..67d4ada0e 100644 --- a/modules/editor/file-templates/packages.el +++ b/modules/editor/file-templates/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/file-templates/packages.el -(package! yasnippet :pin "3bf9a3b1af37174a004798b7195826af0123fa6a") +(package! yasnippet :pin "3bf9a3b1af") diff --git a/modules/editor/fold/packages.el b/modules/editor/fold/packages.el index e582a306f..b236d8ae9 100644 --- a/modules/editor/fold/packages.el +++ b/modules/editor/fold/packages.el @@ -2,4 +2,4 @@ ;;; editor/fold/packages.el (when (featurep! :editor evil) - (package! evil-vimish-fold :pin "c617fecb91303f8c63f85a6101a503fdc88aae84")) + (package! evil-vimish-fold :pin "b6e0e6b91b")) diff --git a/modules/editor/format/packages.el b/modules/editor/format/packages.el index cb39bfba3..752c0ef77 100644 --- a/modules/editor/format/packages.el +++ b/modules/editor/format/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/format/packages.el -(package! format-all :pin "d126830a739a565f858ae3e31887881bc07e8fe6") +(package! format-all :pin "d126830a73") diff --git a/modules/editor/god/packages.el b/modules/editor/god/packages.el index f3b109a27..f5455d0d8 100644 --- a/modules/editor/god/packages.el +++ b/modules/editor/god/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/god/packages.el -(package! god-mode :pin "344167ed9b4c212273dd056e7481cf1373b461d0") +(package! god-mode :pin "344167ed9b") diff --git a/modules/editor/lispy/packages.el b/modules/editor/lispy/packages.el index 34010ffc1..4504bb409 100644 --- a/modules/editor/lispy/packages.el +++ b/modules/editor/lispy/packages.el @@ -1,7 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/lispyville/packages.el -(package! lispy :pin "8db042d40bccc628dd406c1fe712431fb76b3288") - +(package! lispy :pin "d6b19fe2c3") (when (featurep! :editor evil) - (package! lispyville :pin "56198f1c4488a52a0d0512c717dff36e8b9fbfd0")) + (package! lispyville :pin "56198f1c44")) diff --git a/modules/editor/multiple-cursors/packages.el b/modules/editor/multiple-cursors/packages.el index 60f21134f..38e273546 100644 --- a/modules/editor/multiple-cursors/packages.el +++ b/modules/editor/multiple-cursors/packages.el @@ -3,7 +3,7 @@ (cond ((featurep! :editor evil) - (package! evil-multiedit :pin "c3d43b1a65c193755dae2c41ce5c072c4c01b35d") - (package! evil-mc :pin "007d471e26b44e692250804f82f06ebbd27b6ec4")) + (package! evil-multiedit :pin "c3d43b1a65") + (package! evil-mc :pin "007d471e26")) - ((package! multiple-cursors :pin "b880554d04b8f61165afba7d4de19ac9e39bb7ab"))) + ((package! multiple-cursors :pin "b880554d04"))) diff --git a/modules/editor/objed/packages.el b/modules/editor/objed/packages.el index e83a2f1a0..49c15be40 100644 --- a/modules/editor/objed/packages.el +++ b/modules/editor/objed/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/objed/packages.el -(package! objed :pin "8dc17701d1dc65b5d2113e7ca406136bf612bc9e") +(package! objed :pin "8dc17701d1") diff --git a/modules/editor/parinfer/packages.el b/modules/editor/parinfer/packages.el index a3badc94c..df109114b 100644 --- a/modules/editor/parinfer/packages.el +++ b/modules/editor/parinfer/packages.el @@ -11,4 +11,4 @@ ;; separate session: (autoload 'evil-define-key "evil-core" nil nil 'macro)) -(package! parinfer :pin "eaad857ae4351f72a561ee3dec8943713510003f") +(package! parinfer :pin "eaad857ae4") diff --git a/modules/editor/rotate-text/packages.el b/modules/editor/rotate-text/packages.el index 846641da6..15c7216dd 100644 --- a/modules/editor/rotate-text/packages.el +++ b/modules/editor/rotate-text/packages.el @@ -3,4 +3,4 @@ (package! rotate-text :recipe (:host github :repo "debug-ito/rotate-text.el") - :pin "48f193697db996855aee1ad2bc99b38c6646fe76") + :pin "48f193697d") diff --git a/modules/editor/snippets/packages.el b/modules/editor/snippets/packages.el index 9dda3d424..7134aa58b 100644 --- a/modules/editor/snippets/packages.el +++ b/modules/editor/snippets/packages.el @@ -1,11 +1,10 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/snippets/packages.el -(package! yasnippet :pin "3bf9a3b1af37174a004798b7195826af0123fa6a") -(package! auto-yasnippet :pin "db9e0dd4335b2202cd5dac95bbbc87a1032d9bbe") - +(package! yasnippet :pin "3bf9a3b1af") +(package! auto-yasnippet :pin "db9e0dd433") (package! doom-snippets :recipe (:host github :repo "hlissner/doom-snippets" :files ("*.el" "*")) - :pin "30a78a2da2b514e8da15b4c5df2df48356cfe4d8") + :pin "7ba920d1de") diff --git a/modules/editor/word-wrap/packages.el b/modules/editor/word-wrap/packages.el index 1e31f226e..8a82b406d 100644 --- a/modules/editor/word-wrap/packages.el +++ b/modules/editor/word-wrap/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/word-wrap/packages.el -(package! adaptive-wrap :pin "1810c0ee8d827dd502ddeaae5bd759d4811fcbce") +(package! adaptive-wrap :pin "1810c0ee8d") diff --git a/modules/emacs/dired/packages.el b/modules/emacs/dired/packages.el index f36bbb78c..c33be02f3 100644 --- a/modules/emacs/dired/packages.el +++ b/modules/emacs/dired/packages.el @@ -1,12 +1,12 @@ ;; -*- no-byte-compile: t; -*- ;;; emacs/dired/packages.el -(package! diredfl :pin "83567d00affce66a4e501563eddd0bd436ac48d0") -(package! dired-git-info :pin "b47f2b0c3a6cb9b7a62a4ee2605a492e512d40a9") -(package! diff-hl :pin "fb9eb1cd3c4c6ed24b93de1a7cfb369d2983be74") -(package! dired-rsync :pin "698294cbd4b731abcb617f29aa133bc9c60b2651") +(package! diredfl :pin "83567d00af") +(package! dired-git-info :pin "b47f2b0c3a") +(package! diff-hl :pin "fb9eb1cd3c") +(package! dired-rsync :pin "698294cbd4") (when (featurep! +ranger) - (package! ranger :pin "c3f349e52f5c50926dc0f285c97676934f50bc18")) + (package! ranger :pin "af6f781a60")) (when (featurep! +icons) - (package! all-the-icons-dired :pin "980b7747d6c4a7992a1ec56afad908956db0a519")) -(package! fd-dired :pin "fd4c3f490b0b6727592b85f1635e57638dec8f91") + (package! all-the-icons-dired :pin "980b7747d6")) +(package! fd-dired :pin "fd4c3f490b") diff --git a/modules/emacs/ibuffer/packages.el b/modules/emacs/ibuffer/packages.el index 5aa8b6381..f458bd25d 100644 --- a/modules/emacs/ibuffer/packages.el +++ b/modules/emacs/ibuffer/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; emacs/ibuffer/packages.el -(package! ibuffer-projectile :pin "76496214144687cee0b5139be2e61b1e400cac87") -(package! ibuffer-vc :pin "64cb03887bcae6127e80f0d9342c33206e21d2d2") +(package! ibuffer-projectile :pin "7649621414") +(package! ibuffer-vc :pin "64cb03887b") diff --git a/modules/emacs/vc/packages.el b/modules/emacs/vc/packages.el index 86a55777b..d943e18a1 100644 --- a/modules/emacs/vc/packages.el +++ b/modules/emacs/vc/packages.el @@ -5,7 +5,7 @@ (package! vc-annotate :built-in t) (package! smerge-mode :built-in t) -(package! browse-at-remote :pin "1a9392e9d1fad4e1aafb25b68b4e6857fde8f564") -(package! git-timemachine :pin "391eb61050de321101e631fcf373fc70ec6e7700") -(package! gitconfig-mode :pin "55468314a5f6b77d2c96be62c7005ac94545e217") -(package! gitignore-mode :pin "55468314a5f6b77d2c96be62c7005ac94545e217") +(package! browse-at-remote :pin "1a9392e9d1") +(package! git-timemachine :pin "391eb61050") +(package! gitconfig-mode :pin "55468314a5") +(package! gitignore-mode :pin "55468314a5") diff --git a/modules/email/mu4e/packages.el b/modules/email/mu4e/packages.el index 7a1d07291..d30ae6e06 100644 --- a/modules/email/mu4e/packages.el +++ b/modules/email/mu4e/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; email/mu4e/packages.el -(package! mu4e-maildirs-extension :pin "3ef4c48516be66e73d24fe764aadbcfc126b7964") +(package! mu4e-maildirs-extension :pin "3ef4c48516") diff --git a/modules/email/notmuch/packages.el b/modules/email/notmuch/packages.el index 4c55641da..d1f108bf7 100644 --- a/modules/email/notmuch/packages.el +++ b/modules/email/notmuch/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; email/notmuch/packages.el -(package! notmuch :pin "0a0413f5142b578ee6c5ba45e1dfcdc522f57e42") -(package! org-mime :pin "b1899762170eaa656555ce62c58e613ca3509ec4") +(package! notmuch :pin "aba7fb375b") +(package! org-mime :pin "b189976217") (when (featurep! :completion ivy) - (package! counsel-notmuch :pin "a4a1562935e4180c42524c51609d1283e9be0688")) + (package! counsel-notmuch :pin "a4a1562935")) (when (featurep! :completion helm) - (package! helm-notmuch :pin "97a01497e079a7b6505987e9feba6b603bbec288")) + (package! helm-notmuch :pin "97a01497e0")) diff --git a/modules/email/wanderlust/packages.el b/modules/email/wanderlust/packages.el index 6f7eaccba..db6ab91ab 100644 --- a/modules/email/wanderlust/packages.el +++ b/modules/email/wanderlust/packages.el @@ -4,7 +4,7 @@ ;; HACK These are wanderlust's dependencies (wanderlust depends on semi, semi ;; depends on flim, flim on apel), but both flim and apel have non-standard ;; default branches, which straight cannot detect without our help. -(package! flim :recipe (:branch "flim-1_14-wl")) -(package! apel :recipe (:branch "apel-wl")) +(package! flim :recipe (:branch "flim-1_14-wl") :pin "e4bd54fd7d") +(package! apel :recipe (:branch "apel-wl") :pin "d146ddbf88") -(package! wanderlust) +(package! wanderlust :pin "7a919e422a") diff --git a/modules/input/chinese/packages.el b/modules/input/chinese/packages.el index 29b31c858..0e7b5300d 100644 --- a/modules/input/chinese/packages.el +++ b/modules/input/chinese/packages.el @@ -1,8 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; input/chinese/packages.el -(package! pyim :pin "bbeb68605eed6f0863d27558c42258416c7ada55") -(package! fcitx :pin "12dc2638ddd15c8f6cfaecb20e1f428ab2bb5624") -(package! ace-pinyin :pin "8b2e9335b02486730ea4ceee790130cc5328f9ea") -(package! pangu-spacing :pin "f92898949ba3bf991fd229416f3bbb54e9c6c223") -(package! pyim :pin "bbeb68605eed6f0863d27558c42258416c7ada55") +(package! pyim :pin "bbeb68605e") +(package! fcitx :pin "12dc2638dd") +(package! ace-pinyin :pin "8b2e9335b0") +(package! pangu-spacing :pin "f92898949b") +(package! pyim :pin "bbeb68605e") diff --git a/modules/input/japanese/packages.el b/modules/input/japanese/packages.el index 765587543..cddf2a4b6 100644 --- a/modules/input/japanese/packages.el +++ b/modules/input/japanese/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; input/japanese/packages.el -(package! migemo :pin "f42832c8ac462ecbec9a16eb781194f876fba64a") -(package! avy-migemo :pin "922a6dd82c0bfa316b0fbb56a9d4dd4ffa5707e7") -(package! ddskk :pin "51747f7afb5b66675bd9e1e812c93a8aba4d8249") -(package! pangu-spacing :pin "f92898949ba3bf991fd229416f3bbb54e9c6c223") +(package! migemo :pin "f42832c8ac") +(package! avy-migemo :pin "922a6dd82c") +(package! ddskk :pin "51747f7afb") +(package! pangu-spacing :pin "f92898949b") diff --git a/modules/lang/agda/packages.el b/modules/lang/agda/packages.el index ad7731eff..38614c430 100644 --- a/modules/lang/agda/packages.el +++ b/modules/lang/agda/packages.el @@ -6,11 +6,11 @@ :recipe (:host github :repo "agda/agda" :files ("src/data/emacs-mode/agda-input.el") :nonrecursive t) - :pin "4f02b991d6d5eb6dd132591b90d839118e2ab30a") + :pin "e9e23b973d") (package! agda2-mode :recipe (:host github :repo "agda/agda" :files ("src/data/emacs-mode/*.el" (:exclude "agda-input.el")) :nonrecursive t) - :pin "4f02b991d6d5eb6dd132591b90d839118e2ab30a")) + :pin "e9e23b973d")) diff --git a/modules/lang/assembly/packages.el b/modules/lang/assembly/packages.el index 7b87e79ff..78e44be3d 100644 --- a/modules/lang/assembly/packages.el +++ b/modules/lang/assembly/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/assembly/packages.el -(package! mips-mode :pin "75152fc78baa762af4f83602f6cb3c8b9bcebca3") -(package! haxor-mode :pin "6fa25a8e6b6a59481bc0354c2fe1e0ed53cbdc91") -(package! nasm-mode :pin "65ca6546fc395711fac5b3b4299e76c2303d43a8") +(package! mips-mode :pin "75152fc78b") +(package! haxor-mode :pin "6fa25a8e6b") +(package! nasm-mode :pin "65ca6546fc") diff --git a/modules/lang/cc/packages.el b/modules/lang/cc/packages.el index 2b76755a5..824e64f89 100644 --- a/modules/lang/cc/packages.el +++ b/modules/lang/cc/packages.el @@ -3,30 +3,30 @@ (package! cmake-mode :recipe (:host github :repo "emacsmirror/cmake-mode" :files (:defaults "*")) - :pin "bfe85bc009c4778b44e246d5c27d0f888f0bfc0c") -(package! cuda-mode :pin "9ae9eacfdba3559b5456342d0d03296290df8ff5") -(package! demangle-mode :pin "06903d731dfde110e10b979dcc7624ef6dbb5ac8") -(package! disaster :pin "10a785facc60d89d78e0d5177985ab1af1741bb4") -(package! modern-cpp-font-lock :pin "02f104701bc34c146d22e3143ae59ef362999098") -(package! opencl-mode :pin "55cb49c8243e6420961d719faced035bc547c1ef") + :pin "bfe85bc009") +(package! cuda-mode :pin "9ae9eacfdb") +(package! demangle-mode :pin "06903d731d") +(package! disaster :pin "10a785facc") +(package! modern-cpp-font-lock :pin "02f104701b") +(package! opencl-mode :pin "55cb49c824") -(when (package! glsl-mode :pin "43d906688a8e2fe650005806eb69bea131d9321a") +(when (package! glsl-mode :pin "43d906688a") (when (featurep! :completion company) (package! company-glsl :recipe (:host github :repo "Kaali/company-glsl") - :pin "404cd0694ab34971f9c01eb22126cd2e7d3f9dc4"))) + :pin "404cd0694a"))) (if (featurep! +lsp) - (package! ccls :pin "aab3e31fd716daf59f9794e62d473357263e8cc0") - (when (package! irony :pin "8387098286132abd6472a8f49750e38ddb8096b6") - (package! irony-eldoc :pin "0df5831eaae264a25422b061eb2792aadde8b3f2") + (package! ccls :pin "aab3e31fd7") + (when (package! irony :pin "8387098286") + (package! irony-eldoc :pin "0df5831eaa") (when (featurep! :checkers syntax) - (package! flycheck-irony :pin "42dbecd4a865cabeb301193bb4d660e26ae3befe")) + (package! flycheck-irony :pin "42dbecd4a8")) (when (featurep! :completion company) - (package! company-irony :pin "b44711dfce445610c1ffaec4951c6ff3882b216a") - (package! company-irony-c-headers :pin "72c386aeb079fb261d9ec02e39211272f76bbd97"))) - (when (package! rtags :pin "5f1eaf4355e2093afb2b7828f3ebddfcad1234be") + (package! company-irony :pin "b44711dfce") + (package! company-irony-c-headers :pin "72c386aeb0"))) + (when (package! rtags :pin "92c5126e98") (when (featurep! :completion ivy) - (package! ivy-rtags :pin "5f1eaf4355e2093afb2b7828f3ebddfcad1234be")) + (package! ivy-rtags :pin "92c5126e98")) (when (featurep! :completion helm) - (package! helm-rtags :pin "5f1eaf4355e2093afb2b7828f3ebddfcad1234be")))) + (package! helm-rtags :pin "92c5126e98")))) diff --git a/modules/lang/clojure/packages.el b/modules/lang/clojure/packages.el index 5207810ec..b10e142f0 100644 --- a/modules/lang/clojure/packages.el +++ b/modules/lang/clojure/packages.el @@ -1,8 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/clojure/packages.el -(package! cider :pin "ba5680b066121a06bbf9442e54d555de38bdefb2") -(package! clj-refactor :pin "e24ba6284317dbb3e678fcad325044c628da56da") +(package! cider :pin "7437c67f0e") +(package! clj-refactor :pin "e24ba62843") (when (featurep! :checkers syntax) - (package! flycheck-joker :pin "51e99e697761ee8dab863930910abdba7607c1bd")) + (package! flycheck-joker :pin "51e99e6977")) diff --git a/modules/lang/common-lisp/packages.el b/modules/lang/common-lisp/packages.el index c75b1ea8c..d6447f4da 100644 --- a/modules/lang/common-lisp/packages.el +++ b/modules/lang/common-lisp/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/common-lisp/packages.el -(package! sly :pin "cfecd21410e48a111b8d470c911598b270882921") -(package! sly-macrostep :pin "5113e4e926cd752b1d0bcc1508b3ebad5def5fad") -(package! sly-repl-ansi-color :pin "b9cd52d1cf927bf7e08582d46ab0bcf1d4fb5048") +(package! sly :pin "cfecd21410") +(package! sly-macrostep :pin "5113e4e926") +(package! sly-repl-ansi-color :pin "b9cd52d1cf") diff --git a/modules/lang/coq/packages.el b/modules/lang/coq/packages.el index eee3809ee..e10e63f3c 100644 --- a/modules/lang/coq/packages.el +++ b/modules/lang/coq/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/coq/packages.el -(package! proof-general :pin "bee3f802ada921fb8988edb96a8b41429f7c622c") +(package! proof-general :pin "89829c25b9") -(package! company-coq :pin "6e8bc2e367e8184079b7f4b4ab359b64ab884d7c") +(package! company-coq :pin "6e8bc2e367") diff --git a/modules/lang/crystal/packages.el b/modules/lang/crystal/packages.el index 86a66b855..434f80387 100644 --- a/modules/lang/crystal/packages.el +++ b/modules/lang/crystal/packages.el @@ -1,8 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/crystal/packages.el -(package! crystal-mode :pin "2428b016243e78a0312cf6b3ba6939e7169a1405") -(package! inf-crystal :pin "02007b2a2a3bea44902d7c83c4acba1e39d278e3") +(package! crystal-mode :pin "2428b01624") +(package! inf-crystal :pin "02007b2a2a") (when (featurep! :checkers syntax) - (package! flycheck-crystal :pin "2428b016243e78a0312cf6b3ba6939e7169a1405") - (package! flycheck-ameba :pin "0c4925ae0e998818326adcb47ed27ddf9761c7dc")) + (package! flycheck-crystal :pin "2428b01624") + (package! flycheck-ameba :pin "0c4925ae0e")) diff --git a/modules/lang/csharp/packages.el b/modules/lang/csharp/packages.el index dd42ac526..b05b5d4c4 100644 --- a/modules/lang/csharp/packages.el +++ b/modules/lang/csharp/packages.el @@ -1,10 +1,10 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/csharp/packages.el -(package! csharp-mode :pin "57bd21bda4edc16671a85c7d6d51484e40a6e640") +(package! csharp-mode :pin "57bd21bda4") (unless (featurep! +lsp) - (package! omnisharp :pin "e658a18a762438c3e1737612737b05d02a21ca2a")) + (package! omnisharp :pin "e658a18a76")) (when (featurep! +unity) - (package! shader-mode :pin "d7dc8d0d6fe8914e8b6d5cf2081ad61e6952359c")) + (package! shader-mode :pin "d7dc8d0d6f")) diff --git a/modules/lang/data/packages.el b/modules/lang/data/packages.el index 80aab8218..e27bf57ea 100644 --- a/modules/lang/data/packages.el +++ b/modules/lang/data/packages.el @@ -1,12 +1,12 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/data/packages.el -(package! graphql-mode :pin "7c37aee28bf8c8ffb3da73df5571c4e1e352562b") -(package! json-mode :pin "0e819e519ae17a2686e0881c4ca51fa873fa9b83") -(package! jsonnet-mode :pin "2b90b4e12a11c42df0f1e5db327a50555b6ff023") -(package! yaml-mode :pin "cecf4b106b0c4236931b14919fdf87ff3546e2c9") -(package! csv-mode :pin "fbf942e127e68ac8cfcd08a53500ca554fcac079") -(package! dhall-mode :pin "ef4d33debe224c6ba37e51a29b9dc8b74f20f1c2") +(package! graphql-mode :pin "7c37aee28b") +(package! json-mode :pin "0e819e519a") +(package! jsonnet-mode :pin "2b90b4e12a") +(package! yaml-mode :pin "cecf4b106b") +(package! csv-mode :pin "fbf942e127") +(package! dhall-mode :pin "ef4d33debe") (package! protobuf-mode :recipe (:host github :repo "emacsmirror/protobuf-mode" :files (:defaults "*")) - :pin "94b7bd7e8b87ff100c603153d2f8d7a2a08ab50b") + :pin "94b7bd7e8b") diff --git a/modules/lang/elixir/packages.el b/modules/lang/elixir/packages.el index 78b423811..81d4f4f05 100644 --- a/modules/lang/elixir/packages.el +++ b/modules/lang/elixir/packages.el @@ -2,7 +2,7 @@ ;;; lang/elixir/packages.el ;; +elixir.el -(package! elixir-mode :pin "5920edcf19f0526bbee97b01435c4b8bf3b59c36") -(package! alchemist :pin "6f99367511ae209f8fe2c990779764bbb4ccb6ed") +(package! elixir-mode :pin "231291ecad") +(package! alchemist :pin "6f99367511") (when (featurep! :checkers syntax) - (package! flycheck-credo :pin "e88f11ead53805c361ec7706e44c3dfee1daa19f")) + (package! flycheck-credo :pin "e88f11ead5")) diff --git a/modules/lang/elm/packages.el b/modules/lang/elm/packages.el index 8d67916b0..6485cbe2f 100644 --- a/modules/lang/elm/packages.el +++ b/modules/lang/elm/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/elm/packages.el -(package! elm-mode :pin "5df694e307cf8fa5a3555d800984aa4ebb40664f") +(package! elm-mode :pin "dd868e55ff") (when (featurep! :checkers syntax) - (package! flycheck-elm :pin "debd0af563cb6c2944367a691c7fa3021d9378c1")) + (package! flycheck-elm :pin "debd0af563")) diff --git a/modules/lang/emacs-lisp/packages.el b/modules/lang/emacs-lisp/packages.el index e3431f349..97a112caa 100644 --- a/modules/lang/emacs-lisp/packages.el +++ b/modules/lang/emacs-lisp/packages.el @@ -3,13 +3,13 @@ (package! elisp-mode :built-in t) -(package! highlight-quoted :pin "24103478158cd19fbcfb4339a3f1fa1f054f1469") -(package! macrostep :pin "424e3734a1ee526a1bd7b5c3cd1d3ef19d184267") -(package! overseer :pin "02d49f582e80e36b4334c9187801c5ecfb027789") -(package! elisp-def :pin "368b04da68783601b52e3169312183381871cf9e") -(package! elisp-demos :pin "bec206bf1b2ccc899120ec4ca2fcdcf30dcf0da8") +(package! highlight-quoted :pin "2410347815") +(package! macrostep :pin "424e3734a1") +(package! overseer :pin "02d49f582e") +(package! elisp-def :pin "368b04da68") +(package! elisp-demos :pin "bec206bf1b") (when (featurep! :checkers syntax) - (package! flycheck-cask :pin "3457ae553c4feaf8168008f063d78fdde8fb5f94")) + (package! flycheck-cask :pin "3457ae553c")) -(package! buttercup :pin "b297b1dbfa21c87ffbcfc12d19262765387848de") +(package! buttercup :pin "178c7954f8") diff --git a/modules/lang/erlang/packages.el b/modules/lang/erlang/packages.el index 0a6f74a5e..a047ad6e2 100644 --- a/modules/lang/erlang/packages.el +++ b/modules/lang/erlang/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; private/erlang/packages.el -(package! erlang :pin "cf6cf5e5f82e348ecb9bb02d70027fc4961aee3d") +(package! erlang :pin "c15eb5fdf7") (when (featurep! :checkers syntax) - (package! flycheck-rebar3 :pin "3cca1268c54643204b5bae52e3f0bf5bc921018c")) + (package! flycheck-rebar3 :pin "3cca1268c5")) (unless (featurep! +lsp) (when (featurep! :completion ivy) - (package! ivy-erlang-complete :pin "7d60ed111dbfd34ab6ec1b07c06e2d16a5380b9a")) + (package! ivy-erlang-complete :pin "7d60ed111d")) (when (featurep! :completion company) - (package! company-erlang :pin "bc0524a16f17b66c7397690e4ca0e004f09ea6c5"))) + (package! company-erlang :pin "bc0524a16f"))) diff --git a/modules/lang/ess/packages.el b/modules/lang/ess/packages.el index 2456cbaa7..bd2f024f0 100644 --- a/modules/lang/ess/packages.el +++ b/modules/lang/ess/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/ess/packages.el -(package! ess :pin "2812b85880807e5da35dbf2e69fc1b577f2ad7f4") -(package! ess-R-data-view :pin "d6e98d3ae1e2a2ea39a56eebcdb73e99d29562e9") +(package! ess :pin "2812b85880") +(package! ess-R-data-view :pin "d6e98d3ae1") diff --git a/modules/lang/factor/packages.el b/modules/lang/factor/packages.el index 9538471e0..0d7344b40 100644 --- a/modules/lang/factor/packages.el +++ b/modules/lang/factor/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/factor/packages.el -(package! fuel :pin "b3582dd323e5db3cd19efaae3a071578086d244b") +(package! fuel :pin "a62ea78d73") diff --git a/modules/lang/faust/packages.el b/modules/lang/faust/packages.el index 60c373be7..10572a3ac 100644 --- a/modules/lang/faust/packages.el +++ b/modules/lang/faust/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/faust/packages.el -(package! faustine :pin "07a38963111518f86123802f9d477be0d4689a3f") +(package! faustine :pin "07a3896311") diff --git a/modules/lang/fsharp/packages.el b/modules/lang/fsharp/packages.el index 37f18531a..e57e0b023 100644 --- a/modules/lang/fsharp/packages.el +++ b/modules/lang/fsharp/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/fsharp/packages.el -(package! fsharp-mode :pin "0415c45489fa7d83e9a7c94530aa1943682aabf9") +(package! fsharp-mode :pin "8c86e38b93") diff --git a/modules/lang/go/packages.el b/modules/lang/go/packages.el index 0b7657817..ad5a067c0 100644 --- a/modules/lang/go/packages.el +++ b/modules/lang/go/packages.el @@ -1,15 +1,15 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/go/packages.el -(package! go-eldoc :pin "cbbd2ea1e94a36004432a9ac61414cb5a95a39bd") -(package! go-guru :pin "53c76cddf54638dea5e4cae99ce0181de28e1064") -(package! go-mode :pin "53c76cddf54638dea5e4cae99ce0181de28e1064") -(package! gorepl-mode :pin "6a73bf352e8d893f89cad36c958c4db2b5e35e07") -(package! go-tag :pin "59b243f2fa079d9de9d56f6e2d94397e9560310a") -(package! go-gen-test :pin "44c202ac97e728e93a35cee028a0ea8dd6e4292c") +(package! go-eldoc :pin "cbbd2ea1e9") +(package! go-guru :pin "53c76cddf5") +(package! go-mode :pin "53c76cddf5") +(package! gorepl-mode :pin "6a73bf352e") +(package! go-tag :pin "59b243f2fa") +(package! go-gen-test :pin "44c202ac97") (when (featurep! :completion company) - (package! company-go :pin "939b4a677f2f843ea13d9dd90206d57111f0ceb9")) + (package! company-go :pin "939b4a677f")) (when (featurep! :checkers syntax) - (package! flycheck-golangci-lint :pin "8e446c68311048f0b87febf8ef0379e29d358851")) + (package! flycheck-golangci-lint :pin "8e446c6831")) diff --git a/modules/lang/haskell/packages.el b/modules/lang/haskell/packages.el index ddf384dfb..69ced970b 100644 --- a/modules/lang/haskell/packages.el +++ b/modules/lang/haskell/packages.el @@ -1,13 +1,13 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/haskell/packages.el -(package! haskell-mode :pin "1ac4de398f9e19f322fa168ebf58527458e43df5") +(package! haskell-mode :pin "3cf99d7f0e") (when (featurep! +dante) - (package! dante :pin "3e532e8d7ea02d6045345d1175e05b616882112a") - (package! attrap :pin "4cf3e4a16255997e7c3c39682a72866a0a37dd4b")) + (package! dante :pin "3e532e8d7e") + (package! attrap :pin "4cf3e4a162")) (when (featurep! +lsp) - (package! lsp-haskell :pin "6d481f97e62b0fd2455e8f7a36429981277445b1")) + (package! lsp-haskell :pin "6d481f97e6")) ;; DEPRECATED (when (featurep! +intero) - (package! intero :pin "30d8e7330c9b20c2905035bc417fa8645e7b4b85")) + (package! intero :pin "30d8e7330c")) diff --git a/modules/lang/hy/packages.el b/modules/lang/hy/packages.el index 5e559dc2b..5fd2ae15b 100644 --- a/modules/lang/hy/packages.el +++ b/modules/lang/hy/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/hy/packages.el -(package! hy-mode :pin "e2d5fecdaec602788aa7123ed13651c888b8d94b") +(package! hy-mode :pin "e2d5fecdae") diff --git a/modules/lang/idris/packages.el b/modules/lang/idris/packages.el index 721192b51..1e1a3438b 100644 --- a/modules/lang/idris/packages.el +++ b/modules/lang/idris/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/idris/packages.el -(package! idris-mode :pin "acc8835449475d7cd205aba213fdd3d41c38ba40") +(package! idris-mode :pin "acc8835449") diff --git a/modules/lang/java/packages.el b/modules/lang/java/packages.el index 6de3c217d..d98ce9545 100644 --- a/modules/lang/java/packages.el +++ b/modules/lang/java/packages.el @@ -1,16 +1,16 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/java/packages.el -(package! android-mode :pin "d5332e339a1f5e30559a53feffb8442ca79265d6") -(package! groovy-mode :pin "cafdd98e06a3bbff213f3ccb163de2c42d412b66") +(package! android-mode :pin "d5332e339a") +(package! groovy-mode :pin "cafdd98e06") (when (featurep! +meghanada) - (package! meghanada :pin "70bfbf553c7b7fb1928672e9a95b7137e02c2d4b")) + (package! meghanada :pin "70bfbf553c")) (when (featurep! +eclim) - (package! eclim :pin "23f5b294f833ce58516d7b9ae08a7792d70022a1") + (package! eclim :pin "23f5b294f8") (when (featurep! :completion company) - (package! company-emacs-eclim :pin "23f5b294f833ce58516d7b9ae08a7792d70022a1"))) + (package! company-emacs-eclim :pin "23f5b294f8"))) (when (featurep! +lsp) - (package! lsp-java :pin "5c3da6cf3a27dc57df1d537bdacbb318ca628bcf")) + (package! lsp-java :pin "dbeeee9c74")) diff --git a/modules/lang/javascript/packages.el b/modules/lang/javascript/packages.el index 62f0d4072..9e0a75411 100644 --- a/modules/lang/javascript/packages.el +++ b/modules/lang/javascript/packages.el @@ -2,21 +2,21 @@ ;;; lang/javascript/packages.el ;; Major modes -(package! coffee-mode :pin "86ab8aae8662e8eff54d3013010b9c693b16eac5") -(package! js2-mode :pin "b3841a7a304d9d1328fdb0868fbbecf0c2f9831f") -(package! rjsx-mode :pin "0e7fa6b4facdec4f85a7a8865bdf59dfd57217b5") -(package! typescript-mode :pin "761f3aec6e192ddf0a9f1cc3d5d2ee77d32cb06c") +(package! coffee-mode :pin "86ab8aae86") +(package! js2-mode :pin "b3841a7a30") +(package! rjsx-mode :pin "014c760138") +(package! typescript-mode :pin "a0f2c3ebd4") ;; Tools -(package! eslintd-fix :pin "98c669e3653bf94c236c54946c6faba7f782ef0d") -(package! js2-refactor :pin "d4c40b5fc86d3edd7c6a7d83ac86483ee1cb7a28") -(package! npm-mode :pin "3ee7c0bad5b7a041d4739ef3aaa06a3dc764e5eb") +(package! eslintd-fix :pin "98c669e365") +(package! js2-refactor :pin "d4c40b5fc8") +(package! npm-mode :pin "3ee7c0bad5") ;; Eval -(package! nodejs-repl :pin "8b9094826568485eb0c48d798ae0026cb6962b83") -(package! skewer-mode :pin "123215dd9bfa67ce5cc49cd52dd54c0ba7c7e02c") +(package! nodejs-repl :pin "8b90948265") +(package! skewer-mode :pin "123215dd9b") ;; Programming environment -(package! tide :pin "1878a097fc41ee81c40c155022c8feaaf8bfaa6d") +(package! tide :pin "1878a097fc") (when (featurep! :tools lookup) - (package! xref-js2 :pin "6f1ed5dae0c2485416196a51f2fa92f32e4b8262")) + (package! xref-js2 :pin "6f1ed5dae0")) diff --git a/modules/lang/julia/packages.el b/modules/lang/julia/packages.el index 80326fee2..3eb5b27f6 100644 --- a/modules/lang/julia/packages.el +++ b/modules/lang/julia/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/julia/packages.el -(package! julia-mode :pin "5238f9adb7dd1c161fd6130435ebf0ac3755f33c") -(package! julia-repl :pin "b11a5729709c5ca541db2b6472b6579166723060") +(package! julia-mode :pin "5238f9adb7") +(package! julia-repl :pin "b11a572970") diff --git a/modules/lang/kotlin/packages.el b/modules/lang/kotlin/packages.el index 9b1517a43..3c3d5f202 100644 --- a/modules/lang/kotlin/packages.el +++ b/modules/lang/kotlin/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/kotlin/packages.el -(package! kotlin-mode :pin "ab610996820b5cbdb032edbf8747661131603ab8") +(package! kotlin-mode :pin "ab61099682") (when (featurep! :checkers syntax) - (package! flycheck-kotlin :pin "5104ee9a3fdb7f0a0a3d3bcfd8dd3c45a9929310")) + (package! flycheck-kotlin :pin "5104ee9a3f")) diff --git a/modules/lang/latex/packages.el b/modules/lang/latex/packages.el index 886e534ba..9d0a2e206 100644 --- a/modules/lang/latex/packages.el +++ b/modules/lang/latex/packages.el @@ -1,22 +1,22 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/latex/packages.el -(package! auctex :pin "fafa28d54276a73604e696b51c6a1a36d727d3fb") -(package! adaptive-wrap :pin "1810c0ee8d827dd502ddeaae5bd759d4811fcbce") -(package! latex-preview-pane :pin "5297668a89996b50b2b62f99cba01cc544dbed2e") +(package! auctex :pin "fafa28d542") +(package! adaptive-wrap :pin "1810c0ee8d") +(package! latex-preview-pane :pin "5297668a89") ;; Optional module features: (when (featurep! +latexmk) - (package! auctex-latexmk :pin "4d353522650d7685acbf1d38f7dbc504f734bd84")) + (package! auctex-latexmk :pin "4d35352265")) ;; Features according to other user selected options (when (featurep! :completion company) - (package! company-auctex :pin "48c42c58ce2f0e693301b0cb2d085055410c1b25") - (package! company-reftex :pin "33935e96540201adab43f3a765d62289eba9e286") - (package! company-math :pin "600e49449644f6835f9dc3501bc58461999e8ab9")) + (package! company-auctex :pin "48c42c58ce") + (package! company-reftex :pin "33935e9654") + (package! company-math :pin "600e494496")) (when (featurep! :completion ivy) - (package! ivy-bibtex :pin "d4471232be26793fbf56c0ac3690b5f537c378b9")) + (package! ivy-bibtex :pin "d4471232be")) (when (featurep! :completion helm) - (package! helm-bibtex :pin "d4471232be26793fbf56c0ac3690b5f537c378b9")) + (package! helm-bibtex :pin "d4471232be")) diff --git a/modules/lang/lean/packages.el b/modules/lang/lean/packages.el index f8c4170f1..a1ed9b8d9 100644 --- a/modules/lang/lean/packages.el +++ b/modules/lang/lean/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/lean/packages.el -(package! lean-mode :pin "f26e40daad2c1bd090e440a2b931205ac3b9b613") +(package! lean-mode :pin "f26e40daad") (when (featurep! :completion company) - (package! company-lean :pin "f26e40daad2c1bd090e440a2b931205ac3b9b613")) + (package! company-lean :pin "f26e40daad")) diff --git a/modules/lang/ledger/packages.el b/modules/lang/ledger/packages.el index 1811a40a5..005ef47b3 100644 --- a/modules/lang/ledger/packages.el +++ b/modules/lang/ledger/packages.el @@ -1,10 +1,10 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/ledger/packages.el -(package! ledger-mode :pin "a514953d6a25cb29c0ec218e9824ee201c9b904d") +(package! ledger-mode :pin "a514953d6a") (when (featurep! :editor evil) - (package! evil-ledger :pin "7a9f9f5d39c42fffdba8004f8982642351f2b233")) + (package! evil-ledger :pin "7a9f9f5d39")) (when (featurep! :checkers syntax) - (package! flycheck-ledger :pin "2065beab564c23e6ab380547d19bdb5a9b3b25fc")) + (package! flycheck-ledger :pin "2065beab56")) diff --git a/modules/lang/lua/packages.el b/modules/lang/lua/packages.el index 89a9a2b30..13f322b6a 100644 --- a/modules/lang/lua/packages.el +++ b/modules/lang/lua/packages.el @@ -1,13 +1,13 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/lua/packages.el -(package! lua-mode :pin "1f596a93b3f1caadd7bba01030f8c179b029600b") +(package! lua-mode :pin "1f596a93b3") (when (featurep! +moonscript) - (package! moonscript :pin "56f90471e2ced2b0a177aed4d8c2f854797e9cc7") + (package! moonscript :pin "56f90471e2") (when (featurep! :checkers syntax) (package! flycheck-moonscript - :recipe (:host github :repo "hlissner/emacs-flycheck-moonscript") :pin "fcb99e5efcf31db05f236f02eaa575986a57172d"))) + :recipe (:host github :repo "hlissner/emacs-flycheck-moonscript") :pin "fcb99e5efc"))) (when (featurep! :completion company) - (package! company-lua :pin "29f6819de4d691e5fd0b62893a9f4fbc1c6fcb52")) + (package! company-lua :pin "29f6819de4")) diff --git a/modules/lang/markdown/packages.el b/modules/lang/markdown/packages.el index 637a0f32d..7b0c60f74 100644 --- a/modules/lang/markdown/packages.el +++ b/modules/lang/markdown/packages.el @@ -1,13 +1,13 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/markdown/packages.el -(package! markdown-mode :pin "e9dff50d572caa96b68a7466c18c97a8d6ed651c") -(package! markdown-toc :pin "7038f4f6d5c2bc7e4aea89699a607ac2b7dd16a8") -(package! edit-indirect :pin "935ded353b9ed3da67bc61abf245c21b58d88864") +(package! markdown-mode :pin "e9dff50d57") +(package! markdown-toc :pin "7038f4f6d5") +(package! edit-indirect :pin "935ded353b") (when (featurep! +grip) - (package! grip-mode :pin "0c2fe11f12ec23d5bbfba59ba43b89e87ef3eea8")) + (package! grip-mode :pin "cbf20fd131")) (when (featurep! :editor evil +everywhere) (package! evil-markdown - :recipe (:host github :repo "Somelauw/evil-markdown") :pin "46cd81b37991c4325fc24015a610f832b0ff995d")) + :recipe (:host github :repo "Somelauw/evil-markdown") :pin "46cd81b379")) diff --git a/modules/lang/nim/packages.el b/modules/lang/nim/packages.el index c67ba9ec4..31e63f829 100644 --- a/modules/lang/nim/packages.el +++ b/modules/lang/nim/packages.el @@ -3,7 +3,7 @@ ;;; requires nim nimsuggest nimble -(package! nim-mode :pin "16a245e4974d21a6e9e7163e7fbfb50a0bd89f99") +(package! nim-mode :pin "16a245e497") (when (featurep! :checkers syntax) - (package! flycheck-nim :pin "ddfade51001571c2399f78bcc509e0aa8eb752a4")) + (package! flycheck-nim :pin "ddfade5100")) diff --git a/modules/lang/nix/packages.el b/modules/lang/nix/packages.el index 5026a9b15..ce39dbd09 100644 --- a/modules/lang/nix/packages.el +++ b/modules/lang/nix/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/nix/packages.el -(package! nix-mode :pin "5b5961780f3b1c1b62453d2087f775298980f10d") -(package! nix-update :pin "fc6c39c2da3fcfa62f4796816c084a6389c8b6e7") +(package! nix-mode :pin "5b5961780f") +(package! nix-update :pin "fc6c39c2da") (when (featurep! :completion company) - (package! company-nixos-options :pin "977b9a505ffc8b33b70ec7742f90e469b3168297")) + (package! company-nixos-options :pin "977b9a505f")) (when (featurep! :completion helm) - (package! helm-nixos-options :pin "977b9a505ffc8b33b70ec7742f90e469b3168297")) + (package! helm-nixos-options :pin "977b9a505f")) diff --git a/modules/lang/ocaml/packages.el b/modules/lang/ocaml/packages.el index 67fb95936..60ccb3272 100644 --- a/modules/lang/ocaml/packages.el +++ b/modules/lang/ocaml/packages.el @@ -1,25 +1,25 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/ocaml/packages.el -(package! tuareg :pin "c12061eb80c1487a1963af7cdae268d709a70ca9") +(package! tuareg :pin "c12061eb80") (unless (featurep! +lsp) - (package! merlin :pin "f6954e953b4168e6a798a0255d6a2dfbd868a3c6") - (package! merlin-eldoc :pin "db7fab1eddfe34781b7e79694f8923b285698032") + (package! merlin :pin "f6954e953b") + (package! merlin-eldoc :pin "db7fab1edd") (when (featurep! :checkers syntax) - (package! flycheck-ocaml :pin "8707a7bf545a8639a6a5c600a98d9a2ea1487dc9"))) + (package! flycheck-ocaml :pin "8707a7bf54"))) -(package! ocp-indent :pin "9e26c0a2699b7076cebc04ece59fb354eb84c11c") +(package! ocp-indent :pin "9e26c0a269") (when (featurep! :tools eval) - (package! utop :pin "7c99d8c904dbb6fb0daf375f5424a9f6053b9c84")) + (package! utop :pin "7c99d8c904")) (when (featurep! :editor format) ;; by default quelpa generated a version 0pre0.20180929.192844, which got ;; parsed into (0 -1 0 ...), which when compared with version nil (0) in ;; package-installed-p always yielded false (package! ocamlformat :recipe - (:host github :repo "ocaml-ppx/ocamlformat" :files ("emacs/*.el")) :pin "c7376847027ec94929fb3e3c42ba76d03c952d6d")) + (:host github :repo "ocaml-ppx/ocamlformat" :files ("emacs/*.el")) :pin "dba4487820")) (package! dune :recipe - (:host github :repo "ocaml/dune" :files ("editor-integration/emacs/*.el")) :pin "19f3a4a3db93702034c5227517b3e96e89fe5d84") + (:host github :repo "ocaml/dune" :files ("editor-integration/emacs/*.el")) :pin "f3df7abe64") diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index cf1436955..cc5bd7857 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -26,79 +26,80 @@ (package! org-mode :recipe (:host github :repo "emacs-straight/org-mode" - :files ("*.el" "lisp/*.el" "contrib/lisp/*.el"))) + :files ("*.el" "lisp/*.el" "contrib/lisp/*.el")) + :pin "cd1014a75a") ;; ...And prevent other packages from pulling org; org-plus-contrib satisfies ;; the dependency already: https://github.com/raxod502/straight.el/issues/352 (package! org :recipe (:local-repo nil)) -(package! avy :pin "cf95ba9582121a1c2249e3c5efdc51acd566d190") -(package! htmlize :pin "86f22f211e9230857197c42a9823d3f05381deed") +(package! avy) +(package! htmlize :pin "86f22f211e") (package! org-bullets :recipe (:host github :repo "Kaligule/org-bullets") - :pin "8b4f0aab6d49b00faa779785b978fdb67e2eb066") + :pin "8b4f0aab6d") (package! org-yt :recipe (:host github :repo "TobiasZawada/org-yt") - :pin "40cc1ac76d741055cbefa13860d9f070a7ade001") -(package! ox-clip :pin "bd36f9fb4e3b1b9e8686b993b02ccd780ff75a96") -(package! toc-org :pin "379b457fcff091d2fa47223ade58f457fd6eed28") -(package! org-cliplink :pin "82402cae7e118d67de7328417fd018a18f95fac2") -(package! org-bookmark-heading :pin "38a2813f72ff65f3ae91e2ebb23e0bbb42a8d1df") + :pin "40cc1ac76d") +(package! ox-clip :pin "bd36f9fb4e") +(package! toc-org :pin "379b457fcf") +(package! org-cliplink :pin "82402cae7e") +(package! org-bookmark-heading :pin "38a2813f72") (when (featurep! :editor evil +everywhere) (package! evil-org :recipe (:host github :repo "hlissner/evil-org-mode") - :pin "4d44e9bbdc3ae35d0050ca298886710f6531f434")) + :pin "4d44e9bbdc")) (when (featurep! :tools pdf) - (package! org-pdfview :pin "8b71f313634b95a1fac42fc701934fd796565f3b")) + (package! org-pdfview :pin "8b71f31363")) (when (featurep! :tools magit) - (package! orgit :pin "e7cddf39e301c87c36c7de13e429dee74874d5c8")) + (package! orgit :pin "e7cddf39e3")) (when (featurep! +brain) - (package! org-brain :pin "8cb2efc86026f0dcd19a63aef97044131682eba5")) + (package! org-brain :pin "8cb2efc860")) (when (featurep! +dragndrop) - (package! org-download :pin "a367669384859261bcb11bac4b782f231f972353")) + (package! org-download :pin "aad18aecef")) (when (featurep! +gnuplot) - (package! gnuplot :pin "a406143d52618638d908b6b0b1c1c90c045b83ee") - (package! gnuplot-mode :pin "601f6392986f0cba332c87678d31ae0d0a496ce7")) + (package! gnuplot :pin "a406143d52") + (package! gnuplot-mode :pin "601f639298")) (when (featurep! +ipython) ; DEPRECATED - (package! ob-ipython :pin "7147455230841744fb5b95dcbe03320313a77124")) + (package! ob-ipython :pin "7147455230")) (when (featurep! +jupyter) - (package! jupyter :pin "9e3c1633586982e278f072dfaaabd115fa4d19f7")) + (package! jupyter :pin "9e3c163358")) (when (featurep! +pomodoro) - (package! org-pomodoro :pin "aa07c11318f91219336197e62c47bc7a3d090479")) + (package! org-pomodoro :pin "aa07c11318")) (when (featurep! +present) (package! centered-window :recipe (:host github :repo "anler/centered-window-mode") - :pin "24f7c5be9def20879f46659082d497e67b55d7af") - (package! org-tree-slide :pin "7bf09a02bd2d8f1ccfcb5209bfb18fbe02d1f44e") - (package! org-re-reveal :pin "29bc467201220dbf5091fe2d32a2b237c744ff10")) + :pin "24f7c5be9d") + (package! org-tree-slide :pin "7bf09a02bd") + (package! org-re-reveal :pin "29bc467201")) (when (featurep! +journal) - (package! org-journal :pin "cf0f15386fb52479f3b8f4f494feff71ba0052a4")) + (package! org-journal :pin "cf0f15386f")) ;;; Babel -(package! ob-async :pin "80a30b96a007d419ece12c976a81804ede340311") +(package! ob-async :pin "80a30b96a0") (when (featurep! :lang crystal) - (package! ob-crystal :pin "d84c1adee4b269cdba06a97caedb8071561a09af")) + (package! ob-crystal :pin "d84c1adee4")) (when (featurep! :lang go) - (package! ob-go :pin "2067ed55f4c1d33a43cb3f6948609d240a8915f5")) + (package! ob-go :pin "2067ed55f4")) (when (featurep! :lang nim) - (package! ob-nim :pin "bf1642cb93f0a898804dc13fd9408d2964403bd2")) + (package! ob-nim :pin "bf1642cb93")) (when (featurep! :lang racket) (package! ob-racket :recipe (:host github :repo "DEADB17/ob-racket") - :pin "d8fd51bddb019b0eb68755255f88fc800cfe03cb")) + :pin "d8fd51bddb")) (when (featurep! :lang rest) - (package! ob-restclient :pin "c5c22e603531dca48575d0a425fddff16dc0f391")) + (package! ob-restclient :pin "c5c22e6035")) (when (featurep! :lang rust) - (package! ob-rust :pin "6a82587598cd097e9642be916243c31f1231b24a")) + (package! ob-rust :pin "6a82587598")) (when (featurep! :lang scala) - (package! ob-ammonite :pin "39937dff395e70aff76a4224fa49cf2ec6c57cca")) + (package! ob-ammonite :pin "39937dff39")) ;;; Export (when (featurep! +pandoc) - (package! ox-pandoc :pin "aa37dc7e94213d4ebedb85c384c1ba35007da18e")) + (package! ox-pandoc :pin "aa37dc7e94")) (when (featurep! +hugo) (package! ox-hugo :recipe (:host github :repo "kaushalmodi/ox-hugo" :nonrecursive t) - :pin "d2892b3b5ea19f85063f2fba4a5b7ffa1123a395")) + :pin "0530645d73")) (when (featurep! :lang rst) - (package! ox-rst :pin "9158bfd18096c559e0a225ae62ab683f1c98a547")) + (package! ox-rst :pin "9158bfd180")) diff --git a/modules/lang/perl/packages.el b/modules/lang/perl/packages.el index 2bfd7e3c1..7c7adfd1d 100644 --- a/modules/lang/perl/packages.el +++ b/modules/lang/perl/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/perl/packages.el -(package! perl6-mode :pin "88de065795d6863b23b6042576b9e90f8cbf8798") +(package! perl6-mode :pin "88de065795") (when (featurep! :checkers syntax) - (package! flycheck-perl6 :pin "b804702305d7a6e26f762ff98cfdeec2e9dd4cb7")) + (package! flycheck-perl6 :pin "b804702305")) diff --git a/modules/lang/php/packages.el b/modules/lang/php/packages.el index 4a2f41cf5..296230f7f 100644 --- a/modules/lang/php/packages.el +++ b/modules/lang/php/packages.el @@ -1,22 +1,22 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/php/packages.el -(package! php-boris :pin "f2faebf610c917f7091f7ec0cd97645629c4f819") -(package! php-extras :recipe (:host github :repo "arnested/php-extras") :pin "d410c5af663c30c01d461ac476d1cbfbacb49367") -(package! php-mode :pin "167b35749dbf700543d4a540d098c015af58df2b") -(package! php-refactor-mode :pin "7a794b0618df2882b1bd586fdd698dba0bc5130d") -(package! phpunit :pin "fe6bc91c3bd8b329c6d26ad883a025f06b5121ee") +(package! php-boris :pin "f2faebf610") +(package! php-extras :recipe (:host github :repo "arnested/php-extras") :pin "d410c5af66") +(package! php-mode :pin "cade4cef2b") +(package! php-refactor-mode :pin "7a794b0618") +(package! phpunit :pin "fe6bc91c3b") (when (featurep! +hack) - (package! hack-mode :recipe (:host github :repo "hhvm/hack-mode") :pin "fd6a661b091490920804d043303596f9e60a5dd7")) + (package! hack-mode :recipe (:host github :repo "hhvm/hack-mode") :pin "fd6a661b09")) (unless (featurep! +lsp) - (package! phpactor :pin "19d56b4c62772f6939cf1576c72213bf72fd3eb1") + (package! phpactor :pin "5ccf65d59e") (when (featurep! :completion company) - (package! company-phpactor :pin "19d56b4c62772f6939cf1576c72213bf72fd3eb1"))) + (package! company-phpactor :pin "5ccf65d59e"))) (when (featurep! :editor format) - (package! php-cs-fixer :pin "6540006710daf2b2d47576968ea826a83a40a6bf")) + (package! php-cs-fixer :pin "6540006710")) ;; For building php-extras -(package! async :pin "86aef2c38e7d35e8509b7feeee3e989d825eba91") +(package! async :pin "86aef2c38e") diff --git a/modules/lang/plantuml/packages.el b/modules/lang/plantuml/packages.el index 6048a0fa7..b9b6956fd 100644 --- a/modules/lang/plantuml/packages.el +++ b/modules/lang/plantuml/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/plantuml/packages.el -(package! plantuml-mode :pin "ea45a13707abd2a70df183f1aec6447197fc9ccc") +(package! plantuml-mode :pin "ea45a13707") (when (featurep! :checkers syntax) - (package! flycheck-plantuml :pin "183be89e1dbba0b38237dd198dff600e0790309d")) + (package! flycheck-plantuml :pin "183be89e1d")) diff --git a/modules/lang/purescript/packages.el b/modules/lang/purescript/packages.el index df3d86808..e5726e03c 100644 --- a/modules/lang/purescript/packages.el +++ b/modules/lang/purescript/packages.el @@ -5,7 +5,7 @@ ;; due to expecting the compiler to be psc rather than purs. However, one of ;; purescript-mode or psc-ide seems to handle flycheck, so it might be ;; unnecessary altogether. -;;(package! flycheck-purescript :pin "30f0435d5e2715053c8c6170b2bce2ae462ac819") +;;(package! flycheck-purescript :pin "30f0435d5e") -(package! psc-ide :pin "2a9394422da317b54aa1da021aea6cded19004c1") -(package! purescript-mode :pin "8db1d0243c03da31adac4d7c5287407a4df6aff2") +(package! psc-ide :pin "2a9394422d") +(package! purescript-mode :pin "8db1d0243c") diff --git a/modules/lang/python/packages.el b/modules/lang/python/packages.el index 976f94065..fe372a51b 100644 --- a/modules/lang/python/packages.el +++ b/modules/lang/python/packages.el @@ -2,33 +2,33 @@ ;;; lang/python/packages.el ;; Major modes -(package! pip-requirements :pin "216cd1690f80cc965d4ae47b8753fc185f778ff6") +(package! pip-requirements :pin "216cd1690f") (when (featurep! +cython) - (package! cython-mode :pin "6d2c3b9372547ce0aefac2babfe48dc1568875b9") + (package! cython-mode :pin "1bc86b5750") (when (featurep! :checkers syntax) - (package! flycheck-cython :pin "ecc4454d35ab5317ab66a04406f36f0c1dbc0b76"))) + (package! flycheck-cython :pin "ecc4454d35"))) ;; LSP (when (featurep! +lsp) - (package! lsp-python-ms :pin "83ef84d9a4a942f8882b00d07bb78b15f716e89d")) + (package! lsp-python-ms :pin "83ef84d9a4")) ;; Programming environment -(package! anaconda-mode :pin "1bc301b2d2bc336988f4a16a891c275a90136ca5") +(package! anaconda-mode :pin "1bc301b2d2") (when (featurep! :completion company) - (package! company-anaconda :pin "398fad19160cc1d0e31dcb1d4a3f88de7a2d355d")) + (package! company-anaconda :pin "398fad1916")) ;; Environment management -(package! pipenv :pin "b730bb509e8b60af9f5ab1f1e6c3458d1d95d789") -(package! pyvenv :pin "861998b6d157ae73b829f02a5a6c8a9118310831") +(package! pipenv :pin "b730bb509e") +(package! pyvenv :pin "861998b6d1") (when (featurep! +pyenv) - (package! pyenv-mode :pin "aec6f2aa289f6aed974f053c081143758dd142fb")) + (package! pyenv-mode :pin "aec6f2aa28")) (when (featurep! +conda) - (package! conda :pin "41e9593cf230a50183a36fa9c0a4853acb2e7505")) + (package! conda :pin "814439dffa")) ;; Testing frameworks -(package! nose :pin "f8528297519eba911696c4e68fa88892de9a7b72") -(package! python-pytest :pin "09ad688df207ee9b02c990d3897a9e2841931d97") +(package! nose :pin "f852829751") +(package! python-pytest :pin "09ad688df2") ;; Import managements -(package! pyimport :pin "a6f63cf7ed93f0c0f7c207e6595813966f8852b9") -(package! py-isort :pin "e67306f459c47c53a65604e4eea88a3914596560") +(package! pyimport :pin "a6f63cf7ed") +(package! py-isort :pin "e67306f459") diff --git a/modules/lang/qt/packages.el b/modules/lang/qt/packages.el index 22f01ef77..07f3922e7 100644 --- a/modules/lang/qt/packages.el +++ b/modules/lang/qt/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/qt/packages.el -(package! qml-mode :pin "6c5f33ba88ae010bf201a80ee8095e20a724558c") -(package! qt-pro-mode :pin "7a2da323de834294b413cbbb3c92f42f54913643") +(package! qml-mode :pin "6c5f33ba88") +(package! qt-pro-mode :pin "7a2da323de") diff --git a/modules/lang/racket/packages.el b/modules/lang/racket/packages.el index 644884a28..cc3f3331c 100644 --- a/modules/lang/racket/packages.el +++ b/modules/lang/racket/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/racket/packages.el -(package! racket-mode :pin "09eba92e846733db1acc8b9e58ff2b5f52c79b23") +(package! racket-mode :pin "5f396fa91f") diff --git a/modules/lang/rest/packages.el b/modules/lang/rest/packages.el index 0ab4e492c..a6f76fd98 100644 --- a/modules/lang/rest/packages.el +++ b/modules/lang/rest/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/rest/packages.el -(package! restclient :pin "e8ca809ace13549a1ddffb4e4aaa5d5fce750f3d") +(package! restclient :pin "e8ca809ace") (when (featurep! :completion company) - (package! company-restclient :pin "e5a3ec54edb44776738c13e13e34c85b3085277b")) + (package! company-restclient :pin "e5a3ec54ed")) diff --git a/modules/lang/rst/packages.el b/modules/lang/rst/packages.el index c915f35e9..3f77f2d0f 100644 --- a/modules/lang/rst/packages.el +++ b/modules/lang/rst/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/rst/packages.el -(package! sphinx-mode :pin "b5ac514e213459dcc57184086f10b5b6be3cecd8") +(package! sphinx-mode :pin "b5ac514e21") diff --git a/modules/lang/ruby/packages.el b/modules/lang/ruby/packages.el index 671e0c473..acd0d5c0b 100644 --- a/modules/lang/ruby/packages.el +++ b/modules/lang/ruby/packages.el @@ -2,31 +2,31 @@ ;;; lang/ruby/packages.el ;; Major modes -(package! enh-ruby-mode :pin "732331b99a0884dd7fc0149658d4090886857656") -(package! yard-mode :pin "ba74a47463b0320ae152bd42a7dd7aeecd7b5748") +(package! enh-ruby-mode :pin "732331b99a") +(package! yard-mode :pin "ba74a47463") ;; REPL -(package! inf-ruby :pin "fd8d392fefd1d99eb58fc597d537d0d7df29c334") +(package! inf-ruby :pin "fd8d392fef") (when (featurep! :completion company) - (package! company-inf-ruby :pin "fe3e4863bc971fbb81edad447efad5795ead1b17")) + (package! company-inf-ruby :pin "fe3e4863bc")) ;; Programming environment -(package! rubocop :pin "03bf15558a6eb65e4f74000cab29412efd46660e") -(package! robe :pin "8190cb7c7beb8385dd3abf6ea357f33d8981ae8a") +(package! rubocop :pin "03bf15558a") +(package! robe :pin "8190cb7c7b") ;; Project tools (package! bundler ;; REVIEW Remove when endofunky/bundler.el#25 is merged :recipe (:host github :repo "nate/bundler.el") - :pin "05a91d68e21e129b6c4d5462c888ea249c2ea001") -(package! rake :pin "9c204334b03b4e899fadae6e59c20cf105404128") + :pin "10a18a9322") +(package! rake :pin "9c204334b0") ;; Environment management (when (featurep! +rbenv) - (package! rbenv :pin "2ea1a5bdc1266caef1dd77700f2c8f42429b03f1")) + (package! rbenv :pin "2ea1a5bdc1")) (when (featurep! +rvm) - (package! rvm :pin "134497bc460990c71ab8fa75431156e62c17da2d")) + (package! rvm :pin "134497bc46")) ;; Testing frameworks -(package! rspec-mode :pin "c4353a1bff164bccf6c55fda16aa7b9c9ab36685") -(package! minitest :pin "6d9f6233b7ce63c63c96675514c228fd93a2b6a1") +(package! rspec-mode :pin "c4353a1bff") +(package! minitest :pin "6d9f6233b7") diff --git a/modules/lang/rust/packages.el b/modules/lang/rust/packages.el index 06f07c356..ad4ae583b 100644 --- a/modules/lang/rust/packages.el +++ b/modules/lang/rust/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/rust/packages.el -(package! rustic :pin "319e85515918ad8cc5348d945ebdf2a1718e1a64") +(package! rustic :pin "a6b8cd8db8") (unless (featurep! +lsp) - (package! racer :pin "a0bdf778f01e8c4b8a92591447257422ac0b455b")) + (package! racer :pin "a0bdf778f0")) diff --git a/modules/lang/scala/packages.el b/modules/lang/scala/packages.el index 0434865ae..1ed7723dd 100644 --- a/modules/lang/scala/packages.el +++ b/modules/lang/scala/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/scala/packages.el -(package! sbt-mode :pin "633a315ad453cd963588c9b8fba02d9cf75296b4") -(package! scala-mode :pin "44772cbf1e1ade52bc5066555ff0aed68569aaec") +(package! sbt-mode :pin "633a315ad4") +(package! scala-mode :pin "46bb948345") diff --git a/modules/lang/scheme/packages.el b/modules/lang/scheme/packages.el index 35eeb8e19..a1720520e 100644 --- a/modules/lang/scheme/packages.el +++ b/modules/lang/scheme/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/scheme/packages.el -(package! geiser :pin "645e4775420c59bb10ef0693ed2631a8df8c0e29") +(package! geiser :pin "645e477542") diff --git a/modules/lang/sh/packages.el b/modules/lang/sh/packages.el index 6ca6b213d..771a56ed8 100644 --- a/modules/lang/sh/packages.el +++ b/modules/lang/sh/packages.el @@ -2,7 +2,7 @@ ;;; lang/sh/packages.el (when (featurep! :completion company) - (package! company-shell :pin "52f3bf26b74adc30a275f5f4290a1fc72a6876ff")) + (package! company-shell)) (when (featurep! +fish) - (package! fish-mode :pin "688c82decad108029b0434e3bce6c3d129ede6f3")) + (package! fish-mode :pin "688c82deca")) diff --git a/modules/lang/solidity/packages.el b/modules/lang/solidity/packages.el index 7ef68385c..2f7af778b 100644 --- a/modules/lang/solidity/packages.el +++ b/modules/lang/solidity/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/solidity/packages.el -(package! solidity-mode :pin "93412f211fad7dfc3b02aa226856fc52b6a15c22") -(package! company-solidity :pin "93412f211fad7dfc3b02aa226856fc52b6a15c22") -(package! solidity-flycheck :pin "93412f211fad7dfc3b02aa226856fc52b6a15c22") +(package! solidity-mode :pin "b190993dcb") +(package! company-solidity :pin "b190993dcb") +(package! solidity-flycheck :pin "b190993dcb") diff --git a/modules/lang/swift/packages.el b/modules/lang/swift/packages.el index dc86a68cf..4057cab08 100644 --- a/modules/lang/swift/packages.el +++ b/modules/lang/swift/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/swift/packages.el -(package! swift-mode :pin "1268425311ab20f1618df4e52cb1b79e28b553df") +(package! swift-mode :pin "1268425311") (if (featurep! +lsp) - (package! lsp-sourcekit :pin "04d75b6a0be5894fea4a55fec0b2ccedf5b3be58") + (package! lsp-sourcekit :pin "04d75b6a0b") (when (featurep! :completion company) - (package! company-sourcekit :pin "abf9bc5a0102eb666d3aa6d6bf22f6efcc852781")) + (package! company-sourcekit :pin "abf9bc5a01")) (when (featurep! :checkers syntax) - (package! flycheck-swift :pin "4c5ad401252400a78da395fd56a71e67ff8c2761"))) + (package! flycheck-swift :pin "4c5ad40125"))) diff --git a/modules/lang/terra/packages.el b/modules/lang/terra/packages.el index 312816fd2..57adda36c 100644 --- a/modules/lang/terra/packages.el +++ b/modules/lang/terra/packages.el @@ -3,7 +3,7 @@ (package! terra-mode :recipe (:host github :repo "StanfordLegion/terra-mode") - :pin "1e5e82410d60bd0b53fe3e769d9dd36a0d542b71") + :pin "1e5e82410d") (when (featurep! :completion company) - (package! company-lua :pin "29f6819de4d691e5fd0b62893a9f4fbc1c6fcb52")) + (package! company-lua :pin "29f6819de4")) diff --git a/modules/lang/web/packages.el b/modules/lang/web/packages.el index d1031f136..64c0388b5 100644 --- a/modules/lang/web/packages.el +++ b/modules/lang/web/packages.el @@ -2,23 +2,23 @@ ;;; lang/web/packages.el ;; +html.el -(package! emmet-mode :pin "1acb821e0142136344ccf40c1e5fb664d7db2e70") -(package! haml-mode :pin "bf5b6c11b1206759d2b28af48765e04882dd1fc4") -(package! pug-mode :pin "685fd3414d89736bf232f5d1a6bed9e0353b98fe") -(package! slim-mode :pin "3636d18ab1c8b316eea71c4732eb44743e2ded87") -(when (package! web-mode :pin "cd000fcfce97152f8b831b7eef4ea0d0b1eed11a") +(package! emmet-mode :pin "1acb821e01") +(package! haml-mode :pin "bf5b6c11b1") +(package! pug-mode :pin "685fd3414d") +(package! slim-mode :pin "3636d18ab1") +(when (package! web-mode :pin "cd000fcfce") (when (featurep! :completion company) - (package! company-web :pin "f0cc9187c9c34f72ad71f5649a69c74f996bae9a"))) + (package! company-web :pin "f0cc9187c9"))) ;; +css.el (package! css-mode :built-in t) -(package! less-css-mode :built-in t :pin "c7fa3d56d83206b28657f2e56439dc62280a2bf2") +(package! less-css-mode :built-in t :pin "c7fa3d56d8") -(package! sass-mode :pin "247a0d4b509f10b28e4687cd8763492bca03599b") -(package! stylus-mode :pin "4dbde92542fc7ad61df38776980905a4721d642e") -(package! sws-mode :pin "4dbde92542fc7ad61df38776980905a4721d642e") -(package! rainbow-mode :pin "3ef813d6377226de0cac1b0ee536b517f45e61ad") +(package! sass-mode :pin "247a0d4b50") +(package! stylus-mode :pin "4dbde92542") +(package! sws-mode :pin "4dbde92542") +(package! rainbow-mode :pin "3ef813d637") (when (featurep! :completion ivy) - (package! counsel-css :pin "61a38c9d50fa9d1e38b2fa550d07130eb9322524")) + (package! counsel-css :pin "61a38c9d50")) (when (featurep! :completion helm) - (package! helm-css-scss :pin "48b996f73af1fef8d6e88a1c545d98f8c50b0cf3")) + (package! helm-css-scss :pin "48b996f73a")) diff --git a/modules/term/eshell/packages.el b/modules/term/eshell/packages.el index 33e5af203..6eb2b23a9 100644 --- a/modules/term/eshell/packages.el +++ b/modules/term/eshell/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; term/eshell/packages.el -(package! eshell-up :pin "9c100bae5c3020e8d9307e4332d3b64e7dc28519") -(package! eshell-z :pin "337cb241e17bd472bd3677ff166a0800f684213c") -(package! shrink-path :pin "c14882c8599aec79a6e8ef2d06454254bb3e1e41") -(package! esh-help :pin "417673ed18a983930a66a6692dbfb288a995cb80") +(package! eshell-up :pin "9c100bae5c") +(package! eshell-z :pin "337cb241e1") +(package! shrink-path :pin "c14882c859") +(package! esh-help :pin "417673ed18") diff --git a/modules/term/term/packages.el b/modules/term/term/packages.el index b55cfc41c..f98aec986 100644 --- a/modules/term/term/packages.el +++ b/modules/term/term/packages.el @@ -2,4 +2,4 @@ ;;; term/term/packages.el (package! term :built-in t) -(package! multi-term :pin "7307ddd456db44045206253e5a905d3d8c143d5c") +(package! multi-term :pin "7307ddd456") diff --git a/modules/term/vterm/packages.el b/modules/term/vterm/packages.el index 1cee2773a..9e95c3dab 100644 --- a/modules/term/vterm/packages.el +++ b/modules/term/vterm/packages.el @@ -3,4 +3,4 @@ (package! vterm :built-in 'prefer - :pin "8fbab4b091322dd085b8758fb6655300bfb2e439") + :pin "a65f1a84ab") diff --git a/modules/tools/ansible/packages.el b/modules/tools/ansible/packages.el index 1d1e137f3..7a70921d4 100644 --- a/modules/tools/ansible/packages.el +++ b/modules/tools/ansible/packages.el @@ -2,10 +2,10 @@ ;;; tools/ansible/packages.el (package! ansible :recipe (:nonrecursive t) - :pin "c6532e52161a381ed3dddfeaa7c92ae636d3f052") -(package! ansible-doc :pin "86083a7bb2ed0468ca64e52076b06441a2f8e9e0") -(package! jinja2-mode :pin "cfaa7bbe7bb290cc500440124ce89686f3e26f86") -(package! yaml-mode :pin "cecf4b106b0c4236931b14919fdf87ff3546e2c9") + :pin "c6532e5216") +(package! ansible-doc :pin "86083a7bb2") +(package! jinja2-mode :pin "cfaa7bbe7b") +(package! yaml-mode :pin "cecf4b106b") (when (featurep! :completion company) - (package! company-ansible :pin "8d1ffbc357ccb0c307815d0c7f2cbb699f92537b")) + (package! company-ansible :pin "8d1ffbc357")) diff --git a/modules/tools/debugger/packages.el b/modules/tools/debugger/packages.el index 1d89ecca6..298982b9f 100644 --- a/modules/tools/debugger/packages.el +++ b/modules/tools/debugger/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/debugger/packages.el -(when (package! realgud :pin "2cca776d28c4d6ebef033758ef01f2af2e9b3b96") +(when (package! realgud :pin "2cca776d28") (when (featurep! :lang javascript) - (package! realgud-trepan-ni :pin "6e9cac5e8097018aadf41c88de541168036cc227"))) + (package! realgud-trepan-ni :pin "6e9cac5e80"))) (when (featurep! :tools lsp) - (package! dap-mode :pin "9d08eaf77d4aeb80880be85bc0591554314d0eb7")) + (package! dap-mode :pin "d10e254ce4")) diff --git a/modules/tools/direnv/packages.el b/modules/tools/direnv/packages.el index 969bf2ef7..ea105c865 100644 --- a/modules/tools/direnv/packages.el +++ b/modules/tools/direnv/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/direnv/packages.el -(package! direnv :pin "fd0b6bbd5e3eaf6aa48bccd4a1ff3048bfb2c69b") +(package! direnv :pin "fd0b6bbd5e") diff --git a/modules/tools/docker/packages.el b/modules/tools/docker/packages.el index c5a002fc1..76c53507b 100644 --- a/modules/tools/docker/packages.el +++ b/modules/tools/docker/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/docker/packages.el -(package! docker :pin "baba7f72ea9e642536ca3664c2082722062b046e") -(package! docker-tramp :pin "8e2b671eff7a81af43b76d9dfcf94ddaa8333a23") -(package! dockerfile-mode :pin "d31f7685ebc5832d957e25070a930aa42984327d") +(package! docker :pin "baba7f72ea") +(package! docker-tramp :pin "8e2b671eff") +(package! dockerfile-mode :pin "d31f7685eb") diff --git a/modules/tools/editorconfig/packages.el b/modules/tools/editorconfig/packages.el index 4febed86d..a0c8feaa4 100644 --- a/modules/tools/editorconfig/packages.el +++ b/modules/tools/editorconfig/packages.el @@ -3,4 +3,4 @@ (package! editorconfig :recipe (:nonrecursive t) - :pin "65f8244ffbeb9bf2720d922d4b5fc74849b9af82") + :pin "5c67d22a74") diff --git a/modules/tools/ein/packages.el b/modules/tools/ein/packages.el index d755e9f58..51b383f6e 100644 --- a/modules/tools/ein/packages.el +++ b/modules/tools/ein/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/ein/packages.el -(package! ein :pin "41d8e61df6f18f5accc341e7ae42e03069501870") -(package! avy :pin "cf95ba9582121a1c2249e3c5efdc51acd566d190") +(package! ein :pin "bb97c11d11") +(package! avy :pin "cf95ba9582") diff --git a/modules/tools/eval/packages.el b/modules/tools/eval/packages.el index efdcb60a1..249245705 100644 --- a/modules/tools/eval/packages.el +++ b/modules/tools/eval/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/eval/packages.el -(package! quickrun :pin "55bbe5d54b80206ea5a60bf2f58eb6368b2c8201") +(package! quickrun :pin "55bbe5d54b") (when (featurep! +overlay) - (package! eros :pin "dd8910279226259e100dab798b073a52f9b4233a")) + (package! eros :pin "dd89102792")) diff --git a/modules/tools/gist/packages.el b/modules/tools/gist/packages.el index f8a971d9f..44680cb30 100644 --- a/modules/tools/gist/packages.el +++ b/modules/tools/gist/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/gist/packages.el -(package! gist :pin "314fe6ab80fae35b95f0734eceb82f72813b6f41") +(package! gist :pin "314fe6ab80") diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index 1c6f3a13d..288d779c7 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -5,26 +5,26 @@ ;; helm be loaded before `dumb-jump' is byte-compiled during installation. ;; To ensure this, we declare helm before dumb-jump. (when (featurep! :completion helm) - (package! helm :pin "05d70ff116a696f5c18e5ad569573d8936ff01da")) + (package! helm)) ;; -(package! dumb-jump :pin "738d40ceb7e2d6a3a26f7f27a31ba93924baaa2d") +(package! dumb-jump :pin "738d40ceb7") (when (featurep! :completion ivy) - (package! ivy-xref :pin "3d4c35fe2b243d948d8fe02a1f0d76a249d63de9")) + (package! ivy-xref :pin "3d4c35fe2b")) (when (featurep! :completion helm) - (package! helm-xref :pin "6b4a8bd91f5eaf82f51bd31b03f6587387fe6983")) + (package! helm-xref :pin "6b4a8bd91f")) (when (featurep! +docsets) - (package! dash-docs :pin "111fd9b97001f1ad887b45e5308a14ddd68ce70a") + (package! dash-docs :pin "111fd9b970") (when (featurep! :completion helm) - (package! helm-dash :pin "7f853bd34da666f0e9a883011c80f451b06f6c59")) + (package! helm-dash :pin "7f853bd34d")) (when (featurep! :completion ivy) - (package! counsel-dash :pin "370d5f6f14b5294d0eb717f7b2a6a8e93df1ed24"))) + (package! counsel-dash :pin "370d5f6f14"))) (when (featurep! +dictionary) (if IS-MAC - (package! osx-dictionary :pin "1b79ff64c72485cb078db9ab7ee3256b11a99f4b") - (package! define-word :pin "d8c76d503be3d561221631067ec5274e7c147248")) + (package! osx-dictionary :pin "1b79ff64c7") + (package! define-word :pin "d8c76d503b")) ;; Need for Google/DuckDuckGo auto-completion on `+lookup/online' - (package! powerthesaurus :pin "81a262ec0c9294ad377bafc6cc4e6d91b461acb6") - (package! request :pin "b207ebb298dbf181583ebf56c3e18a52fcbaa165")) + (package! powerthesaurus :pin "81a262ec0c") + (package! request :pin "4be823a89b")) diff --git a/modules/tools/lsp/packages.el b/modules/tools/lsp/packages.el index b400c3e7c..3ae41ce7a 100644 --- a/modules/tools/lsp/packages.el +++ b/modules/tools/lsp/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/lsp/packages.el -(package! lsp-mode :pin "e95109b8b84201c299f54d5f22e84e5eb6511ac4") -(package! lsp-ui :pin "01f89e40f473032376f70a90e33831356832f084") +(package! lsp-mode :pin "58dd4bd380") +(package! lsp-ui :pin "cf6906cc45") (when (featurep! :completion company) - (package! company-lsp :pin "f921ffa0cdc542c21dc3dd85f2c93df4288e83bd")) + (package! company-lsp :pin "f921ffa0cd")) (when (featurep! :completion ivy) - (package! lsp-ivy :pin "78c1429c62c19006058b89d462657e1448d1e595")) + (package! lsp-ivy :pin "78c1429c62")) (when (featurep! :completion helm) - (package! helm-lsp :pin "6f62659cc528b7e37ffcc8fb356633acd7031be8")) + (package! helm-lsp :pin "6f62659cc5")) diff --git a/modules/tools/magit/packages.el b/modules/tools/magit/packages.el index efca1c8d2..e2826acb1 100644 --- a/modules/tools/magit/packages.el +++ b/modules/tools/magit/packages.el @@ -1,10 +1,10 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/magit/packages.el -(when (package! magit :pin "5503aa1857e78bb43502261956173a66c9b88c71") - (package! forge :pin "269effb4954071f590954c0e5b4faba3f27d03d0") - (package! magit-gitflow :pin "cc41b561ec6eea947fe9a176349fb4f771ed865b") - (package! magit-todos :pin "a64e36574bcb77a86726922df905307e55ea62ed") - (package! github-review :pin "e8a275939e1a774c84b71ab3df2ce1599445dab0") +(when (package! magit :pin "2bdfc4a08f") + (package! forge :pin "283378353a") + (package! magit-gitflow :pin "cc41b561ec") + (package! magit-todos :pin "a64e36574b") + (package! github-review :pin "1de2d6d148") (when (featurep! :editor evil +everywhere) - (package! evil-magit :pin "7223dca89c0b4bca9871c453a30a4d4edfdb444e"))) + (package! evil-magit :pin "7223dca89c"))) diff --git a/modules/tools/make/packages.el b/modules/tools/make/packages.el index 815c945d3..d389186b5 100644 --- a/modules/tools/make/packages.el +++ b/modules/tools/make/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/make/packages.el -(package! makefile-executor :pin "9a7d78f814a4b372d8f8179819cb1b37b83b1973") +(package! makefile-executor :pin "9a7d78f814") diff --git a/modules/tools/pass/packages.el b/modules/tools/pass/packages.el index e189426c7..f998eb0e1 100644 --- a/modules/tools/pass/packages.el +++ b/modules/tools/pass/packages.el @@ -1,17 +1,17 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/pass/packages.el -(package! pass :pin "919d8e3826d556433ab67d4ee21a509d209d1baa") -(package! password-store :pin "88936b11aff49e48f79842e4628c55620e0ad736") -(package! password-store-otp :pin "04998c8578a060ab4a4e8f46f2ee0aafad4ab4d5") +(package! pass :pin "919d8e3826") +(package! password-store :pin "88936b11af") +(package! password-store-otp :pin "04998c8578") ;; an older version of `auto-source-pass' is built into Emacs 26+, so we must ;; install the new version directly from the source and with a psuedonym. (package! auth-source-pass :recipe (:host github :repo "DamienCassou/auth-password-store") - :pin "ff4940c647786914b3cbef69103d96a4ea334111") + :pin "ff4940c647") (when (featurep! :completion ivy) - (package! ivy-pass :pin "5b523de1151f2109fdd6a8114d0af12eef83d3c5")) + (package! ivy-pass :pin "5b523de115")) (when (featurep! :completion helm) - (package! helm-pass :pin "ed5798f2d83937575e8f23fde33323bca9e85131")) + (package! helm-pass :pin "ed5798f2d8")) diff --git a/modules/tools/pdf/packages.el b/modules/tools/pdf/packages.el index 08972eb01..47196de64 100644 --- a/modules/tools/pdf/packages.el +++ b/modules/tools/pdf/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/pdf/packages.el -(package! pdf-tools :pin "cc29d4c9c2d81fcb1255f7172fd5b9b7851d656c") +(package! pdf-tools :pin "cc29d4c9c2") diff --git a/modules/tools/prodigy/packages.el b/modules/tools/prodigy/packages.el index 57dc56a4f..edb10f54c 100644 --- a/modules/tools/prodigy/packages.el +++ b/modules/tools/prodigy/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/prodigy/packages.el -(package! prodigy :pin "6ae71f27b09b172f03fb55b9eeef001206baacd3") +(package! prodigy :pin "6ae71f27b0") diff --git a/modules/tools/rgb/packages.el b/modules/tools/rgb/packages.el index 01b2679b0..22b018737 100644 --- a/modules/tools/rgb/packages.el +++ b/modules/tools/rgb/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/rgb/packages.el -(package! rainbow-mode :pin "3ef813d6377226de0cac1b0ee536b517f45e61ad") -(package! kurecolor :pin "3fc84840cbbd75e646cafa2fd3a00004b55e37ec") +(package! rainbow-mode :pin "3ef813d637") +(package! kurecolor :pin "3fc84840cb") diff --git a/modules/tools/terraform/packages.el b/modules/tools/terraform/packages.el index 6c1d3de2f..ccc050277 100644 --- a/modules/tools/terraform/packages.el +++ b/modules/tools/terraform/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/terraform/packages.el -(package! terraform-mode :pin "6973d1acaba2835dfdf174f5a5e27de6366002e1") +(package! terraform-mode :pin "6973d1acab") (when (featurep! :completion company) - (package! company-terraform :pin "2d11a21fee2f298e48968e479ddcaeda4d736e12")) + (package! company-terraform :pin "2d11a21fee")) diff --git a/modules/tools/upload/packages.el b/modules/tools/upload/packages.el index 22aa62783..453b0363b 100644 --- a/modules/tools/upload/packages.el +++ b/modules/tools/upload/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/upload/packages.el -(package! ssh-deploy :pin "93a0e189a06d49b03627c65fe77652bee9f129d4") +(package! ssh-deploy :pin "93a0e189a0") diff --git a/modules/ui/deft/packages.el b/modules/ui/deft/packages.el index aa7be392e..18bf7ee99 100644 --- a/modules/ui/deft/packages.el +++ b/modules/ui/deft/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/deft/packages.el -(package! deft :pin "f54e8a65a7e75a029657364055420374df45656d") +(package! deft :pin "f54e8a65a7") diff --git a/modules/ui/doom/packages.el b/modules/ui/doom/packages.el index d60a72f13..37c0337cf 100644 --- a/modules/ui/doom/packages.el +++ b/modules/ui/doom/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/doom/packages.el -(package! doom-themes :pin "2ec6df8905e22586f349290b6f39b320fc2e21be") -(package! solaire-mode :pin "2bfb3efe5a646079389dad6ca60e5e7f2c986829") +(package! doom-themes :pin "1079a47465") +(package! solaire-mode :pin "4ac324ccb0") diff --git a/modules/ui/fill-column/packages.el b/modules/ui/fill-column/packages.el index b86e8cf12..dcc6e381e 100644 --- a/modules/ui/fill-column/packages.el +++ b/modules/ui/fill-column/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/fill-column/packages.el -(package! hl-fill-column :pin "612441e69772c24f9ce67ae73e47c84f29ee653d") +(package! hl-fill-column :pin "612441e697") diff --git a/modules/ui/hl-todo/packages.el b/modules/ui/hl-todo/packages.el index 046a54c55..0d0643348 100644 --- a/modules/ui/hl-todo/packages.el +++ b/modules/ui/hl-todo/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/hl-todo/packages.el -(package! hl-todo :pin "5d2ea49f83a7e6953f9d71de94dee478d08f9543") +(package! hl-todo :pin "5d2ea49f83") diff --git a/modules/ui/hydra/packages.el b/modules/ui/hydra/packages.el index 708dd18fd..5a206be5d 100644 --- a/modules/ui/hydra/packages.el +++ b/modules/ui/hydra/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/hydra/packages.el -(package! hydra :pin "9db28034d7d61bfeff89899633b958f22befc53d") +(package! hydra :pin "e3beffdd80") diff --git a/modules/ui/indent-guides/packages.el b/modules/ui/indent-guides/packages.el index e246304a0..3bf737416 100644 --- a/modules/ui/indent-guides/packages.el +++ b/modules/ui/indent-guides/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/indent-guides/packages.el -(package! highlight-indent-guides :pin "0b10f38c54ffc099861ce8463e16a1b07ddbb203") +(package! highlight-indent-guides :pin "0b10f38c54") diff --git a/modules/ui/modeline/packages.el b/modules/ui/modeline/packages.el index 155dc4ab5..37575888b 100644 --- a/modules/ui/modeline/packages.el +++ b/modules/ui/modeline/packages.el @@ -2,7 +2,7 @@ ;;; ui/modeline/packages.el (unless (featurep! +light) - (package! doom-modeline :pin "dbd9251979de2d94073197b406fe5a72aa593e5d")) -(package! anzu :pin "592f8ee6d0b1bc543943b36a30063c2d1aac4b22") + (package! doom-modeline :pin "21ac606325")) +(package! anzu :pin "592f8ee6d0") (when (featurep! :editor evil) - (package! evil-anzu :pin "9bca6ca14d865e7e005bc02a28a09b4ae74facc9")) + (package! evil-anzu :pin "9bca6ca14d")) diff --git a/modules/ui/nav-flash/packages.el b/modules/ui/nav-flash/packages.el index 3cc02ee6e..12e2a5a1f 100644 --- a/modules/ui/nav-flash/packages.el +++ b/modules/ui/nav-flash/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/nav-flash/packages.el -(package! nav-flash :pin "dbb91216637e0a1e8bfd59aa883c75d45db70daf") +(package! nav-flash :pin "dbb9121663") diff --git a/modules/ui/neotree/packages.el b/modules/ui/neotree/packages.el index fa6fd65a4..314efb4b7 100644 --- a/modules/ui/neotree/packages.el +++ b/modules/ui/neotree/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/neotree/packages.el -(package! neotree :pin "c2420a4b344a9337760981c451783f0ff9df8bbf") +(package! neotree :pin "c2420a4b34") diff --git a/modules/ui/ophints/packages.el b/modules/ui/ophints/packages.el index 3070cc9fb..000154257 100644 --- a/modules/ui/ophints/packages.el +++ b/modules/ui/ophints/packages.el @@ -2,5 +2,5 @@ ;;; ui/ophints/packages.el (if (featurep! :editor evil) - (package! evil-goggles :pin "08a22058fd6a167f9f1b684c649008caef571459") - (package! volatile-highlights :pin "9a20091f0ce7fc0a6b3e641a6a46d5f3ac4d8392")) + (package! evil-goggles :pin "08a22058fd") + (package! volatile-highlights :pin "9a20091f0c")) diff --git a/modules/ui/tabs/packages.el b/modules/ui/tabs/packages.el index 0cabf5fc0..61c683dd7 100644 --- a/modules/ui/tabs/packages.el +++ b/modules/ui/tabs/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/tabs/packages.el -(package! centaur-tabs :pin "9b2ae1ace8c0d4ad1fa90047105793274baa1d48") +(package! centaur-tabs :pin "f9d119d8ba") diff --git a/modules/ui/treemacs/packages.el b/modules/ui/treemacs/packages.el index f638ecce0..00ecd399e 100644 --- a/modules/ui/treemacs/packages.el +++ b/modules/ui/treemacs/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/treemacs/packages.el -(package! treemacs :pin "d539f7bfa0cf97383a3e15688d904c14d4d94aa9") +(package! treemacs :pin "f830f209dd") (when (featurep! :editor evil +everywhere) - (package! treemacs-evil :pin "d539f7bfa0cf97383a3e15688d904c14d4d94aa9")) -(package! treemacs-projectile) + (package! treemacs-evil :pin "f830f209dd")) +(package! treemacs-projectile :pin "f830f209dd") (when (featurep! :tools magit) - (package! treemacs-magit :pin "d539f7bfa0cf97383a3e15688d904c14d4d94aa9")) + (package! treemacs-magit :pin "f830f209dd")) (when (featurep! :ui workspaces) - (package! treemacs-persp :pin "d539f7bfa0cf97383a3e15688d904c14d4d94aa9")) + (package! treemacs-persp :pin "f830f209dd")) diff --git a/modules/ui/unicode/packages.el b/modules/ui/unicode/packages.el index cafa4ae2e..a7c7dfcd7 100644 --- a/modules/ui/unicode/packages.el +++ b/modules/ui/unicode/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/unicode/packages.el -(package! unicode-fonts :pin "7b88ae84e589f6c8b9386b2fb5a02ff4ccb91169") +(package! unicode-fonts :pin "7b88ae84e5") diff --git a/modules/ui/vc-gutter/packages.el b/modules/ui/vc-gutter/packages.el index 3aad609f9..94bbe2fab 100644 --- a/modules/ui/vc-gutter/packages.el +++ b/modules/ui/vc-gutter/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/vc-gutter/packages.el -(package! git-gutter-fringe :pin "16226caab44174301f1659f7bf8cc67a76153445") +(package! git-gutter-fringe :pin "16226caab4") diff --git a/modules/ui/vi-tilde-fringe/packages.el b/modules/ui/vi-tilde-fringe/packages.el index 36b4004e8..2aad44c2f 100644 --- a/modules/ui/vi-tilde-fringe/packages.el +++ b/modules/ui/vi-tilde-fringe/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/vi-tilde-fringe/packages.el -(package! vi-tilde-fringe :pin "f1597a8d54535bb1d84b442577b2024e6f910308") +(package! vi-tilde-fringe :pin "f1597a8d54") diff --git a/modules/ui/window-select/packages.el b/modules/ui/window-select/packages.el index 76c855802..455caf83a 100644 --- a/modules/ui/window-select/packages.el +++ b/modules/ui/window-select/packages.el @@ -2,8 +2,8 @@ ;;; ui/window-select/packages.el (if (featurep! +switch-window) - (package! switch-window :pin "204f9fc1a39868a2d16ab9370a142c8c9c7a0943") - (package! ace-window :pin "edbbb1b77c3fb939e4d9057443bc1897321d0095")) + (package! switch-window :pin "204f9fc1a3") + (package! ace-window :pin "7e0777b39a")) (when (featurep! +numbers) - (package! winum :pin "c5455e866e8a5f7eab6a7263e2057aff5f1118b9")) + (package! winum :pin "c5455e866e")) diff --git a/modules/ui/workspaces/packages.el b/modules/ui/workspaces/packages.el index 3defd308f..6209f670d 100644 --- a/modules/ui/workspaces/packages.el +++ b/modules/ui/workspaces/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/workspaces/packages.el -(package! persp-mode :pin "e330e6240bbb82589077f30472b05b95d1ff430d") +(package! persp-mode :pin "e330e6240b") diff --git a/modules/ui/zen/packages.el b/modules/ui/zen/packages.el index d0f4a073c..1085cea24 100644 --- a/modules/ui/zen/packages.el +++ b/modules/ui/zen/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/zen/packages.el -(package! writeroom-mode :pin "fa17eb651102502f60086d62784f1dae15c0630d") -(package! mixed-pitch :pin "fbc566ace3ed7508dab6bec90ba185f21c829aab") +(package! writeroom-mode :pin "fa17eb6511") +(package! mixed-pitch :pin "fbc566ace3") From f600605de31e4dc1dd2f404829bf531d60b9ae8f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Jan 2020 03:50:49 -0500 Subject: [PATCH 699/983] Add "unpin" section to doom/info Important when debugging potential upstream issues. --- core/autoload/debug.el | 3 ++- core/core-packages.el | 37 ++++++++++++++++++++----------------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/core/autoload/debug.el b/core/autoload/debug.el index 6afbf31fa..e7206ac8f 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -97,7 +97,8 @@ ready to be pasted in a bug report on github." (cl-loop for (name . _) in package-alist collect (format "%s" name))) (error (format "<%S>" e))) - '("n/a")))))))) + '("n/a"))) + (unpin ,@(or (get 'doom-pinned-packages 'modified) '("n/a")))))))) ;; diff --git a/core/core-packages.el b/core/core-packages.el index 171fdbdab..24f585d4e 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -322,23 +322,26 @@ can be used one of five ways: (unpin! (:lang python javascript) (:tools docker)) Or any combination of the above." - `(dolist (target ',targets) - (cond - ((eq target t) - (setq doom-pinned-packages nil)) - ((or (keywordp target) - (listp target)) - (cl-destructuring-bind (category . modules) (doom-enlist target) - (dolist (pkg doom-packages) - (let ((pkg-modules (plist-get (cdr pkg) :modules))) - (and (assq category pkg-modules) - (or (null modules) - (cl-loop for module in modules - if (member (cons category module) pkg-modules) - return t)) - (assq-delete-all (car pkg) doom-pinned-packages)))))) - ((symbolp target) - (assq-delete-all target doom-pinned-packages))))) + `(progn + (put 'doom-pinned-packages 'modified + (delete-dups (append targets (get 'doom-pinned-packages 'modified)))) + (dolist (target ',targets) + (cond + ((eq target t) + (setq doom-pinned-packages nil)) + ((or (keywordp target) + (listp target)) + (cl-destructuring-bind (category . modules) (doom-enlist target) + (dolist (pkg doom-packages) + (let ((pkg-modules (plist-get (cdr pkg) :modules))) + (and (assq category pkg-modules) + (or (null modules) + (cl-loop for module in modules + if (member (cons category module) pkg-modules) + return t)) + (assq-delete-all (car pkg) doom-pinned-packages)))))) + ((symbolp target) + (assq-delete-all target doom-pinned-packages)))))) (provide 'core-packages) ;;; core-packages.el ends here From 57f550bc851c0bd2462ad798fe52e15e95eb02d0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Jan 2020 04:14:40 -0500 Subject: [PATCH 700/983] Rename & change doom/update-pinned-package-declaration + Now named doom/update-pinned-package-form + If passed the prefix arg, the command now prompts for a remote commit to use. --- core/autoload/packages.el | 54 +++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/core/autoload/packages.el b/core/autoload/packages.el index 35f275a61..e0c0240c3 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -203,11 +203,11 @@ ones." (message "Reloading packages...DONE")) ;;;###autoload -(defun doom/update-pinned-package-declaration () +(defun doom/update-pinned-package-form (&optional select) "Inserts or updates a `:pin' for the `package!' statement at point. Grabs the latest commit id of the package using 'git'." - (interactive) + (interactive "P") ;; REVIEW Better error handling ;; TODO Insert a new `package!' if no `package!' at poin (require 'straight) @@ -215,26 +215,30 @@ Grabs the latest commit id of the package using 'git'." (while (and (atom (sexp-at-point)) (not (bolp))) (forward-sexp -1))) - (if (not (eq (sexp-at-point) 'package!)) - (user-error "Not on a `package!' call") - (backward-char) - (let* ((recipe (cdr (sexp-at-point))) - (name (car recipe)) - (id - (cdr (doom-call-process - "git" "ls-remote" - (straight-vc-git--destructure - (doom-plist-merge - (plist-get (cdr recipe) :recipe) - (or (cdr (straight-recipes-retrieve name)) - (plist-get (cdr (assq name doom-packages)) :recipe))) - (upstream-repo upstream-host) - (straight-vc-git--encode-url upstream-repo upstream-host)))))) - (unless id - (user-error "No id for %S package" name)) - (let ((id (car (split-string id)))) - (if (re-search-forward ":pin +\"\\([^\"]+\\)\"" (cdr (bounds-of-thing-at-point 'sexp)) t) - (replace-match id t t nil 1) - (thing-at-point--end-of-sexp) - (backward-char) - (insert " :pin " (prin1-to-string id))))))) + (save-excursion + (if (not (eq (sexp-at-point) 'package!)) + (user-error "Not on a `package!' call") + (backward-char) + (let* ((recipe (cdr (sexp-at-point))) + (name (car recipe)) + (id + (cdr (doom-call-process + "git" "ls-remote" + (straight-vc-git--destructure + (doom-plist-merge + (plist-get (cdr recipe) :recipe) + (or (cdr (straight-recipes-retrieve name)) + (plist-get (cdr (assq name doom-packages)) :recipe))) + (upstream-repo upstream-host) + (straight-vc-git--encode-url upstream-repo upstream-host)))))) + (unless id + (user-error "No id for %S package" name)) + (let* ((id (if select + (car (split-string (completing-read "Commit: " (split-string id "\n" t)))) + (car (split-string id)))) + (id (substring id 0 10))) + (if (re-search-forward ":pin +\"\\([^\"]+\\)\"" (cdr (bounds-of-thing-at-point 'sexp)) t) + (replace-match id t t nil 1) + (thing-at-point--end-of-sexp) + (backward-char) + (insert " :pin " (prin1-to-string id)))))))) From 7cf197d8aed05eb9aa64eb007e2f7a14f1427f3c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Jan 2020 16:03:10 -0500 Subject: [PATCH 701/983] Fix reference to old +lookup-symbol-or-region Was replaced with doom-thing-at-point-or-region in 27bf3c85b --- modules/tools/lookup/autoload/online.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/lookup/autoload/online.el b/modules/tools/lookup/autoload/online.el index bdd9639a0..b7bd0b4a0 100644 --- a/modules/tools/lookup/autoload/online.el +++ b/modules/tools/lookup/autoload/online.el @@ -35,7 +35,7 @@ provider from `+lookup-provider-url-alist'. On consecutive uses, the last provider will be reused. If the universal argument is supplied, always prompt for the provider." (interactive - (list (if (use-region-p) (+lookup-symbol-or-region)) + (list (if (use-region-p) (doom-thing-at-point-or-region)) (+lookup--online-provider current-prefix-arg))) (let ((backend (cl-find-if (lambda (x) (or (stringp x) (fboundp x))) (cdr (assoc provider +lookup-provider-url-alist))))) From 038e52d7094b3118350e7f8d227a56874ebf138e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Jan 2020 16:55:04 -0500 Subject: [PATCH 702/983] tools/lookup: add +offline feature For offline dictionary/thesaurus lookup, using wordnut and synosaurus. --- modules/tools/lookup/README.org | 20 +++++++++++++++---- modules/tools/lookup/autoload/lookup.el | 26 ++++++++++++++++--------- modules/tools/lookup/config.el | 10 +++++++--- modules/tools/lookup/packages.el | 10 ++++++---- 4 files changed, 46 insertions(+), 20 deletions(-) diff --git a/modules/tools/lookup/README.org b/modules/tools/lookup/README.org index 05fdda993..b69d6b25e 100644 --- a/modules/tools/lookup/README.org +++ b/modules/tools/lookup/README.org @@ -10,6 +10,7 @@ - [[#prerequisites][Prerequisites]] - [[#macos][MacOS]] - [[#arch-linux][Arch Linux]] + - [[#nixos][NixOS]] - [[#features][Features]] - [[#jump-to-definition][Jump to definition]] - [[#find-references][Find references]] @@ -32,10 +33,11 @@ up definitions, references and documentation. + Documentation lookup for a variety of online sources (like devdocs.io, stackoverflow or youtube). + Integration with Dash.app docsets. -+ Support for online dictionaries and thesauruses. ++ Support for online (and offline) dictionaries and thesauruses. ** Module Flags + ~+dictionary~ Enable word definition and thesaurus lookup functionality. + + ~+offline~ Install and prefer offline dictionary/thesaurus. + ~+docsets~ Enable integration with Dash.app docsets. ** Plugins @@ -46,13 +48,13 @@ up definitions, references and documentation. * Prerequisites This module has several soft dependencies: -+ ~ripgrep~ as a last-resort fallback for - jump-to-definition/find-references. ++ ~ripgrep~ as a last-resort fallback for jump-to-definition/find-references. + ~sqlite3~ for Dash docset support. ++ ~wordnet~ for offline dictionary and thesaurus support. ** MacOS #+BEGIN_SRC sh -brew install ripgrep +brew install ripgrep wordnet # An older version of sqlite is included in MacOS. If it causes you problems (and # folks have reported it will), install it through homebrew: @@ -65,6 +67,16 @@ export PATH="/usr/local/opt/sqlite/bin:$PATH" ** Arch Linux #+BEGIN_SRC sh sudo pacman -S sqlite ripgrep +sudo yay -S wordnet-cli +#+END_SRC + +** NixOS +#+BEGIN_SRC nix +environment.systemPackages = with pkgs; [ + ripgrep + sqlite + wordnet +]; #+END_SRC * Features diff --git a/modules/tools/lookup/autoload/lookup.el b/modules/tools/lookup/autoload/lookup.el index 3ee8f0cf4..352a1d4bc 100644 --- a/modules/tools/lookup/autoload/lookup.el +++ b/modules/tools/lookup/autoload/lookup.el @@ -321,12 +321,17 @@ Otherwise, falls back on `find-file-at-point'." (list (or (doom-thing-at-point-or-region 'word) (read-string "Look up in dictionary: ")) current-prefix-arg)) + (message "Looking up definition for %S" identifier) (cond ((and IS-MAC (require 'osx-dictionary nil t)) (osx-dictionary--view-result identifier)) - ((and +lookup-dictionary-enable-online (require 'define-word nil t)) - (message "Looking up definition of %S" identifier) + ((and +lookup-dictionary-prefer-offline + (require 'wordnut nil t)) + (unless (executable-find wordnut-cmd) + (user-error "Couldn't find %S installed on your system" + wordnut-cmd)) + (wordnut-search identifier)) + ((require 'define-word nil t) (define-word identifier nil arg)) - ;; TODO Implement offline dictionary backend ((user-error "No dictionary backend is available")))) ;;;###autoload @@ -335,10 +340,13 @@ Otherwise, falls back on `find-file-at-point'." (interactive (list (doom-thing-at-point-or-region 'word) ; TODO actually use this current-prefix-arg)) - (unless (require 'powerthesaurus nil t) - (user-error "No dictionary backend is available")) - (unless +lookup-dictionary-enable-online - ;; TODO Implement offline synonyms backend - (user-error "No offline dictionary implemented yet")) (message "Looking up synonyms for %S" identifier) - (powerthesaurus-lookup-word-dwim)) + (cond ((and +lookup-dictionary-prefer-offline + (require 'synosaurus nil t)) + (unless (executable-find synosaurus-wordnet--command) + (user-error "Couldn't find %S installed on your system" + synosaurus-wordnet--command)) + (synosaurus-choose-and-replace)) + ((require 'powerthesaurus nil t) + (powerthesaurus-lookup-word-dwim)) + ((user-error "No thesaurus backend is available")))) diff --git a/modules/tools/lookup/config.el b/modules/tools/lookup/config.el index 9116fb83e..59a5e93c4 100644 --- a/modules/tools/lookup/config.el +++ b/modules/tools/lookup/config.el @@ -85,15 +85,15 @@ If the argument is interactive (satisfies `commandp'), it is called with argument: the identifier at point. See `set-lookup-handlers!' about adding to this list.") -(defvar +lookup-dictionary-enable-online t +(defvar +lookup-dictionary-prefer-offline (featurep! +offline) "If non-nil, look up dictionaries online. Setting this to nil will force it to use offline backends, which may be less than perfect, but available without an internet connection. -Used by `+lookup/word-definition' and `+lookup/word-synonyms'. +Used by `+lookup/dictionary-definition' and `+lookup/synonyms'. -For `+lookup/word-definition', this is ignored on Mac, where Emacs users +For `+lookup/dictionary-definition', this is ignored on Mac, where Emacs users Dictionary.app behind the scenes to get definitions.") @@ -196,3 +196,7 @@ See https://github.com/magit/ghub/issues/81" (define-key! text-mode-map [remap +lookup/definition] #'+lookup/dictionary-definition [remap +lookup/references] #'+lookup/synonyms)) + + +;;;###package synosaurus +(setq synosaurus-choose-method 'default) ; use ivy/helm instead of ido diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index 288d779c7..e80c98361 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -24,7 +24,9 @@ (when (featurep! +dictionary) (if IS-MAC (package! osx-dictionary :pin "1b79ff64c7") - (package! define-word :pin "d8c76d503b")) - ;; Need for Google/DuckDuckGo auto-completion on `+lookup/online' - (package! powerthesaurus :pin "81a262ec0c") - (package! request :pin "4be823a89b")) + (package! define-word :pin "d8c76d503b") + (package! powerthesaurus :pin "81a262ec0c") + (package! request :pin "4be823a89b") + (when (featurep! +offline) + (package! wordnut :pin "feac531404") + (package! synosaurus :pin "14d34fc92a")))) From 8aec15c287b5969301d0dce1ba6aea208e05654f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Jan 2020 17:06:21 -0500 Subject: [PATCH 703/983] Load lsp-mode a *little* later --- modules/tools/lsp/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/lsp/config.el b/modules/tools/lsp/config.el index 12c585ec2..f0de0fee3 100644 --- a/modules/tools/lsp/config.el +++ b/modules/tools/lsp/config.el @@ -83,8 +83,8 @@ Also see: This also logs the resolved project root, if found, so we know where we are." :override #'lsp (interactive "P") - (require 'lsp-mode) (and (buffer-file-name) + (require 'lsp-mode nil t) (setq-local lsp--buffer-workspaces (or (lsp--try-open-in-library-workspace) From 6758110a251c27f17bc1f7edd23ba01dfceb62d1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Jan 2020 17:06:47 -0500 Subject: [PATCH 704/983] Properly disable direnv when direnv-mode is disabled --- modules/tools/direnv/config.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/tools/direnv/config.el b/modules/tools/direnv/config.el index ae6ef6e3e..10a6a7681 100644 --- a/modules/tools/direnv/config.el +++ b/modules/tools/direnv/config.el @@ -17,9 +17,9 @@ when the file is first opened/major mode is activated. This is significantly less expensive, but is less sensitive to changes to .envrc done outside of Emacs." (direnv--disable) - (when direnv-mode - (add-hook 'after-change-major-mode-hook - #'direnv--maybe-update-environment)))) + (funcall (if direnv-mode 'add-hook 'remove-hook) + 'after-change-major-mode-hook + #'direnv--maybe-update-environment))) (defadvice! +direnv--make-process-environment-buffer-local-a (items) :filter-return #'direnv--export From 786dec3e504e6982945d5daf2675317f080f8c06 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Jan 2020 17:07:31 -0500 Subject: [PATCH 705/983] Remove Inbox heading on org journal capture template --- modules/lang/org/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index abed7ff69..8db070b9b 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -271,7 +271,7 @@ I like: (file+headline +org-capture-notes-file "Inbox") "* %u %?\n%i\n%a" :prepend t) ("j" "Journal" entry - (file+olp+datetree +org-capture-journal-file "Inbox") + (file+olp+datetree +org-capture-journal-file) "* %U %?\n%i\n%a" :prepend t) ;; Will use {project-root}/{todo,notes,changelog}.org, unless a From 871201dad699adc72cb68afecf678d995e62daa6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Jan 2020 01:31:53 -0500 Subject: [PATCH 706/983] Minor doc/comment revision & fixes --- README.md | 67 ++++++++++++++++-------------- core/autoload/format.el | 2 +- core/templates/config.example.el | 4 +- docs/api.org | 1 + modules/editor/evil/+everywhere.el | 4 +- 5 files changed, 41 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index a1c603998..31228ae31 100644 --- a/README.md +++ b/README.md @@ -31,11 +31,13 @@ **Quick start** ```bash -# Install emacs and ripgrep through your package manager, then... git clone https://github.com/hlissner/doom-emacs ~/.emacs.d ~/.emacs.d/bin/doom install ``` +More details, including dependencies and how to install Emacs, can be found [in +the documentation](docs/getting_started.org#install). + **Table of Contents** - [What is Doom Emacs](#what-is-doom-emacs) @@ -56,46 +58,47 @@ It is a story as old as time. A stubborn, shell-dwelling, and melodramatic vimmer -- envious of the features of modern text editors -- spirals into despair before succumbing to the [dark side][url:evil-mode]. This is his config. -Doom is a configuration for [GNU Emacs](https://www.gnu.org/software/emacs/) -designed to make Emacs faster and easier to customize. It can serve as framework -for your own configuration or a resource for fellow Emacs enthusiasts who want -to learn more about our favorite OS. +Doom is a configuration framework for [GNU +Emacs](https://www.gnu.org/software/emacs/) tailored for Emacs bankruptcy +veterans who want less framework in their frameworks and the performance of a +hand rolled config (or better). It can be a foundation for your own config or a +resource for Emacs enthusiasts to learn more about our favorite OS. ## Doom's mantras -- **Gotta go fast.** Startup and run-time performance are high priorities. - Expensive functionality (built-in or in plugins) is modified and optimized - toward this end, otherwise, they must be opt-in. -- **Close to metal.** There's less between you and vanilla Emacs, by design. - There's less to grok. Modules should be syntactically sweet and backend logic - explicit and abstraction-light. The code itself ought to be designed as if - grokking it were part of the user experience; and it is! -- **Opinionated, but not stubborn.** Doom is a bundle of reasonable defaults - and curated opinions, but you aren't stuck with it. Use as little or as much - of it as you like. Use it as-is as a complete Emacs distribution; disable - everything and use it as a baseline for your own; or anywhere in between. -- **Your system, your rules.** There are more ways to set up your programming - environment than there are dislikes on Youtube Rewind '18, so Doom and its - plugins promise not to *automatically* (and definitely not *silently*) install - system dependencies. This means fonts, packages and programs. `doom doctor` - will tell you what's missing though! +- **Gotta go fast.** Startup and run-time performance are priorities. Doom goes + beyond lazy loading packages by modifying them to be snappier and load lazier! +- **Close to metal.** There's less between you and vanilla Emacs by design. + There's less to grok, on top of Emacs. +- **Readability counts.** Internals ought to be written as if reading them were + part of the user experience, and it is! Modules should be syntactically sweet. + Backend logic should be functional (as much as elisp permits), abstraction + light and (hopefully) documented. +- **Opinionated, but not stubborn.** Doom is a bundle of reasonable defaults and + curated opinions, but all of it should be optional. Use as little or as much + of it as you like. +- **Your system, your rules.** There are more ways to set up your development + environment than there are dislikes on Youtube Rewind '18, so Doom leaves it + to you. Doom will not *automatically* install system dependencies (and will + coerce its plugins not to do so either). Use `doom doctor` to figure out + what's missing. ## Features +- Minimalistic good looks inspired by modern editors. +- A modular architecture for a more organized Emacs configuration. +- A custom elisp library to help simplify your config. +- (Optional) Vim-emulation powered by [evil-mode][url:evil-mode], including + ports of popular vim plugins and functionality. +- A declarative [package management system][doom:packages] (powered by + [straight.el][url:straight]) with a command line interface. Install packages + from anywhere, not just (M)ELPA. - A curated set of sane defaults for all packages, all (major) OSes, and Emacs itself. - Support for *many* programming languages. Too many to list. Includes syntax highlighting, linters/checker integration, inline code evaluation, code completion (where possible), REPLs, documentation lookups, snippets, and more! - Support for *many* tools, like docker, pass, ansible, terraform, and more. -- Minimalistic good looks inspired by modern editors. -- A modular architecture for a more organized Emacs configuration. -- A custom elisp library to help you simplify your config. -- A declarative [package management system][doom:packages] (powered by - [straight.el][url:straight]) with a command line interface. Install packages - from anywhere, not just (M)ELPA. -- Vim-emulation powered by [evil-mode][url:evil-mode], including ports of - popular vim plugins and functionality. - A Spacemacs-esque [keybinding scheme][doom:bindings], centered around leader and localleader prefix keys (SPC and SPCm, by default). @@ -107,9 +110,9 @@ to learn more about our favorite OS. snippets libraries. - Project search (and replace) utilities, powered by [ripgrep][url:ripgrep]. - Isolated and persistent workspaces (also substitutes for vim tabs). -- An environment variables file generator and loader, so that Emacs can - perfectly inherit your shell configuration. -- Everything is optional! +- An envvar file generator that captures a snapshot of your shell environment + for Doom to load at startup. No more struggling to get Emacs to inherit your + `PATH`, among other things. # Getting Help diff --git a/core/autoload/format.el b/core/autoload/format.el index 2be22513e..c4429184d 100644 --- a/core/autoload/format.el +++ b/core/autoload/format.el @@ -214,7 +214,7 @@ into faces or ANSI codes depending on the type of sesssion we're in." (defmacro print! (message &rest args) "Prints MESSAGE, formatted with ARGS, to stdout. -Always returns non-nil. +Returns non-nil if the message is a non-empty string. Can be colored using (color ...) blocks: diff --git a/core/templates/config.example.el b/core/templates/config.example.el index 0af845956..2f1430fde 100644 --- a/core/templates/config.example.el +++ b/core/templates/config.example.el @@ -4,8 +4,8 @@ ;; refresh' after modifying this file! -;; These are used for a number of things, particularly for GPG configuration, -;; some email clients, file templates and snippets. +;; Some functionality uses this to identify you, e.g. GPG configuration, email +;; clients, file templates and snippets. (setq user-full-name "John Doe" user-mail-address "john@doe.com") diff --git a/docs/api.org b/docs/api.org index a363d2add..dc9f3d2a5 100644 --- a/docs/api.org +++ b/docs/api.org @@ -28,6 +28,7 @@ It is integrated into Helpful, in Doom. - [[#prependq][prependq!]] - [[#quiet][quiet!]] - [[#remove-hook][remove-hook!]] + - [[#setq][setq!]] - [[#setq-hook][setq-hook!]] - [[#unsetq-hook][unsetq-hook!]] - [[#use-package][use-package!]] diff --git a/modules/editor/evil/+everywhere.el b/modules/editor/evil/+everywhere.el index c519ea0f3..50f4d4c91 100644 --- a/modules/editor/evil/+everywhere.el +++ b/modules/editor/evil/+everywhere.el @@ -11,8 +11,8 @@ ;; their changes will override evil-collection's. ;; 3. Ideally, we'd do away with evil-collection entirely. It changes too often, ;; introduces breaking bugs too frequently, and I don't agree with all their -;; design choices. Regardless, it does mork than it causes trouble, so it may -;; be here to stay. +;; design choices. Regardless, it does more good than trouble, so it may be +;; here to stay. ;; 4. Adds `+evil-collection-disabled-list', to make it easier for users to ;; disable modules, and to reduce the effort required to maintain our copy of ;; `evil-collection-list' (now I can just copy it from time to time). From 827225e331eb14bce926e0bc8c615eb38dd9a5e9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Jan 2020 02:20:39 -0500 Subject: [PATCH 707/983] Fix #2429: replace defunct attach: links w/ download: Forgot that support for attach: links were removed some time ago, but I still want short org-download links, so I've added 'download:' links. --- docs/faq.org | 32 +++++++++++++-------------- modules/lang/org/autoload/org-link.el | 16 ++++++++++++++ modules/lang/org/config.el | 15 ------------- modules/lang/org/contrib/dragndrop.el | 26 ++++++++++++++-------- 4 files changed, 49 insertions(+), 40 deletions(-) diff --git a/docs/faq.org b/docs/faq.org index d94a801ec..7b8abd0fa 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -64,30 +64,30 @@ * General ** Why is it called Doom? -An homage to idsoftware's classic game, whose open sourced code was my first -exposure to programming. +It's an homage to idsoftware's classic game, whose open sourced code was +Henrik's (Doom's maintainer) first exposure to programming. -Also, if you're obsessed enough with a text editor that you write a community -config for it, you're doomed from the get go. +And if you're obsessed enough with a text editor that you write a community +config for it, you're doomed from the start. ** Does Doom work on Windows? -Windows support is weak and will generally lag behind Linux/MacOS support, so -your mileage will vary. However, many have reported success installing Doom -Emacs on Windows (using WSL, WSL2 or scoop/chocolatey). You'll find install -instructions for Windows in the [[file:getting_started.org::On Windows][Getting Starting guide]]. +Windows support is weak and generally lags behind Linux/MacOS support, so your +mileage will vary. However, some have reported success using Doom Emacs on +Windows (using WSL, WSL2 or scoop/chocolatey). You'll find install instructions +in the [[file:getting_started.org::On Windows][Getting Starting guide]]. -If you're a Windows user, help us improve our documentation on Windows support! +If you're a Windows user, help us improve our documentation! ** Is Doom only for vimmers? -Henrik is a dyed-in-the-wool vimmer with more than a decade of vim muscle -memory. Vim's is the only paradigm he truly knows, so vimmers will always be his -primary audience. +No, but it is Doom's primary audience. Its maintainer is a dyed-in-the-wool +vimmer with almost two decades of vim muscle memory, and he came to Emacs to +find a better vim. -That's not to say Doom won't work without evil, only that it is less polished in -that respect. Our growing non-evil userbase are slowly improving the situation -however. We welcome suggestions and PRs to help accommodate a non-evil workflow. +Although Doom is less polished without evil, its growing non-evil user base is +slowly improving the situation. We welcome suggestions and PRs to help +accommodate a non-evil workflow. -If you'd still like a go at it, see the [[file:../modules/editor/evil/README.org::Removing%20evil-mode][Removing evil-mode]] section in the +If you'd still like a go at it, see the [[file:../modules/editor/evil/README.org::Removing%20evil-mode][removing evil-mode]] section in the [[file:../modules/editor/evil/README.org][:editor evil]] module's documentation. ** I am a beginner. Can I use Doom? diff --git a/modules/lang/org/autoload/org-link.el b/modules/lang/org/autoload/org-link.el index 54be1375d..bc4317183 100644 --- a/modules/lang/org/autoload/org-link.el +++ b/modules/lang/org/autoload/org-link.el @@ -1,5 +1,21 @@ ;;; lang/org/autoload/org-link.el -*- lexical-binding: t; -*- +(defun +org--relpath (path root) + (if (and buffer-file-name (file-in-directory-p buffer-file-name root)) + (file-relative-name path) + path)) + +;;;###autoload +(defun +org-def-link (key dir) + (org-link-set-parameters + key + :complete (lambda () (+org--relpath (+org-link-read-file key dir) dir)) + :follow (lambda (link) (find-file (expand-file-name link dir))) + :face (lambda (link) + (if (file-exists-p (expand-file-name link dir)) + 'org-link + 'error)))) + ;;;###autoload (defun +org-link-read-file (key dir) (let ((file (read-file-name (format "%s: " (capitalize key)) dir))) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 8db070b9b..c22c8a5d6 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -387,21 +387,6 @@ file isn't in `org-directory'." (defun +org-init-custom-links-h () - (defun +org--relpath (path root) - (if (and buffer-file-name (file-in-directory-p buffer-file-name root)) - (file-relative-name path) - path)) - - (defun +org-def-link (key dir) - (org-link-set-parameters - key - :complete (lambda () (+org--relpath (+org-link-read-file key dir) dir)) - :follow (lambda (link) (find-file (expand-file-name link dir))) - :face (lambda (link) - (if (file-exists-p (expand-file-name link dir)) - 'org-link - 'error)))) - ;; Highlight broken file links (org-link-set-parameters "file" diff --git a/modules/lang/org/contrib/dragndrop.el b/modules/lang/org/contrib/dragndrop.el index 35526cda3..1fa45acb3 100644 --- a/modules/lang/org/contrib/dragndrop.el +++ b/modules/lang/org/contrib/dragndrop.el @@ -11,6 +11,7 @@ (advice-add #'org-download-enable :override #'ignore) :config (setq org-download-image-dir org-attach-id-dir + org-download-link-format "[[download:%s]]\n" org-download-method 'attach org-download-heading-lvl nil org-download-timestamp "_%Y%m%d_%H%M%S" @@ -20,6 +21,11 @@ (cond ((executable-find "maim") "maim -s %s") ((executable-find "scrot") "scrot -s %s"))))) + ;; A shorter link to attachments + (+org-def-link "download" org-attach-id-dir) + (setf (alist-get "download" org-link-abbrev-alist nil nil #'equal) + (abbreviate-file-name org-attach-id-dir)) + ;; Handle non-image files a little differently. Images should be inserted ;; as-is, as image previews. Other files, like pdfs or zips, should be linked ;; to, with an icon indicating the type of file. @@ -34,15 +40,17 @@ an file icon produced by `+org-attach-icon-for')." (newline)) (cond ((image-type-from-file-name filename) (insert - (concat (if (= org-download-image-html-width 0) "" - (format "#+attr_html: :width %dpx\n" org-download-image-html-width)) - (if (= org-download-image-latex-width 0) "" - (format "#+attr_latex: :width %dcm\n" org-download-image-latex-width)) - (cond ((file-in-directory-p filename org-attach-directory) - (format "[[attach:%s]]" (file-relative-name filename org-attach-directory))) - ((file-in-directory-p filename org-directory) - (format org-download-link-format (file-relative-name filename org-directory))) - ((format org-download-link-format filename))))) + (concat + (if (= org-download-image-html-width 0) "" + (format "#+attr_html: :width %dpx\n" org-download-image-html-width)) + (if (= org-download-image-latex-width 0) "" + (format "#+attr_latex: :width %dcm\n" org-download-image-latex-width)) + (format org-download-link-format + (cond ((file-in-directory-p filename org-attach-directory) + (file-relative-name filename org-download-image-dir)) + ((file-in-directory-p filename org-directory) + (file-relative-name filename org-directory)) + (filename))))) (org-display-inline-images)) ((insert (format "%s [[./%s][%s]] " From 6cdc06043288834a213f80e9145712ef8c8ef71b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Jan 2020 04:19:39 -0500 Subject: [PATCH 708/983] Update & revise docs/faq.org --- docs/faq.org | 373 +++++++++++++++++++-------------------------------- 1 file changed, 139 insertions(+), 234 deletions(-) diff --git a/docs/faq.org b/docs/faq.org index 7b8abd0fa..4bc5defe1 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -37,7 +37,7 @@ - [[#can-vimevil-be-removed-for-a-more-vanilla-emacs-experience][Can Vim/Evil be removed for a more vanilla Emacs experience?]] - [[#should-i-use-make-or-bindoom][Should I use ~make~ or ~bin/doom~?]] - [[#when-should-and-shouldnt-i-use-bindoom][When should and shouldn't I use ~bin/doom~?]] - - [[#when-to-run-doom-refresh][When to run ~doom refresh~]] + - [[#when-to-run-doom-sync][When to run ~doom sync~]] - [[#how-to-suppress-confirmation-prompts-while-bindoom-is-running][How to suppress confirmation prompts while ~bin/doom~ is running]] - [[#defaults][Defaults]] - [[#why-ivy-over-helm][Why Ivy over Helm?]] @@ -134,15 +134,15 @@ Doom had +four+ *five* goals for its package management system: are out-of-date through official channels, have changed hands, have a superior fork, or aren't available in ELPA repos. 3. *Performance:* lazy-loading the package management system is a tremendous - boon to start up speed. Initializing package.el and quelpa (and/or checking - that your packages are installed) every time you start up is expensive. + boon to start up speed. Initializing package.el and straight (and/or checking + that your packages are installed) each time you start up is expensive. 4. *Organization:* an Emacs configuration grows so quickly, in complexity and size. A clear separation of concerns (configuration of packages from their installation) is more organized. 5. *Reproducibility:* /This goal hasn't been implemented yet/, but all our work up until now is aimed at this goal. Emacs is a tumultuous ecosystem; packages break left and right, and we rely on hundreds of them. Eventually, we want - package versions to be locked to versions of Doom so that Doom installs are + package versions to be locked to Doom's releases so that Doom installs are reproducible. ** How does Doom start up so quickly? @@ -160,10 +160,10 @@ up ~gc-cons-threshold~ (and perhaps ~gc-cons-percentage~) temporarily: ;; ... your emacs config here ... #+END_SRC -However, it is important to reset it eventually (as late as possible). Not doing -so will cause garbage collection freezes during long-term interactive use. -Conversely, a ~gc-cons-threshold~ that is too small will cause stuttering. We -use 16mb as our default. +However, it is important to reset it eventually. Not doing so will cause garbage +collection freezes during long-term interactive use. Conversely, a +~gc-cons-threshold~ that is too small will cause stuttering. We use 16mb as our +default. #+BEGIN_SRC emacs-lisp (add-hook 'emacs-startup-hook @@ -190,14 +190,16 @@ helm and ivy). Here is how Doom does it: (add-hook 'minibuffer-exit-hook #'doom-restore-garbage-collection-h) #+END_SRC +Another alternative (which is [[https://github.com/hlissner/doom-emacs/blob/develop/core/core.el#L269-L274][what Doom uses]]) is to use the [[https://gitlab.com/koral/gcmh/][gcmh]] package to +stave off the GC until you are idle or unfocus the Emacs frame. + *** Unset ~file-name-handler-alist~ temporarily Emacs consults this variable every time a file is read or library loaded, or when certain functions in the file API are used (like ~expand-file-name~ or ~file-truename~). -They do so to check if a special handler is needed to read it, but none of these -handlers are necessary for the initialization work we do at startup, so it is -generally safe to disable it (temporarily!): +Emacs does to check if a special handler is needed to read that file, but none +of them are (typically) necessary at startup, so we disable them (temporarily!): #+BEGIN_SRC emacs-lisp (defvar doom--file-name-handler-alist file-name-handler-alist) @@ -214,60 +216,38 @@ generally safe to disable it (temporarily!): (setq file-name-handler-alist doom--file-name-handler-alist))) #+END_SRC -It is important to restore this variable, otherwise you won't be able to use -TRAMP and Emacs will be unable to read compressed/encrypted files. - -*** Cut down on ~load-path~ lookups -Each ~load~ and ~require~ call (without an second argument) costs an O(n) lookup -on ~load-path~. The average Doom config has approximately 260 packages including -dependencies, and around 40 built-in packages. That means a minimum of 300 -entries in ~load-path~ with a worst case of =n=300= for /each/ package load (but -realistically, =n= will be somewhere between =2= and =20=). - -The cost isn't great, but it does add up. There isn't much to do about this, -except be mindful of it where we can: - -+ Paths in Doom's autoloads file are replaced with absolute ones, thus incurring - no lookup cost to lazy load them. -+ The ~load!~ macro is used instead of ~require~ where possible. This builds - paths with string concatenation (which is baked in at compile time, removing - most of the associated cost). -+ ~load-path~ is let-bound to a subset of itself where possible (the - ~doom--initial-load-path~ variable contains the value of ~load-path~ before it - was touched by Doom). +Don't forget to restore ~file-name-handler-alist~, otherwise TRAMP won't work +and compressed/encrypted files won't open. *** Concatenate package autoloads When you install a package, a PACKAGE-autoloads.el file is generated. This file -contains a map of autoloaded functions and snippets declared by the package -(that's what those ~;;;###autoload~ comments are for in packages). They tell -Emacs where to find them, when they are eventually called. In your conventional -Emacs config, every single one of these autoloads files are loaded immediately -at startup. +contains a map of autoloaded functions and snippets declared by the package. +They tell Emacs where to find them when they are eventually called. In your +conventional Emacs config, every one of these autoloads files are loaded +immediately at startup (when ~package-initialize~ is called). Since you'll commonly have hundreds of packages, loading hundreds of autoloads -file can hurt startup times. We get around this by concatenating these autoloads -files into one giant one (in =~/.emacs.d/.local/autoloads.pkg.el=) when you run -~doom refresh~. +file can hurt startup times, especially without an SSD. We get around this by +concatenating these files into one giant one when you run ~doom sync~. -Emacs 27+ will introduce a ~package-quickstart~ feature that will do this for -you -- the =straight= package manager does this for you too -- but Doom Emacs -has its own specialized mechanism for doing this, and has tacked a number of -Doom-specific optimizations on top of it. +Emacs 27+ introduces a ~package-quickstart~ command does this for you, and +=straight=, our package manager, does this for you too, but [[https://github.com/hlissner/doom-emacs/tree/develop/core/cli/autoloads.el][Doom Emacs has its +own specialized mechanism]] for this, topped off with a few Doom-specific +optimizations. *** Lazy load package management system(s) Initializing package.el or straight.el at startup is expensive. We can save some time by delaying that initialization until we actually need these libraries (and -only eagerly load them when we're doing package management, e.g. when we run -~doom refresh~). +load them only when we're doing package management, e.g. when we run ~doom +sync~). -Among other things, ~doom refresh~ does a lot for us. It generates concatenated +Among other things, ~doom sync~ does a lot for us. It generates concatenated autoloads files; caches expensive variables like caches ~load-path~, ~Info-directory-list~ and ~auto-mode-alist~; and preforms all your package management activities there -- far away from your interactive sessions. -How exactly Doom accomplishes all this is a little complex, so instead, here is -a boiled-down version you can use in your own configs (for package.el, not -straight.el): +How exactly Doom accomplishes all this is a long story, so here is a boiled-down +version you can use in your own configs (for package.el, not straight.el): #+BEGIN_SRC emacs-lisp (defvar cache-file "~/.emacs.d/cache/autoloads") @@ -278,26 +258,12 @@ straight.el): (package-initialize) (with-temp-buffer (cl-pushnew doom-core-dir load-path :test #'string=) - (dolist (spec package-alist) - (when-let (desc (cdr spec)) - (let ((file (concat (package--autoloads-file-name desc) ".el"))) - (when (file-readable-p file) - ;; Ensure that the contents of this autoloads file believes they - ;; haven't been moved: - (insert "(let ((load-file-name " (prin1-to-string (abbreviate-file-name file)) "))\n") - (insert-file-contents file) - (save-excursion - ;; Delete forms that modify `load-path' and `auto-mode-alist', we - ;; will set them once, later. - (while (re-search-forward "^\\s-*\\((\\(?:add-to-list\\|\\(?:when\\|if\\) (boundp\\)\\s-+'\\(?:load-path\\|auto-mode-alist\\)\\)" nil t) - (goto-char (match-beginning 1)) - (kill-sexp))) - ;; Remove unnecessary comment lines and (provide ...) forms - (while (re-search-forward "^\\(?:;;\\(.*\n\\)\\|\n\\|(provide '[^\n]+\\)" nil t) - (unless (nth 8 (syntax-ppss)) - (replace-match "" t t))) - (unless (bolp) (insert "\n")) - (insert ")\n"))))) + (dolist (desc (delq nil (mapcar #'cdr package-alist))) + (let ((load-file-name (concat (package--autoloads-file-name desc) ".el"))) + (when (file-readable-p load-file-name) + (condition-case _ + (while t (insert (read (current-buffer)))) + (end-of-file))))) (prin1 `(setq load-path ',load-path auto-mode-alist ',auto-mode-alist Info-directory-list ',Info-directory-list) @@ -309,10 +275,9 @@ straight.el): #+END_SRC You'll need to delete ~cache-files~ any time you install, remove, or update a -new package, however. In that case you could advise ~package-install~ and -~package-delete~ to call ~initialize~ when they succeed. Or, you could make -~initialize~ interactive and call it manually when you determine it's necessary. -Up to you! +new package. You could advise ~package-install~ and ~package-delete~ to call +~initialize~ when they succeed, or make ~initialize~ interactive and call it +manually when necessary. Up to you! Note: package.el is sneaky, and will initialize itself if you're not careful. *Not on my watch, criminal scum!* @@ -327,20 +292,21 @@ Note: package.el is sneaky, and will initialize itself if you're not careful. *** Lazy load more than everything ~use-package~ can defer your packages. Using it is a no-brainer, but Doom goes a little further with lazy loading. There are some massive plugins out there. For -many of them, ordinary lazy loading techniques simply don't work. To name a few: +some of them, ordinary lazy loading techniques don't work. To name a few: + The =lang/org= module defers loading babel packages until their src blocks are - executed. You no longer need ~org-babel-do-load-languages~ in your config. + executed or read. You no longer need ~org-babel-do-load-languages~ in your + config -- in fact, you shouldn't use it at all! + Company and yasnippet are loaded as late as possible (waiting until the user opens a non-read-only, file-visiting buffer (that isn't in fundamental-mode)). -+ The =evil-easymotion= package has many keybinds. You'd need to load the - package for them to all take effect, so instead, =gs= is bound to a command - that loads the package and then invisibly populates =gs=, then simulates the - =gs= keypress as though those new keys had always been there. -+ A number of packages are "incrementally" loaded. This is a Doom feature where, - after a few seconds of idle time post-startup, Doom will load packages - piecemeal while Emacs. It will quickly abort if it detects input, as to make - the process as subtle as possible. ++ The =evil-easymotion= package binds many keys, none of which are available + until you load the package. Instead of loading it at startup, =gs= is bound to + a command that loads the package, populates =gs=, then simulates the =gs= key + press as though those new keys had always been there. ++ Doom loads some packages "incrementally". i.e. after a few seconds of idle + time post-startup, Doom loads packages piecemeal (one dependency at a time) + while Emacs. It aborts if it detects input, as to make the process as subtle + as possible. For example, instead of loading =org= (a giant package), it will load these dependencies, one at a time, before finally loading =org=: @@ -354,21 +320,6 @@ many of them, ordinary lazy loading techniques simply don't work. To name a few: This ensures packages load as quickly as possible when you first load an org file. -*** +Exploit byte-compilation!+ -It used to be that byte-compilation bought a 40-60% improvement in startup -times, because expensive operations (like ~package-initialize~ or -~exec-path-from-shell~) were evaluated at compile time, but Doom has changed. - -I've since adopted a pre-cache approach (when running ~doom refresh~), which -brings these startup benefits to uncompiled Emacs. This renders byte-compilation -significantly less beneficial for startup time. - -That said, compilation will still benefit Doom's snappiness in general. - -Run ~doom compile :core~ to only compile Doom's core files, or ~doom compile~ to -compile the /entire/ config (=~/.emacs.d= and =~/.doom.d=) -- which may take a -while. - *** Use [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Lexical-Binding.html][lexical-binding]] everywhere Add ~;; -*- lexical-binding: t; -*-~ to the top of your elisp files. This can break code if you've written it to depend on undeclared dynamic variables, but @@ -381,32 +332,30 @@ find more about it in: + [[http://nullprogram.com/blog/2016/12/22/]["Some Performance Advantages of Lexical Scope."]] ** Why is startup time important? Why not use the daemon? -One of my motivations for a config that starts up fast (aside from the learning -experience) was to shape Emacs into a viable alternative to vim for one-shot -editing in the terminal (without ~-Q~). This also facilitates: +The central motivation for a config that starts up fast (aside from the learning +experience) was to have a viable alternative to vim for quick, one-shot editing +in the terminal (without ~-Q~). -- Running multiple, independent instances of Emacs (e.g. on a per-project basis, or - for nix-shell users, or to isolate one instance for IRC from an instance for - writing code, etc). +Besides that, it happens to facilitate: + +- Running multiple, independent instances of Emacs (e.g. on a per-project basis, + or for nix-shell users, or to isolate one instance for IRC from an instance + for writing code, etc). - Quicker restarting of Emacs, to reload package settings or recover from disastrous errors which can leave Emacs in a broken state. - Faster integration with "edit in Emacs" solutions (like [[https://github.com/alpha22jp/atomic-chrome][atomic-chrome]]), and - the potential to use them without a running daemon. + without a daemon. -What's more, I don't like using more tools than I need. We should not need a -second program just to make the first run comfortably. +What's more, I believe a daemon shouldn't be necessary to get a sane startup +time out of Emacs. ** How do I use Doom alongside other Emacs configs? I recommend [[https://github.com/plexus/chemacs][Chemacs]]. You can think of it as a bootloader for Emacs. You'll [[file:getting_started.org::*Alongside other Emacs configs (with Chemacs)][find instructions on how to use it with Doom in the user manual]]. -If you only want to try it out without affecting your current config, it is safe -to install Doom anywhere you like. The ~bin/doom~ utility will only address the -config the script is located under. - You'll still need a separate folder for personal configuration (=~/.doom.d= or -=~/.config/doom= by default), but the =-p PATH= flag (or ~DOOMDIR~ environment -variable) will allow you to use a different location: +=~/.config/doom= by default), but the =--doomdir PATH= switch (or ~DOOMDIR~ +environment variable) will allow you to use a different location: #+BEGIN_SRC bash # First install Doom somewhere @@ -479,80 +428,28 @@ first ran ~doom install~. Check out the [[file:getting_started.org::Customize][Customize section]] in the [[file:getting_started.org][Getting Started]] guide for details. ** How do I enable or disable a Doom module? -You'll find your ~doom!~ block in =~/.doom.d/init.el=. This block contains a -list of modules you want enabled and what order to load them in. Disable modules -by commenting them out with semicolons. To enable them, remove those leading -semicolons: +Comment or uncomment the module in your ~doom!~ block, found in +=$DOOMDIR/init.el=. -#+BEGIN_SRC emacs-lisp -(doom! :lang - python ; this is enabled - ;;ruby ; this is disabled - rust) -#+END_SRC - -Remember to run ~bin/doom refresh~ afterwards, on the command line, to sync your +Remember to run ~bin/doom sync~ afterwards, on the command line, to sync your module list with Doom. -You can find a comprehensive list of modules in the [[file:index.org::*Module list][Module Index]]. +See the "[[file:getting_started.org::*Configuration modules][Configuration modules]]" section of the [[file:getting_started.org][Getting Started]] guide for more +information. ** How do I install a package from ELPA? -Add a ~package!~ declaration to =~/.doom.d/packages.el= for each package you -want installed. - -#+BEGIN_SRC elisp -(package! winum) -#+END_SRC - -Remember to run ~doom refresh~ afterwards to ensure the package is installed. - -You'll find more information in the "[[file:getting_started.org::*Installing%20packages][Installing packages]]" section of the [[file:getting_started.org][Getting -Started]] guide. +See the "[[file:getting_started.org::*Installing%20packages][Installing packages]]" section of the [[file:getting_started.org][Getting Started]] guide. ** How do I install a package from github/another source? -The ~package!~ macro can be passed a MELPA style recipe, allowing you to install -packages from just about anywhere: - -#+BEGIN_SRC elisp -(package! evil :recipe (:host github :repo "hlissner/my-evil-fork")) -#+END_SRC - -Remember to run ~doom refresh~ every time you modify you package list, to ensure -your packages are set up and installed. - -You can find more information about the recipe format [[https://github.com/raxod502/straight.el#the-recipe-format][in the straight.el package -readme]]. - -#+begin_quote -If a MELPA recipe exists for the package you are writing a ~package!~ -declaration for, you may omit keywords and Doom's package manager will fill them -in with values from its original recipe. -#+end_quote - -You'll find more information in the "[[file:getting_started.org::*Installing%20packages%20from%20external%20sources][Installing packages from external sources]]" -section of the [[file:getting_started.org][Getting Started]] guide. +See the "[[file:getting_started.org::*Installing%20packages%20from%20external%20sources][Installing packages from external sources]]" section of the [[file:getting_started.org][Getting +Started]] guide. ** How do I change where an existing package is installed from? -~package!~ declarations in your private =packages.el= file have precedence over -modules (even your own). Simply add a new one for that package with the new -recipe. - -You'll find more information in the "[[file:getting_started.org::*Changing%20a%20built-in%20recipe%20for%20a%20package][Changing a built-in recipe for a package]]" -section of the [[file:getting_started.org][Getting Started]] guide. +See the "[[file:getting_started.org::*Changing%20a%20built-in%20recipe%20for%20a%20package][Changing a built-in recipe for a package]]" section of the [[file:getting_started.org][Getting +Started]] guide. ** How do I disable a package completely? -With the ~package!~ macro's ~:disable~ property: - -#+BEGIN_SRC elisp -;;; add to DOOMDIR/packages.el -(package! irony :disable t) -#+END_SRC - -Remember to run ~doom refresh~ afterwards to ensure that the package is -uninstalled and disabled. - -You'll find more information in the "[[file:getting_started.org::*Disabling%20packages][Disabling packages]]" section of the [[file:getting_started.org][Getting -Started]] guide. +See the "[[file:getting_started.org::*Disabling%20packages][disabling packages]]" section of the [[file:getting_started.org][Getting Started]] guide. ** How do I reconfigure a package included in Doom? ~use-package!~ and ~after!~ (wrappers around ~use-package~ and @@ -620,8 +517,8 @@ install it, then load it: (setq doom-theme 'solarized-dark) #+END_SRC -Don't forget to run ~doom refresh~ after adding that ~package!~ statement to -ensure the package is installed. +Don't forget to run ~doom sync~ after adding that ~package!~ statement to ensure +the package is installed. ** How do I change the fonts? Doom exposes five (optional) variables for controlling fonts in Doom, they are: @@ -632,8 +529,8 @@ Doom exposes five (optional) variables for controlling fonts in Doom, they are: + ~doom-unicode-font~ + ~doom-big-font~ (used for ~doom-big-font-mode~) -Each of these will accept either a =font-spec=, font string (="Input Mono-12"=), -or [[https://wiki.archlinux.org/index.php/X_Logical_Font_Description][xlfd font string]]. +They all accept either a =font-spec=, font string (="Input Mono-12"=), or [[https://wiki.archlinux.org/index.php/X_Logical_Font_Description][xlfd +font string]]. e.g. #+BEGIN_SRC emacs-lisp @@ -760,6 +657,7 @@ rules. You'll find more comprehensive documentation on ~set-popup-rule!~ in its docstring (available through =SPC h f= -- or =C-h f= for non-evil users). + ** How do I change the appearance a face (or faces)? Doom provides the ~custom-set-faces!~ and ~custom-theme-set-faces!~ macros as a convenience. @@ -785,15 +683,14 @@ tools for experienced Emacs users to skirt around it (most of the time): - On-the-fly evaluation won't work for all changes. e.g. Changing your ~doom!~ block (i.e. the list of modules for Doom to enable). - But rather than running ~doom refresh~ and restarting Emacs, Doom provides - ~M-x doom/reload~ for your convenience (bound to =SPC h r r= and =C-h r r=). - This runs ~doom refresh~, restarts the Doom initialization process and - re-evaluates your personal config. However, this won't clear pre-existing - state; Doom won't unload modules/packages that have already been loaded and it - can't anticipate complications arising from a private config that isn't - idempotent. -- Many ~bin/doom~ commands are available as elisp commands with the ~doom//*~ - prefix. e.g. ~doom//refresh~, ~doom//update~, etc. Feel free to use them, but + But rather than running ~doom sync~ and restarting Emacs, Doom provides ~M-x + doom/reload~ for your convenience (bound to =SPC h r r= and =C-h r r=). This + runs ~doom sync~, restarts the Doom initialization process and re-evaluates + your personal config. However, this won't clear pre-existing state; Doom won't + unload modules/packages that have already been loaded and it can't anticipate + complications arising from a private config that isn't idempotent. +- Some ~bin/doom~ commands are available as elisp commands. e.g. ~doom/reload~ + for ~doom sync~, ~doom/upgrade~ for ~doom upgrade~ ~doom//s~, ~doom//update~, etc. Feel free to use them, but consider them highly experimental and subject to change without notice. - You can quickly restart Emacs and restore the last session with ~doom/restart-and-restore~ (bound to =SPC q r=). @@ -815,7 +712,7 @@ commands that you may find particularly useful: + ~doom doctor~ :: Diagnose common issues in your environment and list missing external dependencies for your enabled modules. -+ ~doom refresh~ :: Ensures that all missing packages are installed, orphaned ++ ~doom sync~ :: Ensures that all missing packages are installed, orphaned packages are removed, and metadata properly generated. + ~doom install~ :: Install any missing packages. + ~doom update~ :: Update all packages that Doom's (enabled) modules use. @@ -829,12 +726,12 @@ commands that you may find particularly useful: #+BEGIN_SRC bash git pull - doom refresh + doom sync doom update #+END_SRC -** When to run ~doom refresh~ -As a rule of thumb you should run ~doom refresh~ whenever you: +** When to run ~doom sync~ +As a rule of thumb you should run ~doom sync~ whenever you: + Update Doom with ~git pull~ instead of ~doom upgrade~, + Change your ~doom!~ block in =$DOOMDIR/init.el=, @@ -843,8 +740,8 @@ As a rule of thumb you should run ~doom refresh~ whenever you: + Install an Emacs package or dependency outside of Emacs (i.e. through your OS package manager). -If anything is misbehaving, it's a good idea to run ~doom refresh~ first. ~doom -refresh~ is responsible for regenerating your autoloads file (which tells Doom +If anything is misbehaving, it's a good idea to run ~doom sync~ first. ~doom +sync~ is responsible for regenerating your autoloads file (which tells Doom where to find lazy-loaded functions and libraries), installing missing packages, and uninstall orphaned (unneeded) packages. @@ -860,7 +757,7 @@ YES=1 doom update * Defaults ** Why Ivy over Helm? -Short answer: I chose ivy because it is the simpler of the two. +Short answer: ivy is simpler to maintain. Long answer: Features and performance appear to be the main talking points when comparing the two, but as far as I'm concerned they are equal in both respects @@ -930,21 +827,20 @@ Otherwise, it is trivial to install expand-region and binds keys to it yourself: #+END_SRC ** Why not use exec-path-from-shell instead of ~doom env~? -In a nutshell, the ~doom env~ approach is a faster and more robust solution. +The ~doom env~ approach is a faster and more reliable solution. 1. ~exec-path-from-shell~ must spawn (at least) one process at startup to scrape - your shell environment. This can be arbitrarily slow depending on the user's - shell configuration. A single program (like pyenv or nvm) or config framework - (like oh-my-zsh) could undo all of Doom's startup optimizations in one fell - swoop. + your shell environment. This can be slow depending on the user's shell + configuration. A single program (like pyenv or nvm) or config framework (like + oh-my-zsh) could undo Doom's startup optimizations in one fell swoop. -2. ~exec-path-from-shell~ only scrapes /some/ state from your shell. You have to - be proactive in order to get it to capture all the envvars relevant to your - development environment. +2. ~exec-path-from-shell~ takes a whitelist approach and captures only ~PATH~ + and ~MANPATH~ by default. You must be proactive in order to capture all the + envvars relevant to your development environment and tools. - I'd rather it inherit your shell environment /correctly/ (and /completely/) - or not at all. It frontloads the debugging process rather than hiding it - until it you least want to deal with it. +~doom env~ takes the blacklist approach and captures all of your shell +environment. This front loads the debugging process, which is nicer than dealing +with it later, while you're getting work done. That said, if you still want ~exec-path-from-shell~, it is trivial to install yourself: @@ -964,16 +860,16 @@ TL;DR: =ws-butler= is less imposing. Don't be that guy who PRs 99 whitespace adjustments around his one-line contribution. Don't automate this aggressive behavior by attaching ~delete-trailing-whitespace~ (or ~whitespace-cleanup~) to ~before-save-hook~. If -you have rambunctious colleagues peppering trailing whitespace into your project, -you need to have a talk (with wiffle bats, preferably) rather than play this -passive-aggressive game of whack-a-mole. +you have rambunctious colleagues peppering trailing whitespace into your +project, you need to have a talk (with wiffle bats, preferably) rather than play +a passive-aggressive game of whack-a-mole. -Here at Doom Inc we believe that operations that mutate entire files should -never be automated. Rather, they should be invoked deliberately -- by someone -that is aware of the potential consequences. This is where =ws-butler= comes in. -It only cleans up whitespace /on the lines you've touched/ *and* it leaves -behind virtual whitespace (which is never written to the file, but remains there -so your cursor doesn't get thrown around in all that cleanup work). +Here at Doom Inc we believe that operations that mutate entire files should not +be automated. Rather, they should be invoked deliberately, when and where it is +needed, by someone that is aware of the potential consequences. This is where +=ws-butler= comes in. It only cleans up whitespace /on the lines you've touched/ +*and* it leaves behind virtual whitespace (which is never written to the file) +so your cursor doesn't get thrown around in all that cleanup work. In any case, if you had used =ws-butler= from the beginning, trailing whitespace and newlines would never be a problem! @@ -1010,14 +906,14 @@ manually (e.g. by double-clicking each file in explorer). ** ~void-variable~ and ~void-function~ errors on startup The most common culprit for these types of errors are: -1. An out-of-date autoloads file. To regenerate it, run ~doom refresh~. +1. An out-of-date autoloads file. Run ~doom sync~ to regenerate them. - To avoid this issue, remember to run ~doom refresh~ whenever you modify your + To avoid this issue, remember to run ~doom sync~ whenever you modify your ~doom!~ block in =~/.doom.d/init.el=, or add ~package!~ declarations to =~/.doom.d/packages.el=. Or if you modify =~/.emacs.d/.local= by hand, for whatever reason. - See ~doom help refresh~ for details on what this command does and when you + See ~doom help sync~ for details on what this command does and when you should use it. 2. Emacs byte-code isn't forward compatible. If you've recently switched to a @@ -1075,8 +971,8 @@ If you still want to restore the old behavior, simply disable evil-snipe-mode: 1. Make sure you don't have both =~/.doom.d= and =~/.config/doom= directories. Doom will ignore the former if the latter exists. -2. Remember to run ~doom refresh~ when it is necessary. To get to know when, - exactly, you should run this command, run ~doom help refresh~. +2. Remember to run ~doom sync~ when it is necessary. To get to know when, + exactly, you should run this command, run ~doom help sync~. If neither of these solve your issue, try ~bin/doom doctor~. It will detect a variety of common issues, and may give you some clues as to what is wrong. @@ -1138,7 +1034,7 @@ Emacs will search for this file in ~custom-theme-load-path~ and ~doom-theme~ to ~'third-party-theme~, it will search for ~third-party-theme-theme.el~. This is rarely intentional. Omit the ~-theme~ suffix. -3. Did you run ~doom refresh~ after adding your third party theme plugin's +3. Did you run ~doom sync~ after adding your third party theme plugin's ~package!~ declaration to =~/.doom.d/packages.el=? ** TRAMP connections hang forever when connecting You'll find solutions [[https://www.emacswiki.org/emacs/TrampMode#toc7][on the emacswiki]]. @@ -1148,21 +1044,30 @@ upstream, you can't run ~doom update~ to get the latest fixes due to evaluation errors. In those cases, you need to delete the broken local copy before you can install -the new one, which is achieved thus: +the new one, which is achieved by either deleting it from +=~/.emacs.d/.local/straight/repos=, or by cycling the module that installs it: 1. Comment out the broken module/package. -2. Run ~doom refresh -p~. +2. Run ~doom sync~. 3. Uncomment the module/package. -4. Run ~doom refresh~. +4. Run ~doom sync~. ** Why do I see ugly indentation highlights for tabs? [[https://github.com/hlissner/doom-emacs/blob/develop/core/core-ui.el#L132-L150][Doom highlights non-standard indentation]]. i.e. Indentation that doesn't match -the indent style you've set for that file. Doom uses space indentation for most -languages by default (excluding languages where tabs are the norm, like Go). +the indent style you've set for that file. Spaces are Doom's default style for +most languages (excluding languages where tabs are the norm, like Go). There are a couple ways to address this: -1. Change ~indent-tabs-mode~ (nil = spaces, t = tabs). +1. Fix your indentation! If it's highlighted, you have tabs when you should have + spaces (or spaces when you should be using tabs). + + Two easy commands for that: + + - =M-x tabify= + - =M-x untabify= + +2. Change ~indent-tabs-mode~ (nil = spaces, t = tabs) in =~/.doom.d/config.el=: #+BEGIN_SRC elisp ;; use tab indentation everywhere @@ -1173,13 +1078,13 @@ There are a couple ways to address this: (setq-hook! '(c-mode-hook c++-mode-hook) indent-tabs-mode t) ; C/C++ #+END_SRC -2. Use [[https://editorconfig.org/][editorconfig]] to configure code style on a per-project basis. If you +3. Use [[https://editorconfig.org/][editorconfig]] to configure code style on a per-project basis. If you enable Doom's =:tools editorconfig= module, Doom will recognize =.editorconfigrc= files. -3. Or trust in dtrt-indent; a plugin Doom uses to analyze and detect - indentation when you open a file (that isn't in a project with an - editorconfig file). This isn't foolproof, and won't work for files that have - no content in them, but it can help in one-off scenarios. +4. Or trust in dtrt-indent; a plugin Doom uses to analyze and detect indentation + when you open a file (that isn't in a project with an editorconfig file). + This isn't foolproof, and won't work for files that have no content in them, + but it can help in one-off scenarios. * TODO Contributing From 7ff7287df5f18fe873aa31e3820d4078e4383c82 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Jan 2020 04:44:55 -0500 Subject: [PATCH 709/983] Reorganize docs/index, move modules to docs/modules --- docs/index.org | 252 +++++++---------------------------------------- docs/modules.org | 206 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 244 insertions(+), 214 deletions(-) create mode 100644 docs/modules.org diff --git a/docs/index.org b/docs/index.org index 2f5f9104b..a7692b66d 100644 --- a/docs/index.org +++ b/docs/index.org @@ -1,16 +1,20 @@ #+TITLE: Doom Emacs Documentation #+STARTUP: nofold -Doom Emacs is a configuration for [[https://www.gnu.org/software/emacs/][GNU Emacs]] written by a stubborn, -shell-dwelling, and melodramatic ex-vimmer. It is designed to be a foundation -for your own Emacs configuration or a resource for enthusiasts to learn more -about our favorite OS. +Doom is a configuration framework for [[https://www.gnu.org/software/emacs/][GNU Emacs 26.3+]] tailored for Emacs +bankruptcy veterans who want less framework in their frameworks and the +performance of a hand rolled config (or better). It can be a foundation for your +own config or a resource for Emacs enthusiasts to learn more about our favorite +OS. + +Doom is an opinionated collection of reasonable (and optional) defaults with a +focus on performance (both runtime and startup) and on abstraction-light, +readable code design, so that there is less between you and Emacs. #+begin_quote -Github fails to render org links to sub-sections, so it is recommended that you -view the documentation from within Doom Emacs by pressing = d h= (== -is =SPC h= for evil users and =C-h= for vanilla users) or searching it with -= d /=. +The documentation is designed to be viewed within Doom Emacs. Access it by +pressing =SPC d h= (or =C-h d h= for non-evil users), or search it with =SPC h d +s= (or =C-h d s=). #+end_quote * Table of Contents :TOC: @@ -20,31 +24,23 @@ is =SPC h= for evil users and =C-h= for vanilla users) or searching it with - [[#frequently-asked-questions][Frequently Asked Questions]] - [[#contributing][Contributing]] - [[#workflow-tips-tricks--tutorials][Workflow Tips, Tricks & Tutorials]] + - [[#module-appendix][Module Appendix]] - [[#community-resources][Community Resources]] - [[#asking-for-help][Asking for help]] - [[#project-roadmap][Project roadmap]] - [[#tutorials--guides][Tutorials & guides]] -- [[#module-list][Module list]] - - [[#app][:app]] - - [[#completion][:completion]] - - [[#config][:config]] - - [[#editor][:editor]] - - [[#emacs][:emacs]] - - [[#email][:email]] - - [[#input][:input]] - - [[#lang][:lang]] - - [[#term][:term]] - - [[#tools][:tools]] - - [[#ui][:ui]] + - [[#projects-that-supportcompliment-doom][Projects that support/compliment Doom]] + - [[#similar-projects][Similar projects]] * TODO Release Notes * Documentation ** [[file:getting_started.org][Getting Started]] -- [[file:getting_started.org::*Install][Install]] - How to install Emacs, Doom and its plugins -- [[file:getting_started.org::*Update][Update]] - Keep Doom and its packages up-to-date -- [[file:getting_started.org::*Customize][Customize]] - A primer on customizing and reconfiguring Doom -- [[file:getting_started.org::*Troubleshoot][Troubleshoot]] - How to debug Emacs & Doom, find help or look up documentation +- [[file:getting_started.org::*Install][Install]] +- [[file:getting_started.org::*Update & Rollback][Update & Rollback]] +- [[file:getting_started.org::*Configure][Configure]] +- [[file:getting_started.org::*Migrate][Migrate]] +- [[file:getting_started.org::*Troubleshoot][Troubleshoot]] ** [[file:faq.org][Frequently Asked Questions]] - [[file:faq.org::*General][General]] @@ -54,16 +50,17 @@ is =SPC h= for evil users and =C-h= for vanilla users) or searching it with - [[file:faq.org::Contributing][Contributing]] ** TODO [[file:contributing.org][Contributing]] -- [[file:contributing.org::*Where can I help?][Where to get help]] -- Writing an effective bug report -- Suggesting features, keybinds or enhancements -- Contributing code -- Contributing documentation +- [[file:contributing.org::*Where can I help?][Where to get help?]] +- Reporting issues +- Suggesting features, keybinds and enhancements +- Contributing code or documentation - Other ways to support Doom Emacs - Special thanks ** TODO [[file:workflow.org][Workflow Tips, Tricks & Tutorials]] +** [[file:modules.org][Module Appendix]] + * Community Resources ** Asking for help - [[https://discord.gg/bcZ6P3y][Our Discord server]] @@ -79,11 +76,12 @@ is =SPC h= for evil users and =C-h= for vanilla users) or searching it with ** Tutorials & guides + *Doom Emacs* + - (video) [[https://www.youtube.com/watch?v=dr_iBj91eeI][Doom Emacs - Getting Started by DistroTube]] + - (video) [[https://www.youtube.com/playlist?list=PLhXZp00uXBk4np17N39WvB80zgxlZfVwj][DoomCasts]] - [[https://noelwelsh.com/posts/2019-01-10-doom-emacs.html][Noel's crash course on Doom Emacs]] - [[https://medium.com/@aria_39488/getting-started-with-doom-emacs-a-great-transition-from-vim-to-emacs-9bab8e0d8458][Getting Started with Doom Emacs -- a great transition from Vim to Emacs]] - [[https://medium.com/@aria_39488/the-niceties-of-evil-in-doom-emacs-cabb46a9446b][The Niceties of evil in Doom Emacs]] - - [[https://www.youtube.com/playlist?list=PLhXZp00uXBk4np17N39WvB80zgxlZfVwj][DoomCasts (youtube series)]] - - [[https://www.youtube.com/watch?v=GK3fij-D1G8][Org-mode, literate programming in (Doom) Emacs]] + - (video) [[https://www.youtube.com/watch?v=GK3fij-D1G8][Org-mode, literate programming in (Doom) Emacs]] + *Emacs & Emacs Lisp* - [[https://www.gnu.org/software/emacs/manual/html_node/elisp/index.html][The Official Emacs manual]] - A variety of Emacs resources - https://github.com/ema2159/awesome-emacs @@ -92,190 +90,16 @@ is =SPC h= for evil users and =C-h= for vanilla users) or searching it with - http://steve-yegge.blogspot.com/2008/01/emergency-elisp.html - Workflows for customizing Emacs and its packages (and its C/C++ modes): - https://david.rothlis.net/emacs/customize_c.html -+ *Tools in Emacs* - - [[https://www.emacswiki.org/emacs/Calc_Tutorials_by_Andrew_Hyatt][How to use M-x calc]] + - *Tools in Emacs* + - [[https://www.emacswiki.org/emacs/Calc_Tutorials_by_Andrew_Hyatt][How to use M-x calc]] + *Vim & Evil* - [[https://gist.github.com/dmsul/8bb08c686b70d5a68da0e2cb81cd857f][A crash course on modal editing and Ex commands]] -* Module list -** :app -Application modules are complex and opinionated modules that transform Emacs -toward a specific purpose. They may have additional dependencies and should be -loaded last, before =:config= modules. +** Projects that support/compliment Doom ++ [[https://github.com/plexus/chemacs][plexus/chemacs]] ++ [[https://github.com/r-darwish/topgrade][r-darwish/topgrade]] -+ [[file:../modules/app/calendar/README.org][calendar]] - TODO -+ [[file:../modules/app/irc/README.org][irc]] - how neckbeards socialize -+ rss =+org= - an RSS client in Emacs -+ [[file:../modules/app/twitter/README.org][twitter]] - A twitter client for Emacs - -** :checkers -Modules dedicated to linting or checking your code or writing for issues. - -+ syntax =+childframe= - Live error/warning highlights -+ spell =+everywhere= - Spell checking -+ grammar - TODO - -** :completion -Modules that provide new interfaces or frameworks for completion, including code -completion. - -+ [[file:../modules/completion/company/README.org][company]] =+childframe +tng= - The ultimate code completion backend -+ helm =+fuzzy +childframe= - *Another* search engine for love and life -+ ido - The /other/ *other* search engine for love and life -+ [[file:../modules/completion/ivy/README.org][ivy]] =+fuzzy +prescient +childframe= - /The/ search engine for love and life - -** :config -Modules that configure Emacs one way or another, or focus on making it easier -for you to customize it yourself. It is best to load these last. - -+ literate - For users with literate configs. This will tangle+compile a - config.org in your ~doom-private-dir~ when it changes. -+ [[file:../modules/config/default/README.org][default]] =+bindings +smartparens= - The default module sets reasonable defaults - for Emacs. It also provides a Spacemacs-inspired keybinding scheme and a - smartparens config. Use it as a reference for your own modules. - -** :editor -Modules that affect and augment your ability to manipulate or insert text. - -+ [[file:../modules/editor/evil/README.org][evil]] =+everywhere= - transforms Emacs into Vim -+ [[file:../modules/editor/file-templates/README.org][file-templates]] - Auto-inserted templates in blank new files -+ [[file:../modules/editor/fold/README.org][fold]] - universal code folding -+ format =+onsave= - TODO -+ god - run Emacs commands without modifier keys -+ [[file:../modules/editor/lispy/README.org][lispy]] - TODO -+ multiple-cursors - TODO -+ [[file:../modules/editor/objed/README.org][objed]] - TODO -+ [[file:../modules/editor/parinfer/README.org][parinfer]] - TODO -+ rotate-text - TODO -+ [[file:../modules/editor/snippets/README.org][snippets]] - Snippet expansion for lazy typists -+ [[file:../modules/editor/word-wrap/README.org][word-wrap]] - soft wrapping with language-aware indent - -** :emacs -Modules that reconfigure or augment packages or features built into Emacs. - -+ [[file:../modules/emacs/dired/README.org][dired]] =+ranger +icons= - TODO -+ electric - TODO -+ [[file:../modules/emacs/ibuffer/README.org][ibuffer]] =+icons= - TODO -+ vc - TODO - -** :email -+ [[file:../modules/email/mu4e/README.org][mu4e]] =+gmail= - TODO -+ notmuch - TODO -+ wanderlust =+gmail= - TODO - -** :input -+ [[file:../modules/input/chinese/README.org][chinese]] - TODO -+ [[file:../modules/input/japanese/README.org][japanese]] - TODO - -** :lang -Modules that bring support for a language or group of languages to Emacs. - -+ [[file:../modules/lang/agda/README.org][agda]] - TODO -+ assembly - TODO -+ [[file:../modules/lang/cc/README.org][cc]] =+lsp= - TODO -+ clojure - TODO -+ common-lisp - TODO -+ [[file:../modules/lang/coq/README.org][coq]] - TODO -+ crystal - TODO -+ [[file:../modules/lang/csharp/README.org][csharp]] - TODO -+ data - TODO -+ [[file:../modules/lang/elixir/README.org][elixir]] =+lsp= - TODO -+ elm - TODO -+ emacs-lisp - TODO -+ erlang - TODO -+ [[file:../modules/lang/ess/README.org][ess]] - TODO -+ [[file:../modules/lang/faust/README.org][faust]] - TODO -+ [[file:../modules/lang/fsharp/README.org][fsharp]] - TODO -+ [[file:../modules/lang/go/README.org][go]] =+lsp= - TODO -+ [[file:../modules/lang/haskell/README.org][haskell]] =+dante +intero +lsp= - TODO -+ hy - TODO -+ [[file:../modules/lang/idris/README.org][idris]] - TODO -+ java =+meghanada +lsp= - TODO -+ [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - JavaScript, TypeScript, and CoffeeScript support -+ julia - TODO -+ kotlin =+lsp+= - TODO -+ [[file:../modules/lang/latex/README.org][latex]] - TODO -+ lean - TODO -+ [[file:../modules/lang/ledger/README.org][ledger]] - TODO -+ lua =+moonscript= - TODO -+ [[file:../modules/lang/markdown/README.org][markdown]] =+grip= - TODO -+ [[file:../modules/lang/nim/README.org][nim]] - TODO -+ nix - TODO -+ [[file:../modules/lang/ocaml/README.org][ocaml]] =+lsp= - TODO -+ [[file:../modules/lang/org/README.org][org]] =+brain +dragndrop +gnuplot +hugo +ipython +journal +jupyter +pandoc +pomodoro +present= - TODO -+ [[file:../modules/lang/perl/README.org][perl]] - TODO -+ [[file:../modules/lang/php/README.org][php]] =+lsp= - TODO -+ plantuml - TODO -+ purescript - TODO -+ [[file:../modules/lang/python/README.org][python]] =+lsp +pyenv +conda= - TODO -+ qt - TODO -+ racket - TODO -+ [[file:../modules/lang/rest/README.org][rest]] - TODO -+ ruby =+lsp +rvm +rbenv= - TODO -+ [[file:../modules/lang/rust/README.org][rust]] =+lsp= - TODO -+ scala =+lsp= - TODO -+ [[file:../modules/lang/scheme/README.org][scheme]] - TODO -+ [[file:../modules/lang/sh/README.org][sh]] =+fish +lsp= - TODO -+ [[file:../modules/lang/solidity/README.org][solidity]] - TODO -+ swift =+lsp= - TODO -+ terra - TODO -+ web =+lsp= - HTML and CSS (SCSS/SASS/LESS/Stylus) support. - -** :term -Modules that offer terminal emulation. - -+ eshell - TODO -+ shell - TODO -+ term - TODO -+ [[file:../modules/term/vterm/README.org][vterm]] - TODO - -** :tools -Small modules that give Emacs access to external tools & services. - -+ ansible - TODO -+ debugger - A (nigh-)universal debugger in Emacs -+ [[file:../modules/tools/direnv/README.org][direnv]] - TODO -+ [[file:../modules/tools/docker/README.org][docker]] - TODO -+ [[file:../modules/tools/editorconfig/README.org][editorconfig]] - TODO -+ [[file:../modules/tools/ein/README.org][ein]] - TODO -+ [[file:../modules/tools/eval/README.org][eval]] =+overlay= - REPL & code evaluation support for a variety of languages -+ gist - TODO -+ [[file:../modules/tools/lookup/README.org][lookup]] =+dictionary +docsets= - Universal jump-to & documentation lookup - backend -+ [[file:../modules/tools/lsp/README.org][lsp]] - TODO -+ macos - TODO -+ magit - TODO -+ make - TODO -+ pass - TODO -+ pdf - TODO -+ prodigy - TODO -+ rgb - TODO -+ [[file:../modules/tools/terraform/README.org][terraform]] -+ tmux - TODO -+ upload - TODO - -** :ui -Aesthetic modules that affect the Emacs interface or user experience. - -+ [[file:../modules/ui/deft/README.org][deft]] - TODO -+ [[file:../modules/ui/doom/README.org][doom]] - TODO -+ [[file:../modules/ui/doom-dashboard/README.org][doom-dashboard]] - TODO -+ [[file:../modules/ui/doom-quit/README.org][doom-quit]] - TODO -+ fill-column - TODO -+ [[file:../modules/ui/hl-todo/README.org][hl-todo]] - TODO -+ [[file:../modules/ui/hydra/README.org][hydra]] - TODO -+ indent-guides - TODO -+ [[file:../modules/ui/modeline/README.org][modeline]] - TODO -+ [[file:../modules/ui/nav-flash/README.org][nav-flash]] - TODO -+ [[file:../modules/ui/neotree/README.org][neotree]] - TODO -+ [[file:../modules/ui/ophints/README.org][ophints]] - TODO -+ [[file:../modules/ui/popup/README.org][popup]] =+all +defaults= - Makes temporary/disposable windows less intrusive -+ pretty-code - TODO -+ [[file:../modules/ui/tabs/README.org][tabs]] - TODO -+ treemacs - TODO -+ [[file:../modules/ui/unicode/README.org][unicode]] - TODO -+ vc-gutter - TODO -+ vi-tilde-fringe - TODO -+ [[file:../modules/ui/window-select/README.org][window-select]] =+switch-window +numbers= - TODO -+ [[file:../modules/ui/workspaces/README.org][workspaces]] - Isolated workspaces -+ [[file:../modules/ui/zen/README.org][zen]] - Distraction-free coding (or writing) +** Similar projects ++ [[https://github.com/purcell/emacs.d][purcell/emacs.d]] ++ [[https://github.com/seagle0128/.emacs.d][seagle0128/.emacs.d]] ++ [[https://github.com/syl20bnr/spacemacs][syl20bnr/spacemacs]] diff --git a/docs/modules.org b/docs/modules.org new file mode 100644 index 000000000..5ec4128e7 --- /dev/null +++ b/docs/modules.org @@ -0,0 +1,206 @@ +#+TITLE: Module Appendix +#+STARTUP: nofold + +Functionality in Doom is divided into collections of code called modules (à la +Spacemacs' layers). A module is a bundle of packages, configuration and +commands, organized into a unit that can be enabled or disabled by adding or +removing them from your ~doom!~ block (found in =$DOOMDIR/init.el=). + +* Table of Contents :TOC: +- [[#app][:app]] +- [[#completion][:completion]] +- [[#config][:config]] +- [[#editor][:editor]] +- [[#emacs][:emacs]] +- [[#email][:email]] +- [[#input][:input]] +- [[#lang][:lang]] +- [[#term][:term]] +- [[#tools][:tools]] +- [[#ui][:ui]] + +* :app +Application modules are complex and opinionated modules that transform Emacs +toward a specific purpose. They may have additional dependencies and should be +loaded last, before =:config= modules. + +| Module | Flags | Description | +|----------+---------------------+--------------------------------------------------------------------------| +| calendar | - | TODO | +| irc | - | Turns Emacs into an IRC client, powered by circe | +| rss | =+org= | An RSS reader client for Emacs, powered by elfeed | +| twitter | - | A twitter client for Emacs, powered by twittering | +| write | =+wordnut +langnut= | Transforms Emacs into an IDE For fiction, literary or scientific writers | + ++ [[file:../modules/app/calendar/README.org][calendar]] - TODO ++ [[file:../modules/app/irc/README.org][irc]] - how neckbeards socialize ++ rss =+org= - an RSS client in Emacs ++ [[file:../modules/app/twitter/README.org][twitter]] - A twitter client for Emacs ++ [[file:../modules/app/write/README.org][write]] =+wordnut +langtool= - Transforms emacs into an IDE for writers, and for + writing fiction, notes, papers and so on. + +* :completion +Modules that provide new interfaces or frameworks for completion, including code +completion. + ++ [[file:../modules/completion/company/README.org][company]] =+childframe +tng= - The ultimate code completion backend ++ helm =+fuzzy +childframe= - *Another* search engine for love and life ++ ido - The /other/ *other* search engine for love and life ++ [[file:../modules/completion/ivy/README.org][ivy]] =+fuzzy +prescient +childframe= - /The/ search engine for love and life + +* :config +Modules that configure Emacs one way or another, or focus on making it easier +for you to customize it yourself. It is best to load these last. + ++ literate - For users with literate configs. This will tangle+compile a + config.org in your ~doom-private-dir~ when it changes. ++ [[file:../modules/config/default/README.org][default]] =+bindings +smartparens= - The default module sets reasonable defaults + for Emacs. It also provides a Spacemacs-inspired keybinding scheme and a + smartparens config. Use it as a reference for your own modules. + +* :editor +Modules that affect and augment your ability to manipulate or insert text. + ++ [[file:../modules/editor/evil/README.org][evil]] =+everywhere= - transforms Emacs into Vim ++ [[file:../modules/editor/file-templates/README.org][file-templates]] - Auto-inserted templates in blank new files ++ [[file:../modules/editor/fold/README.org][fold]] - universal code folding ++ format =+onsave= - TODO ++ [[file:../modules/editor/lispy/README.org][lispy]] - TODO ++ multiple-cursors - TODO ++ [[file:../modules/editor/objed/README.org][objed]] - TODO ++ [[file:../modules/editor/parinfer/README.org][parinfer]] - TODO ++ rotate-text - TODO ++ [[file:../modules/editor/snippets/README.org][snippets]] - Snippet expansion for lazy typists ++ [[file:../modules/editor/word-wrap/README.org][word-wrap]] - soft wrapping with language-aware indent + +* :emacs +Modules that reconfigure or augment packages or features built into Emacs. + ++ [[file:../modules/emacs/dired/README.org][dired]] =+ranger +icons= - TODO ++ electric - TODO ++ [[file:../modules/emacs/ibuffer/README.org][ibuffer]] =+icons= - TODO ++ vc - TODO + +* :email ++ [[file:../modules/email/mu4e/README.org][mu4e]] =+gmail= - TODO ++ notmuch - TODO ++ wanderlust =+gmail= - TODO + +* :input ++ [[file:../modules/input/chinese/README.org][chinese]] - TODO ++ [[file:../modules/input/japanese/README.org][japanese]] - TODO + +* :lang +Modules that bring support for a language or group of languages to Emacs. + ++ [[file:../modules/lang/agda/README.org][agda]] - TODO ++ assembly - TODO ++ [[file:../modules/lang/cc/README.org][cc]] =+lsp= - TODO ++ clojure - TODO ++ common-lisp - TODO ++ [[file:../modules/lang/coq/README.org][coq]] - TODO ++ crystal - TODO ++ [[file:../modules/lang/csharp/README.org][csharp]] - TODO ++ data - TODO ++ [[file:../modules/lang/elixir/README.org][elixir]] =+lsp= - TODO ++ elm - TODO ++ emacs-lisp - TODO ++ erlang - TODO ++ [[file:../modules/lang/ess/README.org][ess]] - TODO ++ [[file:../modules/lang/faust/README.org][faust]] - TODO ++ [[file:../modules/lang/fsharp/README.org][fsharp]] - TODO ++ [[file:../modules/lang/go/README.org][go]] =+lsp= - TODO ++ [[file:../modules/lang/haskell/README.org][haskell]] =+dante +intero +lsp= - TODO ++ hy - TODO ++ [[file:../modules/lang/idris/README.org][idris]] - TODO ++ java =+meghanada +lsp= - TODO ++ [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - JavaScript, TypeScript, and CoffeeScript support ++ julia - TODO ++ kotlin =+lsp+= - TODO ++ [[file:../modules/lang/latex/README.org][latex]] - TODO ++ lean - TODO ++ [[file:../modules/lang/ledger/README.org][ledger]] - TODO ++ lua =+moonscript= - TODO ++ [[file:../modules/lang/markdown/README.org][markdown]] =+grip= - TODO ++ [[file:../modules/lang/nim/README.org][nim]] - TODO ++ nix - TODO ++ [[file:../modules/lang/ocaml/README.org][ocaml]] =+lsp= - TODO ++ [[file:../modules/lang/org/README.org][org]] =+brain +dragndrop +gnuplot +hugo +ipython +journal +jupyter +pandoc +pomodoro +present= - TODO ++ [[file:../modules/lang/perl/README.org][perl]] - TODO ++ [[file:../modules/lang/php/README.org][php]] =+lsp= - TODO ++ plantuml - TODO ++ purescript - TODO ++ [[file:../modules/lang/python/README.org][python]] =+lsp +pyenv +conda= - TODO ++ qt - TODO ++ racket - TODO ++ [[file:../modules/lang/rest/README.org][rest]] - TODO ++ ruby =+lsp +rvm +rbenv= - TODO ++ [[file:../modules/lang/rust/README.org][rust]] =+lsp= - TODO ++ scala =+lsp= - TODO ++ [[file:../modules/lang/scheme/README.org][scheme]] - TODO ++ [[file:../modules/lang/sh/README.org][sh]] =+fish +lsp= - TODO ++ [[file:../modules/lang/solidity/README.org][solidity]] - TODO ++ swift =+lsp= - TODO ++ terra - TODO ++ web =+lsp= - HTML and CSS (SCSS/SASS/LESS/Stylus) support. + +* :term +Modules that offer terminal emulation. + ++ eshell - TODO ++ shell - TODO ++ term - TODO ++ [[file:../modules/term/vterm/README.org][vterm]] - TODO + +* :tools +Small modules that give Emacs access to external tools & services. + ++ ansible - TODO ++ debugger - A (nigh-)universal debugger in Emacs ++ [[file:../modules/tools/direnv/README.org][direnv]] - TODO ++ [[file:../modules/tools/docker/README.org][docker]] - TODO ++ [[file:../modules/tools/editorconfig/README.org][editorconfig]] - TODO ++ [[file:../modules/tools/ein/README.org][ein]] - TODO ++ [[file:../modules/tools/eval/README.org][eval]] =+overlay= - REPL & code evaluation support for a variety of languages ++ flycheck - Live error/warning highlights ++ flyspell =+everywhere= - Spell checking ++ gist - TODO ++ [[file:../modules/tools/lookup/README.org][lookup]] =+dictionary +docsets= - Universal jump-to & documentation lookup + backend ++ [[file:../modules/tools/lsp/README.org][lsp]] - TODO ++ macos - TODO ++ magit - TODO ++ make - TODO ++ pass - TODO ++ pdf - TODO ++ prodigy - TODO ++ rgb - TODO ++ [[file:../modules/tools/terraform/README.org][terraform]] ++ tmux - TODO ++ upload - TODO + +* :ui +Aesthetic modules that affect the Emacs interface or user experience. + ++ [[file:../modules/ui/deft/README.org][deft]] - TODO ++ [[file:../modules/ui/doom/README.org][doom]] - TODO ++ [[file:../modules/ui/doom-dashboard/README.org][doom-dashboard]] - TODO ++ [[file:../modules/ui/doom-quit/README.org][doom-quit]] - TODO ++ fill-column - TODO ++ [[file:../modules/ui/hl-todo/README.org][hl-todo]] - TODO ++ [[file:../modules/ui/hydra/README.org][hydra]] - TODO ++ indent-guides - TODO ++ [[file:../modules/ui/modeline/README.org][modeline]] - TODO ++ [[file:../modules/ui/nav-flash/README.org][nav-flash]] - TODO ++ [[file:../modules/ui/neotree/README.org][neotree]] - TODO ++ [[file:../modules/ui/ophints/README.org][ophints]] - TODO ++ [[file:../modules/ui/popup/README.org][popup]] =+all +defaults= - Makes temporary/disposable windows less intrusive ++ pretty-code - TODO ++ [[file:../modules/ui/tabs/README.org][tabs]] - TODO ++ treemacs - TODO ++ [[file:../modules/ui/unicode/README.org][unicode]] - TODO ++ vc-gutter - TODO ++ vi-tilde-fringe - TODO ++ [[file:../modules/ui/window-select/README.org][window-select]] =+switch-window +numbers= - TODO ++ [[file:../modules/ui/workspaces/README.org][workspaces]] - Isolated workspaces ++ [[file:../modules/ui/zen/README.org][zen]] - Distraction-free coding (or writing) From a2354a7ad7213e326b93ce47cde38b72a88e6f5d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Jan 2020 04:45:45 -0500 Subject: [PATCH 710/983] Add -p/--packages to 'doom upgrade' And document -f/--force --- core/cli/upgrade.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/cli/upgrade.el b/core/cli/upgrade.el index 003f737de..41571ab4f 100644 --- a/core/cli/upgrade.el +++ b/core/cli/upgrade.el @@ -1,7 +1,8 @@ ;;; core/cli/upgrade.el -*- lexical-binding: t; -*- (defcli! (upgrade up) - ((force-p ["-f" "--force"])) + ((force-p ["-f" "--force"] "Discard local changes to Doom and upgrade anyway") + (packages-only-p ["-p" "--packages"] "Only upgrade packages, not Doom")) "Updates Doom and packages. This requires that ~/.emacs.d is a git repo, and is the equivalent of the @@ -15,7 +16,8 @@ following shell commands: :bare t (if (delq nil (list - (doom-cli-upgrade doom-auto-accept force-p) + (unless packages-only-p + (doom-cli-upgrade doom-auto-accept force-p)) (doom-cli-execute "refresh") (when (doom-cli-packages-update) (doom-cli-reload-package-autoloads) From c395c08788a48a86eb4952f96a7b753528c150fb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Jan 2020 04:57:00 -0500 Subject: [PATCH 711/983] Fix #2396: remove unnecessary neotree popup hacks Looks like they're not needed anymore. --- modules/ui/neotree/config.el | 2 +- modules/ui/popup/+hacks.el | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/ui/neotree/config.el b/modules/ui/neotree/config.el index 6d140a672..a3c86353f 100644 --- a/modules/ui/neotree/config.el +++ b/modules/ui/neotree/config.el @@ -13,7 +13,7 @@ neo-auto-indent-point nil neo-autorefresh nil neo-mode-line-type 'none - neo-window-width 24 + neo-window-width 30 neo-show-updir-line nil neo-theme 'icons neo-banner-message nil diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index 29ff92997..4cc8f9e3d 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -220,12 +220,6 @@ the command buffer." (select-window win)))) -;;;###package neotree -(after! neotree - (advice-add #'neo-util--set-window-width :override #'ignore) - (advice-remove #'balance-windows #'ad-Advice-balance-windows)) - - ;;;###package org (after! org ;; Org has a scorched-earth window management policy I'm not fond of. i.e. it From 32cedd96f9b641557bd9b049dd8c90012cf14f92 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Jan 2020 05:16:21 -0500 Subject: [PATCH 712/983] Revert 310e657 & bump evil Thanks to emacs-evil/evil#1255 --- modules/editor/evil/config.el | 4 +--- modules/editor/evil/packages.el | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index fb1dd534c..9b8aba446 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -50,9 +50,7 @@ directives. By default, this only recognizes C directives.") evil-want-keybinding (not (featurep! +everywhere)) ;; Only do highlighting in selected window so that Emacs has less work ;; to do highlighting them all. - ;; TODO Revert this to `selected-windows' once emacs-evil/evil#1233 is - ;; resolved, otherwise we get no highlights on */# - evil-ex-interactive-search-highlight 'all-windows) + evil-ex-interactive-search-highlight 'selected-window) ;; Slow this down from 0.02 to prevent blocking in large or folded buffers ;; like magit while incrementally highlighting matches. diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index 2298900c0..b05ebb33d 100644 --- a/modules/editor/evil/packages.el +++ b/modules/editor/evil/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/evil/packages.el -(package! evil :pin "e00626d9fd") +(package! evil :pin "3a4ea09bdd") (package! evil-args :pin "758ad5ae54") (package! evil-easymotion :pin "79c13ed3bc") (package! evil-embrace :pin "4379adea03") From 31d330db483a311ba6c2c2547d7f0e2a34f5d3a7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Jan 2020 05:19:27 -0500 Subject: [PATCH 713/983] Bump evil-collection --- modules/editor/evil/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index b05ebb33d..6c01498bc 100644 --- a/modules/editor/evil/packages.el +++ b/modules/editor/evil/packages.el @@ -30,4 +30,4 @@ (package! neotree :pin "c2420a4b34") (autoload 'neotree-make-executor "neotree" nil nil 'macro)) - (package! evil-collection :pin "e9a592e5ee")) + (package! evil-collection :pin "27da36c705")) From 743c03f6082797756f3c2495a2a5ee27975e4021 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Jan 2020 15:12:14 -0500 Subject: [PATCH 714/983] Bind 'SPC m a c' to org-download-screenshot #2429 --- modules/lang/org/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index c22c8a5d6..472ad0bc9 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -621,6 +621,7 @@ between the two." "s" #'org-attach-set-directory "S" #'org-attach-sync (:when (featurep! +dragndrop) + "c" #'org-download-screenshot "y" #'org-download-yank)) (:prefix ("b" . "tables") "-" #'org-table-insert-hline From d123128dc538c40b19aed532158e37b33898d405 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Jan 2020 15:32:45 -0500 Subject: [PATCH 715/983] Unpin neotree in evil module This package! is here to ensure neotree is installed/byte-compiled before evil-collection. The neotree module manages (and pins) it, so we don't need to here. --- modules/editor/evil/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index 6c01498bc..24c46239f 100644 --- a/modules/editor/evil/packages.el +++ b/modules/editor/evil/packages.el @@ -27,7 +27,7 @@ ;; `evil-collection-neotree' uses the `neotree-make-executor' macro, but this ;; requires neotree be available during byte-compilation (while installing). (when (featurep! :ui neotree) - (package! neotree :pin "c2420a4b34") + (package! neotree) (autoload 'neotree-make-executor "neotree" nil nil 'macro)) (package! evil-collection :pin "27da36c705")) From e4728736e53729ed364df5a93b59998a0ab6b58e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Jan 2020 17:07:21 -0500 Subject: [PATCH 716/983] Bump lsp-mode --- modules/tools/lsp/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/lsp/packages.el b/modules/tools/lsp/packages.el index 3ae41ce7a..de711de87 100644 --- a/modules/tools/lsp/packages.el +++ b/modules/tools/lsp/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/lsp/packages.el -(package! lsp-mode :pin "58dd4bd380") +(package! lsp-mode :pin "91e37a61f4") (package! lsp-ui :pin "cf6906cc45") (when (featurep! :completion company) (package! company-lsp :pin "f921ffa0cd")) From 1666ab3ddc5f83bf5b30f3ddcfd3974ea539653d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Jan 2020 17:37:33 -0500 Subject: [PATCH 717/983] Fix #2398: recursive load in wanderlust Its dependencies weren't installed in the correct order (and a super old version of semi was installed because it didn't have an explicit package declaration). --- modules/email/wanderlust/packages.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/email/wanderlust/packages.el b/modules/email/wanderlust/packages.el index db6ab91ab..04963b55b 100644 --- a/modules/email/wanderlust/packages.el +++ b/modules/email/wanderlust/packages.el @@ -2,9 +2,10 @@ ;;; app/wanderlust/packages.el ;; HACK These are wanderlust's dependencies (wanderlust depends on semi, semi -;; depends on flim, flim on apel), but both flim and apel have non-standard -;; default branches, which straight cannot detect without our help. -(package! flim :recipe (:branch "flim-1_14-wl") :pin "e4bd54fd7d") +;; depends on flim, flim on apel), but they all have non-standard default +;; branches which straight cannot detect without our help. (package! apel :recipe (:branch "apel-wl") :pin "d146ddbf88") +(package! flim :recipe (:branch "flim-1_14-wl") :pin "e4bd54fd7d") +(package! semi :recipe (:branch "semi-1_14-wl") :pin "16228dc2d1") (package! wanderlust :pin "7a919e422a") From dadd54604be7fde8daa35f5d408dfbdd5a26339a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 26 Jan 2020 21:21:06 -0500 Subject: [PATCH 718/983] Refactor package update logic Still needs more work. --- core/autoload/packages.el | 29 ++++++ core/cli/packages.el | 214 ++++++++++++++++++-------------------- core/core-packages.el | 1 - core/core.el | 32 +++--- 4 files changed, 145 insertions(+), 131 deletions(-) diff --git a/core/autoload/packages.el b/core/autoload/packages.el index e0c0240c3..7981d3382 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -47,6 +47,7 @@ deps)) deps))) +;;;###autoload (defun doom-package-depending-on (package &optional noerror) "Return a list of packages that depend on the package named NAME." (cl-check-type name symbol) @@ -189,6 +190,34 @@ ones." (doom--read-module-packages-file private-packages all-p t)) (nreverse doom-packages))) +;;;###autoload +(defun doom-package-recipe-list () + "Return straight recipes for non-builtin packages with a local-repo." + (let (recipes) + (dolist (recipe (hash-table-values straight--recipe-cache)) + (with-plist! recipe (local-repo type) + (when (and local-repo (not (eq type 'built-in))) + (push recipe recipes)))) + (nreverse recipes))) + +;;;###autoload +(defmacro doom-with-package-recipes (recipes binds &rest body) + "TODO" + (declare (indent 2)) + (let ((recipe-var (make-symbol "recipe")) + (recipes-var (make-symbol "recipes"))) + `(let* ((,recipes-var ,recipes) + (built ()) + (straight-use-package-pre-build-functions + (cons (lambda (pkg) (cl-pushnew pkg built :test #'equal)) + straight-use-package-pre-build-functions))) + (dolist (,recipe-var ,recipes-var) + (cl-block nil + (straight--with-plist (append (list :recipe ,recipe-var) ,recipe-var) + ,(doom-enlist binds) + ,@body))) + (nreverse built)))) + ;; ;;; Main functions diff --git a/core/cli/packages.el b/core/cli/packages.el index 314ac1bdd..542949c31 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -59,29 +59,20 @@ list remains lean." ;; ;;; Library -(defun doom--straight-recipes () - (let (recipes) - (dolist (recipe (hash-table-values straight--recipe-cache)) - (straight--with-plist recipe (local-repo type) - (when (and local-repo (not (eq type 'built-in))) - (push recipe recipes)))) - (nreverse recipes))) +(defun doom--same-commit-p (abbrev-ref ref) + (and (stringp abbrev-ref) + (stringp ref) + (string-match-p (concat "^" (regexp-quote abbrev-ref)) + ref))) -(defmacro doom--map-recipes (recipes binds &rest body) - (declare (indent 2)) - (let ((recipe-var (make-symbol "recipe")) - (recipes-var (make-symbol "recipes"))) - `(let* ((,recipes-var ,recipes) - (built ()) - (straight-use-package-pre-build-functions - (cons (lambda (pkg) (cl-pushnew pkg built :test #'equal)) - straight-use-package-pre-build-functions))) - (dolist (,recipe-var ,recipes-var) - (cl-block nil - (straight--with-plist (append (list :recipe ,recipe-var) ,recipe-var) - ,(doom-enlist binds) - ,@body))) - (nreverse built)))) +(defun doom--abbrev-commit (commit &optional full) + (if full commit (substring commit 0 7))) + +(defun doom--commit-log-between (start-ref end-ref) + (and (straight--call + "git" "log" "--oneline" "--no-merges" + "-n" "25" end-ref (concat "^" (regexp-quote start-ref))) + (straight--process-get-output))) (defun doom-cli-packages-install () "Installs missing packages. @@ -92,7 +83,7 @@ declaration) or dependency thereof that hasn't already been." (print! (start "Installing packages...")) (print-group! (if-let (built - (doom--map-recipes (doom--straight-recipes) + (doom-with-package-recipes (doom-package-recipe-list) (recipe package type local-repo) (condition-case-unless-debug e (progn @@ -105,7 +96,7 @@ declaration) or dependency thereof that hasn't already been." (if (straight-vc-commit-present-p recipe newcommit) (progn (print! (success "Checking out %s to %s") - package (substring newcommit 0 8)) + package (doom--abbrev-commit newcommit)) (straight-vc-check-out-commit recipe newcommit) (straight-rebuild-package package t)) (ignore-errors @@ -140,7 +131,7 @@ declaration) or dependency thereof that hasn't already been." (unless force-p (straight--make-package-modifications-available)) (if-let (built - (doom--map-recipes (doom--straight-recipes) (package) + (doom-with-package-recipes (doom-package-recipe-list) (package) (straight-use-package (intern package)))) (print! (success "Rebuilt %d package(s)") (length built)) (print! (success "No packages need rebuilding")) @@ -152,101 +143,92 @@ declaration) or dependency thereof that hasn't already been." (straight--transaction-finalize) (print! (start "Updating packages (this may take a while)...")) (let* ((straight--repos-dir (straight--repos-dir)) - (straight--packages-to-rebuild (make-hash-table :test 'equal)) - (updated-repos (make-hash-table :test 'equal)) - (recipes (doom--straight-recipes)) + (packages-to-rebuild (make-hash-table :test 'equal)) + (repos-to-rebuild (make-hash-table :test 'equal)) + (recipes (doom-package-recipe-list)) (total (length recipes)) + (esc (if doom-debug-mode "" "\033[1A")) (i 0) errors) ;; TODO Log this somewhere? - (doom--map-recipes recipes (recipe package type local-repo) + (doom-with-package-recipes recipes (recipe package type local-repo) (cl-incf i) (print-group! (unless (straight--repository-is-available-p recipe) - (print! (error "(%d/%d) Couldn't find local repo for %s!") - i total package) + (print! (error "(%d/%d) Couldn't find local repo for %s!") i total package) (cl-return)) - (when (gethash local-repo updated-repos) - (puthash package t straight--packages-to-rebuild) - (ignore-errors (delete-directory (straight--build-dir package) 'recursive)) - (print! (success "(%d/%d) %s was updated indirectly (with %s)") - i total package local-repo) + (when (gethash local-repo repos-to-rebuild) + (puthash package t packages-to-rebuild) + (print! (success "(%d/%d) %s was updated indirectly (with %s)") i total package local-repo) (cl-return)) - (let ((default-directory (straight--repos-dir local-repo)) - (esc (if doom-debug-mode "" "\033[1A"))) + (let ((default-directory (straight--repos-dir local-repo))) (unless (file-in-directory-p default-directory straight--repos-dir) - (print! (warn "(%d/%d) Skipping %s because it is local") - i total package) + (print! (warn "(%d/%d) Skipping %s because it is local") i total package) (cl-return)) - ;; FIXME Dear lord refactor me (condition-case-unless-debug e - (let ((commit (straight-vc-get-commit type local-repo)) - (newcommit (cdr (assoc local-repo doom-pinned-packages)))) - (and (stringp newcommit) - (string-match-p (concat "^" newcommit) commit) - (print! (success "\033[K(%d/%d) %s is up-to-date...%s") - i total package esc) - (cl-return)) - (unless (or (and (stringp newcommit) - (straight-vc-commit-present-p recipe newcommit) - (print! (start "\033[K(%d/%d) Checking out %s (%s)...%s") - i total package (substring newcommit 0 7) esc)) - (and (print! (start "\033[K(%d/%d) Fetching %s...%s") - i total package esc) - (straight-vc-fetch-from-remote recipe))) - (print! (warn "\033[K(%d/%d) Failed to fetch %s") - i total (or local-repo package)) - (cl-return)) - (let ((output (straight--process-get-output))) - (if (stringp newcommit) - (if (straight-vc-commit-present-p recipe newcommit) - (straight-vc-check-out-commit recipe newcommit) - (print! (start "\033[K(%d/%d) Re-cloning %s...%s") i total local-repo esc) - (ignore-errors - (delete-directory (straight--repos-dir package) 'recursive)) - (straight-use-package (intern package) nil 'no-build)) - (straight-merge-package package) - (setq newcommit (straight-vc-get-commit type local-repo))) - (when (string-match-p (concat "^" newcommit) commit) - (cl-return)) - (print! (start "\033[K(%d/%d) Updating %s...%s") i total local-repo esc) - (puthash local-repo t updated-repos) - (puthash package t straight--packages-to-rebuild) - (ignore-errors - (delete-directory (straight--build-dir package) 'recursive)) - (print-group! - (unless (string-empty-p output) - (print! (info "%s") output)) - (when (eq type 'git) - (straight--call - "git" "log" "--oneline" "--no-merges" - newcommit (concat "^" commit)) - (print-group! - (print! "%s" (straight--process-get-output))))) - (print! (success "(%d/%d) %s updated (%s -> %s)") i total - (or local-repo package) - (substring commit 0 7) - (substring newcommit 0 7)))) + (let ((ref (straight-vc-get-commit type local-repo)) + (target-ref (cdr (assoc local-repo doom-pinned-packages))) + output) + (or (cond + ((not (stringp target-ref)) + (print! (start "\033[K(%d/%d) Fetching %s...%s") i total package esc) + (when (straight-vc-fetch-from-remote recipe) + (setq output (straight--process-get-output)) + (straight-merge-package package) + (setq target-ref (straight-vc-get-commit type local-repo)) + (when (doom--same-commit-p target-ref ref) + (cl-return)))) + + ((doom--same-commit-p target-ref ref) + (print! (success "\033[K(%d/%d) %s is up-to-date...%s") i total package esc) + (cl-return)) + + ((straight-vc-commit-present-p recipe target-ref) + (print! (start "\033[K(%d/%d) Checking out %s (%s)...%s") + i total package (doom--abbrev-commit target-ref) esc) + (straight-vc-check-out-commit recipe target-ref) + (or (not (eq type 'git)) + (setq output (doom--commit-log-between ref target-ref))) + (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) + + ((print! (start "\033[K(%d/%d) Re-cloning %s...%s") i total local-repo esc) + (ignore-errors (delete-directory (straight--repos-dir package) 'recursive)) + (straight-use-package (intern package) nil 'no-build) + (prog1 (file-directory-p (straight--repos-dir package)) + (or (not (eq type 'git)) + (setq output (doom--commit-log-between ref target-ref)))))) + (progn + (print! (warn "\033[K(%d/%d) Failed to fetch %s") i total local-repo) + (cl-return))) + (puthash local-repo t repos-to-rebuild) + (puthash package t packages-to-rebuild) + (unless (string-empty-p output) + (print-group! (print! (info "%s" output)))) + (print! (success "(%d/%d) %s updated (%s -> %s)") + i total local-repo + (doom--abbrev-commit ref) + (doom--abbrev-commit target-ref))) (user-error (signal 'user-error (error-message-string e))) (error (print! (warn "\033[K(%d/%d) Encountered error with %s" i total package)) (print-group! - (print! (error "%s" e)) + (print! (error "%s") e) (print-group! (print! (info "%s" (straight--process-get-output))))) - (push package errors))))) - (princ "\033[K") - (when errors - (print! (error "Encountered %d error(s), the offending packages: %s") - (length errors) (string-join errors ", "))) - (if (hash-table-empty-p straight--packages-to-rebuild) - (ignore - (print! (success "All %d packages are up-to-date") - (hash-table-count straight--repo-cache))) - (print! (success "Updated %d package(s)") - (hash-table-count straight--packages-to-rebuild)) - (doom-cli-packages-build) - t)))) + (push package errors)))))) + (princ "\033[K") + (when errors + (print! (error "Encountered %d error(s), the offending packages: %s") + (length errors) (string-join errors ", "))) + (if (hash-table-empty-p packages-to-rebuild) + (ignore (print! (success "All %d packages are up-to-date") total)) + (let ((default-directory (straight--build-dir))) + (mapc (doom-rpartial #'delete-directory 'recursive) + (hash-table-keys packages-to-rebuild))) + (print! (success "Updated %d package(s)") + (hash-table-count packages-to-rebuild)) + (doom-cli-packages-build) + t))) ;;; PURGE (for the emperor) @@ -267,19 +249,23 @@ declaration) or dependency thereof that hasn't already been." (length (delq nil (mapcar #'doom--cli-packages-purge-build builds)))))) -(defun doom--cli-packages-regraft-repo (repo) +(cl-defun doom--cli-packages-regraft-repo (repo) (let ((default-directory (straight--repos-dir repo))) - (if (not (file-directory-p ".git")) - (ignore (print! (warn "\033[Krepos/%s is not a git repo, skipping" repo))) - (let ((before-size (doom-directory-size default-directory))) - (straight--call "git" "reset" "--hard") - (straight--call "git" "clean" "-ffd") - (if (not (car (straight--call "git" "replace" "--graft" "HEAD"))) - (print! (info "\033[Krepos/%s is already compact\033[1A" repo)) - (straight--call "git" "gc") - (print! (success "\033[KRegrafted repos/%s (from %0.1fKB to %0.1fKB)") - repo before-size (doom-directory-size default-directory)) - (print-group! (print! "%s" (straight--process-get-output))))) + (unless (file-directory-p ".git") + (print! (warn "\033[Krepos/%s is not a git repo, skipping" repo)) + (cl-return)) + (unless (file-in-directory-p default-directory straight-base-dir) + (print! (warn "\033[KSkipping repos/%s because it is local" repo)) + (cl-return)) + (let ((before-size (doom-directory-size default-directory))) + (straight--call "git" "reset" "--hard") + (straight--call "git" "clean" "-ffd") + (if (not (car (straight--call "git" "replace" "--graft" "HEAD"))) + (print! (info "\033[Krepos/%s is already compact\033[1A" repo)) + (straight--call "git" "gc") + (print! (success "\033[KRegrafted repos/%s (from %0.1fKB to %0.1fKB)") + repo before-size (doom-directory-size default-directory)) + (print-group! (print! "%s" (straight--process-get-output)))) t))) (defun doom--cli-packages-regraft-repos (repos) diff --git a/core/core-packages.el b/core/core-packages.el index 24f585d4e..cdd8a4b7e 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -130,7 +130,6 @@ missing) and shouldn't be deleted.") (append (apply orig-fn args) doom-pinned-packages)) - ;; ;;; Bootstrapper diff --git a/core/core.el b/core/core.el index ade8cfefb..7debec9b0 100644 --- a/core/core.el +++ b/core/core.el @@ -448,17 +448,18 @@ unreadable. Returns the names of envvars that were changed." (point-max)))) environment))) (when environment - (setq process-environment - (append (nreverse environment) process-environment) - exec-path - (if (member "PATH" envvars) - (append (split-string (getenv "PATH") path-separator t) - (list exec-directory)) - exec-path) - shell-file-name - (if (member "SHELL" envvars) - (or (getenv "SHELL") shell-file-name) - shell-file-name)) + (setq-default + process-environment + (append (nreverse environment) process-environment) + exec-path + (if (member "PATH" envvars) + (append (split-string (getenv "PATH") path-separator t) + (list exec-directory)) + exec-path) + shell-file-name + (if (member "SHELL" envvars) + (or (getenv "SHELL") shell-file-name) + shell-file-name)) envvars)))) (defun doom-initialize (&optional force-p noerror) @@ -531,11 +532,10 @@ to least)." (file-expand-wildcards (concat doom-core-dir "autoload/*.el"))) ;; Create all our core directories to quell file errors - (dolist (dir (list doom-local-dir - doom-etc-dir - doom-cache-dir)) - (unless (file-directory-p dir) - (make-directory dir 'parents))) + (mapc (doom-rpartial #'make-directory 'parents) + (list doom-local-dir + doom-etc-dir + doom-cache-dir)) ;; Ensure the package management system (and straight) are ready for ;; action (and all core packages/repos are installed) From 99fc55f75cd9158d0d36f27630eb882b338d6642 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Jan 2020 00:51:12 -0500 Subject: [PATCH 719/983] General, minor refactors in doom core --- core/cli/packages.el | 25 +++++++++-------- core/cli/upgrade.el | 23 ++++++++-------- core/core-packages.el | 62 +++++++++++++++++++++---------------------- core/core.el | 25 ++++++++--------- 4 files changed, 65 insertions(+), 70 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 542949c31..d75c987bb 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -88,16 +88,16 @@ declaration) or dependency thereof that hasn't already been." (condition-case-unless-debug e (progn (straight-use-package (intern package)) - (when-let* ((newcommit (cdr (assoc local-repo doom-pinned-packages))) - (oldcommit (straight-vc-get-commit type local-repo))) - (unless (string-match-p (concat "^" newcommit) oldcommit) - (unless (straight-vc-commit-present-p recipe newcommit) + (when-let* ((target-ref (cdr (assoc local-repo doom-pinned-packages))) + (ref (straight-vc-get-commit type local-repo))) + (unless (doom--same-commit target-ref ref) + (unless (straight-vc-commit-present-p recipe target-ref) (straight-vc-fetch-from-remote recipe)) - (if (straight-vc-commit-present-p recipe newcommit) + (if (straight-vc-commit-present-p recipe target-ref) (progn (print! (success "Checking out %s to %s") - package (doom--abbrev-commit newcommit)) - (straight-vc-check-out-commit recipe newcommit) + package (doom--abbrev-commit target-ref)) + (straight-vc-check-out-commit recipe target-ref) (straight-rebuild-package package t)) (ignore-errors (delete-directory (straight--repos-dir package) 'recursive)) @@ -142,27 +142,26 @@ declaration) or dependency thereof that hasn't already been." "Updates packages." (straight--transaction-finalize) (print! (start "Updating packages (this may take a while)...")) - (let* ((straight--repos-dir (straight--repos-dir)) + (let* ((repo-dir (straight--repos-dir)) (packages-to-rebuild (make-hash-table :test 'equal)) (repos-to-rebuild (make-hash-table :test 'equal)) (recipes (doom-package-recipe-list)) (total (length recipes)) - (esc (if doom-debug-mode "" "\033[1A")) + (esc (unless doom-debug-mode "\033[1A")) (i 0) errors) - ;; TODO Log this somewhere? (doom-with-package-recipes recipes (recipe package type local-repo) (cl-incf i) (print-group! (unless (straight--repository-is-available-p recipe) - (print! (error "(%d/%d) Couldn't find local repo for %s!") i total package) + (print! (error "(%d/%d) Couldn't find local repo for %s") i total package) (cl-return)) (when (gethash local-repo repos-to-rebuild) (puthash package t packages-to-rebuild) (print! (success "(%d/%d) %s was updated indirectly (with %s)") i total package local-repo) (cl-return)) (let ((default-directory (straight--repos-dir local-repo))) - (unless (file-in-directory-p default-directory straight--repos-dir) + (unless (file-in-directory-p default-directory repo-dir) (print! (warn "(%d/%d) Skipping %s because it is local") i total package) (cl-return)) (condition-case-unless-debug e @@ -180,7 +179,7 @@ declaration) or dependency thereof that hasn't already been." (cl-return)))) ((doom--same-commit-p target-ref ref) - (print! (success "\033[K(%d/%d) %s is up-to-date...%s") i total package esc) + (print! (info "\033[K(%d/%d) %s is up-to-date...%s") i total package esc) (cl-return)) ((straight-vc-commit-present-p recipe target-ref) diff --git a/core/cli/upgrade.el b/core/cli/upgrade.el index 41571ab4f..1b5f6fd70 100644 --- a/core/cli/upgrade.el +++ b/core/cli/upgrade.el @@ -1,7 +1,7 @@ ;;; core/cli/upgrade.el -*- lexical-binding: t; -*- (defcli! (upgrade up) - ((force-p ["-f" "--force"] "Discard local changes to Doom and upgrade anyway") + ((force-p ["-f" "--force"] "Discard local changes to Doom and packages, and upgrade anyway") (packages-only-p ["-p" "--packages"] "Only upgrade packages, not Doom")) "Updates Doom and packages. @@ -14,16 +14,17 @@ following shell commands: bin/doom refresh bin/doom update" :bare t - (if (delq - nil (list - (unless packages-only-p - (doom-cli-upgrade doom-auto-accept force-p)) - (doom-cli-execute "refresh") - (when (doom-cli-packages-update) - (doom-cli-reload-package-autoloads) - t))) - (print! (success "Done! Restart Emacs for changes to take effect.")) - (print! "Nothing to do. Doom is up-to-date!"))) + (let ((doom-auto-discard force-p)) + (if (delq + nil (list + (unless packages-only-p + (doom-cli-upgrade doom-auto-accept doom-auto-discard)) + (doom-cli-execute "refresh") + (when (doom-cli-packages-update) + (doom-cli-reload-package-autoloads) + t))) + (print! (success "Done! Restart Emacs for changes to take effect.")) + (print! "Nothing to do. Doom is up-to-date!")))) ;; diff --git a/core/core-packages.el b/core/core-packages.el index cdd8a4b7e..430cf1d03 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -150,19 +150,7 @@ necessary package metadata is initialized and available for them." (when (or force-p (not doom-packages)) (doom-log "Initializing straight") (setq doom-init-packages-p t) - (unless (fboundp 'straight--reset-caches) - (doom-ensure-straight) - (require 'straight)) - (straight--reset-caches) - (setq straight-recipe-repositories nil - straight-recipe-overrides nil) - (mapc #'straight-use-recipes doom-core-package-sources) - (straight-register-package - `(straight :type git :host github - :repo ,(format "%s/straight.el" straight-repository-user) - :files ("straight*.el") - :branch ,straight-repository-branch - :no-byte-compile t)) + (doom-ensure-straight) (mapc #'straight-use-package doom-core-packages) (doom-log "Initializing doom-packages") (setq doom-disabled-packages nil @@ -199,24 +187,35 @@ necessary package metadata is initialized and available for them." (defun doom-ensure-straight () "Ensure `straight' is installed and was compiled with this version of Emacs." - (defvar bootstrap-version) - (let* (;; Force straight to install into ~/.emacs.d/.local/straight instead of - ;; ~/.emacs.d/straight by pretending `doom-local-dir' is our .emacs.d. - (user-emacs-directory straight-base-dir) - (bootstrap-file (doom-path straight-base-dir "straight/repos/straight.el/straight.el")) - (bootstrap-version 5)) - (make-directory (doom-path straight-base-dir "straight/build") 'parents) - (unless (featurep 'straight) - (unless (or (require 'straight nil t) - (file-readable-p bootstrap-file)) - (with-current-buffer - (url-retrieve-synchronously - (format "https://raw.githubusercontent.com/raxod502/straight.el/%s/install.el" - straight-repository-branch) - 'silent 'inhibit-cookies) - (goto-char (point-max)) - (eval-print-last-sexp))) - (load bootstrap-file nil t)))) + (unless (fboundp 'straight--reset-caches) + (defvar bootstrap-version) + (let* (;; Force straight to install into ~/.emacs.d/.local/straight instead of + ;; ~/.emacs.d/straight by pretending `doom-local-dir' is our .emacs.d. + (user-emacs-directory straight-base-dir) + (bootstrap-file (doom-path straight-base-dir "straight/repos/straight.el/straight.el")) + (bootstrap-version 5)) + (make-directory (doom-path straight-base-dir "straight/build") 'parents) + (or (require 'straight nil t) + (file-readable-p bootstrap-file) + (with-current-buffer + (url-retrieve-synchronously + (format "https://raw.githubusercontent.com/raxod502/straight.el/%s/install.el" + straight-repository-branch) + 'silent 'inhibit-cookies) + (goto-char (point-max)) + (eval-print-last-sexp))) + (load bootstrap-file nil t)) + (require 'straight)) + (straight--reset-caches) + (setq straight-recipe-repositories nil + straight-recipe-overrides nil) + (mapc #'straight-use-recipes doom-core-package-sources) + (straight-register-package + `(straight :type git :host github + :repo ,(format "%s/straight.el" straight-repository-user) + :files ("straight*.el") + :branch ,straight-repository-branch + :no-byte-compile t))) ;; @@ -244,7 +243,6 @@ Accepts the following properties: :ignore FORM Do not install this package. :pin STR|nil - (NOT IMPLEMENTED YET) Pin this package to commit hash STR. Setting this to nil will unpin this package if previously pinned. :built-in BOOL|'prefer diff --git a/core/core.el b/core/core.el index 7debec9b0..f87e5bb41 100644 --- a/core/core.el +++ b/core/core.el @@ -34,8 +34,6 @@ ;; Load the bare necessities (require 'core-lib) -(autoload 'doom-initialize-packages "core-packages") - ;; ;;; Global variables @@ -448,18 +446,17 @@ unreadable. Returns the names of envvars that were changed." (point-max)))) environment))) (when environment - (setq-default - process-environment - (append (nreverse environment) process-environment) - exec-path - (if (member "PATH" envvars) - (append (split-string (getenv "PATH") path-separator t) - (list exec-directory)) - exec-path) - shell-file-name - (if (member "SHELL" envvars) - (or (getenv "SHELL") shell-file-name) - shell-file-name)) + (setq process-environment + (append (nreverse environment) process-environment) + exec-path + (if (member "PATH" envvars) + (append (split-string (getenv "PATH") path-separator t) + (list exec-directory)) + exec-path) + shell-file-name + (if (member "SHELL" envvars) + (or (getenv "SHELL") shell-file-name) + shell-file-name)) envvars)))) (defun doom-initialize (&optional force-p noerror) From f5800b5b406380ab7263eaef2640c7f72e9709b0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Jan 2020 00:51:37 -0500 Subject: [PATCH 720/983] Bump to hlissner/emacs-doom-themes@d48df7b --- modules/ui/doom/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/doom/packages.el b/modules/ui/doom/packages.el index 37c0337cf..ed58f0f9a 100644 --- a/modules/ui/doom/packages.el +++ b/modules/ui/doom/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/doom/packages.el -(package! doom-themes :pin "1079a47465") +(package! doom-themes :pin "d48df7b02e") (package! solaire-mode :pin "4ac324ccb0") From 5056c746883c8e5d8f273ac5d2ae7fb8eb51fcd5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Jan 2020 01:44:30 -0500 Subject: [PATCH 721/983] Fix some packages failing to fetch on 'doom update' --- core/cli/packages.el | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index d75c987bb..16d3369ef 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -100,7 +100,7 @@ declaration) or dependency thereof that hasn't already been." (straight-vc-check-out-commit recipe target-ref) (straight-rebuild-package package t)) (ignore-errors - (delete-directory (straight--repos-dir package) 'recursive)) + (delete-directory (straight--repos-dir local-repo) 'recursive)) (straight-use-package (intern package)))))) (error (signal 'doom-package-error @@ -191,13 +191,19 @@ declaration) or dependency thereof that hasn't already been." (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) ((print! (start "\033[K(%d/%d) Re-cloning %s...%s") i total local-repo esc) - (ignore-errors (delete-directory (straight--repos-dir package) 'recursive)) - (straight-use-package (intern package) nil 'no-build) - (prog1 (file-directory-p (straight--repos-dir package)) - (or (not (eq type 'git)) - (setq output (doom--commit-log-between ref target-ref)))))) + (let ((repo (straight--repos-dir local-repo))) + (ignore-errors + (delete-directory repo 'recursive)) + (print-group! + (straight-use-package (intern package) nil 'no-build)) + (prog1 (file-directory-p repo) + (or (not (eq type 'git)) + (setq output (doom--commit-log-between ref target-ref))))))) (progn - (print! (warn "\033[K(%d/%d) Failed to fetch %s") i total local-repo) + (print! (warn "\033[K(%d/%d) Failed to fetch %s") + i total local-repo) + (unless (string-empty-p output) + (print-group! (print! (info "%s" output)))) (cl-return))) (puthash local-repo t repos-to-rebuild) (puthash package t packages-to-rebuild) From 471be76ba593af5a2ff1e5850da75fd5a15d4365 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Jan 2020 02:05:14 -0500 Subject: [PATCH 722/983] Fix typo causing void-function error --- core/cli/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 16d3369ef..ddd65b722 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -90,7 +90,7 @@ declaration) or dependency thereof that hasn't already been." (straight-use-package (intern package)) (when-let* ((target-ref (cdr (assoc local-repo doom-pinned-packages))) (ref (straight-vc-get-commit type local-repo))) - (unless (doom--same-commit target-ref ref) + (unless (doom--same-commit-p target-ref ref) (unless (straight-vc-commit-present-p recipe target-ref) (straight-vc-fetch-from-remote recipe)) (if (straight-vc-commit-present-p recipe target-ref) From 26e0e9dd2ad68a449fa4cfe2eef0786f507f0dff Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Jan 2020 03:06:14 -0500 Subject: [PATCH 723/983] Bump to emacs-straight/undo-tree@ad58b21 --- core/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/packages.el b/core/packages.el index 55808d597..64e15b7fb 100644 --- a/core/packages.el +++ b/core/packages.el @@ -27,7 +27,7 @@ ;; on a potato. :recipe (:host github :repo "hlissner/emacs-so-long") :pin "ed666b0716") -(package! undo-tree :pin "1d91157366") +(package! undo-tree :pin "ad58b21cb9") (package! ws-butler ;; Use my fork of ws-butler, which has a few choice improvements and ;; optimizations (the original has been abandoned). From b9f823bfa28b1b8b927ec261ca7135a22a07529f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Jan 2020 17:04:29 -0500 Subject: [PATCH 724/983] Autoload org-download-{yank,screenshot} Fixes #2429 --- modules/lang/org/contrib/dragndrop.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/lang/org/contrib/dragndrop.el b/modules/lang/org/contrib/dragndrop.el index 1fa45acb3..292eb0958 100644 --- a/modules/lang/org/contrib/dragndrop.el +++ b/modules/lang/org/contrib/dragndrop.el @@ -2,7 +2,11 @@ ;;;###if (featurep! +dragndrop) (use-package! org-download - :commands org-download-dnd org-download-dnd-base64 + :commands + org-download-dnd + org-download-yank + org-download-screenshot + org-download-dnd-base64 :init ;; HACK We add these manually so that org-download is truly lazy-loaded (pushnew! dnd-protocol-alist From 46cc7f7fdf85cac47ebdf97526cfd096e52664cd Mon Sep 17 00:00:00 2001 From: Mihai Dinu Date: Mon, 27 Jan 2020 23:50:05 +0100 Subject: [PATCH 725/983] Don't do dired git highlighting if remote Fixes https://github.com/hlissner/doom-emacs/issues/2439 --- modules/emacs/dired/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index dd342aa2b..d78831c3e 100755 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -65,7 +65,7 @@ only variant that supports --group-directories-first." (use-package! diff-hl - :hook (dired-mode . diff-hl-dired-mode) + :hook (dired-mode . diff-hl-dired-mode-unless-remote) :hook (magit-post-refresh . diff-hl-magit-post-refresh) :config ;; use margin instead of fringe From d329ff2a306e7b33d5302f8f89e7245613394adc Mon Sep 17 00:00:00 2001 From: Yiming Chen Date: Tue, 28 Jan 2020 12:17:51 +0800 Subject: [PATCH 726/983] Add {little,greater}-than to +web-entities-list --- modules/lang/web/autoload/html.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/lang/web/autoload/html.el b/modules/lang/web/autoload/html.el index dbba73e60..bfb1de838 100644 --- a/modules/lang/web/autoload/html.el +++ b/modules/lang/web/autoload/html.el @@ -2,6 +2,7 @@ (defvar +web-entities-list [["&" "&"] [" " " "] [" " " "] [" " " "] [" " " "] + ["<" "<"] [">" ">"] ["‏" "‏"] ["‎" "‎"] ["‍" "‍"] ["‌" "‌"] ["¡" "¡"] ["¢" "¢"] ["£" "£"] ["¤" "¤"] ["¥" "¥"] ["¦" "¦"] ["§" "§"] ["¨" "¨"] ["©" "©"] ["ª" "ª"] From d27ff784446bb71b303df9c3ea1a2d3793bc7f54 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Jan 2020 23:35:51 -0500 Subject: [PATCH 727/983] Update discord links --- README.md | 4 ++-- docs/contributing.org | 14 +++++++------- docs/faq.org | 2 +- docs/getting_started.org | 12 +++++++++++- docs/index.org | 2 +- 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 31228ae31..eea060fb1 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@
Build status: develop - + Join our discord server

@@ -171,7 +171,7 @@ you can do to help; I welcome any contribution! [doom:bindings]: modules/config/default/+evil-bindings.el [doom:packages]: core/autoload/packages.el [doom:popups]: modules/ui/popup/README.org -[url:discord]: https://discord.gg/bcZ6P3y +[url:discord]: https://discord.gg/64QNqtq [url:liberapay]: https://liberapay.com/hlissner/donate [url:paypal]: https://paypal.me/henriklissner/10 [url:editorconfig]: http://editorconfig.org/ diff --git a/docs/contributing.org b/docs/contributing.org index 46feb468f..ef2d7f21f 100644 --- a/docs/contributing.org +++ b/docs/contributing.org @@ -1,14 +1,14 @@ #+TITLE: Contributing #+STARTUP: nofold -I can't say Doom Emacs is a one man show anymore. It wouldn't have gotten this -far without the help of folks like you! Still, I struggle to maintain it all; -especially the modules I do not use. If Doom has been useful to you, consider -pitching in and helping me out. +Doom Emacs is an active and ongoing project, maintained mostly by a single +person, but includes the efforts of 200 contributors and growing. There is no +shortage of things that need doing; bugs that need stomping, features that need +implementing, and documentation that needs documenting. If Doom's been useful to +you, convert some caffiene into code; it'd be a huge help! -Help can range from reporting bugs, proposing enhancements, submitting code and -documentation, or just spreading the good word. To ensure no toes get stepped on -or wires crossed, this guide was created to help you help us. +You are welcome to [[https://discord.gg/64QNqtq][join us on our Discord server]], otherwise read on to learn how +to contribute to our fine corner of the interwebs. * Table of Contents :TOC_3: - [[#where-can-i-help][Where can I help?]] diff --git a/docs/faq.org b/docs/faq.org index 4bc5defe1..c1282684b 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -944,7 +944,7 @@ issues #1 and #3: generate an envvar file by running ~doom env~. This scrapes your shell environment into a file that is loaded when Doom Emacs starts up. Check out ~doom help env~ for details on how this works. -For issue #2, you'll need to investigate your launcher. [[https://discord.gg/bcZ6P3y][Our Discord]] is a good +For issue #2, you'll need to investigate your launcher. [[https://discord.gg/64QNqtq][Our Discord]] is a good place to ask about it. ** There's artefacting on my icon fonts in GUI Emacs ([[https://github.com/hlissner/doom-emacs/issues/956][#956]]) diff --git a/docs/getting_started.org b/docs/getting_started.org index 006b450cb..c6936a9d1 100644 --- a/docs/getting_started.org +++ b/docs/getting_started.org @@ -1,6 +1,16 @@ #+TITLE: Getting Started Guide #+STARTUP: nofold +GNU Emacs is one grand ol' adventure, let alone Doom Emacs. Before you start +you'll need to set up Emacs, Doom, and its packages, then learn how to take care +of your new puppy slash operating system. This guide will walk you through +installing, using, configuring and troubleshooting Doom Emacs. + +#+begin_quote +If you feel like we've missed something, [[https://discord.gg/64QNqtq][join us on our Discord server]] and let +us know! +#+end_quote + * Table of Contents :TOC_4: - [[#install][Install]] - [[#emacs--dependencies][Emacs & dependencies]] @@ -1115,7 +1125,7 @@ You can also evaluate code with ~eval-expression~ (=M-;= or =SPC ;=). ** How to extract a backtrace from an error If you encounter an error while using Doom Emacs, you're probably about to head -off and file a bug report (or request help on [[https://discord.gg/bcZ6P3y][our Discord server]]). Before you +off and file a bug report (or request help on [[https://discord.gg/64QNqtq][our Discord server]]). Before you do, please generate a backtrace to include with it. To do so you must enable ~debug-on-error~ then recreate the error. diff --git a/docs/index.org b/docs/index.org index a7692b66d..69c371e22 100644 --- a/docs/index.org +++ b/docs/index.org @@ -63,7 +63,7 @@ s= (or =C-h d s=). * Community Resources ** Asking for help -- [[https://discord.gg/bcZ6P3y][Our Discord server]] +- [[https://discord.gg/64QNqtq][Our Discord server]] - [[https://github.com/hlissner/doom-emacs/issues][Our issue tracker]] ** Project roadmap From 9fa78f6a64345a55f081d2a01540060d94656363 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 27 Jan 2020 23:58:32 -0500 Subject: [PATCH 728/983] Update discord link again First link wasn't a permanent link. Whoops! --- README.md | 4 ++-- docs/contributing.org | 2 +- docs/faq.org | 2 +- docs/getting_started.org | 4 ++-- docs/index.org | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index eea060fb1..7f3af56eb 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Build status: develop - + Join our discord server

@@ -171,7 +171,7 @@ you can do to help; I welcome any contribution! [doom:bindings]: modules/config/default/+evil-bindings.el [doom:packages]: core/autoload/packages.el [doom:popups]: modules/ui/popup/README.org -[url:discord]: https://discord.gg/64QNqtq +[url:discord]: https://discord.gg/qvGgnVx [url:liberapay]: https://liberapay.com/hlissner/donate [url:paypal]: https://paypal.me/henriklissner/10 [url:editorconfig]: http://editorconfig.org/ diff --git a/docs/contributing.org b/docs/contributing.org index ef2d7f21f..c276456e8 100644 --- a/docs/contributing.org +++ b/docs/contributing.org @@ -7,7 +7,7 @@ shortage of things that need doing; bugs that need stomping, features that need implementing, and documentation that needs documenting. If Doom's been useful to you, convert some caffiene into code; it'd be a huge help! -You are welcome to [[https://discord.gg/64QNqtq][join us on our Discord server]], otherwise read on to learn how +You are welcome to [[https://discord.gg/qvGgnVx][join us on our Discord server]], otherwise read on to learn how to contribute to our fine corner of the interwebs. * Table of Contents :TOC_3: diff --git a/docs/faq.org b/docs/faq.org index c1282684b..09cb7a5cd 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -944,7 +944,7 @@ issues #1 and #3: generate an envvar file by running ~doom env~. This scrapes your shell environment into a file that is loaded when Doom Emacs starts up. Check out ~doom help env~ for details on how this works. -For issue #2, you'll need to investigate your launcher. [[https://discord.gg/64QNqtq][Our Discord]] is a good +For issue #2, you'll need to investigate your launcher. [[https://discord.gg/qvGgnVx][Our Discord]] is a good place to ask about it. ** There's artefacting on my icon fonts in GUI Emacs ([[https://github.com/hlissner/doom-emacs/issues/956][#956]]) diff --git a/docs/getting_started.org b/docs/getting_started.org index c6936a9d1..73f67effc 100644 --- a/docs/getting_started.org +++ b/docs/getting_started.org @@ -7,7 +7,7 @@ of your new puppy slash operating system. This guide will walk you through installing, using, configuring and troubleshooting Doom Emacs. #+begin_quote -If you feel like we've missed something, [[https://discord.gg/64QNqtq][join us on our Discord server]] and let +If you feel like we've missed something, [[https://discord.gg/qvGgnVx][join us on our Discord server]] and let us know! #+end_quote @@ -1125,7 +1125,7 @@ You can also evaluate code with ~eval-expression~ (=M-;= or =SPC ;=). ** How to extract a backtrace from an error If you encounter an error while using Doom Emacs, you're probably about to head -off and file a bug report (or request help on [[https://discord.gg/64QNqtq][our Discord server]]). Before you +off and file a bug report (or request help on [[https://discord.gg/qvGgnVx][our Discord server]]). Before you do, please generate a backtrace to include with it. To do so you must enable ~debug-on-error~ then recreate the error. diff --git a/docs/index.org b/docs/index.org index 69c371e22..48c9b829a 100644 --- a/docs/index.org +++ b/docs/index.org @@ -63,7 +63,7 @@ s= (or =C-h d s=). * Community Resources ** Asking for help -- [[https://discord.gg/64QNqtq][Our Discord server]] +- [[https://discord.gg/qvGgnVx][Our Discord server]] - [[https://github.com/hlissner/doom-emacs/issues][Our issue tracker]] ** Project roadmap From 665b627b7c07c8d29ec8d334588cecc2ba308248 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 28 Jan 2020 03:25:37 -0500 Subject: [PATCH 729/983] Update & revise docs + Getting Started + Add "Using/loading local packages" section + Add "Pinning packages to specific commits" section + Clarify prereqs & revise install docs + Revise package-management section + FAQ + Add package management section --- docs/contributing.org | 43 +- docs/faq.org | 82 ++-- docs/getting_started.org | 946 ++++++++++++++++++++++----------------- docs/index.org | 1 + docs/workflow.org | 20 +- 5 files changed, 610 insertions(+), 482 deletions(-) diff --git a/docs/contributing.org b/docs/contributing.org index c276456e8..fe3525faa 100644 --- a/docs/contributing.org +++ b/docs/contributing.org @@ -32,19 +32,20 @@ to contribute to our fine corner of the interwebs. - [[#contributing-documentation][Contributing documentation]] - [[#contributing-to-dooms-manual][Contributing to Doom's manual]] - [[#contributing-module-documentation][Contributing module documentation]] +- [[#help-keep-packages-up-to-date][Help keep packages up-to-date!]] - [[#other-ways-to-support-doom-emacs][Other ways to support Doom Emacs]] - [[#special-thanks][Special thanks]] * Where can I help? + Our [[https://github.com/hlissner/doom-emacs/issues][issue tracker]] has many issues. If you find one that you have an answer to, - please don't hold back! + it would be a huge help! + Look for issues tagged [[https://github.com/hlissner/doom-emacs/labels/good%20first%20issue][good first issue]]. These were judged to have a low barrier of entry. + Look for issues tagged [[https://github.com/hlissner/doom-emacs/labels/help%20wanted][help wanted]]. These tend to be a little (or a lot) harder, and are issues outside my own expertise. + If you've encountered a bug, [[https://github.com/hlissner/doom-emacs/issues/new/choose][file a bug report]]. + The [[https://github.com/hlissner/doom-emacs/projects/3][development roadmap board]] is a rough timeline of what is being worked on - and when. It will give you some idea of what will change and where you can + and when. It will give you an idea of what will change and where you can redirect your efforts. + The [[https://github.com/hlissner/doom-emacs/projects/2][plugins under review board]] lists third party plugins being considered (or rejected) for inclusion in Doom Emacs. Approved and unclaimed packages are @@ -54,30 +55,21 @@ to contribute to our fine corner of the interwebs. cause) perhaps you can address them at the source. * TODO Reporting issues -So you've found a problem. Before you fire off that bug report, there are a few -things you should try first: +You've found a problem and you're ready to fire off that bug report. Hold up! +Before you do that, [[file:getting_started.org::*Troubleshoot][have a look at our Troubleshooting guide]]. If none of these +suggestions pan out, /then/ it is time to file a bug report. -+ Make sure your configuration (or Doom Emacs) is *not* byte-compiled. Run ~doom - clean~ to ensure it isn't. *Byte-compilation interferes with debugging!* -+ Run ~bin/doom refresh~ to ensure all plugins are installed and autoload files - generated. -+ Run ~bin/doom doctor~ to diagnose common issues with your system. -+ Check [[file:faq.org::*Common%20Issues][Common Issues]] in the FAQ to see if yours is a known issue. -+ If you happen to know what module(s) are relevant to your issue, check their - documentation (press = h m= to jump to a module's documentation). Your - issue may be documented. -+ If possible, check if the issue can be reproduced in vanilla Emacs (Emacs - without Doom) and/or vanilla Doom (Doom without your private config). To test - this, use ~M-x doom/sandbox~ (bound to = h E=). [[file:getting_started.org::*Use the sandbox][A guide for using the - sandbox can be found in the manual]]. -+ Make sure your issue hasn't already been reported by searching the [[https://github.com/hlissner/doom-emacs/issues][issue - tracker]]. -+ Make sure your issue hasn't been resolved on the =develop= branch of Doom. +An effective bug report is informative. Please try to provide: -If these suggestions haven't worked for you, it's time [[https://github.com/hlissner/doom-emacs/issues/new/choose][to write a bug report]]. -Please make sure of the following before you submit: ++ A backtrace of all mentioned errors. ++ A step-by-step reproduction of the issue. ++ Information about your Doom config and system environment. ++ Screenshots/casts of the issue (if possible). -** TODO Collect backtraces of any error messages +This section will show you how to collect this information. + +** Acquire a backtrace from errors +See "[[file:getting_started.org::*How to extract a backtrace from an error][How to extract a backtrace from an error]]" in the [[file:getting_started.org][Getting Started]] guide. ** TODO Create a step-by-step reproduction guide @@ -165,6 +157,11 @@ contact via our [[https://discord.gg/bcZ6P3y][Discord server]] or [[mailto:henri ** TODO Contributing module documentation +* TODO Help keep packages up-to-date! +Doom pins all its packages to reduce the likelihood of upstream breakage leaking +into Doom Emacs. However, we may miss when a package releases hotfixes for +critical issues. Let us know or PR a bump to our pinned packages. + * TODO Other ways to support Doom Emacs * TODO Special thanks diff --git a/docs/faq.org b/docs/faq.org index 09cb7a5cd..c966f780c 100644 --- a/docs/faq.org +++ b/docs/faq.org @@ -20,11 +20,6 @@ - [[#should-i-fork-doom-to-customize-it][Should I fork Doom to customize it?]] - [[#how-do-i-configure-doom-emacs][How do I configure Doom Emacs?]] - [[#how-do-i-enable-or-disable-a-doom-module][How do I enable or disable a Doom module?]] - - [[#how-do-i-install-a-package-from-elpa][How do I install a package from ELPA?]] - - [[#how-do-i-install-a-package-from-githubanother-source][How do I install a package from github/another source?]] - - [[#how-do-i-change-where-an-existing-package-is-installed-from][How do I change where an existing package is installed from?]] - - [[#how-do-i-disable-a-package-completely][How do I disable a package completely?]] - - [[#how-do-i-reconfigure-a-package-included-in-doom][How do I reconfigure a package included in Doom?]] - [[#how-do-i-change-the-theme][How do I change the theme?]] - [[#how-do-i-change-the-fonts][How do I change the fonts?]] - [[#how-do-i-bind-my-own-keys-or-change-existing-ones][How do I bind my own keys (or change existing ones)?]] @@ -39,6 +34,13 @@ - [[#when-should-and-shouldnt-i-use-bindoom][When should and shouldn't I use ~bin/doom~?]] - [[#when-to-run-doom-sync][When to run ~doom sync~]] - [[#how-to-suppress-confirmation-prompts-while-bindoom-is-running][How to suppress confirmation prompts while ~bin/doom~ is running]] +- [[#package-management][Package Management]] + - [[#how-do-i-install-a-package-from-elpa][How do I install a package from ELPA?]] + - [[#how-do-i-install-a-package-from-githubanother-source][How do I install a package from github/another source?]] + - [[#how-do-i-change-where-an-existing-package-is-installed-from][How do I change where an existing package is installed from?]] + - [[#how-do-i-disable-a-package-completely][How do I disable a package completely?]] + - [[#how-do-i-reconfigure-a-package-included-in-doom][How do I reconfigure a package included in Doom?]] + - [[#where-does-straight-clonebuild-packages-to][Where does straight clone/build packages to?]] - [[#defaults][Defaults]] - [[#why-ivy-over-helm][Why Ivy over Helm?]] - [[#why-are-there-no-default-keybinds-for-smartparens-for-evil-users][Why are there no default keybinds for Smartparens (for evil users)?]] @@ -437,53 +439,6 @@ module list with Doom. See the "[[file:getting_started.org::*Configuration modules][Configuration modules]]" section of the [[file:getting_started.org][Getting Started]] guide for more information. -** How do I install a package from ELPA? -See the "[[file:getting_started.org::*Installing%20packages][Installing packages]]" section of the [[file:getting_started.org][Getting Started]] guide. - -** How do I install a package from github/another source? -See the "[[file:getting_started.org::*Installing%20packages%20from%20external%20sources][Installing packages from external sources]]" section of the [[file:getting_started.org][Getting -Started]] guide. - -** How do I change where an existing package is installed from? -See the "[[file:getting_started.org::*Changing%20a%20built-in%20recipe%20for%20a%20package][Changing a built-in recipe for a package]]" section of the [[file:getting_started.org][Getting -Started]] guide. - -** How do I disable a package completely? -See the "[[file:getting_started.org::*Disabling%20packages][disabling packages]]" section of the [[file:getting_started.org][Getting Started]] guide. - -** How do I reconfigure a package included in Doom? -~use-package!~ and ~after!~ (wrappers around ~use-package~ and -~eval-after-load~, respectively) are your bread and butter for configuring -packages in Doom. - -#+BEGIN_SRC elisp -;; Takes a feature symbol or a library name (string) -(after! evil - (setq evil-magic nil)) - -;; Takes a major-mode, a quoted hook function or a list of either -(add-hook! python-mode - (setq python-shell-interpreter "bpython")) - -(use-package! hl-todo - ;; if you omit :defer, :hook, :commands, or :after, then the package is loaded - ;; immediately. By using :hook here, the `hl-todo` package won't be loaded - ;; until prog-mode-hook is triggered (by activating a major mode derived from - ;; it, e.g. python-mode) - :hook (prog-mode . hl-todo-mode) - :init - ;; code here will run immediately - :config - ;; code here will run after the package is loaded - (setq hl-todo-highlight-punctuation ":")) - -;; There's also `setq-hook!' for setting variables buffer-locally -(setq-hook! python-mode python-indent-offset 2) -#+END_SRC - -See the "[[file:getting_started.org::*Configuring%20Doom][Configuring Doom]]" section of the [[file:getting_started.org][Getting Started]] guide for more -explanation and examples. - ** How do I change the theme? There are two ways to load a theme. Both assume the theme is installed and available. You can either set ~doom-theme~ or manually load a theme with the @@ -755,6 +710,29 @@ doom --yes update YES=1 doom update #+END_SRC +* Package Management +** How do I install a package from ELPA? +See the "[[file:getting_started.org::*Installing%20packages][Installing packages]]" section of the [[file:getting_started.org][Getting Started]] guide. + +** How do I install a package from github/another source? +See the "[[file:getting_started.org::*Installing%20packages%20from%20external%20sources][Installing packages from external sources]]" section of the [[file:getting_started.org][Getting +Started]] guide. + +** How do I change where an existing package is installed from? +See the "[[file:getting_started.org::*Changing a recipe for a included package][Changing a recipe for a included package]]" section of the [[file:getting_started.org][Getting +Started]] guide. + +** How do I disable a package completely? +See the "[[file:getting_started.org::*Disabling%20packages][disabling packages]]" section of the [[file:getting_started.org][Getting Started]] guide. + +** How do I reconfigure a package included in Doom? +See the "[[file:getting_started.org::*Configuring packages][configuring packages]]" section of the Getting Started guide. + +** Where does straight clone/build packages to? +Straight clones packages to =~/.emacs.d/.local/straight/repos/REPO-NAME=, then +later symlinks and byte-compiles them to +=~/.emacs.d/.local/straight/build/PACKAGE-NAME= when they are "built". + * Defaults ** Why Ivy over Helm? Short answer: ivy is simpler to maintain. diff --git a/docs/getting_started.org b/docs/getting_started.org index 73f67effc..33e3febc7 100644 --- a/docs/getting_started.org +++ b/docs/getting_started.org @@ -19,52 +19,57 @@ us know! - [[#ubuntu][Ubuntu:]] - [[#nixos][NixOS]] - [[#on-macos][On macOS]] - - [[#where-not-to-install-emacs-from][Where *not* to install Emacs from]] + - [[#with-homebrew][With Homebrew]] + - [[#with-macports][With MacPorts]] - [[#on-windows][On Windows]] - [[#chocolatey--scoop][chocolatey / scoop]] - [[#wsl][WSL]] - [[#wsl2][WSL2]] - [[#doom-emacs][Doom Emacs]] + - [[#the-bindoom-utility][The ~bin/doom~ utility]] - [[#install-doom-manually][Install Doom Manually]] - [[#install-doom-alongside-other-configs-with-chemacs][Install Doom alongside other configs (with Chemacs)]] - [[#externalsystem-dependencies][External/system dependencies]] -- [[#update][Update]] - - [[#doom][Doom]] - - [[#plugins][Plugins]] +- [[#update--rollback][Update & Rollback]] - [[#rollback][Rollback]] -- [[#customize][Customize]] - - [[#how-to-enable-or-disable-modules][How to enable or disable modules]] + - [[#updowngrading-emacs][Up/Downgrading Emacs]] +- [[#migrate][Migrate]] + - [[#from-vanilla-emacs][From vanilla Emacs]] + - [[#from-spacemacs][From Spacemacs]] +- [[#configure][Configure]] + - [[#modules][Modules]] - [[#package-management][Package management]] - [[#installing-packages][Installing packages]] - [[#installing-packages-from-external-sources][Installing packages from external sources]] + - [[#pinning-packages-to-specific-commits][Pinning packages to specific commits]] - [[#disabling-packages][Disabling packages]] - - [[#changing-a-built-in-recipe-for-a-package][Changing a built-in recipe for a package]] + - [[#changing-a-recipe-for-a-included-package][Changing a recipe for a included package]] - [[#usingloading-local-packages][Using/loading local packages]] + - [[#adjust-your-load-path][Adjust your ~load-path~]] + - [[#local-repo][:local-repo]] - [[#configuring-doom][Configuring Doom]] - [[#configuring-packages][Configuring packages]] - [[#reloading-your-config][Reloading your config]] - [[#binding-keys][Binding keys]] - - [[#doomdir-file-structure][DOOMDIR file structure]] - [[#writing-your-own-modules][Writing your own modules]] - - [[#structure-of-a-module][Structure of a module]] + - [[#load-order][Load order]] + - [[#location][Location]] + - [[#file-structure][File structure]] - [[#initel][=init.el=]] - [[#configel][=config.el=]] - [[#packagesel][=packages.el=]] - [[#autoloadel-or-autoloadel][=autoload/*.el= OR =autoload.el=]] - [[#doctorel][=doctor.el=]] - [[#additional-files][Additional files]] - - [[#load-order][Load order]] - - [[#module-flags][Module flags]] - - [[#testing-for-flags][Testing for flags]] - - [[#module-settings][Module settings]] + - [[#flags][Flags]] - [[#module-cookies][Module cookies]] + - [[#autodefs][Autodefs]] - [[#common-mistakes-when-configuring-doom-emacs][Common mistakes when configuring Doom Emacs]] - [[#packages-are-eagerly-loaded][Packages are eagerly loaded]] - [[#manual-package-management][Manual package management]] - - [[#using-org-babel-do-load-languages-to-load-your-babel-plugins][Using ~org-babel-do-load-languages~ to load your babel plugins]] + - [[#using-org-babel-do-load-languages-to-load-your-babel-packages][Using ~org-babel-do-load-languages~ to load your babel packages]] - [[#using-delete-trailing-whitespaces-or-whitespace-cleanup-to-manage-leftover-whitespace][Using ~delete-trailing-whitespaces~ or ~whitespace-cleanup~ to manage leftover whitespace]] - [[#troubleshoot][Troubleshoot]] - - [[#ive-run-into-an-issue-where-do-i-start][I've run into an issue, where do I start?]] - [[#looking-up-documentation-and-state-from-within-emacs][Looking up documentation and state from within Emacs]] - [[#variables-functions-faces-etc][Variables, functions, faces, etc.]] - [[#for-doom-modules-packages-autodefs-etc][For Doom Modules, packages, autodefs, etc.]] @@ -81,53 +86,56 @@ us know! - [[#bisecting-doom-emacs][Bisecting Doom Emacs]] * Install -To embark on this grand Emacs adventure, you'll need a couple things installed, -including Emacs (shocking, I know), Doom Emacs, the plugins Doom depends on, and -any external tools /they/ depend on as well. +This is what you'll have installed by the end of this guide: -In summary, you'll be installing: ++ *Required:* + - Git 2.23+ + - Emacs 26.3+ + - [[https://github.com/BurntSushi/ripgrep][ripgrep]] 11.0+ + - GNU Find ++ *Optional:* + - [[https://github.com/sharkdp/fd][fd]] 7.3.0+ -- improves performance for many file indexing commands + - GNU ~tar~ -- needed to read compressed elisp files and install packages with + package.el + - GNU ~ls~ -- to overcome limitations with BSD ls on MacOS or BSD systems + - ~gcc~ or ~clang~ (preferred) -- needed to build some module dependencies + like irony-server, emacsqlite for magit, epdfinfo for pdf-tools or vterm -+ *git* -+ *Emacs 26.1+* -+ *ripgrep* -+ *all-the-icons fonts* -- unnecessary for exclusive use of terminal Emacs - -And then some optional dependencies that you will likely want, as the will -optimize Doom's performance and stability. - -+ [[https://github.com/sharkdp/fd][fd]] -+ *GNU ls* (BSD ls on macOS/BSD Linux has some limitations) -+ *clang* -- with which to compile certain external dependencies, like the - emacsqlite binary, irony server (requires clang), or vterm module - -The following sections will cover how to install Emacs and these dependencies -across various operating systems. +These packages ought to be available through the package managers of most Linux +distributions, or homebrew & macports on macOS, or scoop/chocolatey on Windows. +The following sections will go over how to install them, beginning with Emacs. #+BEGIN_QUOTE -If any of these install instructions are outdated, or your OS is missing, please -help us by [[https://github.com/hlissner/doom-emacs/issues/new][letting us know]] (or correcting it yourself; pull requests are -welcome). +If any of these install instructions are outdated, or instructions for your OS +is missing, [[https://github.com/hlissner/doom-emacs/issues/new/choose][let us know]] (or correct it yourself; pull requests are welcome). #+END_QUOTE ** Emacs & dependencies *** On Linux -Emacs should be available through your distribution's package manager. -Otherwise, it can be [[https://www.gnu.org/software/emacs/manual/html_node/efaq/Installing-Emacs.html][built from source]]. +In the unusual case that Emacs is unavailable through your package manager, +you'll have to [[https://www.gnu.org/software/emacs/manual/html_node/efaq/Installing-Emacs.html][build it from source]]. Otherwise: **** Arch Linux: #+BEGIN_SRC bash -pacman -S git tar clang emacs ripgrep fd +# required dependencies +pacman -S git emacs ripgrep +# optional dependencies +pacman -S clang tar fd #+END_SRC -Emacs 27 (HEAD) can be installed through [[https://aur.archlinux.org/packages/emacs-git/][emacs-git]], available on the AUR. +The above installs Emacs 26.3 (at the time of writing). If you'd prefer Emacs +27/28 (HEAD), it is available through the AUR in the [[https://aur.archlinux.org/packages/emacs-git/][emacs-git]] package. **** Ubuntu: #+BEGIN_SRC bash -apt-get install git tar clang ripgrep fd-find +# required dependencies +apt-get install git ripgrep +# optional dependencies +apt-get install tar fd-find clang #+END_SRC -On Ubuntu 18.04, the latest version of Emacs available is 25.3 (and 24.3 on -Ubuntu 16 or 14). Therefore, we have a few extra steps to install 26.1+: +Only 25.3 is available on Ubuntu 18.04 (and 24.3 on Ubuntu 14 or 16), which Doom +does not support. Extra steps are necessary to acquire 26.3: #+BEGIN_SRC bash add-apt-repository ppa:kelleyk/emacs @@ -136,82 +144,99 @@ apt-get install emacs26 #+END_SRC **** NixOS -On NixOS Emacs 26.x can be installed via ~nix-env --install emacs~, or more -permanently by adding the following entry to ~etc/nixos/configuration.nix~: +On NixOS Emacs 26.3 can be installed via ~nix-env -Ai nixos.emacs~, or +permanently with the following added to ~etc/nixos/configuration.nix~: #+BEGIN_SRC nix environment.systemPackages = with pkgs; [ - coreutils # basic GNU utilities + # required dependencies git - clang - emacs + emacs # Emacs 26.3 ripgrep + # optional dependencies + coreutils # basic GNU utilities fd + clang +]; +#+END_SRC + +To acquire Emacs 27/28+, look into [[https://github.com/nix-community/emacs-overlay/issues][nix-community/emacs-overlay]], which can be +quickly integrated into your configuration.nix with: + +#+BEGIN_SRC nix +nixpkgs.overlays = [ + (import (builtins.fetchTarball https://github.com/nix-community/emacs-overlay/archive/master.tar.gz)) +]; + +environment.systemPackages = with pkgs; [ + emacsGit ]; #+END_SRC *** On macOS -MacOS users have many options for installing Emacs, but they are not created -equal. First, a package manager must be installed. You have a choice between -Homebrew and MacPorts (you only need one): +MacOS users have many options for installing Emacs, but not all of them are well +suited to Doom. Before we get to that you'll need either the Homebrew or +MacPorts package manager installed (you only need one): -+ [[http://brew.sh/][Install Homebrew]] -+ [[https://www.macports.org/install.php][Install MacPorts]] ++ [[http://brew.sh/][How to install Homebrew]] ++ [[https://www.macports.org/install.php][How to install MacPorts]] -**** Homebrew -Homebrew users have a number of formulas available to them. Before they can be -installed, start with Doom's dependencies: +**** With Homebrew +First, Doom's dependencies: #+BEGIN_SRC bash -brew install coreutils git ripgrep fd llvm +# required dependencies +brew install git ripgrep +# optional dependencies +brew install coreutils fd +# Installs clang +xcode-select --install #+END_SRC -For Emacs itself these three are the best options, ordered from most to least -recommended for Doom (based on compatibility). - -- [[https://github.com/d12frosted/homebrew-emacs-plus][emacs-plus]] (the safest option): +For Emacs itself, these three formulas are the best options, ordered from most +to least recommended for Doom (based on compatibility). +- [[https://github.com/d12frosted/homebrew-emacs-plus][emacs-plus]]: #+BEGIN_SRC bash brew tap d12frosted/emacs-plus brew install emacs-plus ln -s /usr/local/opt/emacs-plus/Emacs.app /Applications/Emacs.app #+END_SRC -- [[https://formulae.brew.sh/formula/emacs][emacs]] is another acceptable option. - - #+BEGIN_SRC bash - brew install emacs - #+END_SRC - - [[https://bitbucket.org/mituharu/emacs-mac/overview][emacs-mac]] is another acceptable option. It offers slightly better integration with macOS, native emojis and better childframe support. However, at the time - of writing, it [[https://github.com/railwaycat/homebrew-emacsmacport/issues/52][lacks multi-tty support]] (which impacts daemon usage). - + of writing, it [[https://github.com/railwaycat/homebrew-emacsmacport/issues/52][lacks multi-tty support]] (which impacts daemon usage): #+BEGIN_SRC bash brew tap railwaycat/emacsmacport brew install emacs-mac ln -s /usr/local/opt/emacs-mac/Emacs.app /Applications/Emacs.app #+END_SRC +- [[https://formulae.brew.sh/formula/emacs][emacs]] is another acceptable option, **but does not provide a Emacs.app**: + #+BEGIN_SRC bash + brew install emacs + #+END_SRC + ***** Where *not* to install Emacs from These builds/forks have known compatibility issues with Doom and are *very -likely* to cause you issues later on. Do not use them: +likely* to cause issues later on. Do not use them: + emacsformacosx.com + ~brew cask install emacs~ (installs from emacsformacosx.com) + AquaMacs + XEmacs -**** MacPorts -There are four ports (at writing) available through MacPorts: +**** With MacPorts +There are four ports (at time of writing) available through MacPorts, and they +are all acceptable options: + [[https://ports.macports.org/port/emacs/summary][emacs]] (26.3) and [[https://ports.macports.org/port/emacs-devel/summary][emacs-devel]] (27) -- Installs terminal-only Emacs + [[https://ports.macports.org/port/emacs-app/summary][emacs-app]] (26.3), [[https://ports.macports.org/port/emacs-app-devel/summary][emacs-app-devel]] (27) -- Installs GUI Emacs + [[https://ports.macports.org/port/emacs-mac-app/summary][emacs-mac-app]] (26.3) -- the [[https://bitbucket.org/mituharu/emacs-mac][Mitsuharu Yamamoto mac port]] Some of these ports do not add an =emacs= binary to your ~PATH~, which is -necessary for Doom's installation. This can be fixed by adding the following to -your shell config: +necessary for Doom's installation process. You'll have to do so yourself by +adding this to your shell config: #+BEGIN_SRC sh # Add this to ~/.zshrc or ~/.bash_profile @@ -226,100 +251,104 @@ Or by creating a shim script at ~/usr/local/bin/emacs~: #+END_SRC *** On Windows -*Support for Windows is immature,* so your mileage will vary. Some have reported -success with installing Doom via WSL, chocolatey on git-bash or cygwin. +*Support for Windows is immature* so your mileage there will vary. Some have +reported success using Doom with WSL or WSL2. The maintainer has only (lightly) +tested installing Doom with chocolatey through [[https://gitforwindows.org/][git-bash]]. #+BEGIN_QUOTE -If you manage to get Doom on Windows and found this wasn't enough, or could be -improved, please help us expand this section! +If you manage to get Doom running on Windows and found this guide wasn't enough +or could be improved, please help us expand this section! #+END_QUOTE **** [[https://chocolatey.org/][chocolatey]] / scoop Chocolatey is the simplest to get Doom up and running with: #+BEGIN_SRC sh -choco install git llvm emacs ripgrep fd +choco install git emacs ripgrep fd llvm #+END_SRC #+begin_quote -You can also use [[https://scoop.sh/][scoop]] by simply replacing ~choco~ with ~scoop~ in the above -snippet to achieve the same result. This hasn't been tested, however. +Switching out choco for [[https://scoop.sh/][scoop]] should just work, but it hasn't been tested. #+end_quote -You will also need to [[https://mywindowshub.com/how-to-edit-system-environment-variables-for-a-user-in-windows-10/][add a ~HOME~ system variable]], pointing to -=C:\Users\USERNAME\=, otherwise Emacs will treat -=C:\Users\USERNAME\AppData\Roaming= is your ~HOME~, which causes issues. +You will need [[https://mywindowshub.com/how-to-edit-system-environment-variables-for-a-user-in-windows-10/][the ~HOME~ system variable]] set to =C:\Users\USERNAME\=, otherwise +Emacs will treat =C:\Users\USERNAME\AppData\Roaming= as your ~HOME~, which +causes issues. It's also a good idea to add =C:\Users\USERNAME\.emacs.d\bin= to your ~PATH~. +#+begin_quote +A pre-existing PATH variable should already exist among your system variables. +It contains a string of file paths separated by colons; ~pathA:pathB:pathC~. +Prepend the path to bin/doom to that string: +~C:\Users\username\.emacs.d\bin:pathA:pathB:pathC~ +#+end_quote + **** TODO WSL **** TODO WSL2 ** Doom Emacs -The quickest way to get Doom up and running is: +With Emacs and Doom's dependencies installed, next is to install Doom Emacs +itself: #+BEGIN_SRC bash git clone https://github.com/hlissner/doom-emacs ~/.emacs.d ~/.emacs.d/bin/doom install #+END_SRC -=doom install= performs the following for you: - -1. It creates your =DOOMDIR= at =~/.doom.d=, if it (or =~/.config/doom=) don't - already exist. -2. Copies =~/.emacs.d/init.example.el= to =$DOOMDIR/init.el=, which contains a - ~doom!~ statement that controls what modules to enable and in what order they - are loaded. -3. Creates dummy config.el and packages.el files in ~$DOOMDIR~. -4. Optionally generates an envvar file (equivalent to using ~doom env~), which - stores your shell environment in an env file that Doom will load at startup. - *This is essential for macOS users!* -5. Installs all dependencies for enabled modules (specified by - =$DOOMDIR/init.el=), -6. And prompts to install the icon fonts required by the [[https://github.com/domtronn/all-the-icons.el][all-the-icons]] package. +=doom install= will set up your =DOOMDIR= at =~/.doom.d= (if it doesn't already +exist) and will work you through the first-time setup of Doom Emacs. #+BEGIN_QUOTE -You'll find a break down of ~doom install~ into shell commands in the next -section. +If you'd like a more technical break down of ~doom install~, it's been +translated into shell commands below, in the "Install Doom Manually" section. #+END_QUOTE -Consider the =~/.emacs.d/bin/doom= script your new best friend. It performs a -variety of essential functions to help you manage your Doom Emacs configuration, -not least of which is installing or updating it or its plugins. If nothing else, -get to know these four commands: +*** The ~bin/doom~ utility +This utility is your new best friend. It won't spot you a beer, but it'll +shoulder much of the work associated with managing and maintaining your Doom +Emacs configuration, and then some. Not least of which is installation of and +updating Doom and your installed packages. -- ~doom refresh~: Ensures that Doom is in a proper state to be used (i.e. needed - packages are installed, orphaned packages are removed and necessary metadata - correctly generated). -- ~doom upgrade~: Updates Doom Emacs (if available) and its packages. -- ~doom env~: Generates an "envvar file", which scrapes your shell environment - into a file that is loaded by Doom Emacs at startup. This is especially - necessary for macOS users who open Emacs through an Emacs.app bundle. -- ~doom doctor~: If Doom misbehaves, the doc will diagnose common issues with - your installation and environment. If all else fails, you'll find help on - Doom's [[https://discord.gg/bcZ6P3y][Discord server]] and [[https://github.com/hlissner/doom-emacs/issues][issue tracker]]. +It exposes a variety of commands. ~bin/doom help~ will list them all, but here +is a summary of the most important ones: -Run ~doom help ~ for documentation on these commands, or ~doom help~ -for an overview of what the =bin/doom= script is capable of. ++ ~bin/doom sync~: This synchronizes your config with Doom Emacs. It ensures + that needed packages are installed, orphaned packages are removed and + necessary metadata correctly generated. Run this whenever you modify your + ~doom!~ block or =packages.el= file. ++ ~bin/doom upgrade~: Updates Doom Emacs (if available) and all its packages. ++ ~bin/doom env~: (Re)generates an "envvar file", which is a snapshot of your + shell environment that Doom loads at startup. If your app launcher or OS + launches Emacs in the wrong environment you will need this. **This is required + for GUI Emacs users on MacOS.** ++ ~bin/doom doctor~: If Doom misbehaves, the doc will diagnose common issues + with your installation, system and environment. ++ ~bin/doom purge~: Over time, the repositories for Doom's plugins will + accumulate. Run this command from time to time to delete old, orphaned + packages, and with the ~-g~ switch to compact existing package repos. + +Use ~bin/doom help~ to see an overview of the available commands that =bin/doom= +provides, and ~bin/doom help COMMAND~ to display documentation for a particular +~COMMAND~. #+begin_quote I recommend you add =~/.emacs.d/bin= to your ~PATH~ so you can call =doom= -directly, from anywhere. You don't need to be CDed into =~/.emacs.d/bin= to use -it. A quick way to do so is to add this to your .bashrc or .zshrc file: +directly and from anywhere. Accomplish this by adding this to your .bashrc or +.zshrc file: ~export PATH="$HOME/.emacs.d/bin:$PATH"~ #+end_quote *** Install Doom Manually -If you'd rather install Doom yourself, without the magic of =bin/doom install=, -here is its equivalent in bash shell commands: +If you'd rather install Doom yourself, instead of rely on the magic of =bin/doom +install=, here is its equivalent in bash shell commands (assuming +=hlissner/doom-emacs= has been cloned to =~/.emacs.d=): #+BEGIN_SRC bash -git clone https://github.com/hlissner/doom-emacs ~/.emacs.d - # So we don't have to write ~/.emacs.d/bin/doom every time -export PATH="$HOME/.emacs.d/bin:$PATH" +PATH="$HOME/.emacs.d/bin:$PATH" # Create a directory for our private config mkdir ~/.doom.d # or ~/.config/doom @@ -327,6 +356,8 @@ mkdir ~/.doom.d # or ~/.config/doom # The init.example.el file contains an example doom! call, which tells Doom what # modules to load and in what order. cp ~/.emacs.d/init.example.el ~/.doom.d/init.el +cp ~/.emacs.d/core/templates/config.example.el ~/.doom.d/config.el +cp ~/.emacs.d/core/templates/packages.example.el ~/.doom.d/packages.el # If your ISP or proxy doesn't allow you to install from # raw.githubusercontent.com, then you'll have to install straight (our package @@ -334,42 +365,42 @@ cp ~/.emacs.d/init.example.el ~/.doom.d/init.el mkdir -p ~/.emacs.d/.local/straight/repos git clone -b develop https://github.com/raxod502/straight.el ~/.emacs.d/.local/straight/repos/straight.el -# Edit ~/.doom.d/init.el and adjust the modules list to your liking before -# running this: -doom install +# You might want to edit ~/.doom.d/init.el here and make sure you only have the +# modules you want enabled. + +# Then synchronize Doom with your config: +doom sync # If you know Emacs won't be launched from your shell environment (e.g. you're # on macOS or use an app launcher that doesn't launch programs with the correct -# shell), then creating an envvar file is necessary to ensure Doom inherits your -# shell environment. +# shell) then create an envvar file to ensure Doom correctly inherits your shell +# environment. # -# If you don't know whether you need this or not, no harm in doing it anyway. -# `doom install` will prompt you to generate an envvar file. If you responded -# no, you can generate it later with the following command: +# If you don't know whether you need this or not, there's no harm in doing it +# anyway. `doom install` will have prompted you to generate one. If you +# responded no, you can generate it later with the following command: doom env -# Install the icon fonts Doom uses +# Lastly, install the icon fonts Doom uses: emacs --batch -f all-the-icons-install-fonts #+END_SRC To understand the purpose of the =~/.doom.d= directory and =~/.doom.d/init.el= -file, see the [[#customize][Customize]] section further below. +file, see the [[#configure][Configure]] section further below. *** Install Doom alongside other configs (with Chemacs) -[[https://github.com/plexus/chemacs][Chemacs]] is a bootloader for Emacs; it makes it easy to switch between multiple +[[https://github.com/plexus/chemacs][Chemacs]] is a bootloader for Emacs. It allows you to switch between multiple Emacs configurations. Here is a quick guide for setting it up with Doom Emacs as -the default config. +the default config: 1. First, install Doom somewhere: - - #+BEGIN_SRC sh + #+BEGIN_SRC sh :eval no git clone https://github.com/hlissner/doom-emacs ~/doom-emacs ~/doom-emacs/bin/doom install #+END_SRC 2. Download [[https://raw.githubusercontent.com/plexus/chemacs/master/.emacs][the Chemacs' startup script]] to =~/.emacs=: - - #+BEGIN_SRC bash + #+BEGIN_SRC bash :eval no wget -O ~/.emacs https://raw.githubusercontent.com/plexus/chemacs/master/.emacs #+END_SRC @@ -380,8 +411,7 @@ the default config. 3. Create =~/.emacs-profiles.el= with a list of your Emacs profiles. This file is structured like a =.dir-locals.el= file. Here is an example with Doom (as the default), Spacemacs, and Prelude: - - #+BEGIN_SRC emacs-lisp + #+BEGIN_SRC emacs-lisp :eval no (("default" . ((user-emacs-directory . "~/doom-emacs"))) ("spacemacs" . ((user-emacs-directory . "~/spacemacs"))) ("prelude" . ((user-emacs-directory . "~/prelude")))) @@ -396,43 +426,35 @@ emacs --with-profile spacemacs If no profile is specified, the =default= profile is used. ** External/system dependencies -Your system, your rules. There are as many ways to set up a programming -environment as there are dislikes on Youtube Rewind 2018, so Doom entrusts this -task to you, dear user. - Doom is comprised of modules which provide most of its features, including -language support and integration with external tools. However, some of these -have external dependencies that you must install yourself. You'll find what -modules need what and how to install them in that module's README.org file. If -you find a module without a README file, helps us out by creating one for us! - -~doom doctor~ will provide an overview of missing dependencies (only for the -modules you have enabled) by reporting which ones haven't been installed yet. -Once you know what's missing, have a look at the documentation for that module. - -Use ~M-x doom/help-modules~ (bound to =SPC h d m=) to quickly jump to a module's -documentation from inside Doom. Otherwise, check out the [[file:index.org::*Module list][Module Index]]. - -* Update -Doom is an active project and many of its 300+ plugins are in active development -as well. It is wise to occasionally update them. The following section will go -over how to do so. +language support and integration with external tools. Many of them have external +dependencies that you must install yourself. You'll find what a module needs and +how to install them in that module's README.org file or by running ~bin/doom +doctor~. #+begin_quote -*Important: you may encounter errors after up/downgrading Emacs.* Emacs bytecode -is not forward compatible, so you must recompile or reinstall your plugins to -fix this, i.e. +Use ~M-x doom/help-modules~ (bound to =SPC h d m= or =C-h d m=) to jump to a +module's documentation from within Doom, otherwise, place your cursor on a +module in your ~doom!~ block (in =~/.doom.d/init.el=) and press =K= to jump to +its documentation (or =gd= to jump to its source code). =C-c g k= and =C-c g d= +for non-evil users, respectively. -+ ~doom build~, to rebuild all your installed plugins, -+ Or delete =~/.emacs.d/.local= then ~doom refresh~ to reinstall them +Otherwise, check out the [[file:modules.org][Module Index]]. + +Keep in mind that documentation is an ongoing effort. Some modules may not have +README.org files yet. #+end_quote -** Doom -The =bin/doom= script provides a simple command for upgrading Doom (which will -also update your plugins): +* Update & Rollback +Doom is an active project and many of its 300+ packages are in active +development as well. It is wise to occasionally update. Doom strives to make +this as painless a process as possible. -#+BEGIN_SRC bash -doom upgrade # short version: doom up +The =bin/doom= script provides one simple command for upgrading Doom and your +packages: + +#+BEGIN_SRC bash :eval no +doom upgrade # or 'doom up' #+END_SRC If you want to update Doom manually, ~doom upgrade~ is equivalent to: @@ -440,45 +462,106 @@ If you want to update Doom manually, ~doom upgrade~ is equivalent to: #+BEGIN_SRC bash cd ~/.emacs.d git pull # updates Doom -doom refresh # refreshes plugins & autoloads -doom update # updates installed plugins +doom clean # Ensure your config isn't byte-compiled +doom sync # synchronizes your config with Doom Emacs +doom update # updates installed packages #+END_SRC +To upgrade only your packages (and not Doom itself): + +#+BEGIN_SRC bash +doom upgrade --packages +#+END_SRC + +#+begin_quote To minimize issues while upgrading, avoid modifying Doom's source files. All -your customization should be kept in your =DOOMDIR= (typically, =~/.doom.d=). -Read the [[#customize][Customize]] section for more on configuring Doom. +your customization should be kept in your =DOOMDIR= (e.g. =~/.doom.d=). Read the +[[#Configure][Configure]] section for more on configuring Doom. +#+end_quote -** Plugins -To update /only/ your plugins (i.e. not Doom), run ~doom update~ (short version: -~doom u~). - -** Rollback +** TODO Rollback The =bin/doom= script doesn't currently offer rollback support for Doom or its -plugins (yet). +packages (yet). -* Customize -Your private configuration is located in =~/.doom.d=, by default (if -=~/.config.d/doom= exists, that will be used instead). This directory is -referred to as your ~$DOOMDIR~ or your "private module". +** Up/Downgrading Emacs +*Important: you may encounter errors after up/downgrading Emacs.* Emacs bytecode +is generally not forward compatible. You will have to recompile or reinstall +your packages to fix this, i.e. -~doom install~ will create three files in your DOOMDIR to start you off: ++ ~doom build~, to rebuild all your installed packages, ++ Or delete =~/.emacs.d/.local= then ~doom sync~ to reinstall them -+ init.el :: This is where you'll find your ~doom!~ block, which controls what - modules are enabled and in what order they are loaded. This is copied from - =~/.emacs.d/init.example.el=. -+ config.el :: This is where the bulk of your private configuration will go. -+ packages.el :: This is where you tell Doom what packages you want to install - and where from. +* TODO Migrate +If you're here from another Emacs distribution (or your own), here are a few +things to be aware of while you convert your old config to Doom: -** How to enable or disable modules -Every private config starts with a ~doom!~ block, found in =$DOOMDIR/init.el=. -If you followed the Doom installation instructions and ran ~doom install~, this -file should exist and will contain one. ++ Doom does not use =package.el= to manage its packages, but ~use-package~ does! + You will see errors if you have ~:ensure ...~ properties in your ~use-package~ + blocks. Remove these and, instead, add ~package!~ declarations to + =~/.doom.d/packages.el= to install your packages. -This block controls what modules are enabled and in what order they are loaded. -To enable a module, add it to this list. To disable it, either remove it or -comment it out (in Emacs Lisp, anything following a semicolon is ignored by the -Elisp interpreter; i.e. it's "commented out"). + See [[*Package management]["Package Management"]], earlier in this guide. + +(This section is incomplete) + +** TODO From vanilla Emacs +#+begin_quote +Have you migrated from your own config? Help me flesh out this section by +letting me know what kind of hurdles you faced in doing so. You'll find me [[https://discord.gg/qvGgnVx][on +our Discord server]]. +#+end_quote + +** TODO From Spacemacs +#+begin_quote +Have you migrated from Spacemacs? Help me flesh out this section by letting me +know what kind of hurdles you faced in doing so. You'll find me [[https://discord.gg/qvGgnVx][on our Discord +server]]. +#+end_quote + +* Configure +Doom looks for your private configuration in: + +1. =$XDG_CONFIG_HOME/doom= +2. or =~/.doom.d= + +This directory is referred to as your =DOOMDIR=. + +#+begin_quote +You can override the location of your =DOOMDIR= by changing the environment +variable of the same name. Symlinks will work as well. +#+end_quote + +~doom install~ will deploy three files to your =DOOMDIR=: + ++ init.el :: Where you'll find your ~doom!~ block, which controls what Doom + modules are enabled and in what order they will be loaded. + + This file is evaluated early in the startup process, before any other module + has loaded. ++ config.el :: Where 99.99% of your private configuration should go. Anything + put here will run /after/ all other modules have loaded. ++ packages.el :: Where you declare what packages to install and where from. + +#+begin_quote +Note: do not use ~M-x customize~ or the customize API in general. Doom is +designed to be configured programmatically from your config.el, which can +conflict with Customize's way of writing variables to ~custom-file~. + +Doom provides the ~setq!~ macro for triggering ~defcustom~ setters. +#+end_quote + +** Modules +Doom consists of around 130 modules. A Doom module is a bundle of packages, +configuration and commands, organized into a unit that can be enabled or +disabled by adding or removing them from your ~doom!~ block (found in +=$DOOMDIR/init.el=). + +#+begin_quote +If =$DOOMDIR/init.el= doesn't exist, you haven't installed Doom yet. See [[*Install][the +"Install" section]] above. +#+end_quote + +Your ~doom!~ block will look something like this: #+BEGIN_SRC emacs-lisp ;; To comment something out, you insert at least one semicolon before it. The @@ -491,43 +574,51 @@ Elisp interpreter; i.e. it's "commented out"). php) ; this module is enabled #+END_SRC -Some modules have optional features that can be enabled by passing them flags -like so: +It controls what modules are enabled and in what order they are loaded. Some +modules have *optional features* that can be enabled by passing them flags, +denoted by a plus prefix: #+BEGIN_SRC emacs-lisp (doom! :completion (company +auto) :lang (csharp +unity) - (org +attach +babel +capture +export +present +protocol) + (org +brain +dragndrop +gnuplot +hugo +jupyter) (sh +fish)) #+END_SRC -Different modules support different flags. To see a quick list of what modules -support what flags in [[file:index.org::*Module list][the Module Index]]. - -*WARNING:* when changing your ~doom!~ block you *must* run =~/.emacs.d/bin/doom -refresh= and restart Emacs for the changes to take effect. This ensures the -needed packages are installed, orphaned packages are removed, and necessary -metadata for your Doom Emacs config has been generated. - -** Package management -Doom's package manager is declarative. Your ~DOOMDIR~ is a module, and modules -may optionally possess a packages.el file, where you may declare what packages -you want to install (and where from) using the ~package!~ macro. It can be used -to: - -1. Install packages (conditionally, even), -2. Disable packages (uninstalling them and disabling their configuration), -3. Or change where a package is installed from. - -If a package is installed via ELPA and does not have a ~package!~ declaration, -Doom will assume the package is unwanted and uninstall it for you next time -~doom refresh~ is executed. +Different modules support different flags. Flags that a module doesn't recognize +will be silently ignored. You'll find a comprehensive list of available modules +and their supported flags summarized in [[file:index.org::*Module list][the Module Index]]. #+begin_quote -Remember to run ~doom refresh~ after modifying your packages, to ensure they are -installed and properly integrated into Doom. +*IMPORTANT:* don't forget to run =bin/doom sync= after changing your ~doom!~ +block, then restart Emacs for the changes to take effect. +#+end_quote + +#+begin_quote +Run ~doom doctor~ to determine if there are any issues with your ~doom!~ block, +such as duplicate or misspelled modules. +#+end_quote + +** Package management +**Doom Emacs does not use package.el** (the package manager built into Emacs). +Instead, it uses its own declarative package manager built on top of [[https://github.com/raxod502/straight.el][Straight]]. + +#+begin_quote +If you are coming from another Emacs distro (or vanilla Emacs), be wary of the +~:ensure~ property in ~use-package~ blocks, because it will attempt (and fail) +to install packages through package.el. +#+end_quote + +Packages are declared in ~packages.el~ files located in Doom's modules. This +applies to your ~DOOMDIR~ as well, which is considered a module. You can install +your own packages in =~/.doom.d/packages.el=. + +#+begin_quote +If a package is installed without an accompanying ~package!~ declaration (e.g. +with ~M-x package-install~ or ~M-x straight-use-package~), it will be +uninstalled the next time you run ~bin/doom sync~ or ~bin/doom purge~. #+end_quote *** Installing packages @@ -538,22 +629,13 @@ To install a package, add a ~package!~ declaration for it to ;; Install a package named "example" from ELPA or MELPA (package! example) -;; Tell Doom to install it from a particular archive (e.g. elpa). By default, it -;; will search orgmode.org and melpa.org before searching elpa.gnu.org. See -;; `package-archives' to adjust this order (or to see what values :pin will -;; accept). -(package! example :pin "elpa") - -;; Instruct Doom to install this package once, but never update it when you run -;; `doom update` or `doom upgrade`: -(package! example :freeze t) - ;; Or tell Doom to not manage a particular package at all. (package! example :ignore t) #+END_SRC -~package!~ will return non-nil if the package isn't disabled and is cleared for -install. Use this fact to conditionally install other packages, e.g. +~package!~ will return non-nil if the package is cleared for install and hasn't +been disabled elsewhere. Use this fact to chain package dependencies together. +e.g. #+BEGIN_SRC elisp (when (package! example) @@ -568,33 +650,76 @@ Here are a few examples: #+BEGIN_SRC elisp ;; Install it directly from a github repository. For this to work, the package -;; must have an appropriate .el and must have at least a Package-Version -;; or Version line in its header. -(package! example :recipe (:host github :repo "username/my-example-fork")) +;; must have an appropriate PACKAGENAME.el file which must contain at least a +;; Package-Version or Version line in its header. +(package! example + :recipe (:host github :repo "username/my-example-fork")) -;; If the source files for a package are in a subdirectory in said repo, you'll -;; need to specify what files to pull in. +;; If the source files for a package are in a subdirectory in said repo, use +;; `:files' to target them. (package! example :recipe (:host github :repo "username/my-example-fork" :files ("*.el" "src/lisp/*.el"))) -;; To grab a particular commit: +;; To grab a particular branch or tag: (package! example :recipe (:host gitlab :repo "username/my-example-fork" :branch "develop")) ;; If a package has a default recipe on MELPA or emacsmirror, you may omit -;; keywords and the recipe will inherit from their original. +;; keywords and the recipe will inherit the rest of the recipe from their +;; original. (package! example :recipe (:branch "develop")) ;; If the repo pulls in many unneeded submodules, you can disable recursive cloning (package! example :recipe (:nonrecursive t)) + +;; A package can be installed straight from a git repo by setting :host to nil: +(package! example + :recipe (:host nil :repo "https://some/git/repo")) +#+END_SRC + +The specification for the ~package!~ macro's ~:recipe~ is laid out [[https://github.com/raxod502/straight.el#the-recipe-format][in +Straight.el's README]]. + +#+begin_quote +*IMPORTANT:* Run ~bin/doom sync~ whenever you modify packages.el files to +ensure your changes take effect. +#+end_quote + +*** Pinning packages to specific commits +All of Doom's packages are pinned by default. A pinned package is a package +locked to a specific commit, like so: + +#+BEGIN_SRC elisp +(package! evil :pin "e00626d9fd") +#+END_SRC + +To unpin a package, use the ~unpin!~ macro: + +#+BEGIN_SRC elisp +(unpin! evil) + +;; It can be used to unpin multiple packages at once +(unpin! evil helm org-mode) + +;; Or to unpin all packages in modules +(unpin! (:lang python ruby rust) (:tools docker)) + +;; Or to unpin an entire category of modules +(unpin! :completion :lang :tools) +#+END_SRC + +To unpin all packages and make Doom Emacs rolling release, use + +#+BEGIN_SRC elisp +(unpin! t) #+END_SRC *** Disabling packages -The ~package!~ macro possesses a ~:disable~ property. +The ~package!~ macro possesses a ~:disable~ property: #+BEGIN_SRC emacs-lisp (package! irony :disable t) @@ -602,38 +727,83 @@ The ~package!~ macro possesses a ~:disable~ property. #+END_SRC Once a package is disabled, ~use-packages!~ and ~after!~ blocks for it will be -ignored, and the package will be removed the next time you run ~doom refresh~. -Use this to disable undesirable packages included with the built-in modules. +ignored, and the package is removed the next time you run ~bin/doom sync~. Use +this to disable Doom's packages that you don't want or need. -Alternatively, the ~disable-packages!~ macro exists for more concisely disabling -multiple packages: +There is also the ~disable-packages!~ macro for conveniently disabling multiple +packages: #+BEGIN_SRC elisp (disable-packages! irony rtags) #+END_SRC -*** Changing a built-in recipe for a package -If a module installs package X, but you'd like to install it from somewhere else -(say, a superior fork or a fork with a bugfix), simple add a ~package!~ -declaration for it in your =DOOMDIR/packages.el=. Your private declarations -always have precedence over modules (even your own modules). +#+begin_quote +*IMPORTANT:* Run ~bin/doom sync~ whenever you modify packages.el files to +ensure your changes take effect. +#+end_quote + +*** Changing a recipe for a included package +If a Doom module installs package X from one place, but you'd like to install it +from another (say, a superior fork), add a ~package!~ declaration for it in your +=DOOMDIR/packages.el=. Your private declarations always have precedence over +modules (even your own). #+BEGIN_SRC elisp -;; modules/editor/evil/packages.el +;; in modules/editor/evil/packages.el (package! evil) ; installs from MELPA -;; DOOMDIR/packages.el +;; in DOOMDIR/packages.el (package! evil :recipe (:host github :repo "username/my-evil-fork")) #+END_SRC -You will need to run ~doom refresh~ for this change to take effect. +To install a package only if a built-in package doesn't exist, use ~:built-in +'prefer~: -*** TODO Using/loading local packages +#+BEGIN_SRC elisp +(package! so-long :built-in 'prefer) +#+END_SRC + +#+begin_quote +*IMPORTANT:* Run ~bin/doom sync~ whenever you modify packages.el files to +ensure your changes take effect. +#+end_quote + +*** Using/loading local packages +Say you have a local elisp package you want to install. You have two options: + +**** Adjust your ~load-path~ +Emacs searches for packages in your ~load-path~. Add the path to your package +and Emacs will find it when it tries to load it. e.g. + +#+BEGIN_SRC elisp +(add-load-path! "lisp/package") + +;; or + +(use-package my-package + :load-path "/path/to/my/package") +#+END_SRC + +**** :local-repo +Alternatively, you can specify a ~:local-repo~ in a ~package!~'s ~:recipe~ +declaration: + +#+BEGIN_SRC elisp +(package! my-package :recipe (:local-repo "/path/to/my/package")) + +;; Don't forget to use :files to include files in an unconventional project structure: +(package! my-package + :recipe (:local-repo "/path/to/my/package" + :files ("*.el" "src/lisp/*.el"))) +#+END_SRC + +Remember to run ~doom sync~ to rebuild your package after you've changed it, and +to re-index any autoloads in it. ** Configuring Doom *** Configuring packages If your configuration needs are simple, the ~use-package!~, ~after!~, -~add-hook!~ and ~setq-hook!~ emacros can help you reconfigure packages: +~add-hook!~ and ~setq-hook!~ macros are your bread and butter. #+BEGIN_SRC emacs-lisp ;;; ~/.doom.d/config.el (example) @@ -721,11 +891,30 @@ also be helpful for debugging. + unmap! + define-key! -*** TODO DOOMDIR file structure - ** Writing your own modules -Modules are made up of several files, all of which are optional. This is a -comprehensive list of what they are: +*** Load order +Module files are loaded in a precise order: + +1. =~/.emacs.d/early-init.el= (Emacs 27+ only) +2. =~/.emacs.d/init.el= +3. =$DOOMDIR/init.el= +4. ={~/.emacs.d,$DOOMDIR}/modules/*/*/init.el= +5. ={~/.emacs.d,$DOOMDIR}/modules/*/*/config.el= +6. =$DOOMDIR/config.el= + +*** Location +Doom searches for modules in =~/.emacs.d/modules/CATEGORY/MODULE/= and +=$DOOMDIR/modules/CATEGORY/MODULE/=. If you have a private module with the same +name as an included Doom module, yours will shadow the included one (as if the +included one never existed). + +#+begin_quote +Doom refers to modules in one of two formats: ~:category module~ or +~category/module~. +#+end_quote + +*** File structure +A module consists of several files, all of which are optional. They are: #+begin_example modules/ @@ -740,18 +929,13 @@ modules/ doctor.el #+end_example -By default, doom looks for modules in two places: =.emacs.d/modules/= where doom's -own modules are located and =$DOOMDIR/modules/= where you can define your -own private modules. -*** Structure of a module **** =init.el= -This file is loaded first, before anything else, but after Doom core is loaded. +This file is loaded early, before anything else, but after Doom core is loaded. Use this file to: -+ Configure Emacs or perform setup/teardown operations that must be set before - other modules are (or this module is) loaded. Tampering with ~load-path~, for - instance. ++ Configure Emacs or perform setup/teardown operations that must be set early; + before other modules are (or this module is) loaded. + Reconfigure packages defined in Doom modules with ~use-package-hook!~ (as a last resort, when ~after!~ and hooks aren't enough). + To change the behavior of ~bin/doom~. @@ -767,9 +951,9 @@ This file is the heart of every module. Code in this file should expect that dependencies (in =packages.el=) are installed and available, but shouldn't make assumptions about what /modules/ are -activated (use ~featurep!~ for this). +activated (use ~featurep!~ to detect them). -Packages should be configured using ~after!~ or ~use-package!~. +Packages should be configured using ~after!~ or ~use-package!~: #+BEGIN_SRC emacs-lisp ;; from modules/completion/company/config.el @@ -801,36 +985,7 @@ shouldn't produce side effects and should be deterministic. Because this file gets evaluated in an environment isolated from your interactive session, code within should make no assumptions about the current session. -The ~package!~ macro is the star of the show in =packages.el= files: - -#+BEGIN_SRC emacs-lisp -;; from modules/lang/org/packages.el -(package! org-bullets) - -;; from modules/tools/rotate-text/packages.el -(package! rotate-text :recipe (:host github :repo "debug-ito/rotate-text.el")) -#+END_SRC - -Its ~:recipe~ property accepts [[https://github.com/melpa/melpa#recipe-format][a MELPA recipe]], which provides a lot of control -over where to fetch a package, including specific commit, tags or branches: - -#+BEGIN_SRC emacs-lisp -(package! rotate-text - :recipe (:host github - :repo "debug-ito/rotate-text.el" - :commit "1a2b3c4d")) -#+END_SRC - -You can also use this ~package!~ to disable other packages: - -#+BEGIN_SRC emacs-lisp -;; Uninstalls evil, keeps it uninstalled, and tells Doom to ignore any -;; use-package! and after! blocks for it -(package! evil :disable t) - -;; disable-packages! can be used to disable multiple packages in one statement -(disable-packages! evil evil-snipe evil-escape) -#+END_SRC +See the "[[*Package management][Package Management]]" section for details. **** =autoload/*.el= OR =autoload.el= Functions marked with an autoload cookie (~;;;###autoload~) in these files will @@ -891,72 +1046,61 @@ These additional files are *not* loaded automatically. You will need to use the The ~load!~ macro will try to load a =+git.el= relative to the current file. -*** Load order -Module files are loaded in a precise order: +*** Flags +A module flag is an arbitrary symbol. By convention, these symbols are prefixed +with a ~+~ or a ~-~, to respectively denote the addition or removal of a +feature. There is no functional significance to this notation. -#+BEGIN_SRC sh -~/.emacs.d/early-init.el # in Emacs 27+ only -~/.emacs.d/init.el -$DOOMDIR/init.el -{~/.emacs.d,$DOOMDIR}/modules/*/*/init.el -{~/.emacs.d,$DOOMDIR}/modules/*/*/config.el -$DOOMDIR/config.el +A module may choose to interpret flags however it likes. They can be tested for +with the ~featurep!~ macro: + +#+BEGIN_SRC elisp +;; Has the current module been enabled with the +my-feature flag? +(when (featurep! +my-feature) ...) + +;; It can be used to check the presence of flags in other modules: +(when (featurep! :lang python +lsp) ...) #+END_SRC -*** Module flags -In the code examples of the previous section, you may have noticed something odd -about that haskell entry: ~(haskell +intero)~. ~+intero~ is a module flag. You -may specify these for any module that supports them. Unsupported flags are -ignored. +*** Module cookies +A special syntax exists called module cookies. Like autoload cookies +(~;;;###autoload~), module files may have ~;;;###if FORM~ at or near the top of +the file. FORM is read determine whether or not to ignore this file when +scanning it for autoloads (~doom sync~) or byte-compiling it (~doom compile~). -You can find out what flags a module supports by looking at its documentation (a -README.org in the module's directory; which can be jumped to quickly with ~M-x -doom/describe-module~). - -For example, the haskell module supports the ~+intero~ and ~+dante~ flags, which -represent the two Haskell backends available to Emacs. You may choose one or the -other (or neither, or both) by specifying the appropriate flags in you ~doom!~ -block: +Use this to prevent errors that may occur if that file contains (for example) +calls to functions that won't exist if a certain feature isn't available to that +module, e.g. #+BEGIN_SRC emacs-lisp -(doom! :lang (haskell +dante)) +;;;###if (featurep! +lsp) #+END_SRC -You may specify as many flags are you like: - #+BEGIN_SRC emacs-lisp -(doom! :lang (org +attach +babel +capture +export +present)) +;;;###if (not (locate-library "so-long")) #+END_SRC -#+begin_quote -=+flagname= is simply a naming convention and has no syntactical or functional -significance. -#+end_quote +Remember that these run in a limited, non-interactive sub-session, so do not +call anything that wouldn't be available in a Doom session without any modules +enabled. -**** Testing for flags -Modules are free to interpret flags however they like. If you are writing your -own module(s), you can test for flags using the ~featurep! MODULE SUBMODULE -&optional FLAG~ macro: +*** Autodefs +An autodef is a special kind of autoloaded function or macro which Doom +guarantees will always be defined, whether or not its containing module is +enabled (but will no-op without evaluating its arguments when it is disabled). -#+BEGIN_SRC emacs-lisp -(when (featurep! :lang haskell +dante) - [...]) +You can browse the available autodefs in your current session with ~M-x +doom/help-autodefs~ (=SPC h d u= or =C-h d u=). + +What distinguishes an autodef from a regular autoload is the ~;;;###autodef~ +cookie: + +#+BEGIN_SRC elisp +;;;###autodef +(defun set-something! (value) + ...) #+END_SRC -The first two arguments if ~featurep!~ may be skipped if it is used from inside -a module. For example: - -#+BEGIN_SRC emacs-lisp -;; In modules/lang/haskell/config.el -(when (featurep! +dante) ; same as (featurep! :lang haskell +dante) - [...]) -#+END_SRC - -*** Module settings -Some modules expose settings that can be configured from other modules. Use ~M-x -doom/help-autdefs~ (=SPC h d u= or =C-h d u=) to see what is available and how -to use them. - An example would be the ~set-company-backend!~ function that the =:completion company= module exposes. It lets you register company completion backends with certain major modes. For instance: @@ -965,30 +1109,6 @@ certain major modes. For instance: (set-company-backend! 'python-mode '(company-anaconda)) #+END_SRC -You'll find what settings a module exposes in its documentation (remember to use -~M-x doom/help-modules~ on =SPC h d m= or =C-h d m=). -*** Module cookies -There is a special syntax available to module files called module cookies. Like -autoload cookies (~;;;###autoload~), module files may have ~;;;###if FORM~ at or -near the top of the file. FORM is read by ~doom refresh~ and ~doom compile~ to -determine whether or not to ignore this file. - -If FORM returns nil, the file won't be scanned for autoloads nor will it be -byte-compiled. Use this to prevent errors that may occur if that file contains -(for example) calls to functions that won't exist if a certain feature isn't -available to that module, e.g. - -#+BEGIN_SRC emacs-lisp -;;;###if (featurep! +intero) -#+END_SRC - -#+BEGIN_SRC emacs-lisp -;;;###if (not (featurep 'evil-mode)) -#+END_SRC - -Remember that these run in a limited, non-interactive sub-session, so do not -call anything that wouldn't be available in a Doom session without any modules -enabled. ** Common mistakes when configuring Doom Emacs Having helped many users configure Doom, I've spotted a few recurring oversights that I will list here, in the hopes that it will help you avoid the same @@ -997,7 +1117,7 @@ mistakes: *** Packages are eagerly loaded Using ~use-package!~ without a deferring keyword (one of: ~:defer :after :commands :defer-incrementally :after-call~) will load the package immediately. -This can cause other packages to be pulled in and loaded, which will compromise +This causes other packages to be pulled in and loaded, which will compromise many of Doom's startup optimizations. This is usually by accident. Choosing which keyword to use depends on the @@ -1011,10 +1131,10 @@ has its own package management system. Migrating ~use-package~ code to Doom is usually a case of removing the ~:ensure~ keyword and adding a ~(package! PACKAGENAME)~ to =~/.doom.d/packages.el= (and -running ~doom refresh~ to sync your config). +running ~doom sync~ to sync your config). -*** Using ~org-babel-do-load-languages~ to load your babel plugins -You don't need ~org-babel-do-load-languages~. Doom lazy loads babel plugins +*** Using ~org-babel-do-load-languages~ to load your babel packages +You don't need ~org-babel-do-load-languages~. Doom lazy loads babel packages based on the language name in ~#+BEGIN_SRC~ blocks needed. As long as the babel plugin is installed and the plugin is named after its language (e.g. ~#+BEGIN_SRC rust~ will load ~ob-rust~), you don't need to do anything else. @@ -1060,31 +1180,47 @@ imposing than its alternatives: If you use it, it's there. If you don't, it isn't written to the file. * Troubleshoot -When problems arise, and they will, you will need to debug them. Fortunately, -Emacs (and Doom) provide you with tools to make this easier. I recommend -becoming acquainted with them. They will be yours (and our) best tool for -understanding the problem. +When problems arise, you should be prepared to collect information in order to +solve them, or for the bug report you're about to write. Both Emacs and Doom +provide tools to make this easier. Here are a few things you can try, first: -** I've run into an issue, where do I start? -Before you file a bug report, there are a number of things you should try first: ++ Investigate the =*Messages*= log for warnings or error messages. This log can + be opened with =SPC h e=, =C-h e= or =M-x view-echo-area-messages=. -+ You'll find [[file:faq.org::Common%20Issues][a list of common issues & errors in the FAQ]]. That is a good place - to start. You can access and search this FAQ from inside Doom with =SPC h d f= - (or =C-h d f= for non-evil users). ++ Look up errors/warnings [[file:faq.org::Common%20Issues][on the FAQ]] and [[https://github.com/hlissner/doom-emacs/issues][Doom's issue tracker]]. It is possible + that a solution for your issue already exists. The FAQ can be searched from + inside Doom with =SPC h d f= (or =C-h d f= for non-evil users). -+ Run ~doom doctor~ to diagnose any common issues with your environment or - config. ++ Run ~bin/doom doctor~ on the command line to diagnose common issues with your + environment and config. It will suggest solutions for them as well. -+ Run ~doom refresh~ to ensure the problem isn't caused by missing packages or - outdated autoloads files. ++ ~bin/doom clean~ will ensure the problem isn't stale bytecode in your private + config or Doom core. If you haven't used ~bin/doom compile~, there's no need + to do this. -+ See if your issue is mentioned in the Common Issues section below. ++ ~bin/doom sync~ will ensure the problem isn't missing packages or outdated + autoloads files -+ Search Doom's issue tracker to see if your issue is mentioned there. ++ ~bin/doom build~ will ensure the problem isn't stale package bytecode or + broken symlinks. -+ Ask for help on [[https://discord.gg/bcZ6P3y][our Discord server]]. This may not be immediately available to - everyone, so I won't fault you for skipping this step, but you'll sometimes - find help there quicker. In many cases, Henrik fixes issues. ++ ~bin/doom update~ will ensure that your packages are up-to-date, eliminating + issues that originate from upstream. + ++ If you happen to know what module(s) are relevant to your issue, check their + documentation (press = h m= to jump to a module's documentation). Your + issue may be documented. + ++ If possible, see if the issue can be reproduced in vanilla Emacs (Emacs + without Doom) and/or vanilla Doom (Doom without your private config). [[*Use the sandbox][Doom's + sandbox can help you check]]. + ++ Ask for help on [[https://discord.gg/qvGgnVx][our Discord server]]. It is the quickest way to get help, + sometimes straight from Doom's maintainer, who is very active there. + +If none of these things have helped you, then it's time to open a bug report. +See "[[file:contributing.org::*Reporting issues][Reporting Issues]]" in the [[file:contributing.org][contributing guidelines]] on how to file an +effective bug report. ** Looking up documentation and state from within Emacs ... @@ -1147,7 +1283,7 @@ same command with the ~-d~ or ~--debug~ switches to force it to emit a backtrace when an error occurs. The ~DEBUG~ environment variable will work to. #+BEGIN_SRC sh -doom -d refresh +doom -d sync doom --debug install DEBUG=1 doom update #+END_SRC @@ -1174,7 +1310,7 @@ all of it, or somewhere in between). This can be helpful for isolating bugs to determine who you should report a bug to. If you can recreate a bug in vanilla Emacs than it should be reported to the -developers of the relevant plugins or, perhaps, the Emacs devs themselves. +developers of the relevant packages or, perhaps, the Emacs devs themselves. Otherwise, it is best to bring it up on the Doom Emacs issue list, rather than confusing and inundating the Emacs community with Doom-specific issues. diff --git a/docs/index.org b/docs/index.org index 48c9b829a..4768a3098 100644 --- a/docs/index.org +++ b/docs/index.org @@ -45,6 +45,7 @@ s= (or =C-h d s=). ** [[file:faq.org][Frequently Asked Questions]] - [[file:faq.org::*General][General]] - [[file:faq.org::*Configuration][Configuration]] +- [[file:faq.org::*Package Management][Package Management]] - [[file:faq.org::*Defaults][Defaults]] - [[file:faq.org::Common Issues][Common Issues]] - [[file:faq.org::Contributing][Contributing]] diff --git a/docs/workflow.org b/docs/workflow.org index 50d3bd173..ab8f1bc40 100644 --- a/docs/workflow.org +++ b/docs/workflow.org @@ -1,7 +1,15 @@ -#+TITLE: Workflow tips, tricks & tutorials +#+TITLE: Getting to know Doom Emacs #+STARTUP: nofold -This page is a WIP. +Once you've installed Doom and launched it, the next step of your masochistic +journey is to master it. This guide will walk you through many Doom-centric +workflows you'll commonly find in a text editor (and beyond). It isn't +exhaustive because I don't have enough lives to make it so. + +#+begin_quote +If you feel like we've missed something, don't hesitate to let us know! You're +welcome to [[https://discord.gg/qvGgnVx][join us on our Discord server]]. +#+end_quote * Table of Contents :TOC: - [[#day-1-in-doom-emacs][Day 1 in Doom Emacs]] @@ -14,6 +22,7 @@ This page is a WIP. - [[#pipe-text-through-ex-commands-and-programs][Pipe text through ex commands and programs]] - [[#transposingswapping-text][Transposing/swapping text]] - [[#managing-your-projects][Managing your projects]] + - [[#reconfiguring-emacs-on-a-per-project-basis][Reconfiguring Emacs on a per-project basis]] - [[#search--replace][Search & replace]] - [[#project-wide-text-search][Project-wide text search]] - [[#search--replace-1][Search & replace]] @@ -32,6 +41,8 @@ This page is a WIP. - [[#using-emacs-for][Using Emacs for...]] - [[#writing-fiction][Writing fiction]] - [[#writing-papers][Writing papers]] + - [[#note-keeping][Note-keeping]] + - [[#a-personal-organizer][A Personal Organizer]] - [[#composing-music][Composing music]] - [[#game-development][Game development]] - [[#web-development][Web development]] @@ -48,6 +59,9 @@ This page is a WIP. ** TODO Pipe text through ex commands and programs ** TODO Transposing/swapping text * TODO Managing your projects +** TODO Reconfiguring Emacs on a per-project basis +*** TODO .dir-locals.el +*** TODO editorconfig * TODO Search & replace ** TODO Project-wide text search ** TODO Search & replace @@ -66,6 +80,8 @@ This page is a WIP. * TODO Using Emacs for... ** TODO Writing fiction ** TODO Writing papers +** TODO Note-keeping +** TODO A Personal Organizer ** TODO Composing music ** TODO Game development ** TODO Web development From 4dc01912f16ba9b19de67a64c5702b17edd19818 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 28 Jan 2020 14:06:20 -0500 Subject: [PATCH 730/983] Fix 'doom update' reporting that a successful fetch failed --- core/cli/packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index ddd65b722..9ea99c9a2 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -175,8 +175,8 @@ declaration) or dependency thereof that hasn't already been." (setq output (straight--process-get-output)) (straight-merge-package package) (setq target-ref (straight-vc-get-commit type local-repo)) - (when (doom--same-commit-p target-ref ref) - (cl-return)))) + (or (not (doom--same-commit-p target-ref ref)) + (cl-return)))) ((doom--same-commit-p target-ref ref) (print! (info "\033[K(%d/%d) %s is up-to-date...%s") i total package esc) From c6518498b9b76fbc2d5fe241503e7e517013adfb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 28 Jan 2020 14:07:08 -0500 Subject: [PATCH 731/983] Fix void-variable targets when using unpin! macro --- core/core-packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index 430cf1d03..cb0c5362e 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -319,10 +319,10 @@ can be used one of five ways: (unpin! (:lang python javascript) (:tools docker)) Or any combination of the above." - `(progn + `(let ((targets ',targets)) (put 'doom-pinned-packages 'modified (delete-dups (append targets (get 'doom-pinned-packages 'modified)))) - (dolist (target ',targets) + (dolist (target targets) (cond ((eq target t) (setq doom-pinned-packages nil)) From f9dda3258425b10ee8d41f5d5398ed56dd7494a1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 28 Jan 2020 16:49:48 -0500 Subject: [PATCH 732/983] Remove evil-delete-backward-char-and-join hack The breaking change was reverted upstream: emacs-evil/evil@30b77c9 --- modules/editor/evil/config.el | 9 --------- 1 file changed, 9 deletions(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 9b8aba446..026fdd35d 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -157,15 +157,6 @@ directives. By default, this only recognizes C directives.") (advice-add #'evil-open-above :around #'+evil--insert-newline-above-and-respect-comments-a) (advice-add #'evil-open-below :around #'+evil--insert-newline-below-and-respect-comments-a) - ;; Fix backspace/DEL commands not respecting `delete-selection-mode', - ;; smartparens pairs (in some cases), and ignoring - ;; `+default--delete-backward-char-a' on `delete-char-backward' - (defadvice! +evil-delete-region-if-mark-a (orig-fn &rest args) - :override #'evil-delete-backward-char-and-join - (if (or evil-backspace-join-lines (not (bolp))) - (call-interactively #'backward-delete-char-untabify) - (user-error "Beginning of line"))) - ;; Recenter screen after most searches (dolist (fn '(evil-visualstar/begin-search-forward evil-visualstar/begin-search-backward From c7ab4fafc600c0bb44fa0c4cdafbb416f67c32e2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 28 Jan 2020 16:52:13 -0500 Subject: [PATCH 733/983] Fix void-variable char error in evil-global-marker-p advice --- modules/editor/evil/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 026fdd35d..d4ce0e3dd 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -134,7 +134,7 @@ directives. By default, this only recognizes C directives.") (save-excursion (apply orig-fn args))) ;; In evil, registers 2-9 are buffer-local. In vim, they're global, so... - (defadvice! +evil--make-numbered-markers-global-a (_arg) + (defadvice! +evil--make-numbered-markers-global-a (char) :after-until #'evil-global-marker-p (and (>= char ?2) (<= char ?9))) From fe0c5e135d7461785b8afe54d8a9b72c44fce1f4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 28 Jan 2020 17:50:11 -0500 Subject: [PATCH 734/983] Fix #2293: easymotion with evil operators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reverts fix for #1672, but provides a workaround: (map! :n "gl" (λ! (+evil/easymotion 'normal 'global))) --- modules/editor/evil/autoload/evil.el | 21 ++++++++++++++------- modules/editor/evil/config.el | 5 ++--- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/modules/editor/evil/autoload/evil.el b/modules/editor/evil/autoload/evil.el index 326aec771..575f97077 100644 --- a/modules/editor/evil/autoload/evil.el +++ b/modules/editor/evil/autoload/evil.el @@ -93,13 +93,20 @@ the only window, use evil-window-move-* (e.g. `evil-window-move-far-left')." (interactive) (+evil--window-swap 'down)) ;;;###autoload -(defun +evil/easymotion () - "Invoke and lazy-load `evil-easymotion' without compromising which-key -integration." - (interactive) - (require 'evil-easymotion) - (setq prefix-arg current-prefix-arg) - (push '(t . easymotion) unread-command-events)) +(defun +evil/easymotion (&optional state keymap) + "Invoke `evil-easymotion' lazily without compromising which-key integration." + (interactive (list 'motion 'global)) + (let ((prefix (this-command-keys))) + (require 'evil-easymotion) + (evil-define-key* state keymap prefix evilem-map) + (setq prefix-arg current-prefix-arg + unread-command-events + (mapcar (lambda (e) (cons t e)) + (vconcat (when evil-this-operator + (where-is-internal evil-this-operator + nil + t)) + prefix))))) ;;;###autoload (autoload '+evil:apply-macro "editor/evil/autoload/evil" nil t) (evil-define-operator +evil:apply-macro (beg end) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index d4ce0e3dd..3a77cd7a9 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -206,7 +206,6 @@ directives. By default, this only recognizes C directives.") (use-package! evil-easymotion :commands evilem-create evilem-default-keybindings :config - (evilem-default-keybindings "") ;; Use evil-search backend, instead of isearch (evilem-make-motion evilem-motion-search-next #'evil-ex-search-next :bind ((evil-ex-search-highlight-all nil))) @@ -552,9 +551,9 @@ To change these keys see `+evil-repeat-keys'." :textobj "k" #'evil-indent-plus-i-indent-up #'evil-indent-plus-a-indent-up :textobj "x" #'evil-inner-xml-attr #'evil-outer-xml-attr - ;; evil-easymotion + ;; evil-easymotion (see `+evil/easymotion') (:after evil-easymotion - (:prefix "" ; see `+evil/easymotion' + (:map evilem-map "a" (evilem-create #'evil-forward-arg) "A" (evilem-create #'evil-backward-arg) "s" #'evil-avy-goto-char-2 From c5d6e6267c80c6fb3c6ee89b5a1c079f18d80d5e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 28 Jan 2020 20:37:51 -0500 Subject: [PATCH 735/983] Bump to brotzeit/rustic@c7cab3f My rust advice can be simplified thanks to brotzeit/rustic#87 being merged. --- modules/lang/rust/config.el | 20 +++++--------------- modules/lang/rust/packages.el | 2 +- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/modules/lang/rust/config.el b/modules/lang/rust/config.el index 3cb786cbc..0e80f7d58 100644 --- a/modules/lang/rust/config.el +++ b/modules/lang/rust/config.el @@ -48,21 +48,11 @@ :desc "all" "a" #'rustic-cargo-test :desc "current test" "t" #'rustic-cargo-current-test)) - (defadvice! +rust--dont-install-packages-p (orig-fn &rest args) - :around #'rustic-setup-lsp - (cl-letf (;; `rustic-setup-lsp' uses `package-installed-p' to determine if - ;; lsp-mode/elgot are available. This breaks because Doom doesn't - ;; use package.el to begin with (and lazy loads it). - ((symbol-function #'package-installed-p) - (lambda (pkg) - (require pkg nil t))) - ;; If lsp/elgot isn't available, it attempts to install lsp-mode - ;; via package.el. Doom manages its own dependencies so we disable - ;; that behavior. - ((symbol-function #'rustic-install-lsp-client-p) - (lambda (&rest _) - (message "No LSP server running")))) - (apply orig-fn args)))) + ;; If lsp/elgot isn't available, it attempts to install lsp-mode via + ;; package.el. Doom manages its own dependencies so we disable that behavior. + (defadvice! +rust--dont-install-packages-p (&rest _) + :override #'rustic-install-lsp-client-p + (message "No LSP server running"))) (use-package! racer diff --git a/modules/lang/rust/packages.el b/modules/lang/rust/packages.el index ad4ae583b..1feb32651 100644 --- a/modules/lang/rust/packages.el +++ b/modules/lang/rust/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/rust/packages.el -(package! rustic :pin "a6b8cd8db8") +(package! rustic :pin "c7cab3fbe6") (unless (featurep! +lsp) (package! racer :pin "a0bdf778f0")) From 097972bd9d19d31ceaf280efc155461ff38570d9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 28 Jan 2020 17:54:51 -0500 Subject: [PATCH 736/983] Refactor package pinning - Make doom/info package details more concise - Removed doom-pinned-packages variable (pin info now stored in doom-packages metadata) - Fix unpin! not actually unpinning some packages --- core/autoload/debug.el | 35 +++++++++++++++----- core/autoload/packages.el | 42 ++++++++++++++++++++++++ core/cli/packages.el | 63 ++++++++++++++++++----------------- core/core-packages.el | 69 ++++++++++++++++----------------------- 4 files changed, 129 insertions(+), 80 deletions(-) diff --git a/core/autoload/debug.el b/core/autoload/debug.el index e7206ac8f..d54256035 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -23,11 +23,25 @@ (when (file-exists-p file) (insert-file-contents file)))) +(defun doom--collect-forms-in (file form) + (when (file-readable-p file) + (let (forms) + (with-temp-buffer + (insert-file-contents file) + (delay-mode-hooks (emacs-lisp-mode)) + (while (re-search-forward (format "(%s " (regexp-quote form)) nil t) + (unless (doom-point-in-string-or-comment-p) + (save-excursion + (goto-char (match-beginning 0)) + (push (sexp-at-point) forms)))) + (nreverse forms))))) + ;;;###autoload (defun doom-info () "Returns diagnostic information about the current Emacs session in markdown, ready to be pasted in a bug report on github." (require 'vc-git) + (require 'core-packages) (let ((default-directory doom-emacs-dir) (doom-modules (doom-modules))) (cl-letf @@ -80,14 +94,10 @@ ready to be pasted in a bug report on github." '("n/a"))) (packages ,@(or (condition-case e - (cl-loop for (name . plist) in (doom-package-list) - if (cl-find :private (plist-get plist :modules) - :key #'car) - collect - (if-let (splist (doom-plist-delete (copy-sequence plist) - :modules)) - (prin1-to-string (cons name splist)) - name)) + (mapcar + #'cdr (doom--collect-forms-in + (doom-path doom-private-dir "packages.el") + "package!")) (error (format "<%S>" e))) '("n/a"))) (elpa @@ -98,7 +108,14 @@ ready to be pasted in a bug report on github." collect (format "%s" name))) (error (format "<%S>" e))) '("n/a"))) - (unpin ,@(or (get 'doom-pinned-packages 'modified) '("n/a")))))))) + (unpin ,@(or (condition-case e + (mapcan #'identity + (mapcar + #'cdr (doom--collect-forms-in + (doom-path doom-private-dir "packages.el") + "unpin!"))) + (error (format "<%S>" e))) + '("n/a")))))))) ;; diff --git a/core/autoload/packages.el b/core/autoload/packages.el index 7981d3382..68e2f8f6e 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -13,6 +13,13 @@ nil-value) plist))) +;;;###autoload +(defun doom-package-set (package prop value) + "Set PROPERTY in PACKAGE's recipe to VALUE." + (setf (alist-get package doom-packages) + (plist-put (alist-get package doom-packages) + prop value))) + ;;;###autoload (defun doom-package-recipe (package &optional prop nil-value) "Returns the `straight' recipe PACKAGE was registered with." @@ -23,6 +30,14 @@ nil-value) plist))) +;;;###autoload +(defun doom-package-recipe-repo (package) + "Resolve and return PACKAGE's (symbol) local-repo property." + (if-let* ((recipe (cdr (straight-recipes-retrieve package))) + (repo (straight-vc-local-repo-name recipe))) + repo + (symbol-name package))) + ;;;###autoload (defun doom-package-build-recipe (package &optional prop nil-value) "Returns the `straight' recipe PACKAGE was installed with." @@ -190,6 +205,33 @@ ones." (doom--read-module-packages-file private-packages all-p t)) (nreverse doom-packages))) +;;;###autoload +(defun doom-package-pinned-list () + "Return an alist mapping package names (strings) to pinned commits (strings)." + (let (alist) + (dolist (package doom-packages alist) + (with-plist! (cdr package) (recipe modules disable ignore pin unpin) + (when (and (not ignore) + (not disable) + (or pin unpin)) + (setf (alist-get (doom-package-recipe-repo (car package)) alist + nil 'remove #'equal) + (unless unpin pin))))))) + +;;;###autoload +(defun doom-package-unpinned-list () + "Return an alist mapping package names (strings) to pinned commits (strings)." + (let (alist) + (dolist (package doom-packages alist) + (with-plist! (cdr package) (recipe modules disable ignore pin unpin) + (when (and (not ignore) + (not disable) + (or unpin + (and (plist-member recipe :pin) + (null pin)))) + (cl-pushnew (doom-package-recipe-repo (car package)) alist + :test #'equal)))))) + ;;;###autoload (defun doom-package-recipe-list () "Return straight recipes for non-builtin packages with a local-repo." diff --git a/core/cli/packages.el b/core/cli/packages.el index 9ea99c9a2..24f87598f 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -81,34 +81,20 @@ This function will install any primary package (i.e. a package with a `package!' declaration) or dependency thereof that hasn't already been." (straight--transaction-finalize) (print! (start "Installing packages...")) - (print-group! - (if-let (built - (doom-with-package-recipes (doom-package-recipe-list) - (recipe package type local-repo) - (condition-case-unless-debug e - (progn + (let ((pinned (doom-package-pinned-list))) + (print-group! + (if-let (built + (doom-with-package-recipes (doom-package-recipe-list) + (recipe package type local-repo) + (condition-case-unless-debug e (straight-use-package (intern package)) - (when-let* ((target-ref (cdr (assoc local-repo doom-pinned-packages))) - (ref (straight-vc-get-commit type local-repo))) - (unless (doom--same-commit-p target-ref ref) - (unless (straight-vc-commit-present-p recipe target-ref) - (straight-vc-fetch-from-remote recipe)) - (if (straight-vc-commit-present-p recipe target-ref) - (progn - (print! (success "Checking out %s to %s") - package (doom--abbrev-commit target-ref)) - (straight-vc-check-out-commit recipe target-ref) - (straight-rebuild-package package t)) - (ignore-errors - (delete-directory (straight--repos-dir local-repo) 'recursive)) - (straight-use-package (intern package)))))) - (error - (signal 'doom-package-error - (list package e (straight--process-get-output))))))) - (print! (success "Installed %d packages") - (length built)) - (print! (info "No packages need to be installed")) - nil))) + (error + (signal 'doom-package-error + (list package e (straight--process-get-output))))))) + (print! (success "Installed %d packages") + (length built)) + (print! (info "No packages need to be installed")) + nil)))) (defun doom-cli-packages-build (&optional force-p) @@ -127,11 +113,27 @@ declaration) or dependency thereof that hasn't already been." (or straight--packages-not-to-rebuild (make-hash-table :test #'equal))) (straight--packages-to-rebuild (or (if force-p :all straight--packages-to-rebuild) - (make-hash-table :test #'equal)))) + (make-hash-table :test #'equal))) + (recipes (doom-package-recipe-list))) (unless force-p + (straight--make-build-cache-available) (straight--make-package-modifications-available)) (if-let (built - (doom-with-package-recipes (doom-package-recipe-list) (package) + (doom-with-package-recipes recipes (package local-repo) + ;; Ensure packages with outdated files/bytecode are rebuilt + (let ((build-dir (straight--build-dir package)) + (repo-dir (straight--repos-dir local-repo))) + (and (or (file-newer-than-file-p repo-dir build-dir) + ;; Doesn't make sense to compare el and elc files + ;; when the former isn't a symlink to their source. + (when straight-use-symlinks + (cl-loop for file + in (doom-files-in build-dir :match "\\.el$" :full t) + for elc-file = (byte-compile-dest-file file) + if (and (file-exists-p elc-file) + (file-newer-than-file-p file elc-file)) + return t))) + (puthash package t straight--packages-to-rebuild))) (straight-use-package (intern package)))) (print! (success "Rebuilt %d package(s)") (length built)) (print! (success "No packages need rebuilding")) @@ -143,6 +145,7 @@ declaration) or dependency thereof that hasn't already been." (straight--transaction-finalize) (print! (start "Updating packages (this may take a while)...")) (let* ((repo-dir (straight--repos-dir)) + (pinned (doom-package-pinned-list)) (packages-to-rebuild (make-hash-table :test 'equal)) (repos-to-rebuild (make-hash-table :test 'equal)) (recipes (doom-package-recipe-list)) @@ -166,7 +169,7 @@ declaration) or dependency thereof that hasn't already been." (cl-return)) (condition-case-unless-debug e (let ((ref (straight-vc-get-commit type local-repo)) - (target-ref (cdr (assoc local-repo doom-pinned-packages))) + (target-ref (cdr (assoc local-repo pinned))) output) (or (cond ((not (stringp target-ref)) diff --git a/core/core-packages.el b/core/core-packages.el index cb0c5362e..24690a1c0 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -43,14 +43,6 @@ package's name as a symbol, and whose CDR is the plist supplied to its `package!' declaration. Set by `doom-initialize-packages'.") -(defvar doom-pinned-packages nil - "An alist mapping package names to commit hashes; both strings. - -We avoid straight's lockfiles because we want to pin packages straight from -their `package!' declarations, which is simpler than lockfiles, where version -management would be done in a whole new file that users shouldn't have to deal -with.") - (defvar doom-core-packages '(straight use-package) "A list of packages that must be installed (and will be auto-installed if missing) and shouldn't be deleted.") @@ -127,7 +119,8 @@ missing) and shouldn't be deleted.") (defadvice! doom--read-pinned-packages-a (orig-fn &rest args) "Read from `doom-pinned-packages' on top of straight's lockfiles." :around #'straight--lockfile-read-all - (append (apply orig-fn args) doom-pinned-packages)) + (append (apply orig-fn args) + (doom-package-pinned-list))) ;; @@ -173,17 +166,7 @@ necessary package metadata is initialized and available for them." (print! (warn "%s\n%s") (format "You've disabled %S" name) (indent 2 (concat "This is a core package. Disabling it will cause errors, as Doom assumes\n" - "core packages are always available. Disable their minor-modes or hooks instead."))))) - (when pin - (let ((realname - (if-let* ((recipe (cdr (straight-recipes-retrieve name))) - (repo (straight-vc-local-repo-name recipe))) - repo - (symbol-name name)))) - (doom-log "Pinning package %S to %S" realname pin) - (setf (alist-get realname doom-pinned-packages - nil nil #'equal) - pin))))))))) + "core packages are always available. Disable their minor-modes or hooks instead."))))))))))) (defun doom-ensure-straight () "Ensure `straight' is installed and was compiled with this version of Emacs." @@ -318,27 +301,31 @@ can be used one of five ways: + To unpin packages in individual modules: (unpin! (:lang python javascript) (:tools docker)) -Or any combination of the above." - `(let ((targets ',targets)) - (put 'doom-pinned-packages 'modified - (delete-dups (append targets (get 'doom-pinned-packages 'modified)))) - (dolist (target targets) - (cond - ((eq target t) - (setq doom-pinned-packages nil)) - ((or (keywordp target) - (listp target)) - (cl-destructuring-bind (category . modules) (doom-enlist target) - (dolist (pkg doom-packages) - (let ((pkg-modules (plist-get (cdr pkg) :modules))) - (and (assq category pkg-modules) - (or (null modules) - (cl-loop for module in modules - if (member (cons category module) pkg-modules) - return t)) - (assq-delete-all (car pkg) doom-pinned-packages)))))) - ((symbolp target) - (assq-delete-all target doom-pinned-packages)))))) +Or any combination of the above. + +This macro should only be used from the user's private packages.el. No module +should use it!" + (if (memq t targets) + `(mapc (doom-rpartial #'doom-package-set :unpin t) + (mapcar #'car doom-packages)) + (let (forms) + (dolist (target targets) + (cl-check-type target (or symbol keyword list)) + (cond + ((symbolp target) + (push `(doom-package-set ',target :unpin t) forms)) + ((or (keywordp target) + (listp target)) + (cl-destructuring-bind (category . modules) (doom-enlist target) + (dolist (pkg doom-packages) + (let ((pkg-modules (plist-get (cdr pkg) :modules))) + (and (assq category pkg-modules) + (or (null modules) + (cl-loop for module in modules + if (member (cons category module) pkg-modules) + return t)) + (push `(doom-package-set ',(car pkg) :unpin t) forms)))))))) + (macroexp-progn forms)))) (provide 'core-packages) ;;; core-packages.el ends here From f31840ac9eeba977bd74142078df49d7ffa351f1 Mon Sep 17 00:00:00 2001 From: Seong Yong-ju Date: Wed, 29 Jan 2020 23:59:45 +0900 Subject: [PATCH 737/983] Improve solidity layer Enable +javascript-npm-mode in solidity-mode when package.json exists. Set docsets for solidity-mode. --- modules/lang/javascript/config.el | 8 +++++++- modules/lang/solidity/config.el | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/lang/javascript/config.el b/modules/lang/javascript/config.el index 6baffcc41..3598e0adf 100644 --- a/modules/lang/javascript/config.el +++ b/modules/lang/javascript/config.el @@ -284,7 +284,13 @@ to tide." ;;; Projects (def-project-mode! +javascript-npm-mode - :modes '(html-mode css-mode web-mode markdown-mode js-mode typescript-mode) + :modes '(html-mode + css-mode + web-mode + markdown-mode + js-mode + typescript-mode + solidity-mode) :when (locate-dominating-file default-directory "package.json") :add-hooks '(+javascript-add-node-modules-path-h npm-mode)) diff --git a/modules/lang/solidity/config.el b/modules/lang/solidity/config.el index 8552c3982..5449423f7 100644 --- a/modules/lang/solidity/config.el +++ b/modules/lang/solidity/config.el @@ -11,6 +11,7 @@ :when (featurep! :checkers syntax) :after solidity-mode :config + (set-docsets! 'solidity-mode "Solidity") (setq flycheck-solidity-solc-addstd-contracts t) (when (funcall flycheck-executable-find solidity-solc-path) (add-to-list 'flycheck-checkers 'solidity-checker nil #'eq)) From 5837155df5c93dce61782c53e43e9951efcb4e85 Mon Sep 17 00:00:00 2001 From: Arnaud Rebts Date: Wed, 29 Jan 2020 18:34:39 +0100 Subject: [PATCH 738/983] Bump to brotzeit/rustic@124e028 (#2452) * Bump to brotzeit/rustic@124e028 Rustic was broken because of brotzeit/rustic#88 * Use longer SHA Co-authored-by: Henrik Lissner --- modules/lang/rust/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/rust/packages.el b/modules/lang/rust/packages.el index 1feb32651..a003fb7ab 100644 --- a/modules/lang/rust/packages.el +++ b/modules/lang/rust/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/rust/packages.el -(package! rustic :pin "c7cab3fbe6") +(package! rustic :pin "124e0286dc") (unless (featurep! +lsp) (package! racer :pin "a0bdf778f0")) From 18b0210e5b540916a99a5172ded5bd4a61f2b881 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Jan 2020 01:51:37 -0500 Subject: [PATCH 739/983] Remove nconcq! test The macro was removed some time ago. --- core/test/test-core-lib.el | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/test/test-core-lib.el b/core/test/test-core-lib.el index 5391070d1..ea3bacb4b 100644 --- a/core/test/test-core-lib.el +++ b/core/test/test-core-lib.el @@ -101,12 +101,6 @@ (expect (appendq! list '(d e f)) :to-equal '(a b c d e f))))) - (describe "nconcq!" - (it "nconc's a list to a list symbol" - (let ((list '(a b c))) - (expect (nconcq! list '(d e f)) - :to-equal '(a b c d e f))))) - (describe "delq!" (it "delete's a symbol from a list" (let ((list '(a b c))) From ff4a9c1d4edcd7b88fe14387b2cf9c8b0e34ba22 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Jan 2020 16:34:08 -0500 Subject: [PATCH 740/983] Bump to endofunky/bundler.el@43efb6be4e Reverts 87b33c416 Closes #2421 --- modules/lang/ruby/packages.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/lang/ruby/packages.el b/modules/lang/ruby/packages.el index acd0d5c0b..84af6f149 100644 --- a/modules/lang/ruby/packages.el +++ b/modules/lang/ruby/packages.el @@ -15,10 +15,7 @@ (package! robe :pin "8190cb7c7b") ;; Project tools -(package! bundler - ;; REVIEW Remove when endofunky/bundler.el#25 is merged - :recipe (:host github :repo "nate/bundler.el") - :pin "10a18a9322") +(package! bundler :pin "43efb6be4e") (package! rake :pin "9c204334b0") ;; Environment management From c801a70ec740159e8285f3e58daa54264e2d1e80 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 29 Jan 2020 16:36:18 -0500 Subject: [PATCH 741/983] Bump to emacs-straight/undo-tree@5b6df03781 Fixes #2444 --- core/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/packages.el b/core/packages.el index 64e15b7fb..aa937738a 100644 --- a/core/packages.el +++ b/core/packages.el @@ -27,7 +27,7 @@ ;; on a potato. :recipe (:host github :repo "hlissner/emacs-so-long") :pin "ed666b0716") -(package! undo-tree :pin "ad58b21cb9") +(package! undo-tree :pin "5b6df03781") (package! ws-butler ;; Use my fork of ws-butler, which has a few choice improvements and ;; optimizations (the original has been abandoned). From 35364f1dd156321393310b725c9b5aecca86d91d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Jan 2020 15:31:30 -0500 Subject: [PATCH 742/983] Fix hash-table-p errors on 'doom build' --- core/cli/packages.el | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 24f87598f..36295dfe5 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -120,20 +120,21 @@ declaration) or dependency thereof that hasn't already been." (straight--make-package-modifications-available)) (if-let (built (doom-with-package-recipes recipes (package local-repo) - ;; Ensure packages with outdated files/bytecode are rebuilt - (let ((build-dir (straight--build-dir package)) - (repo-dir (straight--repos-dir local-repo))) - (and (or (file-newer-than-file-p repo-dir build-dir) - ;; Doesn't make sense to compare el and elc files - ;; when the former isn't a symlink to their source. - (when straight-use-symlinks - (cl-loop for file - in (doom-files-in build-dir :match "\\.el$" :full t) - for elc-file = (byte-compile-dest-file file) - if (and (file-exists-p elc-file) - (file-newer-than-file-p file elc-file)) - return t))) - (puthash package t straight--packages-to-rebuild))) + (unless force-p + ;; Ensure packages with outdated files/bytecode are rebuilt + (let ((build-dir (straight--build-dir package)) + (repo-dir (straight--repos-dir local-repo))) + (and (or (file-newer-than-file-p repo-dir build-dir) + ;; Doesn't make sense to compare el and elc files + ;; when the former isn't a symlink to their source. + (when straight-use-symlinks + (cl-loop for file + in (doom-files-in build-dir :match "\\.el$" :full t) + for elc-file = (byte-compile-dest-file file) + if (and (file-exists-p elc-file) + (file-newer-than-file-p file elc-file)) + return t))) + (puthash package t straight--packages-to-rebuild)))) (straight-use-package (intern package)))) (print! (success "Rebuilt %d package(s)") (length built)) (print! (success "No packages need rebuilding")) From b8c25b6b4e35977c5bae9402d5760b042e4c7581 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Jan 2020 16:57:49 -0500 Subject: [PATCH 743/983] Move after! to core-lib Doesn't really belong in core-modules. --- core/core-lib.el | 50 ++++++++++++++++++++++++++++++++++++++++++++ core/core-modules.el | 50 -------------------------------------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index 819f5f99b..e695cf907 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -133,6 +133,56 @@ aliases." (when-let (path (file!)) (directory-file-name (file-name-directory path)))) +(defmacro after! (package &rest body) + "Evaluate BODY after PACKAGE have loaded. + +PACKAGE is a symbol or list of them. These are package names, not modes, +functions or variables. It can be: + +- An unquoted package symbol (the name of a package) + (after! helm BODY...) +- An unquoted list of package symbols (i.e. BODY is evaluated once both magit + and git-gutter have loaded) + (after! (magit git-gutter) BODY...) +- An unquoted, nested list of compound package lists, using any combination of + :or/:any and :and/:all + (after! (:or package-a package-b ...) BODY...) + (after! (:and package-a package-b ...) BODY...) + (after! (:and package-a (:or package-b package-c) ...) BODY...) + Without :or/:any/:and/:all, :and/:all are implied. + +This is a wrapper around `eval-after-load' that: + +1. Suppresses warnings for disabled packages at compile-time +2. No-ops for package that are disabled by the user (via `package!') +3. Supports compound package statements (see below) +4. Prevents eager expansion pulling in autoloaded macros all at once" + (declare (indent defun) (debug t)) + (if (symbolp package) + (unless (memq package (bound-and-true-p doom-disabled-packages)) + (list (if (or (not (bound-and-true-p byte-compile-current-file)) + (require package nil 'noerror)) + #'progn + #'with-no-warnings) + (let ((body (macroexp-progn body))) + `(if (featurep ',package) + ,body + ;; We intentionally avoid `with-eval-after-load' to prevent + ;; eager macro expansion from pulling (or failing to pull) in + ;; autoloaded macros/packages. + (eval-after-load ',package ',body))))) + (let ((p (car package))) + (cond ((not (keywordp p)) + `(after! (:and ,@package) ,@body)) + ((memq p '(:or :any)) + (macroexp-progn + (cl-loop for next in (cdr package) + collect `(after! ,next ,@body)))) + ((memq p '(:and :all)) + (dolist (next (cdr package)) + (setq body `((after! ,next ,@body)))) + (car body)))))) + (defmacro setq! (&rest settings) "A stripped-down `customize-set-variable' with the syntax of `setq'. diff --git a/core/core-modules.el b/core/core-modules.el index 79b16cb32..b4ff99504 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -540,56 +540,6 @@ CATEGORY and MODULE can be omitted When this macro is used from inside a module (memq category (doom-module-get (car module) (cdr module) :flags))))) t)) -(defmacro after! (package &rest body) - "Evaluate BODY after PACKAGE have loaded. - -PACKAGE is a symbol or list of them. These are package names, not modes, -functions or variables. It can be: - -- An unquoted package symbol (the name of a package) - (after! helm BODY...) -- An unquoted list of package symbols (i.e. BODY is evaluated once both magit - and git-gutter have loaded) - (after! (magit git-gutter) BODY...) -- An unquoted, nested list of compound package lists, using any combination of - :or/:any and :and/:all - (after! (:or package-a package-b ...) BODY...) - (after! (:and package-a package-b ...) BODY...) - (after! (:and package-a (:or package-b package-c) ...) BODY...) - Without :or/:any/:and/:all, :and/:all are implied. - -This is a wrapper around `eval-after-load' that: - -1. Suppresses warnings for disabled packages at compile-time -2. No-ops for package that are disabled by the user (via `package!') -3. Supports compound package statements (see below) -4. Prevents eager expansion pulling in autoloaded macros all at once" - (declare (indent defun) (debug t)) - (if (symbolp package) - (unless (memq package (bound-and-true-p doom-disabled-packages)) - (list (if (or (not (bound-and-true-p byte-compile-current-file)) - (require package nil 'noerror)) - #'progn - #'with-no-warnings) - (let ((body (macroexp-progn body))) - `(if (featurep ',package) - ,body - ;; We intentionally avoid `with-eval-after-load' to prevent - ;; eager macro expansion from pulling (or failing to pull) in - ;; autoloaded macros/packages. - (eval-after-load ',package ',body))))) - (let ((p (car package))) - (cond ((not (keywordp p)) - `(after! (:and ,@package) ,@body)) - ((memq p '(:or :any)) - (macroexp-progn - (cl-loop for next in (cdr package) - collect `(after! ,next ,@body)))) - ((memq p '(:and :all)) - (dolist (next (cdr package)) - (setq body `((after! ,next ,@body)))) - (car body)))))) - ;; DEPRECATED (defmacro def-package! (&rest args) (message "`def-package!' was renamed to `use-package!'; use that instead.") From ede5beed7a4b38f2d7ef10dcf56f98a172f1f2ae Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Jan 2020 16:58:31 -0500 Subject: [PATCH 744/983] Change doom-plist-delete to delete N props --- core/autoload/plist.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/autoload/plist.el b/core/autoload/plist.el index 9fe4274be..87f897598 100644 --- a/core/autoload/plist.el +++ b/core/autoload/plist.el @@ -83,11 +83,11 @@ BODY." p)) ;;;###autoload -(defun doom-plist-delete (plist prop) - "Delete PROP from a copy of PLIST." +(defun doom-plist-delete (plist &rest props) + "Delete PROPS from a copy of PLIST." (let (p) (while plist - (if (not (eq prop (car plist))) + (if (not (memq (car plist) props)) (plist-put! p (car plist) (nth 1 plist))) (setq plist (cddr plist))) p)) From c9498d6ba365a360acba8708295f71aedfe8d39c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Jan 2020 17:26:46 -0500 Subject: [PATCH 745/983] Revert to brotzeit/rustic@a6b8cd8 Until brotzeit/rustic#90 is merged. --- modules/lang/rust/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/rust/packages.el b/modules/lang/rust/packages.el index a003fb7ab..ad4ae583b 100644 --- a/modules/lang/rust/packages.el +++ b/modules/lang/rust/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/rust/packages.el -(package! rustic :pin "124e0286dc") +(package! rustic :pin "a6b8cd8db8") (unless (featurep! +lsp) (package! racer :pin "a0bdf778f0")) From 275cd9171d5d7a385e6e1e8b486c3053a3a3b0dd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Jan 2020 17:30:08 -0500 Subject: [PATCH 746/983] Bump to emacs-evil/evil@3b03a4e --- modules/editor/evil/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index 24c46239f..8a7aed675 100644 --- a/modules/editor/evil/packages.el +++ b/modules/editor/evil/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/evil/packages.el -(package! evil :pin "3a4ea09bdd") +(package! evil :pin "3b03a4ef9a") (package! evil-args :pin "758ad5ae54") (package! evil-easymotion :pin "79c13ed3bc") (package! evil-embrace :pin "4379adea03") From 58c6aea7c56bc42b070bf93842e283cf6cf5b0c3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Jan 2020 17:30:35 -0500 Subject: [PATCH 747/983] Bump to akermu/emacs-libvterm@a970b4f472 --- modules/term/vterm/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/term/vterm/packages.el b/modules/term/vterm/packages.el index 9e95c3dab..608aa9fde 100644 --- a/modules/term/vterm/packages.el +++ b/modules/term/vterm/packages.el @@ -3,4 +3,4 @@ (package! vterm :built-in 'prefer - :pin "a65f1a84ab") + :pin "a970b4f472") From 9a0e0291355bc39ff1d02f026ce666765e41d7f7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Jan 2020 18:37:48 -0500 Subject: [PATCH 748/983] Fix output truncation & indentation on 'doom update' --- core/cli/packages.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 36295dfe5..8f42785df 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -212,8 +212,9 @@ declaration) or dependency thereof that hasn't already been." (puthash local-repo t repos-to-rebuild) (puthash package t packages-to-rebuild) (unless (string-empty-p output) - (print-group! (print! (info "%s" output)))) - (print! (success "(%d/%d) %s updated (%s -> %s)") + (print! (start "\033[K(%d/%d) Updating %s...") i total local-repo) + (print-group! (print! "%s" output))) + (print! (success "\033[K(%d/%d) %s updated (%s -> %s)") i total local-repo (doom--abbrev-commit ref) (doom--abbrev-commit target-ref))) From 53d799f377f814a112299b7696f69dbd9533872d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Jan 2020 19:39:36 -0500 Subject: [PATCH 749/983] Reduce file init work when reading autoloads Should suppress Emacs trying to read file-local variables and/or attempts to open TAGS files for the current project. --- core/cli/autoloads.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 92ef89fe2..700e0523c 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -134,10 +134,8 @@ one wants that.") (form)))) (defun doom-cli--generate-autoloads-autodefs (file buffer module &optional module-enabled-p) - (with-current-buffer - (or (get-file-buffer file) - (autoload-find-file file)) - (goto-char (point-min)) + (with-temp-buffer + (insert-file-contents file) (while (re-search-forward "^;;;###autodef *\\([^\n]+\\)?\n" nil t) (let* ((standard-output buffer) (form (read (current-buffer))) From 5b242c73bbc2236bf1176b561b1d9d53cb2a2440 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 31 Jan 2020 03:04:04 -0500 Subject: [PATCH 750/983] Bump to akermu/emacs-libvterm@4fbf8f8 --- modules/term/vterm/config.el | 6 ++---- modules/term/vterm/packages.el | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/term/vterm/config.el b/modules/term/vterm/config.el index df6d150f3..6abec4d96 100644 --- a/modules/term/vterm/config.el +++ b/modules/term/vterm/config.el @@ -13,10 +13,8 @@ ;; Prevent premature horizontal scrolling hscroll-margin 0) + (setq vterm-kill-buffer-on-exit t) + (add-hook 'vterm-mode-hook #'doom-mark-buffer-as-real-h) - ;; Automatically kill buffer when vterm exits. - (add-hook! 'vterm-exit-functions - (defun +vterm-kill-buffer-on-quit-fn (buffer event) - (if buffer (kill-buffer buffer)))) ;; Modeline serves no purpose in vterm (add-hook 'vterm-mode-hook #'hide-mode-line-mode)) diff --git a/modules/term/vterm/packages.el b/modules/term/vterm/packages.el index 608aa9fde..18e6712c4 100644 --- a/modules/term/vterm/packages.el +++ b/modules/term/vterm/packages.el @@ -3,4 +3,4 @@ (package! vterm :built-in 'prefer - :pin "a970b4f472") + :pin "4fbf8f89ff") From 334f98ea52eee2824f983324d30ff4fb9a6d3cf0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 31 Jan 2020 12:58:32 -0500 Subject: [PATCH 751/983] Bump to brotzeit/rustic@da3820d brotzeit/rustic#90 was merged. --- modules/lang/rust/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/rust/packages.el b/modules/lang/rust/packages.el index ad4ae583b..d20e289fe 100644 --- a/modules/lang/rust/packages.el +++ b/modules/lang/rust/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/rust/packages.el -(package! rustic :pin "a6b8cd8db8") +(package! rustic :pin "da3820de18") (unless (featurep! +lsp) (package! racer :pin "a0bdf778f0")) From 88e828d1f3f19f233c4ff909f71180dd03c2bece Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 31 Jan 2020 16:18:16 -0500 Subject: [PATCH 752/983] Add +lsp flag to lang/elm Closes #2460 --- modules/lang/elm/config.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/lang/elm/config.el b/modules/lang/elm/config.el index 695a596f7..71c3dd97c 100644 --- a/modules/lang/elm/config.el +++ b/modules/lang/elm/config.el @@ -3,6 +3,9 @@ (after! elm-mode (add-hook 'elm-mode-hook #'rainbow-delimiters-mode) + (when (featurep! +lsp) + (add-hook 'elm-mode-local-vars-hook #'lsp!)) + (set-company-backend! 'elm-mode 'company-elm) (set-repl-handler! 'elm-mode #'run-elm-interactive) (set-pretty-symbols! 'elm-mode From c733a6aa27a61763b65a4b868d0851fc5a361e47 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 31 Jan 2020 16:21:23 -0500 Subject: [PATCH 753/983] evil-respect-visual-line-mode = nil Since this is vim's default behavior (gj and gk exist for navigating virtual lines). Also the cause of #2447 --- modules/editor/evil/config.el | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 3a77cd7a9..282de7552 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -27,7 +27,6 @@ directives. By default, this only recognizes C directives.") (defvar evil-want-C-w-delete t) (defvar evil-want-Y-yank-to-eol t) (defvar evil-want-abbrev-expand-on-insert-exit nil) -(defvar evil-respect-visual-line-mode t) (use-package! evil :hook (doom-init-modules . evil-mode) From e31bb63c14fb24b021d4898b0d61073bedc1f10f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 31 Jan 2020 16:43:08 -0500 Subject: [PATCH 754/983] message-log-max = 8192 --- core/core.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/core.el b/core/core.el index f87e5bb41..2b046726f 100644 --- a/core/core.el +++ b/core/core.el @@ -134,6 +134,9 @@ users).") ;; ;;; Emacs core configuration +;; lo', longer logs ahoy, so we may reliably locate lapses in doom's logic +(setq message-log-max 8192) + ;; Reduce debug output, well, unless we've asked for it. (setq debug-on-error doom-debug-mode jka-compr-verbose doom-debug-mode) From 7c0e88466402931a70c934d8423e522886118434 Mon Sep 17 00:00:00 2001 From: Alexander Graul Date: Fri, 31 Jan 2020 23:13:08 +0100 Subject: [PATCH 755/983] Add persistent-soft to core/packages.el core/autoload/cache.el defines doom-cache-* functions that wrap around the persistent-soft package. --- core/packages.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/packages.el b/core/packages.el index aa937738a..f6e2f9a14 100644 --- a/core/packages.el +++ b/core/packages.el @@ -42,3 +42,6 @@ ;; core-keybinds.el (package! general :pin "f6e928622d") (package! which-key :pin "db3d003e90") + +;; autoload/cache.el +(package! persistent-soft :pin "a1e0ddf") From 0dc173a63156e8a875705d1ef9e820120c420839 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 1 Feb 2020 02:07:24 -0500 Subject: [PATCH 756/983] Polish progress output during 'doom update' --- core/cli/packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 8f42785df..bf9992d7c 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -194,7 +194,7 @@ declaration) or dependency thereof that hasn't already been." (setq output (doom--commit-log-between ref target-ref))) (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) - ((print! (start "\033[K(%d/%d) Re-cloning %s...%s") i total local-repo esc) + ((print! (start "\033[K(%d/%d) Re-cloning %s...") i total local-repo esc) (let ((repo (straight--repos-dir local-repo))) (ignore-errors (delete-directory repo 'recursive)) @@ -213,7 +213,7 @@ declaration) or dependency thereof that hasn't already been." (puthash package t packages-to-rebuild) (unless (string-empty-p output) (print! (start "\033[K(%d/%d) Updating %s...") i total local-repo) - (print-group! (print! "%s" output))) + (print-group! (print! (indent 2 output)))) (print! (success "\033[K(%d/%d) %s updated (%s -> %s)") i total local-repo (doom--abbrev-commit ref) From d496f277419b366c6eabcd548613b67ca924a970 Mon Sep 17 00:00:00 2001 From: Seong Yong-ju Date: Sat, 1 Feb 2020 17:06:15 +0900 Subject: [PATCH 757/983] Add LSP support for ESS R --- docs/modules.org | 2 +- modules/lang/ess/README.org | 11 +++++++++-- modules/lang/ess/config.el | 8 +++++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/docs/modules.org b/docs/modules.org index 5ec4128e7..89edf0a4b 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -106,7 +106,7 @@ Modules that bring support for a language or group of languages to Emacs. + elm - TODO + emacs-lisp - TODO + erlang - TODO -+ [[file:../modules/lang/ess/README.org][ess]] - TODO ++ [[file:../modules/lang/ess/README.org][ess]] =+lsp= - TODO + [[file:../modules/lang/faust/README.org][faust]] - TODO + [[file:../modules/lang/fsharp/README.org][fsharp]] - TODO + [[file:../modules/lang/go/README.org][go]] =+lsp= - TODO diff --git a/modules/lang/ess/README.org b/modules/lang/ess/README.org index 55330d7ab..2fc985b7b 100644 --- a/modules/lang/ess/README.org +++ b/modules/lang/ess/README.org @@ -4,9 +4,16 @@ This module adds support for various statistics languages, including R, S-Plus, SAS, Julia and Stata. * Table of Contents :TOC: -- [[Appendix][Appendix]] - - [[Keybindings][Keybindings]] +- [[#prequisites][Prequisites]] +- [[#appendix][Appendix]] + - [[#keybindings][Keybindings]] +* Prequisites +This module has sevral optional dependencies: + ++ [[https://github.com/jimhester/lintr][lintr]]: Enables R linting. ++ [[https://github.com/REditorSupport/languageserver][languageserver]]: Enables LSP support in an R buffer (with =+lsp= flag). + * Appendix ** Keybindings *** :map ess-doc-map diff --git a/modules/lang/ess/config.el b/modules/lang/ess/config.el index b38b09a4e..d97c4507b 100644 --- a/modules/lang/ess/config.el +++ b/modules/lang/ess/config.el @@ -19,9 +19,15 @@ ess-style 'DEFAULT ess-history-directory (expand-file-name "ess-history/" doom-cache-dir)) + (set-docsets! 'ess-r-mode "R") + (if (featurep! +lsp) + (add-hook 'ess-r-mode-hook #'lsp!) + (set-lookup-handlers! 'ess-r-mode + :documentation #'ess-display-help-on-object)) + (set-repl-handler! 'ess-r-mode #'+ess/open-r-repl) (set-repl-handler! 'ess-julia-mode #'+ess/open-julia-repl) - (set-lookup-handlers! '(ess-r-mode ess-julia-mode) + (set-lookup-handlers! 'ess-julia-mode :documentation #'ess-display-help-on-object) (set-evil-initial-state! 'ess-r-help-mode 'normal) From 1158412ae8883f030c2c92abc37be81e894be797 Mon Sep 17 00:00:00 2001 From: Seong Yong-ju Date: Sun, 2 Feb 2020 12:00:36 +0900 Subject: [PATCH 758/983] Fix a typo: sevral -> several --- modules/lang/ess/README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/ess/README.org b/modules/lang/ess/README.org index 2fc985b7b..a50f434d7 100644 --- a/modules/lang/ess/README.org +++ b/modules/lang/ess/README.org @@ -9,7 +9,7 @@ SAS, Julia and Stata. - [[#keybindings][Keybindings]] * Prequisites -This module has sevral optional dependencies: +This module has several optional dependencies: + [[https://github.com/jimhester/lintr][lintr]]: Enables R linting. + [[https://github.com/REditorSupport/languageserver][languageserver]]: Enables LSP support in an R buffer (with =+lsp= flag). From abd12a05158efff260b1569af31f6cab3e30f1d1 Mon Sep 17 00:00:00 2001 From: Seong Yong-ju Date: Sun, 2 Feb 2020 12:02:24 +0900 Subject: [PATCH 759/983] Make the LSP lookup handler fallback to ESS --- modules/lang/ess/config.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/lang/ess/config.el b/modules/lang/ess/config.el index d97c4507b..3bdd2e5ed 100644 --- a/modules/lang/ess/config.el +++ b/modules/lang/ess/config.el @@ -20,14 +20,12 @@ ess-history-directory (expand-file-name "ess-history/" doom-cache-dir)) (set-docsets! 'ess-r-mode "R") - (if (featurep! +lsp) - (add-hook 'ess-r-mode-hook #'lsp!) - (set-lookup-handlers! 'ess-r-mode - :documentation #'ess-display-help-on-object)) + (when (featurep! +lsp) + (add-hook 'ess-r-mode-hook #'lsp!)) (set-repl-handler! 'ess-r-mode #'+ess/open-r-repl) (set-repl-handler! 'ess-julia-mode #'+ess/open-julia-repl) - (set-lookup-handlers! 'ess-julia-mode + (set-lookup-handlers! '(ess-r-mode ess-julia-mode) :documentation #'ess-display-help-on-object) (set-evil-initial-state! 'ess-r-help-mode 'normal) From 80a636cb7a383c74ba621bac01b4f643b0c27b77 Mon Sep 17 00:00:00 2001 From: Sean Escriva Date: Sat, 1 Feb 2020 22:35:16 -0500 Subject: [PATCH 760/983] docs: update mu macos install cmd `--with-emacs` arg no longer exists in the formula --- modules/email/mu4e/README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/email/mu4e/README.org b/modules/email/mu4e/README.org index 51c495a9c..a29f675b3 100644 --- a/modules/email/mu4e/README.org +++ b/modules/email/mu4e/README.org @@ -43,7 +43,7 @@ This module requires: ** MacOS #+BEGIN_SRC sh -brew install mu --with-emacs +brew install mu # And one of the following brew install isync # mbsync brew install offlineimap From 373f1d532d6d8dc4d42f74e6e752447200437997 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 2 Feb 2020 00:05:55 -0500 Subject: [PATCH 761/983] Bump to hlissner/doom-snippets@22c96ef To include the following PRs: + hlissner/doom-snippets#27 + hlissner/doom-snippets#26 + hlissner/doom-snippets#23 + hlissner/doom-snippets#21 + hlissner/doom-snippets#20 --- modules/editor/snippets/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/snippets/packages.el b/modules/editor/snippets/packages.el index 7134aa58b..f7b347f1c 100644 --- a/modules/editor/snippets/packages.el +++ b/modules/editor/snippets/packages.el @@ -7,4 +7,4 @@ :recipe (:host github :repo "hlissner/doom-snippets" :files ("*.el" "*")) - :pin "7ba920d1de") + :pin "22c96ef548") From cb86fd046cdfeb6befeb296c906ff9110ff7eb72 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 2 Feb 2020 02:01:40 -0500 Subject: [PATCH 762/983] lang/common-lisp: SPC m {m,M} -> sly macroexpand macrostep-expand was the wrong command (and plugin). --- modules/lang/common-lisp/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/lang/common-lisp/config.el b/modules/lang/common-lisp/config.el index bfed909f7..58a76876d 100644 --- a/modules/lang/common-lisp/config.el +++ b/modules/lang/common-lisp/config.el @@ -70,7 +70,8 @@ :map lisp-mode-map :desc "Sly" "'" #'sly :desc "Sly (ask)" ";" (λ!! #'sly '-) - :desc "Expand macro" "m" #'macrostep-expand + :desc "Expand macro" "m" #'sly-macroexpand-1-inplace + :desc "Expand macro in popup" "M" #'sly-macroexpand-1 (:prefix ("c" . "compile") :desc "Compile file" "c" #'sly-compile-file :desc "Compile/load file" "C" #'sly-compile-and-load-file From 7224f0870a1dd59714d21aa03749d47dd87e536d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 2 Feb 2020 02:02:41 -0500 Subject: [PATCH 763/983] lang/common-lisp: add *sly-description* popup rule --- modules/lang/common-lisp/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/lang/common-lisp/config.el b/modules/lang/common-lisp/config.el index 58a76876d..8320e1232 100644 --- a/modules/lang/common-lisp/config.el +++ b/modules/lang/common-lisp/config.el @@ -32,6 +32,7 @@ '(("^\\*sly-mrepl" :vslot 2 :size 0.3 :quit nil :ttl nil) ("^\\*sly-compilation" :vslot 3 :ttl nil) ("^\\*sly-traces" :vslot 4 :ttl nil) + ("^\\*sly-description" :vslot 5 :size 0.3 :ttl 0) ;; Do not display debugger or inspector buffers in a popup window. These ;; buffers are meant to be displayed with sufficient vertical space. ("^\\*sly-\\(?:db\\|inspector\\)" :ignore t))) From 4a5cf047611f65002f49feef9675c26bcf313ef1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 2 Feb 2020 02:05:20 -0500 Subject: [PATCH 764/983] General refactors & appease byte-compiler --- core/autoload/packages.el | 7 ++- core/autoload/projects.el | 4 +- core/autoload/scratch.el | 1 + core/autoload/text.el | 61 +++++++++++++------------ modules/app/calendar/autoload.el | 6 +-- modules/editor/evil/config.el | 2 +- modules/term/eshell/autoload/company.el | 1 + 7 files changed, 46 insertions(+), 36 deletions(-) diff --git a/core/autoload/packages.el b/core/autoload/packages.el index 68e2f8f6e..57a182e69 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -210,7 +210,8 @@ ones." "Return an alist mapping package names (strings) to pinned commits (strings)." (let (alist) (dolist (package doom-packages alist) - (with-plist! (cdr package) (recipe modules disable ignore pin unpin) + (cl-destructuring-bind (_ &key disable ignore pin unpin &allow-other-keys) + package (when (and (not ignore) (not disable) (or pin unpin)) @@ -223,7 +224,9 @@ ones." "Return an alist mapping package names (strings) to pinned commits (strings)." (let (alist) (dolist (package doom-packages alist) - (with-plist! (cdr package) (recipe modules disable ignore pin unpin) + (cl-destructuring-bind + (_ &key recipe disable ignore pin unpin &allow-other-keys) + package (when (and (not ignore) (not disable) (or unpin diff --git a/core/autoload/projects.el b/core/autoload/projects.el index 6decf3501..e3b924b13 100644 --- a/core/autoload/projects.el +++ b/core/autoload/projects.el @@ -1,6 +1,8 @@ ;;; core/autoload/projects.el -*- lexical-binding: t; -*- -(defvar projectile-project-root nil) +(defvar projectile-enable-caching) +(defvar projectile-project-root) +(defvar projectile-require-project-root) ;;;###autoload (autoload 'projectile-relevant-known-projects "projectile") diff --git a/core/autoload/scratch.el b/core/autoload/scratch.el index 5e5b216ab..3d4947f0d 100644 --- a/core/autoload/scratch.el +++ b/core/autoload/scratch.el @@ -96,6 +96,7 @@ following: ;; ;;; Commands +(defvar projectile-enable-caching) ;;;###autoload (defun doom/open-scratch-buffer (&optional arg project-p) "Pop up a persistent scratch buffer. diff --git a/core/autoload/text.el b/core/autoload/text.el index edfb2997b..ae91e71e7 100644 --- a/core/autoload/text.el +++ b/core/autoload/text.el @@ -117,34 +117,37 @@ in some cases." ;;; Commands (defun doom--bol-bot-eot-eol (&optional pos) - (let* ((bol (if visual-line-mode - (save-excursion - (beginning-of-visual-line) - (point)) - (line-beginning-position))) - (bot (save-excursion - (goto-char bol) - (skip-chars-forward " \t\r") - (point))) - (eol (if visual-line-mode - (save-excursion (end-of-visual-line) (point)) - (line-end-position))) - (eot (or (save-excursion - (if (not comment-use-syntax) - (progn - (goto-char bol) - (when (re-search-forward comment-start-skip eol t) - (or (match-end 1) (match-beginning 0)))) - (goto-char eol) - (while (and (doom-point-in-comment-p) - (> (point) bol)) - (backward-char)) - (skip-chars-backward " " bol) - (unless (or (eq (char-after) 32) (eolp)) - (forward-char)) - (point))) - eol))) - (list bol bot eot eol))) + (save-excursion + (when pos + (goto-char pos)) + (let* ((bol (if visual-line-mode + (save-excursion + (beginning-of-visual-line) + (point)) + (line-beginning-position))) + (bot (save-excursion + (goto-char bol) + (skip-chars-forward " \t\r") + (point))) + (eol (if visual-line-mode + (save-excursion (end-of-visual-line) (point)) + (line-end-position))) + (eot (or (save-excursion + (if (not comment-use-syntax) + (progn + (goto-char bol) + (when (re-search-forward comment-start-skip eol t) + (or (match-end 1) (match-beginning 0)))) + (goto-char eol) + (while (and (doom-point-in-comment-p) + (> (point) bol)) + (backward-char)) + (skip-chars-backward " " bol) + (unless (or (eq (char-after) 32) (eolp)) + (forward-char)) + (point))) + eol))) + (list bol bot eot eol)))) (defvar doom--last-backward-pt nil) ;;;###autoload @@ -154,7 +157,7 @@ beginning of the line. The opposite of `doom/forward-to-last-non-comment-or-eol'." (interactive "d") (let ((pt (or point (point)))) - (cl-destructuring-bind (bol bot _eot eol) + (cl-destructuring-bind (bol bot _eot _eol) (doom--bol-bot-eot-eol pt) (cond ((> pt bot) (goto-char bot)) diff --git a/modules/app/calendar/autoload.el b/modules/app/calendar/autoload.el index f642c184b..7a6a1b73f 100644 --- a/modules/app/calendar/autoload.el +++ b/modules/app/calendar/autoload.el @@ -3,9 +3,9 @@ (defvar +calendar--wconf nil) (defun +calendar--init () - (if-let* ((win (cl-loop for win in (doom-visible-windows) - if (string-match-p "^\\*cfw:" (buffer-name (window-buffer win))) - return win))) + (if-let (win (cl-find-if (lambda (b) (string-match-p "^\\*cfw:" (buffer-name b))) + (doom-visible-windows) + :key #'window-buffer)) (select-window win) (call-interactively +calendar-open-function))) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 282de7552..bb225764c 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -126,7 +126,7 @@ directives. By default, this only recognizes C directives.") (count-lines (point-min) (point-max)) (buffer-size))))) - ;; 'gq' moves the cursor to the beginning of selection. Disable this, since + ;; '=' moves the cursor to the beginning of selection. Disable this, since ;; it's more disruptive than helpful. (defadvice! +evil--dont-move-cursor-a (orig-fn &rest args) :around #'evil-indent diff --git a/modules/term/eshell/autoload/company.el b/modules/term/eshell/autoload/company.el index 1d24cf99a..94d0662ce 100644 --- a/modules/term/eshell/autoload/company.el +++ b/modules/term/eshell/autoload/company.el @@ -3,6 +3,7 @@ ;; REVIEW Refactor me +(defvar pcomplete-suffix-list) (defvar company-pcomplete-available 'unknown) (defun company-pcomplete--prefix () From 29e4719a7d3c9991445be63e755e0cb31fd4fd00 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 2 Feb 2020 02:07:13 -0500 Subject: [PATCH 765/983] Disable GUI elements even if you use chemacs #2354 --- core/core-ui.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-ui.el b/core/core-ui.el index 032097401..4ffb2f450 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -282,7 +282,7 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (setq window-resize-pixelwise t frame-resize-pixelwise t) -(unless EMACS27+ +(when (bound-and-true-p tool-bar-mode) ;; We do this in early-init.el too, but in case the user is on Emacs 26 we do ;; it here too: disable tool and scrollbars, as Doom encourages ;; keyboard-centric workflows, so these are just clutter (the scrollbar also From a14e3afc107f5160b84ac772c7cb690dea27b8f5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 2 Feb 2020 02:36:21 -0500 Subject: [PATCH 766/983] Fix async lookup handlers for tuareg-mode #2394 --- modules/lang/ocaml/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/ocaml/config.el b/modules/lang/ocaml/config.el index c31564d3f..d2db49bb6 100644 --- a/modules/lang/ocaml/config.el +++ b/modules/lang/ocaml/config.el @@ -53,7 +53,7 @@ (after! tuareg (set-company-backend! 'tuareg-mode 'merlin-company-backend) - (set-lookup-handlers! 'tuareg-mode + (set-lookup-handlers! 'tuareg-mode :async t :definition #'merlin-locate :references #'merlin-occurrences :documentation #'merlin-document)) From ac52e644a86ede4a9a7d4f254e2b7b2fb20da2e1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 2 Feb 2020 03:11:44 -0500 Subject: [PATCH 767/983] Revert doom-modeline formats to defaults It's not tenable for me to maintain this package more than I have to anymore, now that I no longer use doom-modeline. Addresses #2356, #1680 --- modules/ui/modeline/config.el | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/modules/ui/modeline/config.el b/modules/ui/modeline/config.el index 337074c27..1a4a7e288 100644 --- a/modules/ui/modeline/config.el +++ b/modules/ui/modeline/config.el @@ -58,19 +58,6 @@ (doom-modeline-set-project-modeline) (hide-mode-line-mode)))) - ;; Remove unused segments & extra padding - (doom-modeline-def-modeline 'main - '(bar window-number matches buffer-info remote-host buffer-position selection-info) - '(objed-state misc-info persp-name irc mu4e github debug input-method buffer-encoding lsp major-mode process vcs checker)) - - (doom-modeline-def-modeline 'special - '(bar window-number matches buffer-info-simple buffer-position selection-info) - '(objed-state misc-info persp-name debug input-method irc-buffers buffer-encoding lsp major-mode process checker)) - - (doom-modeline-def-modeline 'project - '(bar window-number buffer-default-directory) - '(misc-info mu4e github debug battery " " major-mode process)) - ;; Some functions modify the buffer, causing the modeline to show a false ;; modified state, so force them to behave. (defadvice! +modeline--inhibit-modification-hooks-a (orig-fn &rest args) From 6337912d135552845fff3b3b5388367aeae3840a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 2 Feb 2020 03:13:15 -0500 Subject: [PATCH 768/983] Bump to seagle0128/doom-modeline@159fe50 --- modules/ui/modeline/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/modeline/packages.el b/modules/ui/modeline/packages.el index 37575888b..46b55cc28 100644 --- a/modules/ui/modeline/packages.el +++ b/modules/ui/modeline/packages.el @@ -2,7 +2,7 @@ ;;; ui/modeline/packages.el (unless (featurep! +light) - (package! doom-modeline :pin "21ac606325")) + (package! doom-modeline :pin "159fe50fbd")) (package! anzu :pin "592f8ee6d0") (when (featurep! :editor evil) (package! evil-anzu :pin "9bca6ca14d")) From a12a54b28f1fca705f51fdb7a80f3863369fea08 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 2 Feb 2020 03:18:49 -0500 Subject: [PATCH 769/983] Revert direnv modifications Not worth the trouble. I'll move it to my private config. Fixes #2384 Closes #2384 --- modules/tools/direnv/config.el | 51 +++++++--------------------------- 1 file changed, 10 insertions(+), 41 deletions(-) diff --git a/modules/tools/direnv/config.el b/modules/tools/direnv/config.el index 10a6a7681..69c1824d8 100644 --- a/modules/tools/direnv/config.el +++ b/modules/tools/direnv/config.el @@ -7,37 +7,20 @@ "use" "rvm" "use_nix" "use_guix") "TODO") + +;; +;;; Packages + (use-package! direnv :after-call after-find-file dired-initial-position-hook :config - (add-hook! 'direnv-mode-hook - (defun +direnv-init-h () - "Instead of checking for direnv on `post-command-hook', check only once, -when the file is first opened/major mode is activated. This is significantly -less expensive, but is less sensitive to changes to .envrc done outside of -Emacs." - (direnv--disable) - (funcall (if direnv-mode 'add-hook 'remove-hook) - 'after-change-major-mode-hook - #'direnv--maybe-update-environment))) - - (defadvice! +direnv--make-process-environment-buffer-local-a (items) - :filter-return #'direnv--export - (when items - (mapc 'kill-local-variable '(process-environment exec-path)) - (mapc 'make-local-variable '(process-environment exec-path))) - items) - ;; Fontify special .envrc keywords; it's a good indication of whether or not ;; we've typed them correctly. (add-hook! 'direnv-envrc-mode-hook (defun +direnv-envrc-fontify-keywords-h () (font-lock-add-keywords nil `((,(regexp-opt +direnv--keywords 'symbols) - (0 font-lock-keyword-face))))) - (defun +direnv-update-on-save-h () - (add-hook 'after-save-hook #'direnv--maybe-update-environment - nil 'local))) + (0 font-lock-keyword-face)))))) (defadvice! +direnv-update-a (&rest _) "Update direnv. Useful to advise functions that may run @@ -46,24 +29,10 @@ flycheck issues with direnv and on nix." :before #'flycheck-default-executable-find (direnv--maybe-update-environment)) - (defadvice! +direnv--fail-gracefully-a (orig-fn) - "Don't try to update direnv if the executable isn't present." - :around #'direnv--maybe-update-environment - (if (executable-find "direnv") - (when (file-readable-p (or buffer-file-name default-directory)) - (funcall orig-fn)) - (doom-log "Couldn't find direnv executable"))) - - (defadvice! +direnv-update-async-shell-command-a (command &optional output-buffer _error-buffer) - :before #'shell-command - (when (string-match "[ \t]*&[ \t]*\\'" command) - (let ((environment process-environment) - (path exec-path) - (shell shell-file-name)) - (with-current-buffer - (get-buffer-create (or output-buffer "*Async Shell Command*")) - (setq-local process-environment environment) - (setq-local exec-path path) - (setq-local shell-file-name shell))))) + (defadvice! +direnv--fail-gracefully-a (&rest _) + "Don't try to use direnv if the executable isn't present." + :before-while #'direnv-update-directory-environment + (or (executable-find "direnv") + (ignore (doom-log "Couldn't find direnv executable")))) (direnv-mode +1)) From 48b4847db39a5ae35f08fe147d4c94a93890f559 Mon Sep 17 00:00:00 2001 From: Seong Yong-ju Date: Sun, 2 Feb 2020 17:26:28 +0900 Subject: [PATCH 770/983] Call lsp! in ess-r-mode-local-hook --- modules/lang/ess/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/ess/config.el b/modules/lang/ess/config.el index 3bdd2e5ed..8f1812199 100644 --- a/modules/lang/ess/config.el +++ b/modules/lang/ess/config.el @@ -21,7 +21,7 @@ (set-docsets! 'ess-r-mode "R") (when (featurep! +lsp) - (add-hook 'ess-r-mode-hook #'lsp!)) + (add-hook 'ess-r-mode-local-vars-hook #'lsp!)) (set-repl-handler! 'ess-r-mode #'+ess/open-r-repl) (set-repl-handler! 'ess-julia-mode #'+ess/open-julia-repl) From 0c08143a22134d6cc80593c9291210b060c93cf1 Mon Sep 17 00:00:00 2001 From: Tej Chajed Date: Sun, 2 Feb 2020 10:40:25 -0500 Subject: [PATCH 771/983] Add fstar module --- init.example.el | 1 + modules/lang/fstar/README.org | 3 ++ modules/lang/fstar/config.el | 55 ++++++++++++++++++++++++++++++++++ modules/lang/fstar/packages.el | 4 +++ 4 files changed, 63 insertions(+) create mode 100644 modules/lang/fstar/README.org create mode 100644 modules/lang/fstar/config.el create mode 100644 modules/lang/fstar/packages.el diff --git a/init.example.el b/init.example.el index 7fc2f63f9..7e970506d 100644 --- a/init.example.el +++ b/init.example.el @@ -121,6 +121,7 @@ ;;ess ; emacs speaks statistics ;;faust ; dsp, but you get to keep your soul ;;fsharp ; ML stands for Microsoft's Language + ;;fstar ; (dependent) types and (monadic) effects and Z3 ;;go ; the hipster dialect ;;(haskell +dante) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python diff --git a/modules/lang/fstar/README.org b/modules/lang/fstar/README.org new file mode 100644 index 000000000..4f7c312b7 --- /dev/null +++ b/modules/lang/fstar/README.org @@ -0,0 +1,3 @@ +#+TITLE: :lang F* + +This module adds [[https://fstar-lang.org/][F*]] support, powered by [[https://github.com/FStarLang/fstar-mode.el][fstar-mode.el]]. diff --git a/modules/lang/fstar/config.el b/modules/lang/fstar/config.el new file mode 100644 index 000000000..354d3d7b9 --- /dev/null +++ b/modules/lang/fstar/config.el @@ -0,0 +1,55 @@ +;;; lang/fstar/config.el -*- lexical-binding: t; -*- + +(after! fstar-mode + (set-lookup-handlers! 'fstar-mode + :definition #'fstar-jump-to-definition + :documentation #'fstar-doc-at-point-dwim) + + (map! :map fstar-mode-map + :localleader + :desc "F* next" "]" #'fstar-subp-advance-next + :desc "F* go to point" "." #'fstar-subp-advance-or-retract-to-point + :desc "F* previous" "[" #'fstar-subp-retract-last + (:prefix ("p" . "proof") + :desc "go to point (lax)" "l" #'fstar-subp-advance-or-retract-to-point-lax + :desc "compile buffer (lax)" "b" #'fstar-subp-advance-to-point-max-lax + "q" #'fstar-subp-kill-one-or-many + "k" #'fstar-subp-kill-z3 + "r" #'fstar-subp-reload-to-point) + + (:prefix ("l" . "layout") + "c" #'fstar-quit-windows + "o" #'fstar-outline) + + ;; Moving around + "'" #'fstar-jump-to-related-error + (:prefix ("j" . "jump") + "j" #'fstar-jump-to-definition + "f" #'fstar-jump-to-definition-other-frame + "w" #'fstar-jump-to-definition-other-window + "e" #'fstar-jump-to-related-error + "F" #'fstar-jump-to-related-error-other-frame + "W" #'fstar-jump-to-related-error-other-window + "d" #'fstar-visit-dependency + "a" #'fstar-visit-interface-or-implementation + :desc "jump to first unprocessed line" "u" #'fstar-subp-goto-beginning-of-unprocessed) + + ;; Help !!! + (:prefix ("h" . "help") + "y" #'fstar-copy-help-at-point + "w" #'fstar-browse-wiki + "W" #'fstar-browse-wiki-in-browser + "o" #'fstar-list-options + "p" #'fstar-quick-peek) + + (:prefix ("a" . "ask (queries)") + "a" #'fstar-print + "e" #'fstar-eval + "E" #'fstar-eval-custom + "s" #'fstar-search + "d" #'fstar-doc) + + (:prefix ("i" . "insert") + "m" #'fstar-insert-match-dwim + "M" #'fstar-insert-match) + )) diff --git a/modules/lang/fstar/packages.el b/modules/lang/fstar/packages.el new file mode 100644 index 000000000..2916c38be --- /dev/null +++ b/modules/lang/fstar/packages.el @@ -0,0 +1,4 @@ +;; -*- no-byte-compile: t; -*- +;;; lang/fstar.el + +(package! fstar-mode) From 34f205c4da3e1e2edbb31ccb1965eda88f07c498 Mon Sep 17 00:00:00 2001 From: Tej Chajed Date: Sun, 2 Feb 2020 14:08:55 -0500 Subject: [PATCH 772/983] Address issues from code review --- docs/modules.org | 1 + modules/lang/fstar/README.org | 57 +++++++++++++++++++++++++++++++++- modules/lang/fstar/packages.el | 2 +- 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/docs/modules.org b/docs/modules.org index 5ec4128e7..bd552174c 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -109,6 +109,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/ess/README.org][ess]] - TODO + [[file:../modules/lang/faust/README.org][faust]] - TODO + [[file:../modules/lang/fsharp/README.org][fsharp]] - TODO ++ [[file:../modules/lang/fstar/README.org][fstar]] - F* support + [[file:../modules/lang/go/README.org][go]] =+lsp= - TODO + [[file:../modules/lang/haskell/README.org][haskell]] =+dante +intero +lsp= - TODO + hy - TODO diff --git a/modules/lang/fstar/README.org b/modules/lang/fstar/README.org index 4f7c312b7..e40b253cc 100644 --- a/modules/lang/fstar/README.org +++ b/modules/lang/fstar/README.org @@ -1,3 +1,58 @@ -#+TITLE: :lang F* +#+TITLE: :lang fstar +#+TITLE: lang/fstar +#+DATE: February 2, 2020 +#+SINCE: 2.0.10 +#+STARTUP: inlineimages nofold + +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#maintainers][Maintainers]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] +- [[#prerequisites][Prerequisites]] + - [[#f][F*]] + - [[#macos][macOS]] + - [[#arch-linux][Arch Linux]] +- [[#features][Features]] +- [[#configuration][Configuration]] +- [[#troubleshooting][Troubleshooting]] + +* Description This module adds [[https://fstar-lang.org/][F*]] support, powered by [[https://github.com/FStarLang/fstar-mode.el][fstar-mode.el]]. + ++ Syntax highlighting ++ Interactively process F* files one definition at a time ++ Query the running F* process to look up definitions, documentation, and + theorems + +** Maintainers ++ [[https://github.com/tchajed][@tchajed]] (Author) + +** Module Flags +This module provides no flags. + +** Plugins ++ [[https://github.com/FStarLang/fstar-mode.el][fstar-mode]] + +* Prerequisites +** F* +While fstar-mode supports the latest release of F*, you may have a better +experience installing a more recent version from source. See F*'s [[https://github.com/FStarLang/FStar/blob/master/INSTALL.md][INSTALL.md]]. +*** macOS +#+BEGIN_SRC sh +brew install fstar +#+END_SRC +*** Arch Linux +Install ~fstar~ from the AUR: +#+BEGIN_SRC sh +yaourt -S fstar +#+END_SRC + +* Features + +* Configuration + +* Troubleshooting +If you're having trouble getting F* to start correctly, you may need to +configure a few variables in fstar-mode; see its [[https://github.com/FStarLang/fstar-mode.el][README]] for more details. diff --git a/modules/lang/fstar/packages.el b/modules/lang/fstar/packages.el index 2916c38be..80c8aa533 100644 --- a/modules/lang/fstar/packages.el +++ b/modules/lang/fstar/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- -;;; lang/fstar.el +;;; lang/fstar/packages.el (package! fstar-mode) From 047ea8dab52038a3bc83aa136cd51d09ee7a38ce Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 2 Feb 2020 16:00:45 -0500 Subject: [PATCH 773/983] Update & fix org-tree-slide-mode integration --- modules/config/default/+evil-bindings.el | 2 +- modules/lang/org/autoload/contrib-present.el | 69 ++++++++++---------- modules/lang/org/contrib/present.el | 48 ++++++++------ 3 files changed, 61 insertions(+), 58 deletions(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 8bf7742be..efd62d817 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -615,7 +615,7 @@ :desc "Indent style" "I" #'doom/toggle-indent-style :desc "Line numbers" "l" #'doom/toggle-line-numbers (:when (featurep! :lang org +present) - :desc "org-tree-slide mode" "p" #'+org-present/start) + :desc "org-tree-slide mode" "p" #'org-tree-slide-mode) :desc "Read-only mode" "r" #'read-only-mode (:when (featurep! :checkers spell) :desc "Flyspell" "s" #'flyspell-mode) diff --git a/modules/lang/org/autoload/contrib-present.el b/modules/lang/org/autoload/contrib-present.el index 0a4925146..6f40b31af 100644 --- a/modules/lang/org/autoload/contrib-present.el +++ b/modules/lang/org/autoload/contrib-present.el @@ -9,10 +9,13 @@ if (buffer-local-value 'org-tree-slide-mode buf) return t) (org-tree-slide-mode -1) - (remove-hook 'kill-buffer-hook #'+org-present--cleanup-org-tree-slides-mode))) + (remove-hook 'kill-buffer-hook #'+org-present--cleanup-org-tree-slides-mode + 'local))) (defun +org-present--make-invisible (beg end) - (let ((overlay (make-overlay beg end))) + (unless (assq '+org-present buffer-invisibility-spec) + (add-to-invisibility-spec '(+org-present))) + (let ((overlay (make-overlay beg (1+ end)))) (push overlay +org-present--overlays) (overlay-put overlay 'invisible '+org-present))) @@ -21,19 +24,21 @@ ;;; Hooks ;;;###autoload -(defun +org-present-add-overlays-h () - "TODO" - (add-to-invisibility-spec '(+org-present)) +(defun +org-present-hide-blocks-h () + "Hide org #+ constructs." (save-excursion - ;; hide org-mode options starting with #+ (goto-char (point-min)) (while (re-search-forward "^[[:space:]]*\\(#\\+\\)\\(\\(?:BEGIN\\|END\\|ATTR\\)[^[:space:]]+\\).*" nil t) (+org-present--make-invisible (match-beginning 1) - (match-end 0))) - ;; hide stars in headings + (match-end 0))))) + +;;;###autoload +(defun +org-present-hide-leading-stars-h () + "Hide leading stars in headings." + (save-excursion (goto-char (point-min)) - (while (re-search-forward "^\\(\\*+\\s-\\)" nil t) + (while (re-search-forward "^\\(\\*+\\)" nil t) (+org-present--make-invisible (match-beginning 1) (match-end 1))))) ;;;###autoload @@ -55,43 +60,35 @@ (defvar cwm-left-fringe-ratio) (defvar cwm-centered-window-width) ;;;###autoload -(defun +org-present-init-org-tree-window-h () +(defun +org-present-prettify-slide-h () "TODO" "Set up the org window for presentation." (doom/window-maximize-buffer) (let ((arg (if org-tree-slide-mode +1 -1))) (when (fboundp 'centered-window-mode) - (let ((cwm-use-vertical-padding t) - (cwm-frame-internal-border 110) - (cwm-left-fringe-ratio -10) - (cwm-centered-window-width 240)) - (centered-window-mode arg))) - (window-divider-mode (* arg -1)) + (setq-local cwm-use-vertical-padding t) + (setq-local cwm-frame-internal-border 100) + (setq-local cwm-left-fringe-ratio -10) + (setq-local cwm-centered-window-width 300) + (centered-window-mode arg)) (hide-mode-line-mode arg) (+org-pretty-mode arg) (cond (org-tree-slide-mode - (org-indent-mode -1) + (set-window-fringes nil 0 0) + (when (bound-and-true-p solaire-mode) + (solaire-mode -1) + (fringe-mode 0)) + (when (bound-and-true-p flyspell-mode) + (flyspell-mode -1)) + (add-hook 'kill-buffer-hook #'+org-present--cleanup-org-tree-slides-mode + nil 'local) (text-scale-set +org-present-text-scale) - (ignore-errors (org-latex-preview '(4))) - (set-face-attribute 'org-level-2 nil :height 1.4)) + (ignore-errors (org-latex-preview '(4)))) (t - (org-indent-mode +1) (text-scale-set 0) + (set-window-fringes nil fringe-mode fringe-mode) (org-clear-latex-preview) - (set-face-attribute 'org-level-2 nil :height 1.0) (+org-present-remove-overlays-h) - (org-remove-inline-images))))) - - -;; -;;; Commands - -(defvar +org-present--overlays nil) -;;;###autoload -(defun +org-present/start () - "TODO" - (interactive) - (unless (derived-mode-p 'org-mode) - (error "Not in an org buffer")) - (call-interactively #'org-tree-slide-mode) - (add-hook 'kill-buffer-hook #'+org-present--cleanup-org-tree-slides-mode)) + (org-remove-inline-images) + (org-mode))) + (redraw-display))) diff --git a/modules/lang/org/contrib/present.el b/modules/lang/org/contrib/present.el index c882c4435..b6c329b02 100644 --- a/modules/lang/org/contrib/present.el +++ b/modules/lang/org/contrib/present.el @@ -1,7 +1,7 @@ ;;; lang/org/contrib/present.el -*- lexical-binding: t; -*- ;;;###if (featurep! +present) -(defvar +org-present-text-scale 7 +(defvar +org-present-text-scale 6 "The `text-scale-amount' for `org-tree-slide-mode'.") (after! ox @@ -24,31 +24,37 @@ (setq org-tree-slide-skip-outline-level 2 org-tree-slide-activate-message " " org-tree-slide-deactivate-message " " - org-tree-slide-modeline-display nil) + org-tree-slide-modeline-display nil + org-tree-slide-heading-emphasis t) - (map! :map org-tree-slide-mode-map - :n [right] #'org-tree-slide-move-next-tree - :n [left] #'org-tree-slide-move-previous-tree) + (add-hook 'org-tree-slide-mode-after-narrow-hook #'org-display-inline-images) + (add-hook! 'org-tree-slide-mode-hook + #'+org-present-hide-blocks-h + #'+org-present-prettify-slide-h) - (add-hook! 'org-tree-slide-mode-after-narrow-hook - #'+org-present-detect-slide-h - #'+org-present-add-overlays-h - #'org-display-inline-images) - - (add-hook 'org-tree-slide-mode-hook #'+org-present-init-org-tree-window-h) + (when (featurep! :editor evil) + (map! :map org-tree-slide-mode-map + :n [C-right] #'org-tree-slide-move-next-tree + :n [C-left] #'org-tree-slide-move-previous-tree) + (add-hook 'org-tree-slide-mode-hook #'evil-normalize-keymaps)) (defadvice! +org-present--narrow-to-subtree-a (orig-fn &rest args) "Narrow to the target subtree when you start the presentation." :around #'org-tree-slide--display-tree-with-narrow (cl-letf (((symbol-function #'org-narrow-to-subtree) - (lambda () (save-excursion - (save-match-data - (org-with-limited-levels - (narrow-to-region - (progn (org-back-to-heading t) - (forward-line 1) - (point)) - (progn (org-end-of-subtree t t) - (when (and (org-at-heading-p) (not (eobp))) (backward-char 1)) - (point))))))))) + (lambda () + (save-excursion + (save-match-data + (org-with-limited-levels + (narrow-to-region + (progn + (when (org-before-first-heading-p) + (org-next-visible-heading 1)) + (ignore-errors (org-up-heading-all 99)) + (forward-line 1) + (point)) + (progn (org-end-of-subtree t t) + (when (and (org-at-heading-p) (not (eobp))) + (backward-char 1)) + (point))))))))) (apply orig-fn args)))) From 04d14bcba933b5f44d0921d3b23fb413dfb16b6e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 2 Feb 2020 16:03:34 -0500 Subject: [PATCH 774/983] Minor refactors & comment correction --- core/autoload/packages.el | 11 +++++++---- docs/api.org | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/core/autoload/packages.el b/core/autoload/packages.el index 57a182e69..0a6b581b8 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -210,12 +210,12 @@ ones." "Return an alist mapping package names (strings) to pinned commits (strings)." (let (alist) (dolist (package doom-packages alist) - (cl-destructuring-bind (_ &key disable ignore pin unpin &allow-other-keys) + (cl-destructuring-bind (name &key disable ignore pin unpin &allow-other-keys) package (when (and (not ignore) (not disable) (or pin unpin)) - (setf (alist-get (doom-package-recipe-repo (car package)) alist + (setf (alist-get (doom-package-recipe-repo name) alist nil 'remove #'equal) (unless unpin pin))))))) @@ -240,8 +240,11 @@ ones." "Return straight recipes for non-builtin packages with a local-repo." (let (recipes) (dolist (recipe (hash-table-values straight--recipe-cache)) - (with-plist! recipe (local-repo type) - (when (and local-repo (not (eq type 'built-in))) + (cl-destructuring-bind (&key local-repo type no-build &allow-other-keys) + recipe + (unless (or (null local-repo) + (eq type 'built-in) + no-build) (push recipe recipes)))) (nreverse recipes))) diff --git a/docs/api.org b/docs/api.org index dc9f3d2a5..749141a5a 100644 --- a/docs/api.org +++ b/docs/api.org @@ -388,7 +388,7 @@ These are side-by-side comparisons, showing how to bind keys with and without *** package! #+BEGIN_SRC elisp :eval no ;; To install a package that can be found on ELPA or any of the sources -;; specified in `doom-core-package-sources': +;; specified in `straight-recipe-repositories': (package! evil) (package! js2-mode) (package! rainbow-delimiters) From 22bc21a712444ec131a8e193ae9e56d75d1c1fe2 Mon Sep 17 00:00:00 2001 From: xeijin Date: Sun, 2 Feb 2020 23:16:47 +0000 Subject: [PATCH 775/983] windows: disable all-the-icons font install the command is actually fairly useless on windows anyway -- unless you are specifically running emacs with elevated privileges, you get the following error: ``` This will download and install fonts, are you sure you want to do this? (y or n) y Contacting host: raw.githubusercontent.com:443 mm-write-region: Opening output file: Permission denied, c:/Windows/Fonts/material-design-icons.ttf ``` --- core/cli/install.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/core/cli/install.el b/core/cli/install.el index 69efbcd5a..85da5b11e 100644 --- a/core/cli/install.el +++ b/core/cli/install.el @@ -80,14 +80,15 @@ DOOMDIR environment variable. e.g. (print! "Regenerating autoloads files") (doom-cli-reload-autoloads) - (if nofonts-p - (print! (warn "Not installing fonts, as requested")) - (when (or doom-auto-accept - (y-or-n-p "Download and install all-the-icon's fonts?")) - (require 'all-the-icons) - (let ((window-system (cond (IS-MAC 'ns) - (IS-LINUX 'x)))) - (all-the-icons-install-fonts 'yes)))) + (unless IS-WINDOWS + (if nofonts-p + (print! (warn "Not installing fonts, as requested")) + (when (or doom-auto-accept + (y-or-n-p "Download and install all-the-icon's fonts?")) + (require 'all-the-icons) + (let ((window-system (cond (IS-MAC 'ns) + (IS-LINUX 'x)))) + (all-the-icons-install-fonts 'yes))))) (when (file-exists-p "~/.emacs") (print! (warn "A ~/.emacs file was detected. This conflicts with Doom and should be deleted!"))) From 266ea5038c1b5888cbfe116cee30536546247559 Mon Sep 17 00:00:00 2001 From: xeijin Date: Sun, 2 Feb 2020 23:23:05 +0000 Subject: [PATCH 776/983] Update install.el --- core/cli/install.el | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/core/cli/install.el b/core/cli/install.el index 85da5b11e..1d64bb59b 100644 --- a/core/cli/install.el +++ b/core/cli/install.el @@ -80,15 +80,16 @@ DOOMDIR environment variable. e.g. (print! "Regenerating autoloads files") (doom-cli-reload-autoloads) - (unless IS-WINDOWS - (if nofonts-p - (print! (warn "Not installing fonts, as requested")) - (when (or doom-auto-accept - (y-or-n-p "Download and install all-the-icon's fonts?")) - (require 'all-the-icons) - (let ((window-system (cond (IS-MAC 'ns) - (IS-LINUX 'x)))) - (all-the-icons-install-fonts 'yes))))) + + (if nofonts-p + (print! (warn "Not installing fonts, as requested")) + (unless IS-WINDOWS + (when (or doom-auto-accept + (y-or-n-p "Download and install all-the-icon's fonts?")) + (require 'all-the-icons) + (let ((window-system (cond (IS-MAC 'ns) + (IS-LINUX 'x)))) + (all-the-icons-install-fonts 'yes))))) (when (file-exists-p "~/.emacs") (print! (warn "A ~/.emacs file was detected. This conflicts with Doom and should be deleted!"))) From f9e8cb2f0176721dd15311566204113a7e58d3c8 Mon Sep 17 00:00:00 2001 From: xeijin Date: Sun, 2 Feb 2020 23:39:42 +0000 Subject: [PATCH 777/983] adding warning message --- core/cli/install.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/cli/install.el b/core/cli/install.el index 1d64bb59b..0748323e1 100644 --- a/core/cli/install.el +++ b/core/cli/install.el @@ -79,11 +79,11 @@ DOOMDIR environment variable. e.g. (print! "Regenerating autoloads files") (doom-cli-reload-autoloads) - - + (if nofonts-p (print! (warn "Not installing fonts, as requested")) - (unless IS-WINDOWS + (if IS-WINDOWS + (print! (warn "Automated installation is not supported on Windows, see installation instructions: https://github.com/domtronn/all-the-icons.el#installing-fonts")) (when (or doom-auto-accept (y-or-n-p "Download and install all-the-icon's fonts?")) (require 'all-the-icons) From 8de0f62c529172d55378a98fbe0e9ffd4e4b4f7a Mon Sep 17 00:00:00 2001 From: xeijin Date: Sun, 2 Feb 2020 23:44:03 +0000 Subject: [PATCH 778/983] apply Henrik changes --- core/cli/install.el | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/core/cli/install.el b/core/cli/install.el index 0748323e1..719ca07b0 100644 --- a/core/cli/install.el +++ b/core/cli/install.el @@ -80,16 +80,22 @@ DOOMDIR environment variable. e.g. (print! "Regenerating autoloads files") (doom-cli-reload-autoloads) - (if nofonts-p - (print! (warn "Not installing fonts, as requested")) - (if IS-WINDOWS - (print! (warn "Automated installation is not supported on Windows, see installation instructions: https://github.com/domtronn/all-the-icons.el#installing-fonts")) - (when (or doom-auto-accept - (y-or-n-p "Download and install all-the-icon's fonts?")) + (cond (nofonts-p) + (IS-WINDOWS + (print! (warn "Doom cannot install all-the-icons' fonts on Windows!\n")) + (print-group! + (print! + (concat "You'll have to do so manually:\n\n" + " 1. Launch Doom Emacs\n" + " 2. Execute 'M-x all-the-icons-install-fonts' to download the fonts\n" + " 3. Open the download location in windows explorer\n" + " 4. Open each font file to install them")))) + ((or doom-auto-accept + (y-or-n-p "Download and install all-the-icon's fonts?")) (require 'all-the-icons) (let ((window-system (cond (IS-MAC 'ns) (IS-LINUX 'x)))) - (all-the-icons-install-fonts 'yes))))) + (all-the-icons-install-fonts 'yes)))) (when (file-exists-p "~/.emacs") (print! (warn "A ~/.emacs file was detected. This conflicts with Doom and should be deleted!"))) From 65f859cf4d93330015530a508fc46d74fdb18998 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 2 Feb 2020 22:10:09 -0500 Subject: [PATCH 779/983] Bump to hlissner/emacs-doom-themes@aa215ed --- modules/ui/doom/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/doom/packages.el b/modules/ui/doom/packages.el index ed58f0f9a..d396bbc5a 100644 --- a/modules/ui/doom/packages.el +++ b/modules/ui/doom/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/doom/packages.el -(package! doom-themes :pin "d48df7b02e") +(package! doom-themes :pin "aa215edcc2") (package! solaire-mode :pin "4ac324ccb0") From 93fa5edf2fd57e3f2310a804dd2464b3643bd84e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 2 Feb 2020 22:33:53 -0500 Subject: [PATCH 780/983] Bump to mhayashi1120/wgrep@e67e737 --- modules/completion/ivy/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/completion/ivy/packages.el b/modules/completion/ivy/packages.el index 484e3ed6e..47e935078 100644 --- a/modules/completion/ivy/packages.el +++ b/modules/completion/ivy/packages.el @@ -9,7 +9,7 @@ (package! amx :pin "3af93ca066") (package! counsel-projectile :pin "cadc6de707") (package! ivy-rich :pin "7bfc7262fd") -(package! wgrep :pin "379afd89eb") +(package! wgrep :pin "e67e737184") (if (featurep! +prescient) (package! ivy-prescient :pin "7fd8c3b802") From 1cacfcf9627c2ec9116eafc118ab0cf874e9fd1b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 3 Feb 2020 13:01:46 -0500 Subject: [PATCH 781/983] Fix #2479 --- core/autoload/projects.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/autoload/projects.el b/core/autoload/projects.el index e3b924b13..edce48b76 100644 --- a/core/autoload/projects.el +++ b/core/autoload/projects.el @@ -1,7 +1,7 @@ ;;; core/autoload/projects.el -*- lexical-binding: t; -*- +(defvar projectile-project-root nil) (defvar projectile-enable-caching) -(defvar projectile-project-root) (defvar projectile-require-project-root) ;;;###autoload (autoload 'projectile-relevant-known-projects "projectile") From 06c604503a32943f331404f07dda24deac052832 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 3 Feb 2020 13:27:43 -0500 Subject: [PATCH 782/983] Don't auto-fill in latex math/markdonw code blocks Fixes #2453 --- modules/lang/latex/config.el | 7 +++++-- modules/lang/markdown/config.el | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/lang/latex/config.el b/modules/lang/latex/config.el index 7e1e6d101..48a2e19c0 100644 --- a/modules/lang/latex/config.el +++ b/modules/lang/latex/config.el @@ -48,8 +48,11 @@ If no viewers are found, `latex-preview-pane' is used.") (setq-default TeX-master t) ;; set-up chktex (setcar (cdr (assoc "Check" TeX-command-list)) "chktex -v6 -H %s") - ;; tell emacs how to parse tex files - (setq-hook! 'TeX-mode-hook ispell-parser 'tex) + (setq-hook! 'TeX-mode-hook + ;; tell emacs how to parse tex files + ispell-parser 'tex + ;; Don't auto-fill in math blocks + fill-nobreak-predicate (cons #'texmathp fill-nobreak-predicate)) ;; Enable word wrapping (add-hook 'TeX-mode-hook #'visual-line-mode) ;; Fold TeX macros diff --git a/modules/lang/markdown/config.el b/modules/lang/markdown/config.el index 819bcc3ec..897800e44 100644 --- a/modules/lang/markdown/config.el +++ b/modules/lang/markdown/config.el @@ -48,6 +48,10 @@ capture, the end position, and the output buffer.") (set-lookup-handlers! '(markdown-mode gfm-mode) :file #'markdown-follow-thing-at-point) + (setq-hook! 'markdown-mode-hook + fill-nobreak-predicate (cons #'markdown-code-block-at-point-p + fill-nobreak-predicate)) + ;; HACK Prevent mis-fontification of YAML metadata blocks in `markdown-mode' ;; which occurs when the first line contains a colon in it. See ;; https://github.com/jrblevin/markdown-mode/issues/328. From a933c5a47543890a7467245d8ccc7d95b809fe58 Mon Sep 17 00:00:00 2001 From: Seong Yong-ju Date: Tue, 4 Feb 2020 12:48:27 +0900 Subject: [PATCH 783/983] Bump to Fuco1/smartparens@be8d5c9a63 --- core/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/packages.el b/core/packages.el index aa937738a..2cbb93469 100644 --- a/core/packages.el +++ b/core/packages.el @@ -19,7 +19,7 @@ (when IS-MAC (package! ns-auto-titlebar :pin "1efc30d385")) (package! pcre2el :pin "0b5b2a2c17") -(package! smartparens :pin "9449ae0859") +(package! smartparens :pin "be8d5c9a63") (package! so-long :built-in 'prefer ; included in Emacs 27+ ;; REVIEW so-long is slated to be published to ELPA eventually, but until then From 86384b8533899e46478d967505934f842eab85bf Mon Sep 17 00:00:00 2001 From: Seong Yong-ju Date: Tue, 4 Feb 2020 20:42:57 +0900 Subject: [PATCH 784/983] Bump to hlissner/doom-snippets@2781b782a3 --- modules/editor/snippets/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/snippets/packages.el b/modules/editor/snippets/packages.el index f7b347f1c..a75cce163 100644 --- a/modules/editor/snippets/packages.el +++ b/modules/editor/snippets/packages.el @@ -7,4 +7,4 @@ :recipe (:host github :repo "hlissner/doom-snippets" :files ("*.el" "*")) - :pin "22c96ef548") + :pin "2781b782a3") From 1575300ad4f06328ae1fba46626ce2bd9ce5841b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 4 Feb 2020 13:58:43 -0500 Subject: [PATCH 785/983] Add iu/au text-object for urls #2484 --- modules/editor/evil/autoload/textobjects.el | 30 +++++++++++++++++++++ modules/editor/evil/config.el | 1 + 2 files changed, 31 insertions(+) diff --git a/modules/editor/evil/autoload/textobjects.el b/modules/editor/evil/autoload/textobjects.el index bdadf229c..a1c53b03f 100644 --- a/modules/editor/evil/autoload/textobjects.el +++ b/modules/editor/evil/autoload/textobjects.el @@ -11,3 +11,33 @@ (cl-destructuring-bind (beg . end) (bounds-of-thing-at-point 'defun) (evil-range beg end type))) + +;;;###autoload (autoload '+evil:inner-url-txtobj "editor/evil/autoload/textobjects" nil nil) +(evil-define-text-object +evil:inner-url-txtobj (count &optional _beg _end type) + "Text object to select the inner url at point. + +This excludes the protocol and querystring." + (cl-destructuring-bind (beg . end) + (bounds-of-thing-at-point 'url) + (evil-range + (save-excursion + (goto-char beg) + (re-search-forward "://" end t)) + (save-excursion + (goto-char end) + (- (if-let (pos (re-search-backward "[?#]" beg t)) + pos + end) + (if (evil-visual-state-p) + 1 + 0))) + type))) + +;;;###autoload (autoload '+evil:outer-url-txtobj "editor/evil/autoload/textobjects" nil nil) +(evil-define-text-object +evil:outer-url-txtobj (count &optional _beg _end type) + "Text object to select the whole url at point." + (cl-destructuring-bind (beg . end) + (bounds-of-thing-at-point 'url) + (evil-range + beg (- end (if (evil-visual-state-p) 1 0)) + type))) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index bb225764c..3a57ce55d 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -548,6 +548,7 @@ To change these keys see `+evil-repeat-keys'." :textobj "i" #'evil-indent-plus-i-indent #'evil-indent-plus-a-indent :textobj "j" #'evil-indent-plus-i-indent-up-down #'evil-indent-plus-a-indent-up-down :textobj "k" #'evil-indent-plus-i-indent-up #'evil-indent-plus-a-indent-up + :textobj "u" #'+evil:inner-url-txtobj #'+evil:outer-url-txtobj :textobj "x" #'evil-inner-xml-attr #'evil-outer-xml-attr ;; evil-easymotion (see `+evil/easymotion') From 75e7466ad93bb982fd7e54c598b1ea879909127e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 4 Feb 2020 21:02:26 -0500 Subject: [PATCH 786/983] Remove gsw binding to evil-snipe Not sure how that got there. --- modules/editor/evil/config.el | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 3a57ce55d..2ee9f58c7 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -557,11 +557,6 @@ To change these keys see `+evil-repeat-keys'." "a" (evilem-create #'evil-forward-arg) "A" (evilem-create #'evil-backward-arg) "s" #'evil-avy-goto-char-2 - "w" (evilem-create #'evil-snipe-repeat - :pre-hook (save-excursion (call-interactively #'evil-snipe-f)) - :bind ((evil-snipe-scope 'visible) - (evil-snipe-enable-highlight) - (evil-snipe-enable-incremental-highlight))) "SPC" (λ!! #'evil-avy-goto-char-timer t) "/" #'evil-avy-goto-char-timer)) From 688b7c0a760ac45888242c3b50f16183252894be Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 5 Feb 2020 11:10:59 -0500 Subject: [PATCH 787/983] Bump to seagle0128/doom-modeline@31a5ae99b8 --- modules/ui/modeline/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/modeline/packages.el b/modules/ui/modeline/packages.el index 46b55cc28..a342d2ba8 100644 --- a/modules/ui/modeline/packages.el +++ b/modules/ui/modeline/packages.el @@ -2,7 +2,7 @@ ;;; ui/modeline/packages.el (unless (featurep! +light) - (package! doom-modeline :pin "159fe50fbd")) + (package! doom-modeline :pin "31a5ae99b8")) (package! anzu :pin "592f8ee6d0") (when (featurep! :editor evil) (package! evil-anzu :pin "9bca6ca14d")) From ca831ae347c63b45f7c67a7f756fb7cfb6cd9d59 Mon Sep 17 00:00:00 2001 From: Yiming Chen Date: Thu, 6 Feb 2020 15:46:51 +0800 Subject: [PATCH 788/983] Fix recenter after evil-ex-search-word-forward --- modules/editor/evil/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 2ee9f58c7..b990bbae0 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -159,7 +159,7 @@ directives. By default, this only recognizes C directives.") ;; Recenter screen after most searches (dolist (fn '(evil-visualstar/begin-search-forward evil-visualstar/begin-search-backward - evil-ex-search-word-backward + evil-ex-search-word-forward evil-ex-search-word-backward evil-ex-search-forward evil-ex-search-backward)) From 7387b603000a2eae0a7fc50605f80867f9869199 Mon Sep 17 00:00:00 2001 From: Yiming Chen Date: Thu, 6 Feb 2020 15:47:19 +0800 Subject: [PATCH 789/983] Add recenter after evil-ex-search-{next,previous} --- modules/editor/evil/config.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index b990bbae0..ba932bd44 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -161,6 +161,8 @@ directives. By default, this only recognizes C directives.") evil-visualstar/begin-search-backward evil-ex-search-word-forward evil-ex-search-word-backward + evil-ex-search-next + evil-ex-search-previous evil-ex-search-forward evil-ex-search-backward)) (advice-add fn :after #'doom-recenter-a)) From 53f1293955118190cedf96abc9d1048d614d4728 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 13:33:48 -0500 Subject: [PATCH 790/983] Bump to seagle0128/grip-mode@1a61bb7 From seagle0128/grip-mode@cbf20fd --- modules/lang/markdown/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/markdown/packages.el b/modules/lang/markdown/packages.el index 7b0c60f74..da473ffe8 100644 --- a/modules/lang/markdown/packages.el +++ b/modules/lang/markdown/packages.el @@ -6,7 +6,7 @@ (package! edit-indirect :pin "935ded353b") (when (featurep! +grip) - (package! grip-mode :pin "cbf20fd131")) + (package! grip-mode :pin "1a61bb71a7")) (when (featurep! :editor evil +everywhere) (package! evil-markdown From c912d78afee8367f385947eb08647f772a851746 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 13:34:14 -0500 Subject: [PATCH 791/983] Bump to company-mode/company-mode@9de9905 From company-mode/company-mode@d505356 --- modules/completion/company/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/completion/company/packages.el b/modules/completion/company/packages.el index eda8b3c16..87a5be858 100644 --- a/modules/completion/company/packages.el +++ b/modules/completion/company/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; completion/company/packages.el -(package! company :pin "d5053561cb") +(package! company :pin "9de9905ed2") (package! company-dict :pin "cd7b8394f6") (package! company-prescient :pin "7fd8c3b802") (when (featurep! +childframe) From 65b2d50e055907e9a6d271b07f8013514ff955aa Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 13:35:36 -0500 Subject: [PATCH 792/983] Bump to lassik/emacs-format-all-the-code@f57a2a8 From lassik/emacs-format-all-the-code@d126830 --- modules/editor/format/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/format/packages.el b/modules/editor/format/packages.el index 752c0ef77..e56316cac 100644 --- a/modules/editor/format/packages.el +++ b/modules/editor/format/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/format/packages.el -(package! format-all :pin "d126830a73") +(package! format-all :pin "f57a2a8abb") From 450eed72686629b1a4719c0b7c3563620f3b7796 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 15:18:50 -0500 Subject: [PATCH 793/983] Bump to vspinu/company-math@a796053 From vspinu/company-math@600e494 --- modules/lang/latex/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/latex/packages.el b/modules/lang/latex/packages.el index 9d0a2e206..608934c61 100644 --- a/modules/lang/latex/packages.el +++ b/modules/lang/latex/packages.el @@ -15,7 +15,7 @@ (when (featurep! :completion company) (package! company-auctex :pin "48c42c58ce") (package! company-reftex :pin "33935e9654") - (package! company-math :pin "600e494496")) + (package! company-math :pin "a796053590")) (when (featurep! :completion ivy) (package! ivy-bibtex :pin "d4471232be")) (when (featurep! :completion helm) From 5eeb3626102c9e5faa7128f72e1af0ec0b17958c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 13:39:21 -0500 Subject: [PATCH 794/983] Ensure workspace in insertion order Closes #2488 Fixes #2487 --- modules/ui/workspaces/autoload/workspaces.el | 7 ++++--- modules/ui/workspaces/config.el | 11 +++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/modules/ui/workspaces/autoload/workspaces.el b/modules/ui/workspaces/autoload/workspaces.el index 72fd29292..6289cb8e4 100644 --- a/modules/ui/workspaces/autoload/workspaces.el +++ b/modules/ui/workspaces/autoload/workspaces.el @@ -68,13 +68,14 @@ error if NAME doesn't exist." "Return a list of workspace structs (satisifes `+workspace-p')." ;; We don't use `hash-table-values' because it doesn't ensure order in older ;; versions of Emacs - (cdr (cl-loop for persp being the hash-values of *persp-hash* - collect persp))) + (cl-loop for name in persp-names-cache + if (gethash name *persp-hash*) + collect it)) ;;;###autoload (defun +workspace-list-names () "Return the list of names of open workspaces." - (mapcar #'safe-persp-name (+workspace-list))) + persp-names-cache) ;;;###autoload (defun +workspace-buffer-list (&optional persp) diff --git a/modules/ui/workspaces/config.el b/modules/ui/workspaces/config.el index c7581a44b..d54107f29 100644 --- a/modules/ui/workspaces/config.el +++ b/modules/ui/workspaces/config.el @@ -76,10 +76,13 @@ stored in `persp-save-dir'.") "Ensure a main workspace exists." (when persp-mode (let (persp-before-switch-functions) - ;; The default perspective persp-mode creates (`persp-nil-name') is - ;; special and doesn't represent a real persp object, so buffers can't - ;; really be assigned to it, among other quirks. We create a *real* main - ;; workspace to fill this role. + ;; The default perspective persp-mode creates is special and doesn't + ;; represent a real persp object, so buffers can't really be assigned + ;; to it, among other quirks. We hide the nil persp... + (when (equal (car persp-names-cache) persp-nil-name) + (pop persp-names-cache)) + ;; ...and create a *real* main workspace to fill this role, and hide + ;; the nil perspective. (unless (or (persp-get-by-name +workspaces-main) ;; Start from 2 b/c persp-mode counts the nil workspace (> (hash-table-count *persp-hash*) 2)) From 3ab70d78eb6600836758f48064dbb1b24d36ffcd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 15:17:29 -0500 Subject: [PATCH 795/983] Add +workspace/swap-{left,right} commands For changing the order of workspaces. Relevant to #2488, #2487 --- modules/ui/workspaces/autoload/workspaces.el | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/modules/ui/workspaces/autoload/workspaces.el b/modules/ui/workspaces/autoload/workspaces.el index 6289cb8e4..74ee32b89 100644 --- a/modules/ui/workspaces/autoload/workspaces.el +++ b/modules/ui/workspaces/autoload/workspaces.el @@ -404,6 +404,31 @@ the next." ((+workspace-error "Can't delete last workspace" t))))))) +;;;###autoload +(defun +workspace/swap-left (&optional count) + "Swap the current workspace with the COUNTth workspace on its left." + (interactive "p") + (let* ((current-name (+workspace-current-name)) + (count (or count 1)) + (index (- (cl-position current-name persp-names-cache :test #'equal) + count)) + (names (remove current-name persp-names-cache))) + (unless names + (user-error "Only one workspace")) + (let ((index (min (max 0 index) (length names)))) + (setq persp-names-cache + (append (cl-subseq names 0 index) + (list current-name) + (cl-subseq names index)))) + (when (called-interactively-p 'any) + (+workspace/display)))) + +;;;###autoload +(defun +workspace/swap-right (&optional count) + "Swap the current workspace with the COUNTth workspace on its right." + (interactive "p") + (funcall-interactively #'+workspace/swap-left (- count))) + ;; ;;; Tabs display in minibuffer From 7eafc543476922d43222d65379e55c89baa1586e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 14:14:36 -0500 Subject: [PATCH 796/983] Fix code-folding at EOL when cursor isn't at EOL --- modules/editor/fold/autoload/fold.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/editor/fold/autoload/fold.el b/modules/editor/fold/autoload/fold.el index 7105885d9..69726ebaa 100644 --- a/modules/editor/fold/autoload/fold.el +++ b/modules/editor/fold/autoload/fold.el @@ -27,7 +27,10 @@ (save-excursion (ignore-errors (or (hs-looking-at-block-start-p) - (hs-find-block-beginning))))) + (hs-find-block-beginning) + (unless (eolp) + (end-of-line) + (+fold--hideshow-fold-p)))))) (defun +fold--invisible-points (count) (let (points) From a4293b53a174379c4f6ea3202aec72c405ee385f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 14:48:05 -0500 Subject: [PATCH 797/983] Enable rustic-clippy checker in LSP's absence --- modules/lang/rust/config.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/lang/rust/config.el b/modules/lang/rust/config.el index 0e80f7d58..1435d7c1a 100644 --- a/modules/lang/rust/config.el +++ b/modules/lang/rust/config.el @@ -28,8 +28,10 @@ (add-hook 'rustic-mode-hook #'rainbow-delimiters-mode) - (when (featurep! +lsp) - (add-hook 'rustic-mode-local-vars-hook #'lsp!)) + (if (featurep! +lsp) + (add-hook 'rustic-mode-local-vars-hook #'lsp!) + (after! rustic-flycheck + (add-to-list 'flycheck-checkers 'rustic-clippy))) (map! :map rustic-mode-map :localleader From 77e58609d43df9facf721248e024f5e845f0a09c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 15:27:03 -0500 Subject: [PATCH 798/983] doom/update-pinned-package-form: improve error feedback --- core/autoload/packages.el | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/core/autoload/packages.el b/core/autoload/packages.el index 0a6b581b8..56a4753d1 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -297,25 +297,29 @@ Grabs the latest commit id of the package using 'git'." (user-error "Not on a `package!' call") (backward-char) (let* ((recipe (cdr (sexp-at-point))) - (name (car recipe)) + (package (car recipe)) + (oldid (doom-package-get package :pin)) (id (cdr (doom-call-process "git" "ls-remote" (straight-vc-git--destructure (doom-plist-merge (plist-get (cdr recipe) :recipe) - (or (cdr (straight-recipes-retrieve name)) - (plist-get (cdr (assq name doom-packages)) :recipe))) + (or (cdr (straight-recipes-retrieve package)) + (plist-get (cdr (assq package doom-packages)) :recipe))) (upstream-repo upstream-host) (straight-vc-git--encode-url upstream-repo upstream-host)))))) (unless id - (user-error "No id for %S package" name)) + (user-error "No id for %S package" package)) (let* ((id (if select (car (split-string (completing-read "Commit: " (split-string id "\n" t)))) (car (split-string id)))) (id (substring id 0 10))) - (if (re-search-forward ":pin +\"\\([^\"]+\\)\"" (cdr (bounds-of-thing-at-point 'sexp)) t) - (replace-match id t t nil 1) - (thing-at-point--end-of-sexp) - (backward-char) - (insert " :pin " (prin1-to-string id)))))))) + (if (and oldid (string-match-p (concat "^" oldid) id)) + (user-error "No update necessary") + (if (re-search-forward ":pin +\"\\([^\"]+\\)\"" (cdr (bounds-of-thing-at-point 'sexp)) t) + (replace-match id t t nil 1) + (thing-at-point--end-of-sexp) + (backward-char) + (insert " :pin " (prin1-to-string id))) + (message "Updated %S: %s -> %s" package oldid id))))))) From 5a8fb8173951fc3603c7ca63f6d2403dfc644b58 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 15:28:51 -0500 Subject: [PATCH 799/983] Adjust visual-fill-column after text scaling --- modules/ui/zen/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ui/zen/config.el b/modules/ui/zen/config.el index 487b11d6a..7be558f92 100644 --- a/modules/ui/zen/config.el +++ b/modules/ui/zen/config.el @@ -20,7 +20,8 @@ (defun +zen-enable-text-scaling-mode-h () "Enable `mixed-pitch-mode' when in `+zen-mixed-pitch-modes'." (when (/= +zen-text-scale 0) - (text-scale-set (if writeroom-mode +zen-text-scale 0))))) + (text-scale-set (if writeroom-mode +zen-text-scale 0)) + (visual-fill-column-adjust)))) ;; Adjust margins when text size is changed (advice-add #'text-scale-adjust :after #'visual-fill-column-adjust)) From 7afa8a7e902e44c9a11e29c23a2b673ef9c1345a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 15:29:28 -0500 Subject: [PATCH 800/983] Refactor tools/direnv --- modules/tools/direnv/config.el | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/modules/tools/direnv/config.el b/modules/tools/direnv/config.el index 69c1824d8..04abdab15 100644 --- a/modules/tools/direnv/config.el +++ b/modules/tools/direnv/config.el @@ -1,6 +1,6 @@ ;;; tools/direnv/config.el -*- lexical-binding: t; -*- -(defvar +direnv--keywords +(defvar +direnv-keywords '("direnv_layout_dir" "PATH_add" "path_add" "log_status" "log_error" "has" "join_args" "expand_path" "dotenv" "user_rel_path" "find_up" "source_env" "watch_file" "source_up" "direnv_load" "MANPATH_add" "load_prefix" "layout" @@ -12,22 +12,18 @@ ;;; Packages (use-package! direnv - :after-call after-find-file dired-initial-position-hook + :hook (before-hack-local-variables . direnv--maybe-update-environment) + :hook (flycheck-before-syntax-check . direnv--maybe-update-environment) + :hook (direnv-envrc-mode . +direnv-envrc-fontify-keywords-h) :config - ;; Fontify special .envrc keywords; it's a good indication of whether or not - ;; we've typed them correctly. - (add-hook! 'direnv-envrc-mode-hook - (defun +direnv-envrc-fontify-keywords-h () - (font-lock-add-keywords - nil `((,(regexp-opt +direnv--keywords 'symbols) - (0 font-lock-keyword-face)))))) + (add-to-list 'direnv-non-file-modes 'vterm-mode) - (defadvice! +direnv-update-a (&rest _) - "Update direnv. Useful to advise functions that may run -environment-sensitive logic like `flycheck-default-executable-find'. This fixes -flycheck issues with direnv and on nix." - :before #'flycheck-default-executable-find - (direnv--maybe-update-environment)) + (defun +direnv-envrc-fontify-keywords-h () + "Fontify special .envrc keywords; it's a good indication of whether or not +we've typed them correctly." + (font-lock-add-keywords + nil `((,(regexp-opt +direnv-keywords 'symbols) + (0 font-lock-keyword-face))))) (defadvice! +direnv--fail-gracefully-a (&rest _) "Don't try to use direnv if the executable isn't present." From 1910453e29b652ba3370b694125f9f914ea81914 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 15:30:50 -0500 Subject: [PATCH 801/983] The byte-compiler ate my baby --- core/autoload/fonts.el | 3 +- core/autoload/packages.el | 2 +- modules/lang/emacs-lisp/autoload.el | 4 +- modules/term/eshell/autoload/company.el | 53 +++++++++++++------------ modules/tools/lookup/autoload/lookup.el | 2 +- modules/ui/modeline/autoload.el | 12 ++---- 6 files changed, 36 insertions(+), 40 deletions(-) diff --git a/core/autoload/fonts.el b/core/autoload/fonts.el index f1d9f1b58..8df22d185 100644 --- a/core/autoload/fonts.el +++ b/core/autoload/fonts.el @@ -44,8 +44,7 @@ FRAME parameter defaults to current frame." (let* ((font (frame-parameter nil 'font)) (font (doom--font-name font)) (increment (* increment doom-font-increment)) - (zoom-factor (or doom--font-scale 0)) - success) + (zoom-factor (or doom--font-scale 0))) (let ((new-size (+ (string-to-number (aref font xlfd-regexp-pixelsize-subnum)) increment))) (unless (> new-size 0) diff --git a/core/autoload/packages.el b/core/autoload/packages.el index 56a4753d1..9d6d7eed0 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -54,7 +54,7 @@ (car (gethash (symbol-name package) straight--build-cache))) ;;;###autoload -(defun doom-package-dependencies (package &optional recursive noerror) +(defun doom-package-dependencies (package &optional recursive _noerror) "Return a list of dependencies for a package." (let ((deps (nth 1 (gethash (symbol-name package) straight--build-cache)))) (if recursive diff --git a/modules/lang/emacs-lisp/autoload.el b/modules/lang/emacs-lisp/autoload.el index cdbf89ff2..6941ebfb5 100644 --- a/modules/lang/emacs-lisp/autoload.el +++ b/modules/lang/emacs-lisp/autoload.el @@ -88,7 +88,7 @@ library/userland functions" ((and (symbolp (setq module (sexp-at-point))) (string-prefix-p "+" (symbol-name module))) (while (symbolp (sexp-at-point)) - (beginning-of-sexp)) + (thing-at-point--beginning-of-sexp)) (setq flag module module (car (sexp-at-point))) (when (re-search-backward "\\_<:\\w+\\_>" nil t) @@ -99,7 +99,7 @@ library/userland functions" (list category module flag)))))))) ;;;###autoload -(defun +emacs-lisp-lookup-definition (thing) +(defun +emacs-lisp-lookup-definition (_thing) "Lookup definition of THING." (if-let (module (+emacs-lisp--module-at-point)) (doom/help-modules (car module) (cadr module) 'visit-dir) diff --git a/modules/term/eshell/autoload/company.el b/modules/term/eshell/autoload/company.el index 94d0662ce..22dfd6b4c 100644 --- a/modules/term/eshell/autoload/company.el +++ b/modules/term/eshell/autoload/company.el @@ -3,37 +3,38 @@ ;; REVIEW Refactor me -(defvar pcomplete-suffix-list) (defvar company-pcomplete-available 'unknown) (defun company-pcomplete--prefix () - (let* ((pcomplete-stub) - pcomplete-seen - pcomplete-norm-func - pcomplete-args - pcomplete-last pcomplete-index - (pcomplete-autolist pcomplete-autolist) - (pcomplete-suffix-list pcomplete-suffix-list)) - (pcomplete-completions) - (buffer-substring (pcomplete-begin) (point)))) + (with-no-warnings + (let* ((pcomplete-stub) + pcomplete-seen + pcomplete-norm-func + pcomplete-args + pcomplete-last pcomplete-index + (pcomplete-autolist pcomplete-autolist) + (pcomplete-suffix-list pcomplete-suffix-list)) + (pcomplete-completions) + (buffer-substring (pcomplete-begin) (point))))) (defun company-pcomplete--candidates () - (let* ((pcomplete-stub) - (pcomplete-show-list t) - pcomplete-seen pcomplete-norm-func - pcomplete-args pcomplete-last pcomplete-index - (pcomplete-autolist pcomplete-autolist) - (pcomplete-suffix-list pcomplete-suffix-list) - (candidates (pcomplete-completions)) - (prefix (buffer-substring (pcomplete-begin) (point))) - ;; Collect all possible completions for the current stub - (cnds (all-completions pcomplete-stub candidates)) - (bnds (completion-boundaries pcomplete-stub candidates nil "")) - (skip (- (length pcomplete-stub) (car bnds)))) - ;; Replace the stub at the beginning of each candidate by the prefix - (mapcar (lambda (cand) - (concat prefix (substring cand skip))) - cnds))) + (with-no-warnings + (let* ((pcomplete-stub) + (pcomplete-show-list t) + pcomplete-seen pcomplete-norm-func + pcomplete-args pcomplete-last pcomplete-index + (pcomplete-autolist pcomplete-autolist) + (pcomplete-suffix-list pcomplete-suffix-list) + (candidates (pcomplete-completions)) + (prefix (buffer-substring (pcomplete-begin) (point))) + ;; Collect all possible completions for the current stub + (cnds (all-completions pcomplete-stub candidates)) + (bnds (completion-boundaries pcomplete-stub candidates nil "")) + (skip (- (length pcomplete-stub) (car bnds)))) + ;; Replace the stub at the beginning of each candidate by the prefix + (mapcar (lambda (cand) + (concat prefix (substring cand skip))) + cnds)))) ;;;###autoload (defun company-pcomplete-available () diff --git a/modules/tools/lookup/autoload/lookup.el b/modules/tools/lookup/autoload/lookup.el index 352a1d4bc..6501134f4 100644 --- a/modules/tools/lookup/autoload/lookup.el +++ b/modules/tools/lookup/autoload/lookup.el @@ -335,7 +335,7 @@ Otherwise, falls back on `find-file-at-point'." ((user-error "No dictionary backend is available")))) ;;;###autoload -(defun +lookup/synonyms (identifier &optional arg) +(defun +lookup/synonyms (identifier &optional _arg) "Look up and insert a synonym for the word at point (or selection)." (interactive (list (doom-thing-at-point-or-region 'word) ; TODO actually use this diff --git a/modules/ui/modeline/autoload.el b/modules/ui/modeline/autoload.el index 8f3eb1839..58ecd562b 100644 --- a/modules/ui/modeline/autoload.el +++ b/modules/ui/modeline/autoload.el @@ -21,14 +21,10 @@ Meant for `doom-change-font-size-hook'." (setq +modeline--old-bar-height doom-modeline-height)) (let ((default-height +modeline--old-bar-height) (scale (or (frame-parameter nil 'font-scale) 0))) - (if (> scale 0) - (let ((font-size (string-to-number - (aref (doom--font-name (frame-parameter nil 'font) - (selected-frame)) - xlfd-regexp-pixelsize-subnum))) - (scale (frame-parameter nil 'font-scale))) - (setq doom-modeline-height (+ default-height (* scale doom-font-increment)))) - (setq doom-modeline-height default-height)))) + (setq doom-modeline-height + (if (> scale 0) + (+ default-height (* scale doom-font-increment)) + default-height)))) ;;;###autoload (defun +modeline-update-env-in-all-windows-h (&rest _) From 92f8ce562cead3c6d187466a1b185b0b12c1f04f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 15:31:40 -0500 Subject: [PATCH 802/983] Fix dir-locals targeting fundamental-mode while evil-mode is active #2493 Due to hack upstream, in evil --- modules/editor/evil/config.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 2ee9f58c7..111b40e05 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -156,6 +156,14 @@ directives. By default, this only recognizes C directives.") (advice-add #'evil-open-above :around #'+evil--insert-newline-above-and-respect-comments-a) (advice-add #'evil-open-below :around #'+evil--insert-newline-below-and-respect-comments-a) + ;; REVIEW Fix #2493: dir-locals cannot target fundamental-mode when evil-mode + ;; is active. See https://github.com/hlissner/doom-emacs/issues/2493. + ;; Revert this if this is ever fixed upstream. + (defadvice! fix-local-vars (&rest _) + :before #'turn-on-evil-mode + (when (eq major-mode 'fundamental-mode) + (hack-local-variables))) + ;; Recenter screen after most searches (dolist (fn '(evil-visualstar/begin-search-forward evil-visualstar/begin-search-backward From 22bf716e431dd3c32662ee272b65b50300d28720 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 15:50:12 -0500 Subject: [PATCH 803/983] Fix gf/find-file-at-point in c-mode --- modules/lang/cc/config.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/lang/cc/config.el b/modules/lang/cc/config.el index 09d03513f..51d171790 100644 --- a/modules/lang/cc/config.el +++ b/modules/lang/cc/config.el @@ -110,7 +110,10 @@ This is ignored by ccls.") (label . 0)))) (when (listp c-default-style) - (setf (alist-get 'other c-default-style) "doom"))) + (setf (alist-get 'other c-default-style) "doom")) + + (after! ffap + (add-to-list 'ffap-list '(c-mode . ffap-c-mode)))) (use-package! modern-cpp-font-lock From eca387d670b3265202896b6cbe51adc15a0ca4c5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 16:44:58 -0500 Subject: [PATCH 804/983] Refactor +lookup/file & update :file handlers + Removed idris-mode's file handler. It doesn't do what I thought it did. + Fix markdown-follow-thing-at-point file handler creating empty buffer. --- modules/lang/idris/config.el | 3 +-- modules/lang/markdown/config.el | 4 ++- modules/tools/lookup/autoload/lookup.el | 34 ++++++------------------- 3 files changed, 12 insertions(+), 29 deletions(-) diff --git a/modules/lang/idris/config.el b/modules/lang/idris/config.el index 249fd2d08..408a3b0fe 100644 --- a/modules/lang/idris/config.el +++ b/modules/lang/idris/config.el @@ -4,8 +4,7 @@ (add-hook 'idris-mode-hook #'turn-on-idris-simple-indent) (set-repl-handler! 'idris-mode 'idris-pop-to-repl) (set-lookup-handlers! 'idris-mode - :documentation #'idris-docs-at-point - :file #'idris-load-file) + :documentation #'idris-docs-at-point) (map! :localleader :map idris-mode-map "r" #'idris-load-file diff --git a/modules/lang/markdown/config.el b/modules/lang/markdown/config.el index 897800e44..3ab052322 100644 --- a/modules/lang/markdown/config.el +++ b/modules/lang/markdown/config.el @@ -46,7 +46,9 @@ capture, the end position, and the output buffer.") (set-flyspell-predicate! '(markdown-mode gfm-mode) #'+markdown-flyspell-word-p) (set-lookup-handlers! '(markdown-mode gfm-mode) - :file #'markdown-follow-thing-at-point) + ;; `markdown-follow-thing-at-point' may open an external program or a + ;; buffer. No good way to tell, so pretend it's async. + :file '(markdown-follow-thing-at-point :async t)) (setq-hook! 'markdown-mode-hook fill-nobreak-predicate (cons #'markdown-code-block-at-point-p diff --git a/modules/tools/lookup/autoload/lookup.el b/modules/tools/lookup/autoload/lookup.el index 6501134f4..7b012e256 100644 --- a/modules/tools/lookup/autoload/lookup.el +++ b/modules/tools/lookup/autoload/lookup.el @@ -281,34 +281,16 @@ Otherwise, falls back on `find-file-at-point'." (if ffap-url-regexp "Find file or URL: " "Find file: ") (doom-thing-at-point-or-region)))))) (require 'ffap) - (cond ((not path) - (call-interactively #'find-file-at-point)) + (cond ((and path + buffer-file-name + (file-equal-p path buffer-file-name) + (user-error "Already here"))) - ((ffap-url-p path) - (find-file-at-point path)) + ((+lookup--jump-to :file path)) - ((not (+lookup--jump-to :file path)) - (let ((fullpath (doom-path path))) - (when (and buffer-file-name (file-equal-p fullpath buffer-file-name)) - (user-error "Already here")) - (let* ((insert-default-directory t) - (project-root (doom-project-root)) - (ffap-file-finder - (cond ((not (doom-glob fullpath)) - #'find-file) - ((ignore-errors (file-in-directory-p fullpath project-root)) - (lambda (dir) - (let* ((default-directory dir) - projectile-project-name - projectile-project-root - (projectile-project-root-cache (make-hash-table :test 'equal)) - (file (projectile-completing-read "Find file: " - (projectile-current-project-files) - :initial-input path))) - (find-file (expand-file-name file (doom-project-root))) - (run-hooks 'projectile-find-file-hook)))) - (#'doom-project-browse)))) - (find-file-at-point path)))))) + ((stringp path) (find-file-at-point path)) + + ((call-interactively #'find-file-at-point)))) ;; From 8243c86f4027d93952daea6b6458e6b84b6e877a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 17:17:05 -0500 Subject: [PATCH 805/983] Bump haskell-mode, dante & intero haskell/haskell-mode@3cf99d7 -> haskell/haskell-mode@4a87d72 chrisdone/intero@30d8e73 -> chrisdone/intero@fdb0550 jyp/dante@3e532e8 -> jyp/dante@4955bc7 --- modules/lang/haskell/packages.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/lang/haskell/packages.el b/modules/lang/haskell/packages.el index 69ced970b..24d936e95 100644 --- a/modules/lang/haskell/packages.el +++ b/modules/lang/haskell/packages.el @@ -1,13 +1,13 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/haskell/packages.el -(package! haskell-mode :pin "3cf99d7f0e") +(package! haskell-mode :pin "4a87d72589") (when (featurep! +dante) - (package! dante :pin "3e532e8d7e") + (package! dante :pin "4955bc7363") (package! attrap :pin "4cf3e4a162")) (when (featurep! +lsp) (package! lsp-haskell :pin "6d481f97e6")) ;; DEPRECATED (when (featurep! +intero) - (package! intero :pin "30d8e7330c")) + (package! intero :pin "fdb0550a2d")) From 431cd38e8339f2a97dc0defee9bad333da0ae0b5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 17:28:45 -0500 Subject: [PATCH 806/983] Update +doom-solaire-themes to include all doom-themes --- modules/ui/doom/config.el | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index f13019e76..2b70d59a0 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -1,24 +1,39 @@ ;;; ui/doom/config.el -*- lexical-binding: t; -*- (defvar +doom-solaire-themes - '((doom-challenger-deep . t) + '((doom-acario-dark . t) + (doom-acario-light . t) + (doom-challenger-deep . t) (doom-city-lights . t) + (doom-dark+ . t) (doom-dracula . t) - (doom-molokai) + (doom-fairy-floss . t) (doom-gruvbox . t) + (doom-horizon . t) + (doom-laserwave . t) + (doom-losvkem . t) + (doom-manegarm . t) + (doom-material . t) + (doom-molokai . t) + (doom-moonlight . t) (doom-nord . t) (doom-nord-light . t) - (doom-nova) + (doom-nova . t) + (doom-oceanic-next . t) (doom-one . t) (doom-one-light . t) + (doom-outrun-electric . t) (doom-opera . t) + (doom-palenight . t) + (doom-peacock . t) (doom-snazzy . t) (doom-solarized-dark . t) (doom-solarized-light) + (doom-sourcerer . t) (doom-spacegrey . t) (doom-tomorrow-day . t) (doom-tomorrow-night . t) - (doom-vibrant)) + (doom-vibrant . t)) "An alist of themes that support `solaire-mode'. If CDR is t, then `solaire-mode-swap-bg' will be used automatically, when the theme is loaded.") From 086e9451489d87ea13b9fa9859193bb7df33c125 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 17:32:43 -0500 Subject: [PATCH 807/983] Update modules index + Remove :app write + Move :tools fly{check,spell} to new :checkers {syntax,spell} + Remove redundant table --- docs/modules.org | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/docs/modules.org b/docs/modules.org index 89edf0a4b..394df6a05 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -8,6 +8,7 @@ removing them from your ~doom!~ block (found in =$DOOMDIR/init.el=). * Table of Contents :TOC: - [[#app][:app]] +- [[#checkers][:checkers]] - [[#completion][:completion]] - [[#config][:config]] - [[#editor][:editor]] @@ -24,20 +25,15 @@ Application modules are complex and opinionated modules that transform Emacs toward a specific purpose. They may have additional dependencies and should be loaded last, before =:config= modules. -| Module | Flags | Description | -|----------+---------------------+--------------------------------------------------------------------------| -| calendar | - | TODO | -| irc | - | Turns Emacs into an IRC client, powered by circe | -| rss | =+org= | An RSS reader client for Emacs, powered by elfeed | -| twitter | - | A twitter client for Emacs, powered by twittering | -| write | =+wordnut +langnut= | Transforms Emacs into an IDE For fiction, literary or scientific writers | - + [[file:../modules/app/calendar/README.org][calendar]] - TODO + [[file:../modules/app/irc/README.org][irc]] - how neckbeards socialize + rss =+org= - an RSS client in Emacs + [[file:../modules/app/twitter/README.org][twitter]] - A twitter client for Emacs -+ [[file:../modules/app/write/README.org][write]] =+wordnut +langtool= - Transforms emacs into an IDE for writers, and for - writing fiction, notes, papers and so on. + +* :checkers ++ syntax =+childframe= - Live error/warning highlights ++ spell =+everywhere= - Spell checking ++ grammar - TODO * :completion Modules that provide new interfaces or frameworks for completion, including code @@ -162,8 +158,6 @@ Small modules that give Emacs access to external tools & services. + [[file:../modules/tools/editorconfig/README.org][editorconfig]] - TODO + [[file:../modules/tools/ein/README.org][ein]] - TODO + [[file:../modules/tools/eval/README.org][eval]] =+overlay= - REPL & code evaluation support for a variety of languages -+ flycheck - Live error/warning highlights -+ flyspell =+everywhere= - Spell checking + gist - TODO + [[file:../modules/tools/lookup/README.org][lookup]] =+dictionary +docsets= - Universal jump-to & documentation lookup backend From 2322bff412074ba5d7b7c4c01a11959890895e84 Mon Sep 17 00:00:00 2001 From: Janfel <33464477+Janfel@users.noreply.github.com> Date: Fri, 7 Feb 2020 01:35:46 +0100 Subject: [PATCH 808/983] Fix typo: ffap-list -> ffap-alist --- modules/lang/cc/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/cc/config.el b/modules/lang/cc/config.el index 51d171790..9430e6a77 100644 --- a/modules/lang/cc/config.el +++ b/modules/lang/cc/config.el @@ -113,7 +113,7 @@ This is ignored by ccls.") (setf (alist-get 'other c-default-style) "doom")) (after! ffap - (add-to-list 'ffap-list '(c-mode . ffap-c-mode)))) + (add-to-list 'ffap-alist '(c-mode . ffap-c-mode)))) (use-package! modern-cpp-font-lock From 640cee3b2669d300d2e59319404430a71d1dd015 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 22:26:06 -0500 Subject: [PATCH 809/983] Fix no such file errors when quitting emacs Because org-id-locations-file cannot be read/written to. --- modules/lang/org/config.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 472ad0bc9..152322847 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -988,4 +988,10 @@ compelling reason, so..." org-id-locations-file (concat org-directory ".orgids") org-id-locations-file-relative t) + ;; HACK `org-id' doesn't check if `org-id-locations-file' exists or is + ;; writeable before trying to read/write to it. + (defadvice! +org--fail-gracefully-a (&rest _) + :before-while '(org-id-locations-save org-id-locations-load) + (file-exists-p org-id-locations-file)) + (add-hook 'org-open-at-point-functions #'doom-set-jump-h)) From 01c3f34bb07e45c4b3c71470757b48429a12d483 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 22:34:31 -0500 Subject: [PATCH 810/983] Ensure lsp-ui doesn't overwrite file/dir-local flycheck-checker --- modules/tools/lsp/config.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/tools/lsp/config.el b/modules/tools/lsp/config.el index f0de0fee3..ac335e2f5 100644 --- a/modules/tools/lsp/config.el +++ b/modules/tools/lsp/config.el @@ -118,7 +118,12 @@ This also logs the resolved project root, if found, so we know where we are." (lsp--flymake-setup)) ((require 'flycheck nil t) (require 'lsp-ui-flycheck) - (lsp-ui-flycheck-enable t))))) + (let ((old-checker flycheck-checker)) + (lsp-ui-flycheck-enable t) + (when old-checker + (setq-local flycheck-checker old-checker) + (kill-local-variable 'flycheck-check-syntax-automatically))))))) + :config (setq lsp-prefer-flymake nil lsp-ui-doc-max-height 8 From fba3c834033690830de0873a88075a3fcef5672a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Feb 2020 22:54:16 -0500 Subject: [PATCH 811/983] Bump helpful, projectile & which-key Wilfred/helpful@e511e8d -> Wilfred/helpful@c54e9dd bbatsov/projectile@27a0da9 -> bbatsov/projectile@84be1da justbur/emacs-which-key@db3d003 -> justbur/emacs-which-key@cf44641 --- core/packages.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/packages.el b/core/packages.el index 2cbb93469..39eddd192 100644 --- a/core/packages.el +++ b/core/packages.el @@ -15,7 +15,7 @@ ;; core-editor.el (package! better-jumper :pin "6d240032ca") (package! dtrt-indent :pin "48221c928b") -(package! helpful :pin "e511e8dbd3") +(package! helpful :pin "c54e9ddbd6") (when IS-MAC (package! ns-auto-titlebar :pin "1efc30d385")) (package! pcre2el :pin "0b5b2a2c17") @@ -37,8 +37,8 @@ (package! xclip :pin "88003b782e")) ;; core-projects.el -(package! projectile :pin "27a0da9cdc") +(package! projectile :pin "84be1dada3") ;; core-keybinds.el (package! general :pin "f6e928622d") -(package! which-key :pin "db3d003e90") +(package! which-key :pin "cf44641485") From 6d8d8a3d425e929051f0ee9efc04cc2b5ccee9dc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 7 Feb 2020 03:39:43 -0500 Subject: [PATCH 812/983] Bump org-mode, org-download, org-re-reveal, org-journal, ox-hugo emacs-straight/org-mode@cd1014a -> emacs-straight/org-mode@ec6d01f abo-abo/org-download@aad18ae -> abo-abo/org-download@7040188 oer/org-re-reveal@29bc467 -> oer/org-re-reveal@14df754 bastibe/org-journal@cf0f153 -> bastibe/org-journal@128f053 kaushalmodi/ox-hugo@0530645 -> kaushalmodi/ox-hugo@a80b250 Fixes #2499 --- modules/lang/org/packages.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index cc5bd7857..be44ad625 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -27,7 +27,7 @@ :recipe (:host github :repo "emacs-straight/org-mode" :files ("*.el" "lisp/*.el" "contrib/lisp/*.el")) - :pin "cd1014a75a") + :pin "ec6d01fd49") ;; ...And prevent other packages from pulling org; org-plus-contrib satisfies ;; the dependency already: https://github.com/raxod502/straight.el/issues/352 (package! org :recipe (:local-repo nil)) @@ -56,7 +56,7 @@ (when (featurep! +brain) (package! org-brain :pin "8cb2efc860")) (when (featurep! +dragndrop) - (package! org-download :pin "aad18aecef")) + (package! org-download :pin "70401884e9")) (when (featurep! +gnuplot) (package! gnuplot :pin "a406143d52") (package! gnuplot-mode :pin "601f639298")) @@ -71,9 +71,9 @@ :recipe (:host github :repo "anler/centered-window-mode") :pin "24f7c5be9d") (package! org-tree-slide :pin "7bf09a02bd") - (package! org-re-reveal :pin "29bc467201")) + (package! org-re-reveal :pin "14df7542f2")) (when (featurep! +journal) - (package! org-journal :pin "cf0f15386f")) + (package! org-journal :pin "128f0533a7")) ;;; Babel (package! ob-async :pin "80a30b96a0") @@ -100,6 +100,6 @@ (when (featurep! +hugo) (package! ox-hugo :recipe (:host github :repo "kaushalmodi/ox-hugo" :nonrecursive t) - :pin "0530645d73")) + :pin "a80b250987")) (when (featurep! :lang rst) (package! ox-rst :pin "9158bfd180")) From 456b501aad3d3baecc61576ac94223e0a7c769db Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 7 Feb 2020 03:43:26 -0500 Subject: [PATCH 813/983] Bump to hlissner/emacs-doom-themes@7131b60 --- modules/ui/doom/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/doom/packages.el b/modules/ui/doom/packages.el index d396bbc5a..47b6e966f 100644 --- a/modules/ui/doom/packages.el +++ b/modules/ui/doom/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/doom/packages.el -(package! doom-themes :pin "aa215edcc2") +(package! doom-themes :pin "7131b60161") (package! solaire-mode :pin "4ac324ccb0") From 014385a9f689bfdb7aebcacf6635b1af2200d6db Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 7 Feb 2020 04:23:07 -0500 Subject: [PATCH 814/983] Prevent numerical type errors on after-find-file In some edge cases. --- core/core-editor.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 81cc7ae10..570a43fc4 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -43,10 +43,11 @@ possible." (and buffer-file-name (not doom-large-file-p) (file-exists-p buffer-file-name) - (> (nth 7 (file-attributes buffer-file-name)) - (* 1024 1024 - (assoc-default buffer-file-name doom-large-file-size-alist - #'string-match-p))))) + (ignore-errors + (> (nth 7 (file-attributes buffer-file-name)) + (* 1024 1024 + (assoc-default buffer-file-name doom-large-file-size-alist + #'string-match-p)))))) (prog1 (apply orig-fn args) (if (memq major-mode doom-large-file-excluded-modes) (setq doom-large-file-p nil) From 883a326e87f9b87b5e729ef01f2bcdec7a897cad Mon Sep 17 00:00:00 2001 From: yoavm448 Date: Fri, 7 Feb 2020 12:36:07 +0200 Subject: [PATCH 815/983] Add cdlatex support in latex: +cdlatex cdlatex has 4 main functionalities: + Math and environments snippets: I've disabled these in favor of yasnippet when using :editor snippets by just unbinding the TAB in cdlatex's keymap + Auto insertion of closing delimiters: disabled in favor of smartparens + Fast insertion for some macros: `a becomes \alpha. Kept as-is + Fast accent insertion: a'~ becomes \tilde{a}. Kept as-is I also updated the docs, and added a section explaining how to re-enable cdlatex's snippets despite having yasnippet. --- modules/lang/latex/README.org | 19 ++++++++++++++++++- modules/lang/latex/config.el | 24 ++++++++++++++++++++++++ modules/lang/latex/packages.el | 3 +++ 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/modules/lang/latex/README.org b/modules/lang/latex/README.org index 173744725..0d208c5c7 100644 --- a/modules/lang/latex/README.org +++ b/modules/lang/latex/README.org @@ -12,6 +12,7 @@ - [[#customization][Customization]] - [[#specifying-the-location-of-a-bibtex-file--corresponding-pdfs][Specifying the location of a bibtex file & corresponding PDFs]] - [[#changing-the-pdfs-viewer][Changing the PDFs viewer]] + - [[#using-cdlatexs-snippets-despite-having-yasnippet][Using cdlatex's snippets despite having yasnippet]] * Description Provide a helping hand when working with LaTeX documents. @@ -27,7 +28,8 @@ Provide a helping hand when working with LaTeX documents. + Compile your .tex code only once using LatexMk ** Module Flags -+ ~+latexmk~ Use LatexMk instead of LaTeX to compile documents. ++ =+latexmk= Use LatexMk instead of LaTeX to compile documents. ++ =+cdlatex= Enable [[https://github.com/cdominik/cdlatex][cdlatex]] for fast math insertion. ** Plugins + [[http://www.gnu.org/software/auctex/][auctex]] @@ -38,6 +40,7 @@ Provide a helping hand when working with LaTeX documents. + [[https://github.com/TheBB/company-reftex][company-reftex]]* + [[https://github.com/vspinu/company-math][company-math]]* + [[https://github.com/tmalsburg/helm-bibtex][ivy-bibtex]]* or [[https://github.com/tmalsburg/helm-bibtex][helm-bibtex]]* ++ [[https://github.com/cdominik/cdlatex][cdlatex]] (=+cdlatex=) * TODO Prerequisites @@ -76,3 +79,17 @@ tool, for instance: If none of these tools are found, ~latex-preview-pane~ (uses ~DocView~ in Emacs) is used as a fallback. You can use this exclusively by setting ~+latex-viewers~ to ~nil~. + +** Using cdlatex's snippets despite having yasnippet +cdlatex has a snippet insertion capability which is disabled in favor of +yasnippet when using ~:editor snippets~. If you still wanna use it, simply rebind +the ~TAB~ key for cdlatex, which takes care of snippet-related stuff: + +#+BEGIN_SRC emacs-lisp +(map! :map cdlatex-mode-map + :i "TAB" #'cdlatex-tab) +#+END_SRC + +This would favor yasnippet's expansion and cursor movement over cdlatex's +expansion and movement, but that shouldn't matter if you're not using yasnippet +in latex buffers. diff --git a/modules/lang/latex/config.el b/modules/lang/latex/config.el index 48a2e19c0..8cc779e7a 100644 --- a/modules/lang/latex/config.el +++ b/modules/lang/latex/config.el @@ -119,6 +119,30 @@ If no viewers are found, `latex-preview-pane' is used.") (lambda () (* (/ 10.0 (preview-document-pt)) preview-scale)))) +(use-package! cdlatex + :defer t + :when (featurep! +cdlatex) + :hook (LaTeX-mode . cdlatex-mode) + :config + ;; Disabling keys that have overlapping functionality with other parts of Doom + ;; smartparens takes care of inserting closing delimiters + (define-key cdlatex-mode-map "$" nil) + (define-key cdlatex-mode-map "(" nil) + (define-key cdlatex-mode-map "{" nil) + (define-key cdlatex-mode-map "[" nil) + (define-key cdlatex-mode-map "|" nil) + (define-key cdlatex-mode-map "<" nil) + ;; TAB is used for cdlatex's snippets and navigation. But have yasnippet for that. + (when (featurep! :editor snippets) + (define-key cdlatex-mode-map "\t" nil)) + + ;; AUCTeX takes care of auto-inserting {} on _^ if you want, with `TeX-electric-sub-and-superscript' + (define-key cdlatex-mode-map "^" nil) + (define-key cdlatex-mode-map "_" nil) + ;; AUCTeX already provides this with `LaTeX-insert-item' + (define-key cdlatex-mode-map [(control return)] nil)) + + ;; Nicely indent lines that have wrapped when visual line mode is activated (use-package! adaptive-wrap :hook (LaTeX-mode . adaptive-wrap-prefix-mode) diff --git a/modules/lang/latex/packages.el b/modules/lang/latex/packages.el index 608934c61..db8796c1d 100644 --- a/modules/lang/latex/packages.el +++ b/modules/lang/latex/packages.el @@ -10,6 +10,9 @@ (when (featurep! +latexmk) (package! auctex-latexmk :pin "4d35352265")) +(when (featurep! +cdlatex) + (package! cdlatex :pin "b7af5a9884")) + ;; Features according to other user selected options (when (featurep! :completion company) From eabbae7e395787db0af04732a2689a2692d57aa9 Mon Sep 17 00:00:00 2001 From: Tej Chajed Date: Fri, 7 Feb 2020 16:23:31 -0500 Subject: [PATCH 816/983] Remove redundant title --- modules/lang/fstar/README.org | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/lang/fstar/README.org b/modules/lang/fstar/README.org index e40b253cc..30b025eaa 100644 --- a/modules/lang/fstar/README.org +++ b/modules/lang/fstar/README.org @@ -1,5 +1,3 @@ -#+TITLE: :lang fstar - #+TITLE: lang/fstar #+DATE: February 2, 2020 #+SINCE: 2.0.10 From afe819e2a15bdd9ddde5d24aad64be9c0fe852f0 Mon Sep 17 00:00:00 2001 From: yoavm448 Date: Sat, 8 Feb 2020 00:37:13 +0200 Subject: [PATCH 817/983] Use map! for nilling out cdlatex's keymap I previously thought this didn't work, but it seems to now...? --- modules/lang/latex/config.el | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/modules/lang/latex/config.el b/modules/lang/latex/config.el index 8cc779e7a..407cc6f29 100644 --- a/modules/lang/latex/config.el +++ b/modules/lang/latex/config.el @@ -125,22 +125,25 @@ If no viewers are found, `latex-preview-pane' is used.") :hook (LaTeX-mode . cdlatex-mode) :config ;; Disabling keys that have overlapping functionality with other parts of Doom - ;; smartparens takes care of inserting closing delimiters - (define-key cdlatex-mode-map "$" nil) - (define-key cdlatex-mode-map "(" nil) - (define-key cdlatex-mode-map "{" nil) - (define-key cdlatex-mode-map "[" nil) - (define-key cdlatex-mode-map "|" nil) - (define-key cdlatex-mode-map "<" nil) - ;; TAB is used for cdlatex's snippets and navigation. But have yasnippet for that. - (when (featurep! :editor snippets) - (define-key cdlatex-mode-map "\t" nil)) - - ;; AUCTeX takes care of auto-inserting {} on _^ if you want, with `TeX-electric-sub-and-superscript' - (define-key cdlatex-mode-map "^" nil) - (define-key cdlatex-mode-map "_" nil) - ;; AUCTeX already provides this with `LaTeX-insert-item' - (define-key cdlatex-mode-map [(control return)] nil)) + (map! :map cdlatex-mode-map + ;; smartparens takes care of inserting closing delimiters, and if you + ;; don't use smartparens you probably won't want these also. + :g "$" nil + :g "(" nil + :g "{" nil + :g "[" nil + :g "|" nil + :g "<" nil + ;; TAB is used for cdlatex's snippets and navigation. But have yasnippet + ;; for that. + (:when (featurep! :editor snippets) + :g "TAB" nil) + ;; AUCTeX takes care of auto-inserting {} on _^ if you want, with + ;; `TeX-electric-sub-and-superscript' + :g "^" nil + :g "_" nil + ;; AUCTeX already provides this with `LaTeX-insert-item' + :g [(control return)] nil)) ;; Nicely indent lines that have wrapped when visual line mode is activated From 49c7cf8172093a19342d7581f0126f6898767cba Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 8 Feb 2020 07:14:40 -0500 Subject: [PATCH 818/983] Resolve major mode for (cached)-nix-shell scripts --- modules/lang/nix/autoload.el | 21 +++++++++++++++++++++ modules/lang/nix/config.el | 2 ++ 2 files changed, 23 insertions(+) diff --git a/modules/lang/nix/autoload.el b/modules/lang/nix/autoload.el index bce624513..d0f950569 100644 --- a/modules/lang/nix/autoload.el +++ b/modules/lang/nix/autoload.el @@ -39,3 +39,24 @@ ((user-error "No search engine is enabled. Enable helm or ivy!"))) ;; Tell lookup module to let us handle things from here 'deferred) + +;;;###autoload +(defun +nix-shell-init-mode () + "Resolve a (cached-)?nix-shell shebang to the correct major mode." + (save-excursion + (goto-char (point-min)) + (save-match-data + (when (re-search-forward "#! *\\(?:cached-\\)?nix-shell +-i +\\([^ \n]+\\)" 256 t) + (let* ((interp (match-string 1)) + (mode + (assoc-default + interp + (mapcar (lambda (e) + (cons (format "\\`%s\\'" (car e)) + (cdr e))) + interpreter-mode-alist) + #'string-match-p))) + (when mode + (prog1 (set-auto-mode-0 mode) + (when (eq major-mode 'sh-mode) + (sh-set-shell interp))))))))) diff --git a/modules/lang/nix/config.el b/modules/lang/nix/config.el index 8c3c3dc8c..f8c0a0a5e 100644 --- a/modules/lang/nix/config.el +++ b/modules/lang/nix/config.el @@ -1,6 +1,8 @@ ;;; lang/nix/config.el -*- lexical-binding: t; -*- (use-package! nix-mode + :interpreter ("cached-nix-shell" . +nix-shell-init-mode) + :interpreter ("nix-shell" . +nix-shell-init-mode) :mode "\\.nix\\'" :config (set-company-backend! 'nix-mode 'company-nixos-options) From 4d393fe9c2d0e8251c76255d9ff174242cff2e02 Mon Sep 17 00:00:00 2001 From: yoavm448 Date: Sat, 8 Feb 2020 19:40:28 +0200 Subject: [PATCH 819/983] Also try to search for fdfind, not only fd --- modules/completion/ivy/config.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 5140a721e..21acdffad 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -266,6 +266,8 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." (cl-destructuring-bind (find-program . args) (cond ((executable-find "fd") (cons "fd" (list "-t" "f" "-E" ".git"))) + ((executable-find "fdfind") + (cons "fdfind" (list "-t" "f" "-E" ".git"))) ((executable-find "rg") (cons "rg" (list "--files" "--hidden" "--no-messages"))) ((cons find-program args))) @@ -275,7 +277,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." (cons find-program args) (lambda () (goto-char (point-min)) - (let ((offset (if (member find-program '("fd" "rg")) 0 2)) + (let ((offset (if (member find-program '("fd" "fdfind" "rg")) 0 2)) files) (while (< (point) (point-max)) (push (buffer-substring From e4e0f33ab5639124e708e13449cc30f18779f4c2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 8 Feb 2020 18:10:34 -0500 Subject: [PATCH 820/983] Bump to jacktasia/dumb-jump@daddd9b From jacktasia/dumb-jump@738d40c --- modules/tools/lookup/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index e80c98361..30d5002d7 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -8,7 +8,7 @@ (package! helm)) ;; -(package! dumb-jump :pin "738d40ceb7") +(package! dumb-jump :pin "daddd9ba6a") (when (featurep! :completion ivy) (package! ivy-xref :pin "3d4c35fe2b")) (when (featurep! :completion helm) From 4a60200f3d4a3959d8bbe0542b0d69acf19877a5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 8 Feb 2020 18:11:22 -0500 Subject: [PATCH 821/983] Unpin tkf/emacs-request This package is a secondary dependency of many packages. Best to keep it up-to-date at all times. --- modules/tools/lookup/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index 30d5002d7..7efe70f8e 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -26,7 +26,7 @@ (package! osx-dictionary :pin "1b79ff64c7") (package! define-word :pin "d8c76d503b") (package! powerthesaurus :pin "81a262ec0c") - (package! request :pin "4be823a89b") + (package! request) (when (featurep! +offline) (package! wordnut :pin "feac531404") (package! synosaurus :pin "14d34fc92a")))) From 724413d88f3ab317cbcc8349e3fc18cace86d886 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 8 Feb 2020 18:13:00 -0500 Subject: [PATCH 822/983] Bind C-RET -> ess-eval-line in normal mode And reformat ess keybinds. --- modules/lang/ess/config.el | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/modules/lang/ess/config.el b/modules/lang/ess/config.el index 8f1812199..f68dd01da 100644 --- a/modules/lang/ess/config.el +++ b/modules/lang/ess/config.el @@ -38,25 +38,26 @@ comment-line-break-function nil) (map! (:after ess-help - :map ess-help-mode-map - :n "q" #'kill-current-buffer - :n "Q" #'ess-kill-buffer-and-go - :n "K" #'ess-display-help-on-object - :n "go" #'ess-display-help-in-browser - :n "gO" #'ess-display-help-apropos - :n "gv" #'ess-display-vignettes - :m "]]" #'ess-skip-to-next-section - :m "[[" #'ess-skip-to-previous-section - :map ess-doc-map - "h" #'ess-display-help-on-object - "p" #'ess-R-dv-pprint - "t" #'ess-R-dv-ctable - [C-return] #'ess-eval-line - [up] #'comint-next-input - [down] #'comint-previous-input) + (:map ess-help-mode-map + :n "q" #'kill-current-buffer + :n "Q" #'ess-kill-buffer-and-go + :n "K" #'ess-display-help-on-object + :n "go" #'ess-display-help-in-browser + :n "gO" #'ess-display-help-apropos + :n "gv" #'ess-display-vignettes + :m "]]" #'ess-skip-to-next-section + :m "[[" #'ess-skip-to-previous-section) + (:map ess-doc-map + "h" #'ess-display-help-on-object + "p" #'ess-R-dv-pprint + "t" #'ess-R-dv-ctable + [up] #'comint-next-input + [down] #'comint-previous-input + [C-return] #'ess-eval-line)) - :localleader :map ess-mode-map + :n [C-return] #'ess-eval-line + :localleader "," #'ess-eval-region-or-function-or-paragraph-and-step "'" #'R [tab] #'ess-switch-to-inferior-or-script-buffer From ef472d7c1a1b0035862f2ef341ea4f0586299d58 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 8 Feb 2020 20:43:29 -0500 Subject: [PATCH 823/983] Add flyspell-lazy package To hopefully speed up flyspell. --- modules/checkers/spell/config.el | 4 ++++ modules/checkers/spell/packages.el | 2 ++ 2 files changed, 6 insertions(+) diff --git a/modules/checkers/spell/config.el b/modules/checkers/spell/config.el index 14fd2912e..867fedd75 100644 --- a/modules/checkers/spell/config.el +++ b/modules/checkers/spell/config.el @@ -94,3 +94,7 @@ e.g. proselint and langtool." ((require 'flyspell-correct-popup nil t) (setq flyspell-popup-correct-delay 0.8) (define-key popup-menu-keymap [escape] #'keyboard-quit)))) + + +(use-package! flyspell-lazy + :after flyspell) diff --git a/modules/checkers/spell/packages.el b/modules/checkers/spell/packages.el index 21f2a534d..873abb64d 100644 --- a/modules/checkers/spell/packages.el +++ b/modules/checkers/spell/packages.el @@ -7,3 +7,5 @@ ((featurep! :completion helm) (package! flyspell-correct-helm :pin "b0353a41a7")) ((package! flyspell-correct-popup :pin "b0353a41a7"))) + +(package! flyspell-lazy :pin "3ebf68cc9e") From 73c893ba35ecbb9a5db5dab17b83b44b30e032d0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 8 Feb 2020 20:53:50 -0500 Subject: [PATCH 824/983] lang/ledger: refactor & use hledger by default --- modules/lang/ledger/config.el | 38 ++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/modules/lang/ledger/config.el b/modules/lang/ledger/config.el index bd87308af..ff3453be3 100644 --- a/modules/lang/ledger/config.el +++ b/modules/lang/ledger/config.el @@ -1,23 +1,29 @@ ;;; lang/ledger/config.el -*- lexical-binding: t; -*- -;;;###package ledger-mode -(setq ledger-clear-whole-transactions 1) +(use-package! ledger-mode + :defer t + :init + (setq ledger-clear-whole-transactions 1 + ledger-mode-should-check-version nil) -(defadvice! +ledger--check-version-a (orig-fn) - "Fail gracefully if ledger binary isn't available." - :around #'ledger-check-version - (if (executable-find ledger-binary-path) - (funcall orig-fn) - (message "Couldn't find '%s' executable" ledger-binary-path))) + :config + (setq ledger-binary-path + (or (cl-delete-if-not #'executable-find (list "hledger" "ledger")) + "ledger")) -;; Restore leader key in ledger reports -(map! :after ledger-mode - :map ledger-report-mode-map - "C-c C-c" #'ledger-report-edit-report - "C-c C-r" #'ledger-report-redo - "C-c C-s" #'ledger-report-save - :map ledger-reconcile-mode-map - [tab] #'ledger-reconcile-toggle) + (defadvice! +ledger--check-version-a (orig-fn) + "Fail gracefully if ledger binary isn't available." + :around #'ledger-check-version + (if (executable-find ledger-binary-path) + (funcall orig-fn) + (message "Couldn't find '%s' executable" ledger-binary-path))) + + (map! :map ledger-report-mode-map + "C-c C-c" #'ledger-report-edit-report + "C-c C-r" #'ledger-report-redo + "C-c C-s" #'ledger-report-save + :map ledger-reconcile-mode-map + [tab] #'ledger-reconcile-toggle)) (use-package! flycheck-ledger From 01aadd8900be45f912124d9d815d8790f540d38c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 8 Feb 2020 21:47:04 -0500 Subject: [PATCH 825/983] Fix vestigial org easymotion keybind --- modules/config/default/+evil-bindings.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index efd62d817..7216d1e37 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -77,10 +77,9 @@ :n "q" #'kill-current-buffer) :m "gs" #'+evil/easymotion ; lazy-load `evil-easymotion' - (:after org - :map org-mode-map - :prefix "" - "h" #'+org/goto-visible) + (:after evil-org + :map evil-org-mode-map + :m "gsh" #'+org/goto-visible) (:when (featurep! :editor multiple-cursors) :prefix "gz" From 2c312c4f23f88851aef99c2936a3fa1da7715230 Mon Sep 17 00:00:00 2001 From: yoavm448 Date: Sun, 9 Feb 2020 10:03:37 +0200 Subject: [PATCH 826/983] Use doom-projectile-fd-binary for fd binary Don't look for it again --- modules/completion/ivy/config.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 21acdffad..9b32c097e 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -264,10 +264,8 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." "Change `counsel-file-jump' to use fd or ripgrep, if they are available." :override #'counsel--find-return-list (cl-destructuring-bind (find-program . args) - (cond ((executable-find "fd") - (cons "fd" (list "-t" "f" "-E" ".git"))) - ((executable-find "fdfind") - (cons "fdfind" (list "-t" "f" "-E" ".git"))) + (cond ((executable-find doom-projectile-fd-binary) + (cons doom-projectile-fd-binary (list "-t" "f" "-E" ".git"))) ((executable-find "rg") (cons "rg" (list "--files" "--hidden" "--no-messages"))) ((cons find-program args))) @@ -277,7 +275,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." (cons find-program args) (lambda () (goto-char (point-min)) - (let ((offset (if (member find-program '("fd" "fdfind" "rg")) 0 2)) + (let ((offset (if (member find-program (list "rg" doom-projectile-fd-binary)) 0 2)) files) (while (< (point) (point-max)) (push (buffer-substring From af9d8257f18f3eb2c0ee7b751c4f6d69be4a93dd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 9 Feb 2020 04:33:17 -0500 Subject: [PATCH 827/983] Fix void-function: closure errors on vterm-toggle-send-escape --- modules/editor/evil/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 111b40e05..26ba9865b 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -418,7 +418,7 @@ To change these keys see `+evil-repeat-keys'." (defadvice! +evil-collection-disable-blacklist-a (orig-fn) :around #'evil-collection-vterm-toggle-send-escape ; allow binding to ESC (let (evil-collection-key-blacklist) - (apply orig-fn)))) + (funcall-interactively orig-fn)))) ;; Keybinds that have no Emacs+evil analogues (i.e. don't exist): ;; zq - mark word at point as good word From 3e253ed67e5622078dc088f7624f64d73030a4cb Mon Sep 17 00:00:00 2001 From: Seong Yong-ju Date: Sun, 9 Feb 2020 18:47:05 +0900 Subject: [PATCH 828/983] Add LSP support for Dockerfile --- docs/modules.org | 2 +- modules/tools/docker/README.org | 6 +++++- modules/tools/docker/config.el | 7 ++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/modules.org b/docs/modules.org index 89edf0a4b..ff0ff6fc5 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -158,7 +158,7 @@ Small modules that give Emacs access to external tools & services. + ansible - TODO + debugger - A (nigh-)universal debugger in Emacs + [[file:../modules/tools/direnv/README.org][direnv]] - TODO -+ [[file:../modules/tools/docker/README.org][docker]] - TODO ++ [[file:../modules/tools/docker/README.org][docker]] =+lsp= - TODO + [[file:../modules/tools/editorconfig/README.org][editorconfig]] - TODO + [[file:../modules/tools/ein/README.org][ein]] - TODO + [[file:../modules/tools/eval/README.org][eval]] =+overlay= - REPL & code evaluation support for a variety of languages diff --git a/modules/tools/docker/README.org b/modules/tools/docker/README.org index afa890255..ddf9eec07 100644 --- a/modules/tools/docker/README.org +++ b/modules/tools/docker/README.org @@ -29,7 +29,7 @@ convenience functions allow images to be built easily. =docker-tramp.el= offers a [[https://www.gnu.org/software/tramp/][TRAMP]] method for Docker containers. ** Module Flags -This module provides no flags. ++ =+lsp= Enables integration for the Dockerfile Language Server. ** Plugins + [[https://github.com/Silex/docker.el][docker]] @@ -40,6 +40,10 @@ This module provides no flags. This module assumes =docker=, =docker-compose= and =docker-machine= binaries are installed and accessible from your PATH. +Optionally, this module also uses the following programs: + ++ =docker-langserver= (for LSP users): ~npm install -g dockerfile-language-server-nodejs~ + * Features ** Docker control Use =M-x docker=, select a resource, and then mark or unmark items using the diff --git a/modules/tools/docker/config.el b/modules/tools/docker/config.el index 9c14b77e9..b6dff7f56 100644 --- a/modules/tools/docker/config.el +++ b/modules/tools/docker/config.el @@ -1,7 +1,6 @@ ;;; tools/docker/config.el -*- lexical-binding: t; -*- (after! docker - (set-docsets! 'dockerfile-mode "Docker") (set-evil-initial-state! '(docker-container-mode docker-image-mode @@ -9,3 +8,9 @@ docker-volume-mode docker-machine-mode) 'emacs)) + +(after! dockerfile-mode + (set-docsets! 'dockerfile-mode "Docker") + + (when (featurep! +lsp) + (add-hook 'dockerfile-mode-local-vars-hook #'lsp!))) From 7fe392d946903f6b0974cc9381c671dbe96f1838 Mon Sep 17 00:00:00 2001 From: Remco Verhoef Date: Sun, 9 Feb 2020 10:58:49 +0100 Subject: [PATCH 829/983] add benchmark bindings (,tbs and ,tba) go supports running benchmarks much similar to running tests, the new key bindings will run single or all benchmark --- modules/lang/go/autoload.el | 15 +++++++++++++++ modules/lang/go/config.el | 6 ++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/modules/lang/go/autoload.el b/modules/lang/go/autoload.el index 709bd2a2e..4e13dcab4 100644 --- a/modules/lang/go/autoload.el +++ b/modules/lang/go/autoload.el @@ -41,6 +41,21 @@ (+go--run-tests (concat "-run" "='" (match-string-no-properties 2) "'"))) (error "Must be in a _test.go file"))) +;;;###autoload +(defun +go/bench-all () + (interactive) + (+go--run-tests "-test.run=NONE -test.bench=\".*\"")) + +;;;###autoload +(defun +go/bench-single () + (interactive) + (if (string-match "_test\\.go" buffer-file-name) + (save-excursion + (re-search-backward "^func[ ]+\\(([[:alnum:]]*?[ ]?[*]?[[:alnum:]]+)[ ]+\\)?\\(Benchmark[[:alnum:]_]+\\)(.*)") + (+go--run-tests (concat "-test.run=NONE -test.bench" "='" (match-string-no-properties 2) "'"))) + (error "Must be in a _test.go file"))) + + ;;;###autoload (defun +go/play-buffer-or-region (&optional beg end) "TODO" diff --git a/modules/lang/go/config.el b/modules/lang/go/config.el index 05947af45..3c9234718 100644 --- a/modules/lang/go/config.el +++ b/modules/lang/go/config.el @@ -55,8 +55,10 @@ "n" #'+go/test-nested "g" #'go-gen-test-dwim "G" #'go-gen-test-all - "e" #'go-gen-test-exported))) - + "e" #'go-gen-test-exported) + (:prefix ("tb" . "bench") + "s" #'+go/bench-single + "a" #'+go/bench-all))) (use-package! gorepl-mode :commands gorepl-run-load-current-file) From f01b03a73fb933a1cdc1889effefef5d897a07db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Thor=C3=A9n?= Date: Sun, 9 Feb 2020 14:32:19 +0100 Subject: [PATCH 830/983] Fix list passed as argument to executable-find Previously, a list would be passed as an argument to 'executable-find' in '+ledger--check-version-a'. This instead passes "hledger" as an argument if found, else "ledger". --- modules/lang/ledger/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/lang/ledger/config.el b/modules/lang/ledger/config.el index ff3453be3..597fe9c4e 100644 --- a/modules/lang/ledger/config.el +++ b/modules/lang/ledger/config.el @@ -8,7 +8,8 @@ :config (setq ledger-binary-path - (or (cl-delete-if-not #'executable-find (list "hledger" "ledger")) + (if (executable-find "hledger") + "hledger" "ledger")) (defadvice! +ledger--check-version-a (orig-fn) From f4d5953be5694ff6556c4941061362681a5e5689 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 9 Feb 2020 14:55:44 -0500 Subject: [PATCH 831/983] Fix indentation --- modules/lang/ledger/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/ledger/config.el b/modules/lang/ledger/config.el index 597fe9c4e..c516e7bfe 100644 --- a/modules/lang/ledger/config.el +++ b/modules/lang/ledger/config.el @@ -10,7 +10,7 @@ (setq ledger-binary-path (if (executable-find "hledger") "hledger" - "ledger")) + "ledger")) (defadvice! +ledger--check-version-a (orig-fn) "Fail gracefully if ledger binary isn't available." From 7ebc88790590ab97d3f549d02199f8b501cb8610 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 9 Feb 2020 17:00:28 -0500 Subject: [PATCH 832/983] Merge tb prefix into t prefix --- modules/lang/go/config.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/lang/go/config.el b/modules/lang/go/config.el index 3c9234718..948675616 100644 --- a/modules/lang/go/config.el +++ b/modules/lang/go/config.el @@ -55,10 +55,11 @@ "n" #'+go/test-nested "g" #'go-gen-test-dwim "G" #'go-gen-test-all - "e" #'go-gen-test-exported) - (:prefix ("tb" . "bench") - "s" #'+go/bench-single - "a" #'+go/bench-all))) + "e" #'go-gen-test-exported + (:prefix ("b" . "bench") + "s" #'+go/bench-single + "a" #'+go/bench-all)))) + (use-package! gorepl-mode :commands gorepl-run-load-current-file) From 5e0e0bd3b734de91b435be1bd9b0fcba3dab7bee Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 9 Feb 2020 15:44:25 -0500 Subject: [PATCH 833/983] Remove redundant evil-set-initial-state Redundant with evil-collection-mu4e --- modules/email/mu4e/config.el | 8 -------- 1 file changed, 8 deletions(-) diff --git a/modules/email/mu4e/config.el b/modules/email/mu4e/config.el index 17577014a..b05c00c38 100644 --- a/modules/email/mu4e/config.el +++ b/modules/email/mu4e/config.el @@ -97,14 +97,6 @@ (when (fboundp 'imagemagick-register-types) (imagemagick-register-types)) - (set-evil-initial-state! - '(mu4e-main-mode - mu4e-view-mode - mu4e-headers-mode - mu4e-compose-mode - mu4e~update-mail-mode) - 'normal) - (map! :localleader :map mu4e-compose-mode-map :desc "send and exit" "s" #'message-send-and-exit From e241fa347b1e20824d26d35f109353d94a545a81 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 9 Feb 2020 19:01:36 -0500 Subject: [PATCH 834/983] Bump to rmuslimov/browse-at-remote@aeee6bf From rmuslimov/browse-at-remote@1a9392e rmuslimov/browse-at-remote#59 upstreamed some of our local changes. --- modules/emacs/vc/autoload/vc.el | 15 +-------------- modules/emacs/vc/packages.el | 2 +- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/modules/emacs/vc/autoload/vc.el b/modules/emacs/vc/autoload/vc.el index 4b26f41b4..e49fed36a 100644 --- a/modules/emacs/vc/autoload/vc.el +++ b/modules/emacs/vc/autoload/vc.el @@ -3,26 +3,13 @@ (autoload 'browse-at-remote-get-url "browse-at-remote") (autoload 'browse-at-remote--file-url "browse-at-remote") -(defun +vc--remote-file-or-region-link () - (if (or (doom-region-active-p) (not buffer-file-name)) - (browse-at-remote-get-url) - (browse-at-remote--file-url (buffer-file-name)))) - -;;;###autoload -(defun +vc/browse-at-remote-file-or-region () - "Open the current file at remote in your browser. -If a selection is active, highlight them. Otherwise omits the #L suffix in -the URL." - (interactive) - (browse-url (+vc--remote-file-or-region-link))) - ;;;###autoload (defun +vc/browse-at-remote-kill-file-or-region () "Copy the current file's remote URL to your clipboard. If a selection is active, highlight them. Otherwise omits the #L suffix in the URL." (interactive) - (let ((url (+vc--remote-file-or-region-link))) + (let ((url (browse-at-remote-get-url))) (kill-new url) (message "Copied to clipboard: %S" url))) diff --git a/modules/emacs/vc/packages.el b/modules/emacs/vc/packages.el index d943e18a1..70bd4075f 100644 --- a/modules/emacs/vc/packages.el +++ b/modules/emacs/vc/packages.el @@ -5,7 +5,7 @@ (package! vc-annotate :built-in t) (package! smerge-mode :built-in t) -(package! browse-at-remote :pin "1a9392e9d1") +(package! browse-at-remote :pin "aeee6bf38f") (package! git-timemachine :pin "391eb61050") (package! gitconfig-mode :pin "55468314a5") (package! gitignore-mode :pin "55468314a5") From 7e676e90f3f3f209edbc1da399c6033dd964a905 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 9 Feb 2020 19:08:06 -0500 Subject: [PATCH 835/983] Bump to emacs-straight/org-mode@ec6d01f From emacs-straight/org-mode@2096c9c --- modules/lang/org/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index be44ad625..9408b8cba 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -27,7 +27,7 @@ :recipe (:host github :repo "emacs-straight/org-mode" :files ("*.el" "lisp/*.el" "contrib/lisp/*.el")) - :pin "ec6d01fd49") + :pin "2096c9c76f") ;; ...And prevent other packages from pulling org; org-plus-contrib satisfies ;; the dependency already: https://github.com/raxod502/straight.el/issues/352 (package! org :recipe (:local-repo nil)) From c13e7fe7fcf845a05f1feec1a9b646e42b20d685 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 9 Feb 2020 20:40:25 -0500 Subject: [PATCH 836/983] Bump magit, forge, magit-todos & evil-magit magit/magit@2bdfc4a -> magit/magit@57f2d0f magit/forge@2833783 -> magit/forge@0081afd emacs-evil/evil-magit@7223dca -> evil-magit/evil-magit@1bfd546 alphapapa/magit-todos@a64e365 -> alphapapa/magit-todos@ad5663a --- modules/tools/magit/packages.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/tools/magit/packages.el b/modules/tools/magit/packages.el index e2826acb1..08e7fd80c 100644 --- a/modules/tools/magit/packages.el +++ b/modules/tools/magit/packages.el @@ -1,10 +1,10 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/magit/packages.el -(when (package! magit :pin "2bdfc4a08f") - (package! forge :pin "283378353a") +(when (package! magit :pin "57f2d0f830") + (package! forge :pin "0081afd2c8") (package! magit-gitflow :pin "cc41b561ec") - (package! magit-todos :pin "a64e36574b") + (package! magit-todos :pin "ad5663aa26") (package! github-review :pin "1de2d6d148") (when (featurep! :editor evil +everywhere) - (package! evil-magit :pin "7223dca89c"))) + (package! evil-magit :pin "1bfd546be8"))) From ad8c685a179c2b3e03122ebff3079ece33ef73af Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 9 Feb 2020 21:00:53 -0500 Subject: [PATCH 837/983] Bump to ema2159/centaur-tabs@0383af0 From ema2159/centaur-tabs@f9d119d May address #2436 --- modules/ui/tabs/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/tabs/packages.el b/modules/ui/tabs/packages.el index 61c683dd7..5e02417c5 100644 --- a/modules/ui/tabs/packages.el +++ b/modules/ui/tabs/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/tabs/packages.el -(package! centaur-tabs :pin "f9d119d8ba") +(package! centaur-tabs :pin "0383af0174") From ae1e3f005e5a2880b59bb3ae2c02e1c4492a265f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 10 Feb 2020 02:38:12 -0500 Subject: [PATCH 838/983] Bump to Alexander-Miller/treemacs@05d264ae8c Also affects treemacs-{evil,projectile,magit,persp}, since they are in the same repo. --- modules/ui/treemacs/packages.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ui/treemacs/packages.el b/modules/ui/treemacs/packages.el index 00ecd399e..03c9bd8b2 100644 --- a/modules/ui/treemacs/packages.el +++ b/modules/ui/treemacs/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/treemacs/packages.el -(package! treemacs :pin "f830f209dd") +(package! treemacs :pin "05d264ae8c") (when (featurep! :editor evil +everywhere) - (package! treemacs-evil :pin "f830f209dd")) -(package! treemacs-projectile :pin "f830f209dd") + (package! treemacs-evil :pin "05d264ae8c")) +(package! treemacs-projectile :pin "05d264ae8c") (when (featurep! :tools magit) - (package! treemacs-magit :pin "f830f209dd")) + (package! treemacs-magit :pin "05d264ae8c")) (when (featurep! :ui workspaces) - (package! treemacs-persp :pin "f830f209dd")) + (package! treemacs-persp :pin "05d264ae8c")) From e5760a223887035bd14e1222c16ed8c7b49cd74e Mon Sep 17 00:00:00 2001 From: Clement Busschaert Date: Mon, 10 Feb 2020 08:38:34 +0100 Subject: [PATCH 839/983] evil: smerge hydra on `SPC g m` --- modules/config/default/+evil-bindings.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 7216d1e37..ee85fdaef 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -400,6 +400,8 @@ :desc "Git revert file" "R" #'vc-revert :desc "Copy link to remote" "y" #'+vc/browse-at-remote-kill-file-or-region :desc "Copy link to homepage" "Y" #'+vc/browse-at-remote-kill-homepage + (:when (featurep! :ui hydra) + :desc "SMerge" "m" #'+vc/smerge-hydra/body)) (:when (featurep! :ui vc-gutter) :desc "Git revert hunk" "r" #'git-gutter:revert-hunk :desc "Git stage hunk" "s" #'git-gutter:stage-hunk From ae75326a408eb93a30550382efbf5d70831d6a46 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 10 Feb 2020 02:39:26 -0500 Subject: [PATCH 840/983] Move lsp! to sh-mode-local-vars-hook --- modules/lang/sh/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/sh/config.el b/modules/lang/sh/config.el index 395cca3ac..9777bda89 100755 --- a/modules/lang/sh/config.el +++ b/modules/lang/sh/config.el @@ -18,7 +18,7 @@ (set-repl-handler! 'sh-mode #'+sh/open-repl) (when (featurep! +lsp) - (add-hook 'sh-mode-hook #'lsp!)) + (add-hook 'sh-mode-local-vars-hook #'lsp!)) (setq sh-indent-after-continuation 'always) From ae9c364f0e48537602ead05dab859ce7c0c064c3 Mon Sep 17 00:00:00 2001 From: yoavm448 Date: Mon, 10 Feb 2020 09:59:47 +0200 Subject: [PATCH 841/983] Add +latexmk, +cdlatex to docs/modules.org --- docs/modules.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules.org b/docs/modules.org index 394df6a05..84569ad94 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -113,7 +113,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - JavaScript, TypeScript, and CoffeeScript support + julia - TODO + kotlin =+lsp+= - TODO -+ [[file:../modules/lang/latex/README.org][latex]] - TODO ++ [[file:../modules/lang/latex/README.org][latex]] =+latexmk +cdlatex= + lean - TODO + [[file:../modules/lang/ledger/README.org][ledger]] - TODO + lua =+moonscript= - TODO From e78beea59cfb6d7bc8f51cdcf4808a0eac4edfc3 Mon Sep 17 00:00:00 2001 From: yoavm448 Date: Mon, 10 Feb 2020 10:07:59 +0200 Subject: [PATCH 842/983] Forgot the 'TODO' for latex in docs/modules --- docs/modules.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules.org b/docs/modules.org index 84569ad94..18a338066 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -113,7 +113,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - JavaScript, TypeScript, and CoffeeScript support + julia - TODO + kotlin =+lsp+= - TODO -+ [[file:../modules/lang/latex/README.org][latex]] =+latexmk +cdlatex= ++ [[file:../modules/lang/latex/README.org][latex]] =+latexmk +cdlatex= - TODO + lean - TODO + [[file:../modules/lang/ledger/README.org][ledger]] - TODO + lua =+moonscript= - TODO From 2f61c79a869fef07715c7ce69ab43ea108e4963a Mon Sep 17 00:00:00 2001 From: yoavm448 Date: Mon, 10 Feb 2020 10:14:42 +0200 Subject: [PATCH 843/983] Pronunciation in a comment --- modules/lang/latex/config.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/latex/config.el b/modules/lang/latex/config.el index 407cc6f29..50d993ef0 100644 --- a/modules/lang/latex/config.el +++ b/modules/lang/latex/config.el @@ -134,8 +134,8 @@ If no viewers are found, `latex-preview-pane' is used.") :g "[" nil :g "|" nil :g "<" nil - ;; TAB is used for cdlatex's snippets and navigation. But have yasnippet - ;; for that. + ;; TAB is used for cdlatex's snippets and navigation. But we have + ;; yasnippet for that. (:when (featurep! :editor snippets) :g "TAB" nil) ;; AUCTeX takes care of auto-inserting {} on _^ if you want, with From b22f7005f8e91bd45d16d64a8fa1dee982bc1d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Acc=C3=A1cio=20Nogueira?= Date: Mon, 10 Feb 2020 11:36:55 +0100 Subject: [PATCH 844/983] use OPTARG to get key --- bin/org-capture | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/org-capture b/bin/org-capture index 15d6f0a34..d2e076cf5 100755 --- a/bin/org-capture +++ b/bin/org-capture @@ -22,8 +22,8 @@ fi # org-capture key mapped to argument flags # keys=$(emacsclient -e "(+org-capture-available-keys)" | cut -d '"' -f2) -while getopts hk opt; do - key="\"$opt\"" +while getopts "hk:" opt; do + key="\"$OPTARG\"" break done shift $((OPTIND-1)) From a9a04a692488f54181a2d3a90412db096e782b82 Mon Sep 17 00:00:00 2001 From: Dan LaManna Date: Mon, 10 Feb 2020 19:55:00 -0500 Subject: [PATCH 845/983] lang/python: assert when python isn't installed --- modules/lang/python/doctor.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/python/doctor.el b/modules/lang/python/doctor.el index 40637a75a..8ef41ee63 100644 --- a/modules/lang/python/doctor.el +++ b/modules/lang/python/doctor.el @@ -5,7 +5,7 @@ "This module requires (:tools lsp)") (if (not (executable-find "python")) - (warn! "Python isn't installed.") + (assert! "Python isn't installed.") (unless (featurep! +lsp) (unless (zerop (shell-command "python -c 'import setuptools'")) (warn! "setuptools wasn't detected, which anaconda-mode requires")))) From 02271f507eec57d83d61696c3cdbe4744ca61d98 Mon Sep 17 00:00:00 2001 From: Dan LaManna Date: Mon, 10 Feb 2020 19:55:49 -0500 Subject: [PATCH 846/983] lang/python: combine :editor format checks --- modules/lang/python/doctor.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/lang/python/doctor.el b/modules/lang/python/doctor.el index 8ef41ee63..085295c37 100644 --- a/modules/lang/python/doctor.el +++ b/modules/lang/python/doctor.el @@ -28,10 +28,6 @@ (unless (executable-find "ipython") (warn! "Couldn't find ipython in your PATH"))) -(if (and (featurep! :editor format) - (not (executable-find "black"))) - (warn! "Couldn't find black. Code formatting will not work.")) - (if (not (executable-find "pytest")) (warn! "Couldn't find pytest. Running tests through pytest will not work.")) @@ -44,6 +40,8 @@ (if (not (executable-find "isort")) (warn! "Couldn't find isort. Import sorting will not work.")) -(if (and (featurep! :editor format) - (not (executable-find "pyflakes"))) +(when (featurep! :editor format) + (unless (executable-find "pyflakes") (warn! "Couldn't find pyflakes. Import management will not work.")) + (unless (executable-find "black") + (warn! "Couldn't find black. Code formatting will not work."))) From 0a463673c94631f78df8c06b1e7287044dd55073 Mon Sep 17 00:00:00 2001 From: Paul Oppenheimer Date: Mon, 10 Feb 2020 20:18:51 -0500 Subject: [PATCH 847/983] make doom purge -g more aggressive Reflog keeps the history of every reset, so expiring it allows us to remove more older commits. git gc by default only cleans for 2 week old objects, so I made it more aggressive --- core/cli/packages.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index bf9992d7c..37dc938ce 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -272,7 +272,8 @@ declaration) or dependency thereof that hasn't already been." (straight--call "git" "clean" "-ffd") (if (not (car (straight--call "git" "replace" "--graft" "HEAD"))) (print! (info "\033[Krepos/%s is already compact\033[1A" repo)) - (straight--call "git" "gc") + (straight--call "git" "reflog" "expire" "--expire=all" "--all") + (straight--call "git" "gc" "--prune=now") (print! (success "\033[KRegrafted repos/%s (from %0.1fKB to %0.1fKB)") repo before-size (doom-directory-size default-directory)) (print-group! (print! "%s" (straight--process-get-output)))) From fdba4472fc4a5e7cf2b031643cacdee0519cc628 Mon Sep 17 00:00:00 2001 From: Dan LaManna Date: Mon, 10 Feb 2020 22:04:08 -0500 Subject: [PATCH 848/983] lang/python: reformat checks to prefer unless --- modules/lang/python/doctor.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/lang/python/doctor.el b/modules/lang/python/doctor.el index 085295c37..a711ca9ea 100644 --- a/modules/lang/python/doctor.el +++ b/modules/lang/python/doctor.el @@ -28,17 +28,17 @@ (unless (executable-find "ipython") (warn! "Couldn't find ipython in your PATH"))) -(if (not (executable-find "pytest")) - (warn! "Couldn't find pytest. Running tests through pytest will not work.")) +(unless (executable-find "pytest") + (warn! "Couldn't find pytest. Running tests through pytest will not work.")) -(if (not (executable-find "nosetests")) - (warn! "Couldn't find nosetests. Running tests through nose will not work.")) +(unless (executable-find "nosetests") + (warn! "Couldn't find nosetests. Running tests through nose will not work.")) -(if (not (executable-find "pipenv")) - (warn! "Couldn't find pipenv. pipenv support will not work.")) +(unless (executable-find "pipenv") + (warn! "Couldn't find pipenv. pipenv support will not work.")) -(if (not (executable-find "isort")) - (warn! "Couldn't find isort. Import sorting will not work.")) +(unless (executable-find "isort") + (warn! "Couldn't find isort. Import sorting will not work.")) (when (featurep! :editor format) (unless (executable-find "pyflakes") From 9cbbf81c3fb78bbe15fe63926c6366f8d15858b5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 10 Feb 2020 14:35:39 -0500 Subject: [PATCH 849/983] Don't recompile in 'doom sync' This may be reinstated later, but for now is a common source of issues because Doom must be fully loaded before byte-compiling; and doing this is prone to errors when Doom is in an incomplete state (which may be the case if there were an error earlier in 'doom sync'). This won't be an issue once the doom script becomes transactional. --- core/core-cli.el | 1 - 1 file changed, 1 deletion(-) diff --git a/core/core-cli.el b/core/core-cli.el index d0149f3cb..cc1511b37 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -359,7 +359,6 @@ stale." (doom-cli-packages-build) (doom-cli-packages-purge prune-p 'builds-p prune-p prune-p) (doom-cli-reload-package-autoloads) - (doom-cli-byte-compile nil 'recompile) t))) (load! "cli/env") From 1446f1a37c0d307927bb0b81aea73c774452df6a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 03:12:40 -0500 Subject: [PATCH 850/983] Bump to Alexander-Miller/treemacs@4d4a955 From Alexander-Miller/treemacs@05d264a Due to hlissner/emacs-doom-themes#395 --- modules/ui/treemacs/packages.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ui/treemacs/packages.el b/modules/ui/treemacs/packages.el index 03c9bd8b2..cc3c0d1e5 100644 --- a/modules/ui/treemacs/packages.el +++ b/modules/ui/treemacs/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/treemacs/packages.el -(package! treemacs :pin "05d264ae8c") +(package! treemacs :pin "4d4a955fcb") (when (featurep! :editor evil +everywhere) - (package! treemacs-evil :pin "05d264ae8c")) -(package! treemacs-projectile :pin "05d264ae8c") + (package! treemacs-evil :pin "4d4a955fcb")) +(package! treemacs-projectile :pin "4d4a955fcb") (when (featurep! :tools magit) - (package! treemacs-magit :pin "05d264ae8c")) + (package! treemacs-magit :pin "4d4a955fcb")) (when (featurep! :ui workspaces) - (package! treemacs-persp :pin "05d264ae8c")) + (package! treemacs-persp :pin "4d4a955fcb")) From 493b85c3965b90ac4b6dfdd5a98075f4045ce4b5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 03:21:44 -0500 Subject: [PATCH 851/983] Wait a second before restarting server sit-for doesn't necessarily do so if emacs recieves input during. --- modules/config/default/autoload/default.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/config/default/autoload/default.el b/modules/config/default/autoload/default.el index fdd1cc096..10837d9a9 100644 --- a/modules/config/default/autoload/default.el +++ b/modules/config/default/autoload/default.el @@ -53,5 +53,5 @@ If ARG (universal argument), runs `compile' from the current directory." (interactive) (server-force-delete) (while (server-running-p) - (sit-for 1)) + (sleep-for 1)) (server-start)) From e8813ffa9055f7ab29adc6df23046845af4918c3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 03:22:49 -0500 Subject: [PATCH 852/983] Bump to hlissner/emacs-doom-themes@de96a55 From hlissner/emacs-doom-themes@7131b60 --- modules/ui/doom/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/doom/packages.el b/modules/ui/doom/packages.el index 47b6e966f..62f8a3765 100644 --- a/modules/ui/doom/packages.el +++ b/modules/ui/doom/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/doom/packages.el -(package! doom-themes :pin "7131b60161") +(package! doom-themes :pin "de96a5558d") (package! solaire-mode :pin "4ac324ccb0") From 63049a60c8bcf3c44033a237a3990fba6ae8a0a1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 03:23:45 -0500 Subject: [PATCH 853/983] Bump to seagle0128/doom-modeline@3836b8f From seagle0128/doom-modeline@31a5ae9 --- modules/ui/modeline/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/modeline/packages.el b/modules/ui/modeline/packages.el index a342d2ba8..04e99f62f 100644 --- a/modules/ui/modeline/packages.el +++ b/modules/ui/modeline/packages.el @@ -2,7 +2,7 @@ ;;; ui/modeline/packages.el (unless (featurep! +light) - (package! doom-modeline :pin "31a5ae99b8")) + (package! doom-modeline :pin "3836b8f871")) (package! anzu :pin "592f8ee6d0") (when (featurep! :editor evil) (package! evil-anzu :pin "9bca6ca14d")) From b1c02e64f52f959370362b3629e55f496950b0c5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 03:40:16 -0500 Subject: [PATCH 854/983] Conform advice to naming conventions --- modules/editor/evil/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 30e1cf9cb..714e1518b 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -159,7 +159,7 @@ directives. By default, this only recognizes C directives.") ;; REVIEW Fix #2493: dir-locals cannot target fundamental-mode when evil-mode ;; is active. See https://github.com/hlissner/doom-emacs/issues/2493. ;; Revert this if this is ever fixed upstream. - (defadvice! fix-local-vars (&rest _) + (defadvice! +evil--fix-local-vars-a (&rest _) :before #'turn-on-evil-mode (when (eq major-mode 'fundamental-mode) (hack-local-variables))) From ed24a4c8574fe6fd06ee79c4c877c9ee6a1a2590 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 03:46:24 -0500 Subject: [PATCH 855/983] Fix prematurely terminated sexp --- modules/config/default/+evil-bindings.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index ee85fdaef..e39d24910 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -401,7 +401,7 @@ :desc "Copy link to remote" "y" #'+vc/browse-at-remote-kill-file-or-region :desc "Copy link to homepage" "Y" #'+vc/browse-at-remote-kill-homepage (:when (featurep! :ui hydra) - :desc "SMerge" "m" #'+vc/smerge-hydra/body)) + :desc "SMerge" "m" #'+vc/smerge-hydra/body) (:when (featurep! :ui vc-gutter) :desc "Git revert hunk" "r" #'git-gutter:revert-hunk :desc "Git stage hunk" "s" #'git-gutter:stage-hunk From 524985ed816d291e4fe9b01f4da6a2bf4f52006c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 03:47:15 -0500 Subject: [PATCH 856/983] Fix reference to removed command Removed in e241fa347 --- modules/config/default/+evil-bindings.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index e39d24910..5d5851f8f 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -427,7 +427,7 @@ :desc "Find issue" "i" #'forge-visit-issue :desc "Find pull request" "p" #'forge-visit-pullreq) (:prefix ("o" . "open in browser") - :desc "Browse file or region" "o" #'+vc/browse-at-remote-file-or-region + :desc "Browse file or region" "o" #'browse-at-remote :desc "Browse homepage" "h" #'+vc/browse-at-remote-homepage :desc "Browse remote" "r" #'forge-browse-remote :desc "Browse commit" "c" #'forge-browse-commit From 9bd3d666179eaf2fb89ef407934983e2bcdc6743 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 13:36:03 -0500 Subject: [PATCH 857/983] Add popup rule for *Local variables* popup --- modules/ui/popup/config.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/ui/popup/config.el b/modules/ui/popup/config.el index 8b2c889ce..e849e4cae 100644 --- a/modules/ui/popup/config.el +++ b/modules/ui/popup/config.el @@ -131,6 +131,8 @@ prevent the popup(s) from messing up the UI (or vice versa)." ("^ \\*" :slot 1 :vslot -1 :size +popup-shrink-to-fit))) (when (featurep! +defaults) '(("^\\*Completions" :ignore t) + ("^\\*Local variables\\*$" + :vslot -1 :slot 1 :size +popup-shrink-to-fit) ("^\\*\\(?:[Cc]ompil\\(?:ation\\|e-Log\\)\\|Messages\\)" :vslot -2 :size 0.3 :autosave t :quit t :ttl nil) ("^\\*\\(?:doom \\|Pp E\\)" ; transient buffers (no interaction required) From 3b6fd1b360953ca70a8a6de06e5b44c21e2d9d02 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 13:36:23 -0500 Subject: [PATCH 858/983] Deactivate mark after successful file search Fixes #2523 --- modules/completion/helm/autoload/helm.el | 1 + modules/completion/ivy/autoload/ivy.el | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/completion/helm/autoload/helm.el b/modules/completion/helm/autoload/helm.el index 610abb75d..c453eabad 100644 --- a/modules/completion/helm/autoload/helm.el +++ b/modules/completion/helm/autoload/helm.el @@ -58,6 +58,7 @@ workspace." (delq nil (append (list (when all-files "-z -uu") (unless recursive "--maxdepth 1")) args)))) + (setq deactivate-mark t) (helm-rg (or query (when (use-region-p) (let ((beg (or (bound-and-true-p evil-visual-beginning) (region-beginning))) diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index 7634f09b1..3c34ae2c8 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -253,6 +253,7 @@ The point of this is to avoid Emacs locking up indexing massive file trees." (unless recursive " --maxdepth 1") " " (mapconcat #'shell-quote-argument args " ")))) + (setq deactivate-mark t) (counsel-rg (or query (when (doom-region-active-p) From abbfea8cffd273a0a31ebfbe7ffe6bffbee10553 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 14:15:36 -0500 Subject: [PATCH 859/983] Bump to seagle0128/doom-modeline@a2687e8 From seagle0128/doom-modeline@3836b8f --- modules/ui/modeline/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/modeline/packages.el b/modules/ui/modeline/packages.el index 04e99f62f..df7844238 100644 --- a/modules/ui/modeline/packages.el +++ b/modules/ui/modeline/packages.el @@ -2,7 +2,7 @@ ;;; ui/modeline/packages.el (unless (featurep! +light) - (package! doom-modeline :pin "3836b8f871")) + (package! doom-modeline :pin "a2687e8416")) (package! anzu :pin "592f8ee6d0") (when (featurep! :editor evil) (package! evil-anzu :pin "9bca6ca14d")) From fe584a1f0cfb37b60e04e92459538f820329a30e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 16:59:20 -0500 Subject: [PATCH 860/983] Add (real) indirect buffers to workspace --- modules/ui/workspaces/config.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/ui/workspaces/config.el b/modules/ui/workspaces/config.el index d54107f29..16ba3b8db 100644 --- a/modules/ui/workspaces/config.el +++ b/modules/ui/workspaces/config.el @@ -121,11 +121,12 @@ stored in `persp-save-dir'.") (add-hook! '(doom-switch-buffer-hook server-visit-hook) (defun +workspaces-add-current-buffer-h () "Add current buffer to focused perspective." - (and persp-mode - (not (persp-buffer-filtered-out-p - (current-buffer) - persp-add-buffer-on-after-change-major-mode-filter-functions)) - (persp-add-buffer (current-buffer) (get-current-persp) nil nil)))) + (when persp-mode + (let ((buffer (or (buffer-base-buffer (current-buffer)) + (current-buffer)))) + (or (persp-buffer-filtered-out-p + buffer persp-add-buffer-on-after-change-major-mode-filter-functions) + (persp-add-buffer buffer (get-current-persp) nil nil)))))) (add-hook 'persp-add-buffer-on-after-change-major-mode-filter-functions #'doom-unreal-buffer-p) From 725003376f3dd9899d7eb7352eeb8e9ff1578b67 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 17:01:00 -0500 Subject: [PATCH 861/983] Add indirect buffer itself to workspace --- modules/ui/workspaces/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/workspaces/config.el b/modules/ui/workspaces/config.el index 16ba3b8db..6c3d6dea8 100644 --- a/modules/ui/workspaces/config.el +++ b/modules/ui/workspaces/config.el @@ -126,7 +126,7 @@ stored in `persp-save-dir'.") (current-buffer)))) (or (persp-buffer-filtered-out-p buffer persp-add-buffer-on-after-change-major-mode-filter-functions) - (persp-add-buffer buffer (get-current-persp) nil nil)))))) + (persp-add-buffer (current-buffer) (get-current-persp) nil nil)))))) (add-hook 'persp-add-buffer-on-after-change-major-mode-filter-functions #'doom-unreal-buffer-p) From 93fce97e61cfb18de8f5ac9b5e47333862b1ea48 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 17:47:39 -0500 Subject: [PATCH 862/983] Refactor +workspaces-add-current-buffer-h --- modules/ui/workspaces/config.el | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/ui/workspaces/config.el b/modules/ui/workspaces/config.el index 6c3d6dea8..a348ac07e 100644 --- a/modules/ui/workspaces/config.el +++ b/modules/ui/workspaces/config.el @@ -117,16 +117,15 @@ stored in `persp-save-dir'.") ;; add buffers when they are switched to. (setq persp-add-buffer-on-find-file nil persp-add-buffer-on-after-change-major-mode nil) - (add-hook! '(doom-switch-buffer-hook server-visit-hook) (defun +workspaces-add-current-buffer-h () "Add current buffer to focused perspective." - (when persp-mode - (let ((buffer (or (buffer-base-buffer (current-buffer)) - (current-buffer)))) - (or (persp-buffer-filtered-out-p - buffer persp-add-buffer-on-after-change-major-mode-filter-functions) - (persp-add-buffer (current-buffer) (get-current-persp) nil nil)))))) + (or (not persp-mode) + (persp-buffer-filtered-out-p + (or (buffer-base-buffer (current-buffer)) + (current-buffer)) + persp-add-buffer-on-after-change-major-mode-filter-functions) + (persp-add-buffer (current-buffer) (get-current-persp) nil nil)))) (add-hook 'persp-add-buffer-on-after-change-major-mode-filter-functions #'doom-unreal-buffer-p) From 7aca54ab91c440666cf8fb1693054155506381d5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 17:47:49 -0500 Subject: [PATCH 863/983] Bump ccls & {,ivy-,helm-}rtags MaskRay/ccls@aab3e31 -> MaskRay/ccls@e5cc4c3 Andersbakken/rtags@92c5126 -> Andersbakken/rtags@31f7842 --- modules/lang/cc/packages.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/lang/cc/packages.el b/modules/lang/cc/packages.el index 824e64f89..dae001853 100644 --- a/modules/lang/cc/packages.el +++ b/modules/lang/cc/packages.el @@ -17,7 +17,7 @@ :pin "404cd0694a"))) (if (featurep! +lsp) - (package! ccls :pin "aab3e31fd7") + (package! ccls :pin "e5cc4c3e6f") (when (package! irony :pin "8387098286") (package! irony-eldoc :pin "0df5831eaa") (when (featurep! :checkers syntax) @@ -25,8 +25,8 @@ (when (featurep! :completion company) (package! company-irony :pin "b44711dfce") (package! company-irony-c-headers :pin "72c386aeb0"))) - (when (package! rtags :pin "92c5126e98") + (when (package! rtags :pin "31f7842015") (when (featurep! :completion ivy) - (package! ivy-rtags :pin "92c5126e98")) + (package! ivy-rtags :pin "31f7842015")) (when (featurep! :completion helm) - (package! helm-rtags :pin "92c5126e98")))) + (package! helm-rtags :pin "31f7842015")))) From be778bb65fa0c33c50006b6dcad00b312d1c121a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 19:22:09 -0500 Subject: [PATCH 864/983] Bump to mooz/js2-mode@fe53814 From mooz/js2-mode@b3841a7 --- modules/lang/javascript/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/javascript/packages.el b/modules/lang/javascript/packages.el index 9e0a75411..7d89725fb 100644 --- a/modules/lang/javascript/packages.el +++ b/modules/lang/javascript/packages.el @@ -3,7 +3,7 @@ ;; Major modes (package! coffee-mode :pin "86ab8aae86") -(package! js2-mode :pin "b3841a7a30") +(package! js2-mode :pin "fe53814dc2") (package! rjsx-mode :pin "014c760138") (package! typescript-mode :pin "a0f2c3ebd4") From 7548148d1479a3146bee46e2d879f31f1ad0c362 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 19:22:47 -0500 Subject: [PATCH 865/983] Bump lsp-mode & lsp-ui emacs-lsp/lsp-mode@91e37a6 -> emacs-lsp/lsp-mode@c8188ef emacs-lsp/lsp-ui@cf6906c -> emacs-lsp/lsp-ui@582e153 --- modules/tools/lsp/packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tools/lsp/packages.el b/modules/tools/lsp/packages.el index de711de87..d388c4aa3 100644 --- a/modules/tools/lsp/packages.el +++ b/modules/tools/lsp/packages.el @@ -1,8 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/lsp/packages.el -(package! lsp-mode :pin "91e37a61f4") -(package! lsp-ui :pin "cf6906cc45") +(package! lsp-mode :pin "c8188efeba") +(package! lsp-ui :pin "582e153a5e") (when (featurep! :completion company) (package! company-lsp :pin "f921ffa0cd")) (when (featurep! :completion ivy) From f9eb6a3b65281e09e99dfdc7db35026a7f5406b7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 19:24:08 -0500 Subject: [PATCH 866/983] Bump to jacktasia/dumb-jump@b5185e3 From jacktasia/dumb-jump@daddd9b --- modules/tools/lookup/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index 7efe70f8e..5509fb090 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -8,7 +8,7 @@ (package! helm)) ;; -(package! dumb-jump :pin "daddd9ba6a") +(package! dumb-jump :pin "b5185e3368") (when (featurep! :completion ivy) (package! ivy-xref :pin "3d4c35fe2b")) (when (featurep! :completion helm) From 48225b30e8a05d710fe335a021ff47f9506707d2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Feb 2020 21:53:28 -0500 Subject: [PATCH 867/983] Bump to ema2159/centaur-tabs@3658efc From ema2159/centaur-tabs@0383af0 --- modules/ui/tabs/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/tabs/packages.el b/modules/ui/tabs/packages.el index 5e02417c5..898a642e3 100644 --- a/modules/ui/tabs/packages.el +++ b/modules/ui/tabs/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/tabs/packages.el -(package! centaur-tabs :pin "0383af0174") +(package! centaur-tabs :pin "3658efccd8") From 3139137210ebf1c0c25d40a06914b8deb455e482 Mon Sep 17 00:00:00 2001 From: Bobbie Soedirgo Date: Wed, 12 Feb 2020 17:20:01 +0800 Subject: [PATCH 868/983] change `org-re-reveal-root' to https://revealjs.com --- modules/lang/org/contrib/present.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/contrib/present.el b/modules/lang/org/contrib/present.el index b6c329b02..a92ff6572 100644 --- a/modules/lang/org/contrib/present.el +++ b/modules/lang/org/contrib/present.el @@ -14,7 +14,7 @@ (use-package! org-re-reveal :after ox :init - (setq org-re-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js@3/")) + (setq org-re-reveal-root "https://revealjs.com")) (use-package! org-tree-slide From 6602372e8bcb5b309cbad730b5bb8095047c3076 Mon Sep 17 00:00:00 2001 From: Bobbie Soedirgo Date: Wed, 12 Feb 2020 18:11:58 +0800 Subject: [PATCH 869/983] change a related config in ox-pandoc --- modules/lang/org/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 152322847..46b046288 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -442,7 +442,7 @@ file isn't in `org-directory'." (setq org-pandoc-options '((standalone . t) (mathjax . t) - (variable . "revealjs-url=https://cdn.jsdelivr.net/npm/reveal.js@3/"))))) + (variable . "revealjs-url=https://revealjs.com"))))) (defun +org-init-habit-h () From 51d71ee7e3345e41812241143e5ba7b240713d50 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 12 Feb 2020 20:40:34 -0500 Subject: [PATCH 870/983] Bump to hlissner/emacs-doom-themes@de96a55 From hlissner/emacs-doom-themes@c8dd976 --- modules/ui/doom/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/doom/packages.el b/modules/ui/doom/packages.el index 62f8a3765..186d872e8 100644 --- a/modules/ui/doom/packages.el +++ b/modules/ui/doom/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/doom/packages.el -(package! doom-themes :pin "de96a5558d") +(package! doom-themes :pin "c8dd976067") (package! solaire-mode :pin "4ac324ccb0") From 066afa17dafbc14e3da70de723af3065ff602170 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 13 Feb 2020 01:24:04 -0500 Subject: [PATCH 871/983] Update doomdir templates --- core/templates/config.example.el | 19 +++++++++++-------- core/templates/packages.example.el | 19 +++++++++---------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/core/templates/config.example.el b/core/templates/config.example.el index 2f1430fde..2f476f919 100644 --- a/core/templates/config.example.el +++ b/core/templates/config.example.el @@ -1,7 +1,7 @@ ;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- ;; Place your private configuration here! Remember, you do not need to run 'doom -;; refresh' after modifying this file! +;; sync' after modifying this file! ;; Some functionality uses this to identify you, e.g. GPG configuration, email @@ -14,7 +14,8 @@ ;; ;; + `doom-font' ;; + `doom-variable-pitch-font' -;; + `doom-big-font' -- used for `doom-big-font-mode' +;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for +;; presentations or streaming. ;; ;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd ;; font string. You generally only need these two: @@ -22,14 +23,15 @@ ;; There are two ways to load a theme. Both assume the theme is installed and ;; available. You can either set `doom-theme' or manually load a theme with the -;; `load-theme' function. These are the defaults. +;; `load-theme' function. This is the default: (setq doom-theme 'doom-one) -;; If you intend to use org, it is recommended you change this! +;; If you use `org' and don't want your org files in the default location below, +;; change `org-directory'. It must be set before org loads! (setq org-directory "~/org/") -;; If you want to change the style of line numbers, change this to `relative' or -;; `nil' to disable it: +;; This determines the style of line numbers in effect. If set to `nil', line +;; numbers are disabled. For relative line numbers, set this to `relative'. (setq display-line-numbers-type t) @@ -38,8 +40,9 @@ ;; - `load!' for loading external *.el files relative to this one ;; - `use-package' for configuring packages ;; - `after!' for running code after a package has loaded -;; - `add-load-path!' for adding directories to the `load-path', where Emacs -;; looks when you load packages with `require' or `use-package'. +;; - `add-load-path!' for adding directories to the `load-path', relative to +;; this file. Emacs searches the `load-path' when you load packages with +;; `require' or `use-package'. ;; - `map!' for binding new keys ;; ;; To get information about any of these functions/macros, move the cursor over diff --git a/core/templates/packages.example.el b/core/templates/packages.example.el index b0c8dc3eb..2afbc7e28 100644 --- a/core/templates/packages.example.el +++ b/core/templates/packages.example.el @@ -1,23 +1,22 @@ ;; -*- no-byte-compile: t; -*- ;;; $DOOMDIR/packages.el -;; This is where you install packages, by declaring them with the `package!' -;; macro, then running 'doom refresh' on the command line. You'll need to -;; restart Emacs for your changes to take effect! Or at least, run M-x -;; `doom/reload'. +;; To install a package with Doom you must declare them here, run 'doom sync' on +;; the command line, then restart Emacs for the changes to take effect. +;; Alternatively, use M-x doom/reload. ;; -;; WARNING: Don't disable core packages listed in ~/.emacs.d/core/packages.el. -;; Doom requires these, and disabling them may have terrible side effects. -;; -;; Here are a couple examples: +;; WARNING: Disabling core packages listed in ~/.emacs.d/core/packages.el may +;; have nasty side-effects and is not recommended. ;; All of Doom's packages are pinned to a specific commit, and updated from ;; release to release. To un-pin all packages and live on the edge, do: -;(setq doom-pinned-packages nil) +;(unpin! t) ;; ...but to unpin a single package: -;(package! pinned-package :pin nil) +;(unpin! pinned-package) +;; Use it to unpin multiple packages +;(unpin! pinned-package another-pinned-package) ;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: From b4c56cc6910f154188ef782767b659e81752da05 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 13 Feb 2020 02:51:28 -0500 Subject: [PATCH 872/983] Add package bump PR template --- .github/PULL_REQUEST/bump.md | 30 +++++++++++++++++++ .../general.md} | 4 +++ 2 files changed, 34 insertions(+) create mode 100644 .github/PULL_REQUEST/bump.md rename .github/{PULL_REQUEST_TEMPLATE.md => PULL_REQUEST/general.md} (85%) diff --git a/.github/PULL_REQUEST/bump.md b/.github/PULL_REQUEST/bump.md new file mode 100644 index 000000000..c02624b7e --- /dev/null +++ b/.github/PULL_REQUEST/bump.md @@ -0,0 +1,30 @@ +--- +name: Bump a package +about: Update a pinned package to a new commit +labels: is:update re:packages +--- +> You're about to request a package be bumped to a newer commit. +> +> 1. Please make sure this PR targets the `develop` branch and not `master`. +> 2. Describe why these bumps are necessary below +> 3. Please conform your commit messages to one of the following formats: +> +> Bump to username/repo@a1b2c3d +> +> From username/repo@z9y8x7w +> +> OR, if multiple packages are bumped in one commit: +> +> Bump package1, package2 & package 3 +> +> emacs-lsp/lsp-mode@91e37a6 -> emacs-lsp/lsp-mode@c8188ef +> emacs-lsp/lsp-ui@cf6906c -> emacs-lsp/lsp-ui@582e153 +> +> (Commit hashes should be limited to 7 characters) +> +> 4. You've included links to relevant issues, if any +> 5. You've deleted this template +> +> Thank you for contributing to Doom Emacs! <3 + +Explain why this bump is necessary here... diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST/general.md similarity index 85% rename from .github/PULL_REQUEST_TEMPLATE.md rename to .github/PULL_REQUEST/general.md index 6a69c8e63..d36a306b9 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST/general.md @@ -1,3 +1,7 @@ +--- +name: General Contribution +about: A general code or documentation PR +--- > Please follow these steps before submitting your PR: > > - [ ] This PR targets the `develop` branch and not `master` From c27697d90e3d01f3dde4011467c7d49185cedbf4 Mon Sep 17 00:00:00 2001 From: Christopher Batey Date: Thu, 13 Feb 2020 07:22:06 +0000 Subject: [PATCH 873/983] Bump lsp-mode & lsp-ui emacs-lsp/lsp-mode@c8188ef -> emacs-lsp/lsp-mode@e7c7abf emacs-lsp/lsp-ui@582e153 -> emacs-lsp/lsp-ui@6caacc8 --- modules/tools/lsp/packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tools/lsp/packages.el b/modules/tools/lsp/packages.el index d388c4aa3..e451c3225 100644 --- a/modules/tools/lsp/packages.el +++ b/modules/tools/lsp/packages.el @@ -1,8 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/lsp/packages.el -(package! lsp-mode :pin "c8188efeba") -(package! lsp-ui :pin "582e153a5e") +(package! lsp-mode :pin "e7c7abf236") +(package! lsp-ui :pin "6caacc8c93") (when (featurep! :completion company) (package! company-lsp :pin "f921ffa0cd")) (when (featurep! :completion ivy) From 7f6876d85b74b6c35a8faf7e3816a3fc2591094e Mon Sep 17 00:00:00 2001 From: Xuan Bi Date: Wed, 12 Feb 2020 22:47:36 +0800 Subject: [PATCH 874/983] Enable flyspell in git-commit-mode --- modules/checkers/spell/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/checkers/spell/config.el b/modules/checkers/spell/config.el index 867fedd75..760c3f1ef 100644 --- a/modules/checkers/spell/config.el +++ b/modules/checkers/spell/config.el @@ -51,7 +51,8 @@ TeX-mode-hook rst-mode-hook mu4e-compose-mode-hook - message-mode-hook) + message-mode-hook + git-commit-mode-hook) #'flyspell-mode) (when (featurep! +everywhere) From b627cef26506551a7cdcc087bb6db570a69c75df Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 13 Feb 2020 14:39:56 -0500 Subject: [PATCH 875/983] Mention discord server in how_to issue template --- .github/ISSUE_TEMPLATE/how_to.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/how_to.md b/.github/ISSUE_TEMPLATE/how_to.md index c4dd58329..d4d0544a6 100644 --- a/.github/ISSUE_TEMPLATE/how_to.md +++ b/.github/ISSUE_TEMPLATE/how_to.md @@ -4,6 +4,9 @@ about: How to get Doom/Emacs to behave a certain way labels: is:question --- +> Please visit our Discord server to ask how-to and workflow questions: +> https://discord.gg/qvGgnVx -- post on Doom's issue tracker as a last resort. + **What are you trying to achieve?** ... From 75e1b13c6a409d19f0d49c1dd615385603d05678 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 13 Feb 2020 14:40:46 -0500 Subject: [PATCH 876/983] Bump to seagle0128/doom-modeline@c4969ff From seagle0128/doom-modeline@a2687e8 --- modules/ui/modeline/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/modeline/packages.el b/modules/ui/modeline/packages.el index df7844238..024796440 100644 --- a/modules/ui/modeline/packages.el +++ b/modules/ui/modeline/packages.el @@ -2,7 +2,7 @@ ;;; ui/modeline/packages.el (unless (featurep! +light) - (package! doom-modeline :pin "a2687e8416")) + (package! doom-modeline :pin "c4969ff149")) (package! anzu :pin "592f8ee6d0") (when (featurep! :editor evil) (package! evil-anzu :pin "9bca6ca14d")) From e404b48c05a4c1d1e1b4cc29b9ff55af90b250b9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 13 Feb 2020 14:41:25 -0500 Subject: [PATCH 877/983] Bump gcmh, xclip, projectile & which-key koral/gcmh@f542908 -> koral/gcmh@8867533 emacs-straight/xclip@88003b782e -> emacs-straight/xclip@d022cf947d bbatsov/projectile@84be1da -> bbatsov/projectile@341150c justbur/emacs-which-key@cf44641 -> justbur/emacs-which-key@7b068f3 --- core/packages.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/packages.el b/core/packages.el index e2d355fd0..78d524e91 100644 --- a/core/packages.el +++ b/core/packages.el @@ -3,7 +3,7 @@ ;; core.el (package! auto-minor-mode :pin "17cfa1b548") -(package! gcmh :pin "f542908b9a") +(package! gcmh :pin "8867533a73") ;; core-ui.el (package! all-the-icons :pin "1416f37984") @@ -34,14 +34,14 @@ :recipe (:host github :repo "hlissner/ws-butler") :pin "e4430d3778") (unless IS-WINDOWS - (package! xclip :pin "88003b782e")) + (package! xclip :pin "d022cf947d")) ;; core-projects.el -(package! projectile :pin "84be1dada3") +(package! projectile :pin "341150c0e7") ;; core-keybinds.el (package! general :pin "f6e928622d") -(package! which-key :pin "cf44641485") +(package! which-key :pin "7b068f3e95") ;; autoload/cache.el (package! persistent-soft :pin "a1e0ddf") From 7b40e80a8f1e8ce851e9d43e6838360d8d7aa01a Mon Sep 17 00:00:00 2001 From: Mark Martinez Date: Thu, 13 Feb 2020 23:30:28 -0600 Subject: [PATCH 878/983] Fix `+file-template-p` to use `:when` keyword --- modules/editor/file-templates/config.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/editor/file-templates/config.el b/modules/editor/file-templates/config.el index ca887163e..8c19ab61d 100644 --- a/modules/editor/file-templates/config.el +++ b/modules/editor/file-templates/config.el @@ -118,11 +118,14 @@ information.") "Return t if RULE applies to the current buffer." (let ((pred (car rule)) (plist (cdr rule))) - (and (cond ((symbolp pred) (eq major-mode pred)) - ((and (stringp pred) buffer-file-name) - (string-match-p pred buffer-file-name)) - ((not (plist-member plist :when)) t) - ((funcall (plist-get plist :when) buffer-file-name))) + (and (or (and (symbolp pred) + (eq major-mode pred)) + (and (stringp pred) + (stringp buffer-file-name) + (string-match-p pred buffer-file-name) + (or (not (plist-member plist :when)) + (funcall (plist-get plist :when) + buffer-file-name)))) rule))) (defun +file-templates-check-h () From 608bc9f75b940d0e245735c101704ee9a211507f Mon Sep 17 00:00:00 2001 From: yoavm448 Date: Fri, 14 Feb 2020 15:07:46 +0200 Subject: [PATCH 879/983] file-templates docs: registering and overriding --- modules/editor/file-templates/README.org | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/editor/file-templates/README.org b/modules/editor/file-templates/README.org index 519c0ee47..55b2eafc3 100644 --- a/modules/editor/file-templates/README.org +++ b/modules/editor/file-templates/README.org @@ -49,8 +49,12 @@ for comment headers in code. #+end_quote * Configuration -** TODO Registering a new file template -** TODO Changing existing file templates +** Registering a new file template +Look into the documentation of ~set-file-template!~ and ~set-file-templates!~. +** Changing existing file templates +Simply register a new template (using ~set-file-template!~) that matches the same +file. The new template would be pushed to the top of ~+file-template-alist~ and +thus would take priority while searching for a template to insert. ** Adding new OSS licenses The ~+file-templates/insert-license~ command searches for snippets under ~text-mode~ that are named ~__license-ABC~, where ABC is the short name of the From 55ed4ee7b62ae3db9c1fa2bb9c14a6eb2a1fd121 Mon Sep 17 00:00:00 2001 From: yoavm448 Date: Fri, 14 Feb 2020 15:08:27 +0200 Subject: [PATCH 880/983] Update TOC format of file-templates README The new format is the one used by toc-org, the old one would have been updated eventually... --- modules/editor/file-templates/README.org | 30 ++++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/editor/file-templates/README.org b/modules/editor/file-templates/README.org index 55b2eafc3..9a195f6e5 100644 --- a/modules/editor/file-templates/README.org +++ b/modules/editor/file-templates/README.org @@ -4,21 +4,21 @@ #+STARTUP: inlineimages * Table of Contents :TOC_2:noexport: -- [[Description][Description]] - - [[Module Flags][Module Flags]] - - [[Plugins][Plugins]] -- [[Prerequisites][Prerequisites]] -- [[Usage][Usage]] - - [[Inserting OSS licenses][Inserting OSS licenses]] -- [[Configuration][Configuration]] - - [[Registering a new file template][Registering a new file template]] - - [[Changing existing file templates][Changing existing file templates]] - - [[Adding new OSS licenses][Adding new OSS licenses]] -- [[Troubleshooting][Troubleshooting]] -- [[Appendix][Appendix]] - - [[API][API]] - - [[Commands][Commands]] - - [[Variables][Variables]] +- [[#description][Description]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] +- [[#prerequisites][Prerequisites]] +- [[#usage][Usage]] + - [[#inserting-oss-licenses][Inserting OSS licenses]] +- [[#configuration][Configuration]] + - [[#registering-a-new-file-template][Registering a new file template]] + - [[#changing-existing-file-templates][Changing existing file templates]] + - [[#adding-new-oss-licenses][Adding new OSS licenses]] +- [[#troubleshooting][Troubleshooting]] +- [[#appendix][Appendix]] + - [[#api][API]] + - [[#commands][Commands]] + - [[#variables][Variables]] * Description This module adds file templates for blank files, powered by yasnippet. From 176be128ef38c5f95bdc1923895744177b379fe4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 14 Feb 2020 15:14:28 -0500 Subject: [PATCH 881/983] gdb-show-main = gdb-many-windows = t --- modules/tools/debugger/config.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/tools/debugger/config.el b/modules/tools/debugger/config.el index 3becc86eb..419b172a5 100644 --- a/modules/tools/debugger/config.el +++ b/modules/tools/debugger/config.el @@ -20,6 +20,11 @@ ;; ;;; Packages +;;;###package gdb +(setq gdb-show-main t + gdb-many-windows t) + + (use-package! dap-mode :when (featurep! :tools lsp) :after lsp-mode From 114be4af5734c6bbb698d8816c7f060b8c7280ac Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 16 Feb 2020 00:43:11 -0500 Subject: [PATCH 882/983] Don't use c-toggle-{electric-state,auto-newline} globally Fixes an odd error where: 1. You open an elixir-mode buffer 2. elixir-mode sets `mode-name` to a non-string value 3. cc-mode is pulled in by one of its dependencies 4. `c-toggle-electric-state` is called from the config/default module 5. Which calls `c-update-modeline` 6. Which operates on `mode-name` and assumes it is a string 7. And a wrong-type-argument: stringp error is thrown --- modules/config/default/config.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index bca8cf43c..f852d20f9 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -123,9 +123,7 @@ ;; Disable electric keys in C modes because it interferes with smartparens ;; and custom bindings. We'll do it ourselves (mostly). (after! cc-mode - (c-toggle-electric-state -1) - (c-toggle-auto-newline -1) - (setq c-electric-flag nil) + (setq-default c-electric-flag nil) (dolist (key '("#" "{" "}" "/" "*" ";" "," ":" "(" ")" "\177")) (define-key c-mode-base-map key nil)) From 21dfd6159eed9e6ebdff3c2365ee32a66a0d42bb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 16 Feb 2020 00:48:13 -0500 Subject: [PATCH 883/983] Bump to politza/pdf-tools@0159cb1 From politza/pdf-tools@cc29d4c --- modules/tools/pdf/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/pdf/packages.el b/modules/tools/pdf/packages.el index 47196de64..06ef963d3 100644 --- a/modules/tools/pdf/packages.el +++ b/modules/tools/pdf/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/pdf/packages.el -(package! pdf-tools :pin "cc29d4c9c2") +(package! pdf-tools :pin "0159cb1ab3") From 24d2f494c9fba708143fca2016ad8315aeb775bf Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 16 Feb 2020 00:49:01 -0500 Subject: [PATCH 884/983] lang/org: refactor advice & ob-ammonite integration --- modules/lang/org/config.el | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 46b046288..b72f277a4 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -6,7 +6,8 @@ (D . C) (sh . shell) (bash . shell) - (matlab . octave)) + (matlab . octave) + (amm . ammonite)) "An alist mapping languages to babel libraries. This is necessary for babel libraries (ob-*.el) that don't match the name of the language. @@ -242,12 +243,7 @@ path too.") (message (concat "`org-babel-do-load-languages' is redundant with Doom's lazy loading mechanism for babel " "packages. There is no need to use it, so it has been disabled"))) - - (when (featurep! :lang scala) - (add-hook! '+org-babel-load-functions - (defun +org-babel-load-ammonite-h (lang) - (and (eq lang 'amm) - (require 'ob-ammonite nil t)))))) + ) (defun +org-init-capture-defaults-h () @@ -491,11 +487,11 @@ eldoc string." (funcall orig-fn (cl-loop for part in path ;; Remove full link syntax - for part = (replace-regexp-in-string org-link-any-re "\\4" part) + for fixedpart = (replace-regexp-in-string org-link-any-re "\\4" part) for n from 0 for face = (nth (% n org-n-level-faces) org-level-faces) collect - (org-add-props part + (org-add-props fixedpart nil 'face `(:foreground ,(face-foreground face nil t) :weight bold))) width prefix separator)) From 92e8521e9050847ccdc1c2194072a88ca7dfa05f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 16 Feb 2020 02:50:52 -0500 Subject: [PATCH 885/983] Remove centralization of org exports It's too much hassle to maintain, and too many exporters expect to work out of the current directory. --- modules/lang/org/config.el | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index b72f277a4..1db8c52d7 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -52,10 +52,6 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default (defvar +org-initial-fold-level 2 "The initial fold level of org files when no #+STARTUP options for it.") -(defvar +org-enable-centralized-exports t - "If non-nil, files exported from files in `org-directory' will be stored in -`+org-export-directory', rather than the same directory has the input file(s).") - (defvar +org-export-directory ".export/" "Where to store exported files relative to `org-directory'. Can be an absolute path too.") @@ -358,30 +354,6 @@ underlying, modified buffer. This fixes that." (add-to-list 'projectile-globally-ignored-directories org-attach-id-dir))) -(defun +org-init-centralized-exports-h () - "TODO" - ;; I don't have any beef with org's built-in export system, but I do wish it - ;; would export to a central directory (by default), rather than - ;; `default-directory'. This is because all my org files are usually in one - ;; place, and I want to be able to refer back to old exports if needed. - (setq +org-export-directory (expand-file-name +org-export-directory org-directory)) - - (defadvice! +org--export-output-file-name-a (args) - "Return a centralized export location unless one is provided or the current -file isn't in `org-directory'." - :filter-args #'org-export-output-file-name - (when (and +org-enable-centralized-exports - (not (nth 2 args)) - buffer-file-name - (file-in-directory-p buffer-file-name org-directory)) - (cl-destructuring-bind (extension &optional subtreep _pubdir) args - (let ((dir (expand-file-name +org-export-directory org-directory))) - (unless (file-directory-p dir) - (make-directory dir t)) - (setq args (list extension subtreep dir))))) - args)) - - (defun +org-init-custom-links-h () ;; Highlight broken file links (org-link-set-parameters @@ -950,7 +922,6 @@ compelling reason, so..." #'+org-init-babel-lazy-loader-h #'+org-init-capture-defaults-h #'+org-init-capture-frame-h - #'+org-init-centralized-exports-h #'+org-init-custom-links-h #'+org-init-export-h #'+org-init-habit-h From e59265bed75dd376f4dd362622ffbb93eaa9daaa Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 16 Feb 2020 02:53:27 -0500 Subject: [PATCH 886/983] Update lang/org's readme --- modules/lang/org/README.org | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/lang/org/README.org b/modules/lang/org/README.org index ee27165e3..59c3968cb 100644 --- a/modules/lang/org/README.org +++ b/modules/lang/org/README.org @@ -24,9 +24,9 @@ This module adds org-mode support to Doom Emacs, along with a number of adjustments, extensions and reasonable defaults to make it more performant and intuitive out of the box: -+ A custom, centralized attachment and export system that stores files in one - place, rather than in the same directory as the input file(s) (only applies to - attachments/exporting from files in/under =org-directory=). ++ A custom, centralized attachment system that stores files in one place, rather + than in the same directory as the input file(s) (only applies to attachments + from files in/under =org-directory=). + Executable code blocks with support for a variety of languages and tools (depending on what :lang modules are enabled). + Supports an external org-capture workflow through the =bin/org-capture= shell From ca18034e329536d68100a45d6c6388342e6bdb38 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 17 Feb 2020 04:58:57 -0500 Subject: [PATCH 887/983] Fix drag'n'drop in non-org-mode buffers --- modules/lang/org/autoload/contrib-dragndrop.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/autoload/contrib-dragndrop.el b/modules/lang/org/autoload/contrib-dragndrop.el index 6dfb31157..618790cee 100644 --- a/modules/lang/org/autoload/contrib-dragndrop.el +++ b/modules/lang/org/autoload/contrib-dragndrop.el @@ -7,6 +7,6 @@ (if (eq major-mode 'org-mode) (+org/attach-file-and-insert-link uri) (let ((dnd-protocol-alist - (rassq-delete-all '+org-attach-download-dnd + (rassq-delete-all '+org-dragndrop-download-dnd-fn (copy-alist dnd-protocol-alist)))) (dnd-handle-one-url nil action uri)))) From dc745084d268c050c0414365dc75e6066ecac2bf Mon Sep 17 00:00:00 2001 From: Aku Kotkavuo Date: Tue, 18 Feb 2020 01:57:30 +0200 Subject: [PATCH 888/983] Fix documentation shortcut --- docs/index.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.org b/docs/index.org index 4768a3098..d035eb6e6 100644 --- a/docs/index.org +++ b/docs/index.org @@ -13,8 +13,8 @@ readable code design, so that there is less between you and Emacs. #+begin_quote The documentation is designed to be viewed within Doom Emacs. Access it by -pressing =SPC d h= (or =C-h d h= for non-evil users), or search it with =SPC h d -s= (or =C-h d s=). +pressing =SPC h d h= (or =C-h d h= for non-evil users), or search it with =SPC h +d s= (or =C-h d s=). #+end_quote * Table of Contents :TOC: From c917502823b09eea9d6878c29d2931257369edb6 Mon Sep 17 00:00:00 2001 From: Tyler Hampton Date: Mon, 17 Feb 2020 20:28:03 -0800 Subject: [PATCH 889/983] Add LSP server activation behind feature flag --- modules/tools/terraform/config.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/tools/terraform/config.el b/modules/tools/terraform/config.el index e6ca17f5e..4f1fcc9d6 100644 --- a/modules/tools/terraform/config.el +++ b/modules/tools/terraform/config.el @@ -13,3 +13,8 @@ :after terraform-mode :config (set-company-backend! 'terraform-mode 'company-terraform)) + + +(after! terraform-mode + (if (featurep! +lsp) + (add-hook 'terraform-mode-local-vars-hook #'lsp!)) From 2350e266c0a061972f54667b786ad1b16e1c7414 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 17 Feb 2020 17:08:25 -0500 Subject: [PATCH 890/983] Clarify scoop install instructions --- docs/getting_started.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/getting_started.org b/docs/getting_started.org index 33e3febc7..721a390f9 100644 --- a/docs/getting_started.org +++ b/docs/getting_started.org @@ -268,7 +268,8 @@ choco install git emacs ripgrep fd llvm #+END_SRC #+begin_quote -Switching out choco for [[https://scoop.sh/][scoop]] should just work, but it hasn't been tested. +Switch out choco for [[https://scoop.sh/][scoop]] and it should just work, except for Emacs; scoop has +no emacs recipe. You'll need to use another method to install it. #+end_quote You will need [[https://mywindowshub.com/how-to-edit-system-environment-variables-for-a-user-in-windows-10/][the ~HOME~ system variable]] set to =C:\Users\USERNAME\=, otherwise From 60fde473d45aa5c438a0afc9b24d51d7ffb2c98f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 18 Feb 2020 00:18:18 -0500 Subject: [PATCH 891/983] Remove +rss-elfeed-files & use rmh-elfeed-org-files No need for the abstraction. --- modules/app/rss/config.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/app/rss/config.el b/modules/app/rss/config.el index 7e1af21a5..ad424271e 100644 --- a/modules/app/rss/config.el +++ b/modules/app/rss/config.el @@ -4,10 +4,6 @@ ;; by apps Reeder and Readkit. It can be invoked via `=rss'. Otherwise, if you ;; don't care for the UI you can invoke elfeed directly with `elfeed'. -(defvar +rss-elfeed-files (list "elfeed.org") - "Where to look for elfeed.org files, relative to `org-directory'. Can be -absolute paths.") - (defvar +rss-split-direction 'below "What direction to pop up the entry buffer in elfeed.") @@ -67,8 +63,10 @@ easier to scroll through.") (use-package! elfeed-org :when (featurep! +org) :after elfeed + :init + (setq rmh-elfeed-org-files (list "elfeed.org")) :config (let ((default-directory org-directory)) (setq rmh-elfeed-org-files - (mapcar #'expand-file-name +rss-elfeed-files))) + (mapcar #'expand-file-name rmh-elfeed-org-files))) (elfeed-org)) From e3d7b2662c3db8dbe0939e1a73923bf1ab2b0c28 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 18 Feb 2020 00:19:56 -0500 Subject: [PATCH 892/983] Don't throw error if elfeed org file does not exist The user may not want an org file, so we shouldn't impose this error on them if one doesn't exist. --- modules/app/rss/config.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/app/rss/config.el b/modules/app/rss/config.el index ad424271e..a17947150 100644 --- a/modules/app/rss/config.el +++ b/modules/app/rss/config.el @@ -66,7 +66,8 @@ easier to scroll through.") :init (setq rmh-elfeed-org-files (list "elfeed.org")) :config - (let ((default-directory org-directory)) - (setq rmh-elfeed-org-files - (mapcar #'expand-file-name rmh-elfeed-org-files))) - (elfeed-org)) + (and (let ((default-directory org-directory)) + (setq rmh-elfeed-org-files + (cl-remove-if-not + #'file-exists-p (mapcar #'expand-file-name rmh-elfeed-org-files)))) + (elfeed-org))) From 67a8c75b721aae3220e67846f1885817b2e87c74 Mon Sep 17 00:00:00 2001 From: Tyler Hampton Date: Mon, 17 Feb 2020 22:18:05 -0800 Subject: [PATCH 893/983] Fix indentation and remove if --- modules/tools/terraform/config.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/tools/terraform/config.el b/modules/tools/terraform/config.el index 4f1fcc9d6..24b129281 100644 --- a/modules/tools/terraform/config.el +++ b/modules/tools/terraform/config.el @@ -1,5 +1,9 @@ ;;; tools/terraform/config.el -*- lexical-binding: t; -*- +(when (featurep! +lsp) + (add-hook 'terraform-mode-local-vars-hook #'lsp!) + + (map! :after terraform-mode :map terraform-mode-map :localleader From 4cca1783761a2fc8b8cd448da51d0664a2b43c35 Mon Sep 17 00:00:00 2001 From: Tyler Hampton Date: Mon, 17 Feb 2020 22:36:31 -0800 Subject: [PATCH 894/983] Remove previous block --- modules/tools/terraform/config.el | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/tools/terraform/config.el b/modules/tools/terraform/config.el index 24b129281..1166d1c2c 100644 --- a/modules/tools/terraform/config.el +++ b/modules/tools/terraform/config.el @@ -17,8 +17,3 @@ :after terraform-mode :config (set-company-backend! 'terraform-mode 'company-terraform)) - - -(after! terraform-mode - (if (featurep! +lsp) - (add-hook 'terraform-mode-local-vars-hook #'lsp!)) From 838f96a58144d4553bcb6d35d0939bd6e55b2d79 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 18 Feb 2020 01:54:18 -0500 Subject: [PATCH 895/983] Fix persistent-soft :pin --- core/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/packages.el b/core/packages.el index 78d524e91..4dc671942 100644 --- a/core/packages.el +++ b/core/packages.el @@ -44,4 +44,4 @@ (package! which-key :pin "7b068f3e95") ;; autoload/cache.el -(package! persistent-soft :pin "a1e0ddf") +(package! persistent-soft :pin "a1e0ddf2a1") From 925ff3933734ca4bd3b61618e7d46b3d2281454a Mon Sep 17 00:00:00 2001 From: Undead Kernel Date: Tue, 18 Feb 2020 15:14:03 +0100 Subject: [PATCH 896/983] bindings: correct description type-o --- modules/config/default/+emacs-bindings.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index 51c385589..a65bd0642 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -70,7 +70,7 @@ :desc "Sudo find file" "S" #'doom/sudo-find-file :desc "Yank filename" "y" #'+default/yank-buffer-filename :desc "Open scratch buffer" "x" #'doom/open-scratch-buffer - :desc "Open project scratch buffer" "X" #'doom/switch-to-scratch-buffer + :desc "Switch to scratch buffer" "X" #'doom/switch-to-scratch-buffer (:when (featurep! :tools editorconfig) :desc "Open project editorconfig" "." #'editorconfig-find-current-editorconfig)) From 3e733b88e763f90501cab5ca23755ad4e27a81cc Mon Sep 17 00:00:00 2001 From: Tyler Hampton Date: Tue, 18 Feb 2020 10:45:32 -0800 Subject: [PATCH 897/983] Add install instructions for scoop emacs --- docs/getting_started.org | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/getting_started.org b/docs/getting_started.org index 721a390f9..33fd8118a 100644 --- a/docs/getting_started.org +++ b/docs/getting_started.org @@ -268,10 +268,16 @@ choco install git emacs ripgrep fd llvm #+END_SRC #+begin_quote -Switch out choco for [[https://scoop.sh/][scoop]] and it should just work, except for Emacs; scoop has -no emacs recipe. You'll need to use another method to install it. +Scoop is also a viable way of installing Emacs. However, because Emacs is a GUI +application, it is relegated to the 'extras' Scoop bucket and that will need to +be enabled. #+end_quote +#+BEGIN_SRC sh +scoop enable extras +scoop install git emacs ripgrep fd llvm +#+END_SRC + You will need [[https://mywindowshub.com/how-to-edit-system-environment-variables-for-a-user-in-windows-10/][the ~HOME~ system variable]] set to =C:\Users\USERNAME\=, otherwise Emacs will treat =C:\Users\USERNAME\AppData\Roaming= as your ~HOME~, which causes issues. From 4680f23d902f49260060bc7debe7c3cdae813ae5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 18 Feb 2020 14:37:15 -0500 Subject: [PATCH 898/983] Fix type listp error when formatting buffers Because `buffer-local-variables` may contain symbols (which represent locally unbound variables), not just sublists. --- modules/editor/format/autoload/format.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/editor/format/autoload/format.el b/modules/editor/format/autoload/format.el index 5894a7781..00123f9fb 100644 --- a/modules/editor/format/autoload/format.el +++ b/modules/editor/format/autoload/format.el @@ -137,7 +137,8 @@ See `+format/buffer' for the interactive version of this function, and (insert output) ;; Ensure this temp buffer _seems_ as much like the origin ;; buffer as possible. - (cl-loop for (var . val) in (buffer-local-variables origin-buffer) + (cl-loop for (var . val) + in (cl-remove-if-not #'listp (buffer-local-variables origin-buffer)) ;; Making enable-multibyte-characters buffer-local ;; causes an error. unless (eq var 'enable-multibyte-characters) From 41279cfc4160311ddeb5b69ab204420237053643 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 18 Feb 2020 18:47:55 -0500 Subject: [PATCH 899/983] Fix centered-frame snippet --- docs/api.org | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/api.org b/docs/api.org index 749141a5a..e4702ffc5 100644 --- a/docs/api.org +++ b/docs/api.org @@ -33,7 +33,7 @@ It is integrated into Helpful, in Doom. - [[#unsetq-hook][unsetq-hook!]] - [[#use-package][use-package!]] - [[#interesting-snippets][Interesting snippets]] - - [[#persist-emacs-initial-frame-size-across-sessions][Persist Emacs' initial frame size across sessions]] + - [[#center-emacs-initial-frame-with-a-fixed-size][Center Emacs' initial frame with a fixed size]] - [[#persist-emacs-initial-frame-position-dimensions-andor-full-screen-state-across-sessions][Persist Emacs' initial frame position, dimensions and/or full-screen state across sessions]] - [[#update-cursor-shape-under-terminal-emacs][Update cursor shape under terminal Emacs]] @@ -521,15 +521,15 @@ These are side-by-side comparisons, showing how to bind keys with and without :defer-incrementally t) #+END_SRC * Interesting snippets -** Persist Emacs' initial frame size across sessions +** Center Emacs' initial frame with a fixed size #+BEGIN_SRC elisp (let ((display-height (display-pixel-height)) (display-width (display-pixel-width))) - (add-to-list 'initial-frame-alist - `((left . ,(/ new-frame-width 2)) - (top . ,(/ new-frame-height 2)) - (width . ,(/ display-width 2)) - (height . ,(/ display-height 2))))) + (pushnew! initial-frame-alist + `(left . ,(/ display-width 2)) + `(top . ,(/ display-height 2)) + `(width . ,display-width) + `(height . ,display-height))) #+END_SRC ** Persist Emacs' initial frame position, dimensions and/or full-screen state across sessions From e08e7a44225ee3936af911be762cb4a4a196b973 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 18 Feb 2020 22:44:48 -0500 Subject: [PATCH 900/983] Bump evil-nerd-commenter, evil-traces & evil-collection redguardtoo/evil-nerd-commenter@bed56ec -> redguardtoo/evil-nerd-commenter@c9fa23e mamapanda/evil-traces@257c66b -> mamapanda/evil-traces@bc25cae emacs-evil/evil-collection@27da36c -> emacs-evil/evil-collection@e6a4ba6 --- modules/editor/evil/+everywhere.el | 1 + modules/editor/evil/packages.el | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/editor/evil/+everywhere.el b/modules/editor/evil/+everywhere.el index 50f4d4c91..fcc34b980 100644 --- a/modules/editor/evil/+everywhere.el +++ b/modules/editor/evil/+everywhere.el @@ -82,6 +82,7 @@ variable for an explanation of the defaults (in comments). See (custom cus-edit) cus-theme daemons + dashboard deadgrep debbugs debug diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index 8a7aed675..391d3af7d 100644 --- a/modules/editor/evil/packages.el +++ b/modules/editor/evil/packages.el @@ -8,14 +8,14 @@ (package! evil-escape :pin "f4e9116bfb") (package! evil-exchange :pin "3030e21ee1") (package! evil-indent-plus :pin "0c7501e6ef") -(package! evil-nerd-commenter :pin "bed56ecb88") +(package! evil-nerd-commenter :pin "c9fa23ee7e") (package! evil-numbers :recipe (:host github :repo "janpath/evil-numbers") :pin "d988041c1f") (package! evil-snipe :pin "3ec8adfd49") (package! evil-surround :pin "9b0b17f06c") (package! evil-textobj-anyblock :pin "ff00980f06") -(package! evil-traces :pin "257c66bd7a") +(package! evil-traces :pin "bc25cae9fa") (package! evil-visualstar :pin "06c053d8f7") (package! exato :pin "88266fa7fc") (package! evil-quick-diff @@ -30,4 +30,4 @@ (package! neotree) (autoload 'neotree-make-executor "neotree" nil nil 'macro)) - (package! evil-collection :pin "27da36c705")) + (package! evil-collection :pin "e6a4ba695e")) From f7445a10dbe62ba294d42242ef2d2c6ee0dbc257 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 18 Feb 2020 22:56:47 -0500 Subject: [PATCH 901/983] General refactor & reformatting across the board --- bin/doom | 8 ++++---- core/cli/autoloads.el | 7 ++++--- core/core-projects.el | 4 ++-- core/core-ui.el | 4 ++-- modules/lang/plantuml/packages.el | 2 ++ modules/term/vterm/config.el | 2 +- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/bin/doom b/bin/doom index 8d23b15e3..5ac35bf82 100755 --- a/bin/doom +++ b/bin/doom @@ -57,10 +57,10 @@ with a different private module." (setq command "help")) (when (equal (user-real-uid) 0) - (message - (concat "WARNING: This script is running as root. This isn't necessary and is likely\n" - "unintentional. It will cause file permissions errors later if you use this\n" - "Doom installation on a non-root account.\n")) + (print! + (concat "WARNING: This script is running as root. This likely wasn't intentional, and\n" + "is unnecessary to use this script. This will cause file permissions errors\n" + "later if you use this Doom installation on a non-root account.\n")) (unless (or doom-auto-accept (y-or-n-p "Continue anyway?")) (user-error "Aborted"))) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 700e0523c..4cd2e5fd0 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -33,9 +33,10 @@ one wants that.") (and (print! (start "Generating core autoloads...")) (doom-cli--write-autoloads file (doom-cli--generate-autoloads - (cl-loop for dir in (append (list doom-core-dir) - (cdr (doom-module-load-path 'all-p)) - (list doom-private-dir)) + (cl-loop for dir + in (append (list doom-core-dir) + (cdr (doom-module-load-path 'all-p)) + (list doom-private-dir)) if (doom-glob dir "autoload.el") collect it if (doom-glob dir "autoload/*.el") append it) 'scan)) diff --git a/core/core-projects.el b/core/core-projects.el index 9c08a0872..6f978fc01 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -54,8 +54,8 @@ Emacs.") ;; searches from the current directory down to / for certain project ;; markers, like package.json, setup.py, or Cargo.toml ;; + `projectile-root-top-down-recurring' -> consults - ;; `projectile-project-root-files-top-down-recurring'; searches from the - ;; current directory down to / for a directory that has .svn or Makefile but + ;; `projectile-project-root-files-top-down-recurring'; e.g. searches from + ;; the current directory down to / for a directory that has Makefile but ;; doesn't have a parent with one of those files. ;; ;; In the interest of performance, we reduce the number of project root marker diff --git a/core/core-ui.el b/core/core-ui.el index 4ffb2f450..8d02d4210 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -480,8 +480,8 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (defadvice! doom--disable-all-the-icons-in-tty-a (orig-fn &rest args) "Return a blank string in tty Emacs, which doesn't support multiple fonts." :around '(all-the-icons-octicon all-the-icons-material - all-the-icons-faicon all-the-icons-fileicon - all-the-icons-wicon all-the-icons-alltheicon) + all-the-icons-faicon all-the-icons-fileicon + all-the-icons-wicon all-the-icons-alltheicon) (if (or (not after-init-time) (display-multi-font-p)) (apply orig-fn args) ""))) diff --git a/modules/lang/plantuml/packages.el b/modules/lang/plantuml/packages.el index b9b6956fd..129f2b550 100644 --- a/modules/lang/plantuml/packages.el +++ b/modules/lang/plantuml/packages.el @@ -4,3 +4,5 @@ (package! plantuml-mode :pin "ea45a13707") (when (featurep! :checkers syntax) (package! flycheck-plantuml :pin "183be89e1d")) + +;; ob-plantuml is provided by org-plus-contrib diff --git a/modules/term/vterm/config.el b/modules/term/vterm/config.el index 6abec4d96..097e9d597 100644 --- a/modules/term/vterm/config.el +++ b/modules/term/vterm/config.el @@ -1,7 +1,7 @@ ;;; term/vterm/config.el -*- lexical-binding: t; -*- (use-package! vterm - :when module-file-suffix + :when (boundp 'module-file-suffix) :defer t :preface (setq vterm-install t) :config From 4391c569684ebac3ccdbc5b4eb6767b845342ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastien=20Rivi=C3=A8re?= Date: Wed, 19 Feb 2020 08:29:24 +0100 Subject: [PATCH 902/983] fix missing parenthesis in terraform config --- modules/tools/terraform/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/terraform/config.el b/modules/tools/terraform/config.el index 1166d1c2c..897bb712f 100644 --- a/modules/tools/terraform/config.el +++ b/modules/tools/terraform/config.el @@ -1,7 +1,7 @@ ;;; tools/terraform/config.el -*- lexical-binding: t; -*- (when (featurep! +lsp) - (add-hook 'terraform-mode-local-vars-hook #'lsp!) + (add-hook 'terraform-mode-local-vars-hook #'lsp!)) (map! :after terraform-mode From e9ab3967836390e4378148281d44b5e9ee166a4a Mon Sep 17 00:00:00 2001 From: Sebastian Sturm Date: Tue, 18 Feb 2020 20:03:18 +0100 Subject: [PATCH 903/983] Update to latest lsp-mode, lsp-ui --- modules/tools/lsp/config.el | 5 +++-- modules/tools/lsp/packages.el | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/tools/lsp/config.el b/modules/tools/lsp/config.el index ac335e2f5..a1df04f25 100644 --- a/modules/tools/lsp/config.el +++ b/modules/tools/lsp/config.el @@ -27,8 +27,9 @@ This can be a single company backend or a list thereof. It can be anything lsp-intelephense-storage-path (concat doom-cache-dir "lsp-intelephense/")) :config - (when (and lsp-auto-configure lsp-auto-require-clients) - (require 'lsp-clients)) + (when lsp-auto-configure + (mapc (lambda (package) (require package nil t)) + lsp-client-packages)) (set-lookup-handlers! 'lsp-mode :async t :documentation 'lsp-describe-thing-at-point diff --git a/modules/tools/lsp/packages.el b/modules/tools/lsp/packages.el index e451c3225..e2f449548 100644 --- a/modules/tools/lsp/packages.el +++ b/modules/tools/lsp/packages.el @@ -1,8 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/lsp/packages.el -(package! lsp-mode :pin "e7c7abf236") -(package! lsp-ui :pin "6caacc8c93") +(package! lsp-mode :pin "2fc0963a50") +(package! lsp-ui :pin "e8200e3b72") (when (featurep! :completion company) (package! company-lsp :pin "f921ffa0cd")) (when (featurep! :completion ivy) From f0bc835d1948b859d3fecdfc6ff8bccd8565b8f2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 19 Feb 2020 17:28:13 -0500 Subject: [PATCH 904/983] Fix #2564: associate *.eex with web-mode And expand :mode declarations for readability. --- modules/lang/web/+html.el | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/modules/lang/web/+html.el b/modules/lang/web/+html.el index 4870ab20c..1824c279b 100644 --- a/modules/lang/web/+html.el +++ b/modules/lang/web/+html.el @@ -1,12 +1,24 @@ ;;; lang/web/+html.el -*- lexical-binding: t; -*- (use-package! web-mode + :mode "\\.p?html?\\'" + :mode "\\.\\(?:tpl\\|blade\\)\\(?:\\.php\\)?\\'" + :mode "\\.erb\\'" + :mode "\\.eex\\'" + :mode "\\.jsp\\'" + :mode "\\.as[cp]x\\'" + :mode "\\.hbs\\'" + :mode "\\.mustache\\'" + :mode "\\.svelte\\'" + :mode "\\.vue\\'" + :mode "\\.twig\\'" + :mode "\\.jinja\\'" + :mode "wp-content/themes/.+/.+\\.php\\'" + :mode "templates/.+\\.php\\'" ;; REVIEW We associate TSX files with `web-mode' because `typescript-mode' ;; does not officially support JSX/TSX. See ;; https://github.com/emacs-typescript/typescript.el/issues/4 - :mode "\\.\\(?:as\\(?:[cp]x\\)\\|blade\\.php\\|erb\\|hbs\\|j\\(?:inja\\|sp\\)\\|mustache\\|p?html?\\|svelte\\|t\\(?:pl\\.php\\|sx\\|wig\\)\\|vue\\)\\'" - :mode "wp-content/themes/.+/.+\\.php\\'" - :mode "templates/.+\\.php\\'" + :mode "\\.tsx\\'" :config (set-docsets! 'web-mode "HTML" "CSS" "Twig" "WordPress") From 71e5a5513b91c2cc92ade0edfac98047b8fd072d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 19 Feb 2020 17:52:05 -0500 Subject: [PATCH 905/983] Fix #2556 (hopefully): exec format error on Windows --- core/cli/packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 37dc938ce..0190d2639 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -116,8 +116,7 @@ declaration) or dependency thereof that hasn't already been." (make-hash-table :test #'equal))) (recipes (doom-package-recipe-list))) (unless force-p - (straight--make-build-cache-available) - (straight--make-package-modifications-available)) + (straight--make-build-cache-available)) (if-let (built (doom-with-package-recipes recipes (package local-repo) (unless force-p @@ -125,6 +124,7 @@ declaration) or dependency thereof that hasn't already been." (let ((build-dir (straight--build-dir package)) (repo-dir (straight--repos-dir local-repo))) (and (or (file-newer-than-file-p repo-dir build-dir) + (file-exists-p (straight--modified-dir (or local-repo package))) ;; Doesn't make sense to compare el and elc files ;; when the former isn't a symlink to their source. (when straight-use-symlinks From beb7a40a84c47ee5c6038d345188969c7f85609a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 19 Feb 2020 18:21:24 -0500 Subject: [PATCH 906/983] Fix inline previews for "download:%s" org links #2539 --- modules/lang/org/contrib/dragndrop.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/lang/org/contrib/dragndrop.el b/modules/lang/org/contrib/dragndrop.el index 292eb0958..d1ce37f51 100644 --- a/modules/lang/org/contrib/dragndrop.el +++ b/modules/lang/org/contrib/dragndrop.el @@ -13,6 +13,12 @@ '("^\\(?:https?\\|ftp\\|file\\|nfs\\):" . +org-dragndrop-download-dnd-fn) '("^data:" . org-download-dnd-base64)) (advice-add #'org-download-enable :override #'ignore) + + (after! org + ;; A shorter link to attachments + (+org-def-link "download" org-attach-id-dir) + (setf (alist-get "download" org-link-abbrev-alist nil nil #'equal) + (abbreviate-file-name org-attach-id-dir))) :config (setq org-download-image-dir org-attach-id-dir org-download-link-format "[[download:%s]]\n" @@ -25,11 +31,6 @@ (cond ((executable-find "maim") "maim -s %s") ((executable-find "scrot") "scrot -s %s"))))) - ;; A shorter link to attachments - (+org-def-link "download" org-attach-id-dir) - (setf (alist-get "download" org-link-abbrev-alist nil nil #'equal) - (abbreviate-file-name org-attach-id-dir)) - ;; Handle non-image files a little differently. Images should be inserted ;; as-is, as image previews. Other files, like pdfs or zips, should be linked ;; to, with an icon indicating the type of file. From 4b8986cac40c2f97e70a596954b5cdfdc887d080 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 19 Feb 2020 19:01:38 -0500 Subject: [PATCH 907/983] Add *.eex to web-mode-engines-alist #2564 --- modules/lang/web/+html.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/lang/web/+html.el b/modules/lang/web/+html.el index 1824c279b..6cb724193 100644 --- a/modules/lang/web/+html.el +++ b/modules/lang/web/+html.el @@ -61,6 +61,8 @@ "\\(?:>\\|]\\|}\\)+\\'"))))) (delq! nil web-mode-engines-auto-pairs)) + (add-to-list 'web-mode-engines-alist '("elixir" . "\\.eex\\'")) + (map! :map web-mode-map (:localleader :desc "Rehighlight buffer" "h" #'web-mode-buffer-highlight From 1ab9f8b99d35a451a06c8278457ddfa58c566186 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 19 Feb 2020 19:03:46 -0500 Subject: [PATCH 908/983] Fix commenting JS in web-mode --- modules/lang/web/+html.el | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/lang/web/+html.el b/modules/lang/web/+html.el index 6cb724193..dfb57899e 100644 --- a/modules/lang/web/+html.el +++ b/modules/lang/web/+html.el @@ -63,6 +63,27 @@ (add-to-list 'web-mode-engines-alist '("elixir" . "\\.eex\\'")) + (let ((types '("javascript" "jsx"))) + (setq web-mode-comment-formats + (cl-remove-if (lambda (item) (member (car item) types)) + web-mode-comment-formats)) + (dolist (type types) + (push (cons type "//") web-mode-comment-formats))) + + (add-hook! 'web-mode-hook + (defun +web--fix-js-comments-h () + "Fix comment handling in `web-mode' for JavaScript." + (when (member web-mode-content-type '("javascript" "jsx")) + ;; For some reason the default is to insert HTML comments even + ;; in JavaScript. + (setq-local comment-start "//") + (setq-local comment-end "") + ;; Needed since otherwise the default value generated by + ;; `comment-normalize-vars' will key off the syntax and think + ;; that a single "/" starts a comment, which completely borks + ;; auto-fill. + (setq-local comment-start-skip "// *")))) + (map! :map web-mode-map (:localleader :desc "Rehighlight buffer" "h" #'web-mode-buffer-highlight From 8e748ec5679afd231f6f377aecd8111830ac1c49 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 19 Feb 2020 23:02:07 -0500 Subject: [PATCH 909/983] Use enh-ruby-mode for ruby shell scripts Instead of ruby-mode --- modules/lang/ruby/config.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/lang/ruby/config.el b/modules/lang/ruby/config.el index 26f7e326a..22f713c6e 100644 --- a/modules/lang/ruby/config.el +++ b/modules/lang/ruby/config.el @@ -11,8 +11,10 @@ :mode ("\\.\\(?:pry\\|irb\\)rc\\'" . +ruby-init-h) :mode ("\\.\\(?:rb\\|rake\\|rabl\\|ru\\|builder\\|gemspec\\|jbuilder\\|thor\\)\\'" . +ruby-init-h) :mode ("/\\(?:Berks\\|Cap\\|Gem\\|Guard\\|Pod\\|Puppet\\|Rake\\|Thor\\|Vagrant\\)file\\'" . +ruby-init-h) + :interpreter ("j?ruby\\([0-9.]+\\)" . +ruby-init-h) :preface (after! ruby-mode + (rassq-delete-all 'ruby-mode interpreter-mode-alist) (require 'enh-ruby-mode)) (defun +ruby-init-h () "Enable `enh-ruby-mode' if ruby is available, otherwise `ruby-mode'." From f29d5ed0343408e2489fbe1de3f7e6a8c3d5f8a3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 19 Feb 2020 23:04:21 -0500 Subject: [PATCH 910/983] lang/ruby: minor refactor --- modules/lang/ruby/config.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/lang/ruby/config.el b/modules/lang/ruby/config.el index 22f713c6e..f3dcc52d4 100644 --- a/modules/lang/ruby/config.el +++ b/modules/lang/ruby/config.el @@ -29,12 +29,12 @@ (add-hook 'enh-ruby-mode-local-vars-hook #'lsp!)) (after! company-dabbrev-code - (add-to-list 'company-dabbrev-code-modes 'enh-ruby-mode nil #'eq) - (add-to-list 'company-dabbrev-code-modes 'ruby-mode nil #'eq)) + (add-to-list 'company-dabbrev-code-modes 'enh-ruby-mode) + (add-to-list 'company-dabbrev-code-modes 'ruby-mode)) (after! inf-ruby ;; switch to inf-ruby from compile if we detect a breakpoint has been hit - (add-hook 'compilation-filter-hook 'inf-ruby-auto-enter)) + (add-hook 'compilation-filter-hook #'inf-ruby-auto-enter)) ;; so class and module pairs work (setq-hook! (ruby-mode enh-ruby-mode) sp-max-pair-length 6)) From 8a7763337d78f562989d5ac7eca7e35ae9a7e3cd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 19 Feb 2020 23:34:16 -0500 Subject: [PATCH 911/983] doom refresh -> doom sync refresh isn't going anywhere, but sync will be the canonical command here on out, because it is more appropriate for kind of work it will be doing in the future. --- README.md | 2 +- core/autoload/config.el | 10 +++++----- core/cli/env.el | 6 +++--- core/cli/upgrade.el | 2 +- core/core-packages.el | 2 +- core/core.el | 2 +- core/templates/QUICKSTART_INTRO | 2 +- modules/editor/evil/README.org | 2 +- modules/lang/ocaml/README.org | 4 ++-- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 7f3af56eb..cfa4f3dc3 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ We have [a Discord server][url:discord]! Hop on and say hi! Encountered strange behavior or an error? Here are some things to try before you shoot off that bug report: -- Run `bin/doom refresh`. This ensures Doom is properly set up and its autoloads +- Run `bin/doom sync`. This ensures Doom is properly set up and its autoloads files are up-to-date. - If you have byte-compiled your config (with `bin/doom compile`), see if `bin/doom clean` makes the issue go away. Never debug issues with a diff --git a/core/autoload/config.el b/core/autoload/config.el index 5984af4de..d465d66f4 100644 --- a/core/autoload/config.el +++ b/core/autoload/config.el @@ -68,16 +68,16 @@ And jumps to your `doom!' block." (defun doom/reload () "Reloads your private config. -This is experimental! It will try to do as `bin/doom refresh' does, but from -within this Emacs session. i.e. it reload autoloads files (if necessary), -reloads your package list, and lastly, reloads your private config.el. +This is experimental! It will try to do as `bin/doom sync' does, but from within +this Emacs session. i.e. it reload autoloads files (if necessary), reloads your +package list, and lastly, reloads your private config.el. Runs `doom-reload-hook' afterwards." (interactive) (require 'core-cli) (when (and IS-WINDOWS (file-exists-p doom-env-file)) (warn "Can't regenerate envvar file from within Emacs. Run 'doom env' from the console")) - (doom--compile (format "%s refresh -e" doom-bin) + (doom--compile (format "%s sync -e" doom-bin) :on-success (let ((doom-reloading-p t)) (doom-initialize 'force) @@ -99,7 +99,7 @@ This is much faster and safer than `doom/reload', but not as comprehensive. This reloads your package and module visibility, but does not install new packages or remove orphaned ones. It also doesn't reload your private config. -It is useful to only pull in changes performed by 'doom refresh' on the command +It is useful to only pull in changes performed by 'doom sync' on the command line." (interactive) (require 'core-cli) diff --git a/core/cli/env.el b/core/cli/env.el index 97cffa80b..de66a3e32 100644 --- a/core/cli/env.el +++ b/core/cli/env.el @@ -19,8 +19,8 @@ This is useful in cases where you cannot guarantee that Emacs (or the daemon) will be launched from the correct environment (e.g. on MacOS or through certain app launchers on Linux). -This file is automatically regenerated when you run this command or 'doom -refresh'. However, 'doom refresh' will only regenerate this file if it exists. +This file is automatically regenerated when you run this command or 'doom sync'. +However, 'doom sync' will only regenerate this file if it exists. Why this over exec-path-from-shell? @@ -111,7 +111,7 @@ default, on Linux, this is '$SHELL -ic /usr/bin/env'. Variables in "#\n" (if (file-equal-p env-file doom-env-file) (concat "# It is NOT safe to edit this file. Changes will be overwritten next time you\n" - "# run 'doom refresh'. To create a safe-to-edit envvar file use:\n#\n" + "# run 'doom sync'. To create a safe-to-edit envvar file use:\n#\n" "# doom env -o ~/.doom.d/myenv\n#\n" "# And load it with (doom-load-envvars-file \"~/.doom.d/myenv\").\n") (concat "# This file is safe to edit by hand, but needs to be loaded manually with:\n#\n" diff --git a/core/cli/upgrade.el b/core/cli/upgrade.el index 1b5f6fd70..5e327f525 100644 --- a/core/cli/upgrade.el +++ b/core/cli/upgrade.el @@ -11,7 +11,7 @@ following shell commands: cd ~/.emacs.d git pull --rebase bin/doom clean - bin/doom refresh + bin/doom sync bin/doom update" :bare t (let ((doom-auto-discard force-p)) diff --git a/core/core-packages.el b/core/core-packages.el index 24690a1c0..ea21d41e7 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -21,7 +21,7 @@ ;; ;; + `bin/doom install`: a wizard that guides you through setting up Doom and ;; your private config for the first time. -;; + `bin/doom refresh`: your go-to command for making sure Doom is in optimal +;; + `bin/doom sync`: your go-to command for making sure Doom is in optimal ;; condition. It ensures all unneeded packages are removed, all needed ones ;; are installed, and all metadata associated with them is generated. ;; + `bin/doom upgrade`: upgrades Doom Emacs and your packages to the latest diff --git a/core/core.el b/core/core.el index 2b046726f..d6288781c 100644 --- a/core/core.el +++ b/core/core.el @@ -115,7 +115,7 @@ This file is compiled from the autoloads files of all installed packages combined.") (defconst doom-env-file (concat doom-local-dir "env") - "The location of your envvar file, generated by `doom env refresh`. + "The location of your envvar file, generated by `doom env`. This file contains environment variables scraped from your shell environment, which is loaded at startup (if it exists). This is helpful if Emacs can't diff --git a/core/templates/QUICKSTART_INTRO b/core/templates/QUICKSTART_INTRO index 8a410349e..f7d101ac7 100644 --- a/core/templates/QUICKSTART_INTRO +++ b/core/templates/QUICKSTART_INTRO @@ -15,7 +15,7 @@ Before you doom yourself, there are a few things you should know: give you clues about what is wrong. 3. Use `bin/doom upgrade` to update Doom. Doing it any other way may require - additional work. When in doubt, run `bin/doom refresh`. + additional work. When in doubt, run `bin/doom sync`. 4. Check out `bin/doom help` to see what else `bin/doom` can do (and it is recommended you add ~/.emacs.d/bin to your PATH). diff --git a/modules/editor/evil/README.org b/modules/editor/evil/README.org index 0549a9316..05b6a2fde 100644 --- a/modules/editor/evil/README.org +++ b/modules/editor/evil/README.org @@ -137,7 +137,7 @@ And these are text objects added by this module: You must do two things to remove Evil: 1. Remove =:editor evil= from =~/.doom.d/init.el=, -2. Run ~doom refresh~ to clean up lingering dependencies and refresh your +2. Run ~doom sync~ to clean up lingering dependencies and regenerate your autoloads files. 3. [OPTIONAL] You may want to assign new values to ~doom-leader-alt-key~ and ~doom-localleader-alt-key~. These are bound to =C-c= and =C-c l= by default. diff --git a/modules/lang/ocaml/README.org b/modules/lang/ocaml/README.org index ce5b47645..ac89cab0f 100644 --- a/modules/lang/ocaml/README.org +++ b/modules/lang/ocaml/README.org @@ -69,8 +69,8 @@ opam install merlin utop ocp-indent dune ocamlformat + If =:emacs imenu= is enabled then top level symbols (modules, type, functions, etc.) can be looked up using =SPC / i= -Run =bin/doom refresh= to install all packages and =make doctor= to diagnose -missing tools. +Run =doom sync= to install all packages and =doom doctor= to diagnose missing +tools. * Appendix ** Commands From 10623868b8be7673fac765bb2ac6191ca44c344e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 19 Feb 2020 23:41:39 -0500 Subject: [PATCH 912/983] Fix #2567: unbound js2-refactor keybinds --- modules/lang/javascript/config.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/lang/javascript/config.el b/modules/lang/javascript/config.el index 3598e0adf..0fdff1030 100644 --- a/modules/lang/javascript/config.el +++ b/modules/lang/javascript/config.el @@ -211,10 +211,7 @@ to tide." (use-package! js2-refactor :hook ((js2-mode rjsx-mode) . js2-refactor-mode) - :config - (when (featurep! :editor evil +everywhere) - (let ((js2-refactor-mode-map (evil-get-auxiliary-keymap js2-refactor-mode-map 'normal t t))) - (js2r-add-keybindings-with-prefix (format "%s r" doom-localleader-key)))) + :init (map! :after js2-mode :map js2-mode-map :localleader @@ -233,7 +230,12 @@ to tide." (:prefix ("u" . "unwrap")) (:prefix ("v" . "var")) (:prefix ("w" . "wrap")) - (:prefix ("3" . "ternary"))))) + (:prefix ("3" . "ternary")))) + :config + (when (featurep! :editor evil +everywhere) + (add-hook 'js2-refactor-mode-hook #'evil-normalize-keymaps) + (let ((js2-refactor-mode-map (evil-get-auxiliary-keymap js2-refactor-mode-map 'normal t t))) + (js2r-add-keybindings-with-prefix (format "%s r" doom-localleader-key))))) (use-package! eslintd-fix From dbf9c92b487c3962573b443c4e13c64253a50e2c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 20 Feb 2020 00:51:55 -0500 Subject: [PATCH 913/983] Fix +evil-resolve-vim-path-a not removing excess backslashes --- modules/editor/evil/autoload/advice.el | 130 ++++++++++++------------- 1 file changed, 60 insertions(+), 70 deletions(-) diff --git a/modules/editor/evil/autoload/advice.el b/modules/editor/evil/autoload/advice.el index 73a56f873..834f40315 100644 --- a/modules/editor/evil/autoload/advice.el +++ b/modules/editor/evil/autoload/advice.el @@ -15,76 +15,66 @@ support for most vim file modifiers, as well as: See http://vimdoc.sourceforge.net/htmldoc/cmdline.html#filename-modifiers for more information on modifiers." - (let* (case-fold-search - (regexp (concat "\\(?:^\\|[^\\\\]\\)" - "\\(\\([#%]\\)" - "\\(\\(?::\\(?:[PphtreS~.]\\|g?s[^:\t\n ]+\\)\\)*\\)\\)")) - (matches - (cl-loop with i = 0 - while (and (< i (length file-name)) - (string-match regexp file-name i)) - do (setq i (1+ (match-beginning 0))) - and collect - (cl-loop for j to (/ (length (match-data)) 2) - collect (match-string j file-name))))) - (dolist (match matches) - (let ((flags (split-string (cadddr match) ":" t)) - (path (and buffer-file-name - (pcase (caddr match) - ("%" (file-relative-name buffer-file-name)) - ("#" (save-excursion (other-window 1) (file-relative-name buffer-file-name)))))) - flag global) - (if (not path) - (setq path "") - (while flags - (setq flag (pop flags)) - (when (string-suffix-p "\\" flag) - (setq flag (concat flag (pop flags)))) - (when (string-prefix-p "gs" flag) - (setq global t - flag (substring flag 1))) - (setq path - (or (pcase (substring flag 0 1) - ("p" (expand-file-name path)) - ("~" (concat "~/" (file-relative-name path "~"))) - ("." (file-relative-name path default-directory)) - ("t" (file-name-nondirectory (directory-file-name path))) - ("r" (file-name-sans-extension path)) - ("e" (file-name-extension path)) - ("S" (shell-quote-argument path)) - ("h" - (let ((parent (file-name-directory (expand-file-name path)))) - (unless (equal (file-truename path) - (file-truename parent)) - (if (file-name-absolute-p path) - (directory-file-name parent) - (file-relative-name parent))))) - ("s" - (if (featurep 'evil) - (when-let (args (evil-delimited-arguments (substring flag 1) 2)) - (let ((pattern (evil-transform-vim-style-regexp (car args))) - (replace (cadr args))) - (replace-regexp-in-string - (if global pattern (concat "\\(" pattern "\\).*\\'")) - (evil-transform-vim-style-regexp replace) path t t - (unless global 1)))) - path)) - ("P" - (let ((project-root (doom-project-root (file-name-directory (expand-file-name path))))) - (unless project-root - (user-error "Not in a project")) - (abbreviate-file-name project-root))) - (_ path)) - ""))) - ;; strip trailing slash, if applicable - (when (and (not (string= path "")) (equal (substring path -1) "/")) - (setq path (substring path 0 -1)))) - (setq file-name - (replace-regexp-in-string - (format "\\(?:^\\|[^\\\\]\\)\\(%s\\)" - (regexp-quote (cadr match))) - path file-name t t 1)))) - (replace-regexp-in-string regexp "\\1" file-name t))) + (let (case-fold-search) + (with-temp-buffer + (save-excursion (insert file-name)) + (while (re-search-forward "\\(^\\|[^\\\\]\\)\\(\\([%#]\\)\\(:\\([PphtreS~.]\\|g?s\\)\\)*\\)" nil t) + (catch 'continue + (unless buffer-file-name + (replace-match (match-string 1) t t nil 2) + (throw 'continue t)) + (let ((beg (match-beginning 2)) + (end (match-end 3)) + (path (pcase (match-string 3) + ("%" (file-relative-name buffer-file-name)) + ("#" (and (other-buffer) + (buffer-file-name (other-buffer))))))) + (save-match-data + (goto-char beg) + (while (re-search-forward ":\\([PphtreS~.]\\|g?s\\)" (+ (point) 3) t) + (let* ((modifier (match-string 1)) + (global (string-prefix-p "gs" modifier))) + (when global + (setq modifier (substring modifier 1))) + (setq end (match-end 1) + path + (or (when path + (pcase (substring modifier 0 1) + ("p" (expand-file-name path)) + ("~" (concat "~/" (file-relative-name path "~"))) + ("." (file-relative-name path default-directory)) + ("t" (file-name-nondirectory (directory-file-name path))) + ("r" (file-name-sans-extension path)) + ("e" (file-name-extension path)) + ("S" (shell-quote-argument path)) + ("h" + (let ((parent (file-name-directory (expand-file-name path)))) + (unless (file-equal-p path parent) + (if (file-name-absolute-p path) + (directory-file-name parent) + (file-relative-name parent))))) + ("s" + (if (featurep 'evil) + (when-let (args (evil-delimited-arguments (substring modifier 1) 2)) + (let ((pattern (evil-transform-vim-style-regexp (car args))) + (replace (cadr args))) + (replace-regexp-in-string + (if global pattern (concat "\\(" pattern "\\).*\\'")) + (evil-transform-vim-style-regexp replace) path t t + (unless global 1)))) + path)) + ("P" + (let ((project-root (doom-project-root (file-name-directory (expand-file-name path))))) + (unless project-root + (user-error "Not in a project")) + (abbreviate-file-name project-root))))) + "")) + ;; strip trailing slash, if applicable + (or (string-empty-p path) + (not (equal (substring path -1) "/")) + (setq path (substring path 0 -1)))))) + (replace-match path t t nil 2)))) + (replace-regexp-in-string "\\\\\\([#%]\\)" "\\1" (buffer-string) t)))) (defun +evil--insert-newline (&optional above _noextranewline) (let ((pos (save-excursion (beginning-of-line-text) (point))) From 9efd70394720786a8dd27e08d150db313ae888af Mon Sep 17 00:00:00 2001 From: Michael Sanders Date: Wed, 19 Feb 2020 20:11:21 -0800 Subject: [PATCH 914/983] lang/ruby: Add detection for additional files This adds support for podspecs used by Cocoapods, Brewfiles from Homebrew Bundle, and Fastfiles from Fastlane. --- modules/lang/ruby/config.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/ruby/config.el b/modules/lang/ruby/config.el index f3dcc52d4..7cb57a32c 100644 --- a/modules/lang/ruby/config.el +++ b/modules/lang/ruby/config.el @@ -9,8 +9,8 @@ (use-package! enh-ruby-mode :mode ("\\.\\(?:pry\\|irb\\)rc\\'" . +ruby-init-h) - :mode ("\\.\\(?:rb\\|rake\\|rabl\\|ru\\|builder\\|gemspec\\|jbuilder\\|thor\\)\\'" . +ruby-init-h) - :mode ("/\\(?:Berks\\|Cap\\|Gem\\|Guard\\|Pod\\|Puppet\\|Rake\\|Thor\\|Vagrant\\)file\\'" . +ruby-init-h) + :mode ("\\.\\(?:rb\\|rake\\|rabl\\|ru\\|builder\\|gemspec\\|podspec\\|jbuilder\\|thor\\)\\'" . +ruby-init-h) + :mode ("/\\(?:Berks\\|Brew\\|Cap\\|Fast\\|Gem\\|Guard\\|Pod\\|Puppet\\|Rake\\|Thor\\|Vagrant\\)file\\'" . +ruby-init-h) :interpreter ("j?ruby\\([0-9.]+\\)" . +ruby-init-h) :preface (after! ruby-mode From 59cb9b4abadeafa8668a7c183c3c9ba0b3fdea45 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 20 Feb 2020 15:25:38 -0500 Subject: [PATCH 915/983] ruby-insert-encoding-magic-comment = nil It is the default with enh-ruby-mode. Also: refactor ruby-mode config out of enh-ruby-mode. --- modules/lang/ruby/config.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/lang/ruby/config.el b/modules/lang/ruby/config.el index f3dcc52d4..92565a4bc 100644 --- a/modules/lang/ruby/config.el +++ b/modules/lang/ruby/config.el @@ -7,15 +7,18 @@ ;; ;;; Packages +(after! ruby-mode + (setq ruby-insert-encoding-magic-comment nil) + (when (require 'enh-ruby-mode nil t) + (rassq-delete-all 'ruby-mode interpreter-mode-alist))) + + (use-package! enh-ruby-mode :mode ("\\.\\(?:pry\\|irb\\)rc\\'" . +ruby-init-h) :mode ("\\.\\(?:rb\\|rake\\|rabl\\|ru\\|builder\\|gemspec\\|jbuilder\\|thor\\)\\'" . +ruby-init-h) :mode ("/\\(?:Berks\\|Cap\\|Gem\\|Guard\\|Pod\\|Puppet\\|Rake\\|Thor\\|Vagrant\\)file\\'" . +ruby-init-h) :interpreter ("j?ruby\\([0-9.]+\\)" . +ruby-init-h) :preface - (after! ruby-mode - (rassq-delete-all 'ruby-mode interpreter-mode-alist) - (require 'enh-ruby-mode)) (defun +ruby-init-h () "Enable `enh-ruby-mode' if ruby is available, otherwise `ruby-mode'." (if (executable-find "ruby") From 8a5ffc32f508af582b18a570df2e2c6fbf87cee7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 20 Feb 2020 16:52:56 -0500 Subject: [PATCH 916/983] Bump to ProofGeneral/PG@2a17093 From ProofGeneral/PG@89829c2 Also removes pg-init hacks, as they no longer seem necessary after ProofGeneral/PG@7371521 Hopefully fixes #2565 --- modules/lang/coq/config.el | 11 +---------- modules/lang/coq/packages.el | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/modules/lang/coq/config.el b/modules/lang/coq/config.el index b44b58612..98b202787 100644 --- a/modules/lang/coq/config.el +++ b/modules/lang/coq/config.el @@ -1,16 +1,7 @@ ;;; lang/coq/config.el -*- lexical-binding: t; -*- ;;;###package proof-general -;; HACK `proof-general' ascertains its own library path at compile time in its -;; autoloads file using `byte-compile-current-file' (and stores it in -;; `pg-init--script-full-path'). This means that when -;; `doom-package-autoload-file' is created and byte-compiled, -;; `pg-init--script-full-path' will be wrong, causing file-missing errors as it -;; tries to load `proof-site'. We prevent this by defining these two variables -;; early, in our own autoloads file. -(setq pg-init--script-full-path (locate-library "proof-general") - pg-init--pg-root (file-name-directory pg-init--script-full-path) - proof-splash-enable nil) +(setq proof-splash-enable nil) ;;;###package coq diff --git a/modules/lang/coq/packages.el b/modules/lang/coq/packages.el index e10e63f3c..f51b087e9 100644 --- a/modules/lang/coq/packages.el +++ b/modules/lang/coq/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/coq/packages.el -(package! proof-general :pin "89829c25b9") +(package! proof-general :pin "2a17093f6a") (package! company-coq :pin "6e8bc2e367") From 037bcf3c127c54d653b03618a850e1edbd1d3b36 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 20 Feb 2020 17:24:16 -0500 Subject: [PATCH 917/983] Fix #2568: change when file-templates are expanded --- modules/editor/file-templates/config.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/editor/file-templates/config.el b/modules/editor/file-templates/config.el index 8c19ab61d..537cd1afd 100644 --- a/modules/editor/file-templates/config.el +++ b/modules/editor/file-templates/config.el @@ -137,10 +137,7 @@ must be non-read-only, empty, and there must be a rule in (bobp) (eobp) (not (member (substring (buffer-name) 0 1) '("*" " "))) (not (file-exists-p buffer-file-name)) - ;; Prevent file-templates from breaking org-capture when target file - ;; doesn't exist and has a file template. - (or (not (fboundp 'org-capture-get)) - (not (org-capture-get :new-buffer))) + (not (buffer-modified-p)) (when-let (rule (cl-find-if #'+file-template-p +file-templates-alist)) (apply #'+file-templates--expand rule)))) @@ -159,4 +156,4 @@ must be non-read-only, empty, and there must be a rule in (yas-reload-all))) ;; -(add-hook 'find-file-hook #'+file-templates-check-h) +(add-hook 'doom-switch-buffer-hook #'+file-templates-check-h) From 888d456dc9e9ae852377eb1dbd4a9cfaa8ee9a94 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 20 Feb 2020 17:42:58 -0500 Subject: [PATCH 918/983] Fix #2524: :make executing wrong command --- modules/editor/evil/+commands.el | 5 +++-- modules/editor/evil/autoload/ex.el | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/editor/evil/+commands.el b/modules/editor/evil/+commands.el index 704d04acd..69b9082ba 100644 --- a/modules/editor/evil/+commands.el +++ b/modules/editor/evil/+commands.el @@ -73,8 +73,9 @@ (evil-ex-define-cmd "pg[grep]d" #'+helm:project-search-from-cwd))) ;;; Project tools -(evil-ex-define-cmd "compile" #'+evil:compile) -(evil-ex-define-cmd "mak[e]" #'+evil:make) +(evil-ex-define-cmd "com[pile]" #'+evil:compile) +(evil-ex-define-cmd "make" #'+evil:make) +(evil-ex-define-cmd "mk" #'+evil:make) ; convenience alias (evil-ex-define-cmd "debug" #'+debugger/start) (evil-ex-define-cmd "er[rors]" #'flycheck-list-errors) diff --git a/modules/editor/evil/autoload/ex.el b/modules/editor/evil/autoload/ex.el index a6405b950..09b18ed70 100644 --- a/modules/editor/evil/autoload/ex.el +++ b/modules/editor/evil/autoload/ex.el @@ -110,10 +110,11 @@ If BANG is non-nil, open compilation output in a comint buffer. If BANG, then run ARGUMENTS as a full command. This command understands vim file modifiers (like %:p:h). See `+evil-resolve-vim-path-a' for details." (interactive "") - (+evil:compile (format "make %s" - (evil-ex-replace-special-filenames - arguments)) - bang)) + (let ((compile-command "make")) + (+evil:compile (if (stringp arguments) + (evil-ex-replace-special-filenames arguments) + "") + bang))) ;;;###autoload (autoload '+evil:compile "editor/evil/autoload/ex" nil t) (evil-define-command +evil:compile (arguments &optional bang) From cd3103b1bec626edacda230993611449b06004af Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 20 Feb 2020 18:13:22 -0500 Subject: [PATCH 919/983] Bump to brotzeit/rustic@6dead0c From brotzeit/rustic@da3820d Due to changes upstream, users can no longer use lsp-rust-server to switch to rust-analyzer with rustic-mode. Use rustic-lsp-server instead. --- modules/lang/rust/README.org | 2 +- modules/lang/rust/config.el | 9 ++++----- modules/lang/rust/packages.el | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/lang/rust/README.org b/modules/lang/rust/README.org index 0abdb7be1..4b31c8c9a 100644 --- a/modules/lang/rust/README.org +++ b/modules/lang/rust/README.org @@ -78,7 +78,7 @@ You'll need [[https://github.com/rust-analyzer/rust-analyzer][rust-analyzer]] in #+BEGIN_SRC elisp ;; in $DOOMDIR/config.el -(setq lsp-rust-server 'rust-analyzer) +(setq rustic-lsp-server 'rust-analyzer) #+END_SRC ** Enabling elgot support for Rust diff --git a/modules/lang/rust/config.el b/modules/lang/rust/config.el index 1435d7c1a..0fb0bcc5e 100644 --- a/modules/lang/rust/config.el +++ b/modules/lang/rust/config.el @@ -21,15 +21,13 @@ ;; buffers, so we disable it, but only for evil users, because it ;; affects `forward-sexp' and its ilk. See ;; https://github.com/rust-lang/rust-mode/issues/288. - rustic-match-angle-brackets (not (featurep! :editor evil)) - ;; We use the superior default client provided by `lsp-mode', not the - ;; one rustic-mode sets up for us. - rustic-lsp-client nil) + rustic-match-angle-brackets (not (featurep! :editor evil))) (add-hook 'rustic-mode-hook #'rainbow-delimiters-mode) (if (featurep! +lsp) (add-hook 'rustic-mode-local-vars-hook #'lsp!) + (setq rustic-lsp-server nil) (after! rustic-flycheck (add-to-list 'flycheck-checkers 'rustic-clippy))) @@ -51,7 +49,8 @@ :desc "current test" "t" #'rustic-cargo-current-test)) ;; If lsp/elgot isn't available, it attempts to install lsp-mode via - ;; package.el. Doom manages its own dependencies so we disable that behavior. + ;; package.el. Doom manages its own dependencies through straight so disable + ;; this behavior to avoid package-not-initialized errors. (defadvice! +rust--dont-install-packages-p (&rest _) :override #'rustic-install-lsp-client-p (message "No LSP server running"))) diff --git a/modules/lang/rust/packages.el b/modules/lang/rust/packages.el index d20e289fe..3b640d7ca 100644 --- a/modules/lang/rust/packages.el +++ b/modules/lang/rust/packages.el @@ -1,6 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/rust/packages.el -(package! rustic :pin "da3820de18") +(package! rustic :pin "6dead0cdd4") (unless (featurep! +lsp) (package! racer :pin "a0bdf778f0")) From 0e1a737127cf73bc581c96e02d04804554d78c3b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 20 Feb 2020 18:19:59 -0500 Subject: [PATCH 920/983] Fix #2541: empty imenu list in rustic+rls buffers --- modules/lang/rust/config.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/lang/rust/config.el b/modules/lang/rust/config.el index 0fb0bcc5e..30f224fa4 100644 --- a/modules/lang/rust/config.el +++ b/modules/lang/rust/config.el @@ -48,10 +48,19 @@ :desc "all" "a" #'rustic-cargo-test :desc "current test" "t" #'rustic-cargo-current-test)) + ;; HACK Fixes #2541: RLS doesn't appear to support documentSymbol, but + ;; lsp-rust thinks it does, and so yields imenu population to the server. + ;; The result is an empty imenu list. Until RLS supports documentSymbol, + ;; we disable `lsp-enable-imenu' is rust+RLS buffers. + (defadvice! +rust--disable-imenu-for-lsp-mode-a (&rest _) + :before #'rustic-lsp-mode-setup + (when (eq rustic-lsp-server 'rls) + (setq-local lsp-enable-imenu nil))) + ;; If lsp/elgot isn't available, it attempts to install lsp-mode via ;; package.el. Doom manages its own dependencies through straight so disable ;; this behavior to avoid package-not-initialized errors. - (defadvice! +rust--dont-install-packages-p (&rest _) + (defadvice! +rust--dont-install-packages-a (&rest _) :override #'rustic-install-lsp-client-p (message "No LSP server running"))) From 82b1efeb8ad03b13f386132361a1d97b1fc66359 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 20 Feb 2020 18:21:56 -0500 Subject: [PATCH 921/983] Fix #2576: bind gt/gT for navigating centaur tabs --- modules/editor/evil/config.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 714e1518b..ffa82f65b 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -458,6 +458,9 @@ To change these keys see `+evil-repeat-keys'." :n "gT" #'+workspace:switch-previous :n "]w" #'+workspace/switch-right :n "[w" #'+workspace/switch-left) + (:when (featurep! :ui tabs) + :n "gt" #'centaur-tabs-forward + :n "gT" #'centaur-tabs-backward) ;; custom vim-unmpaired-esque keys :m "]#" #'+evil/next-preproc-directive From 55e83da9e745f658c1f279f867d57147baf005be Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 20 Feb 2020 18:59:50 -0500 Subject: [PATCH 922/983] Don't kill haskell REPLs on ESC/C-g #2571 --- modules/lang/haskell/config.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/lang/haskell/config.el b/modules/lang/haskell/config.el index e34f5e67a..a961d8cc0 100644 --- a/modules/lang/haskell/config.el +++ b/modules/lang/haskell/config.el @@ -25,6 +25,8 @@ (set-repl-handler! '(haskell-mode haskell-cabal-mode literate-haskell-mode) #'+haskell/open-repl :persist t) + ;; Don't kill REPL popup on ESC/C-g + (set-popup-rule! "^\\*haskell\\*" :quit nil) (add-hook! 'haskell-mode-hook #'haskell-collapse-mode ; support folding haskell code blocks From 7f9623249f0f34e08c9f319d482d42bb0f8bca0c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 20 Feb 2020 19:48:27 -0500 Subject: [PATCH 923/983] Abort company popups when entering normal mode You likely don't need completion anymore once you exit insert state. --- modules/completion/company/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/completion/company/config.el b/modules/completion/company/config.el index a4e53da2d..b1bda000e 100644 --- a/modules/completion/company/config.el +++ b/modules/completion/company/config.el @@ -20,7 +20,8 @@ :config (when (featurep! :editor evil) (add-hook 'company-mode-hook #'evil-normalize-keymaps) - + ;; Don't persist company popups when switching back to normal mode. + (add-hook 'evil-normal-state-entry-hook #'company-abort) ;; Allow users to switch between backends on the fly. E.g. C-x C-s followed ;; by C-x C-n, will switch from `company-yasnippet' to ;; `company-dabbrev-code'. From c62c3bc4cd4604fdb095495f092712f3cb077327 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 20 Feb 2020 20:27:23 -0500 Subject: [PATCH 924/983] Fix #2544: revert 5ecf2066813e --- modules/lang/org/autoload/org-capture.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/lang/org/autoload/org-capture.el b/modules/lang/org/autoload/org-capture.el index c15484b14..ab7270bf7 100644 --- a/modules/lang/org/autoload/org-capture.el +++ b/modules/lang/org/autoload/org-capture.el @@ -42,6 +42,7 @@ you're done. This can be called from an external shell script." (frame (if (+org-capture-frame-p) (selected-frame) (make-frame +org-capture-frame-parameters)))) + (select-frame-set-input-focus frame) ; fix MacOS not focusing new frames (with-selected-frame frame (require 'org-capture) (condition-case ex From 84a525a0996cd1a806c6838f15a8c3fc9ef4056a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 20 Feb 2020 21:36:04 -0500 Subject: [PATCH 925/983] Remove wrap, additional-wrap, & escape key themes + Escape was redundant with Doom's own escape handler + Disabled wrap/addition-wrap, as it isn't enabled by default, is potentially redundant with evil-{surround,embrace}, and prone to issues in tty emacs (see #2573). Fixes #2573 --- modules/editor/lispy/config.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/editor/lispy/config.el b/modules/editor/lispy/config.el index 0103f0cbe..f2860b816 100644 --- a/modules/editor/lispy/config.el +++ b/modules/editor/lispy/config.el @@ -13,6 +13,7 @@ (setq lispy-close-quotes-at-end-p t) (add-hook 'lispy-mode-hook #'turn-off-smartparens-mode)) + (use-package! lispyville :when (featurep! :editor evil) :hook (lispy-mode . lispyville-mode) @@ -23,8 +24,5 @@ (prettify insert) (atom-movement normal visual) slurp/barf-lispy - (wrap normal insert) additional - additional-insert - (additional-wrap normal insert) - (escape insert)))) + additional-insert))) From 6d2c82db34121e77119dd6f85d9a8d7e7332005d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 20 Feb 2020 21:43:37 -0500 Subject: [PATCH 926/983] Conform editor/lispy readme to new format #1166 And update it. --- modules/editor/lispy/README.org | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/modules/editor/lispy/README.org b/modules/editor/lispy/README.org index 51e88eabb..f5f8a4a3b 100644 --- a/modules/editor/lispy/README.org +++ b/modules/editor/lispy/README.org @@ -1,5 +1,15 @@ -#+TITLE: :editor lispy +#+TITLE: editor/lispy +#+DATE: October 27, 2018 +#+SINCE: v2.0 +#+STARTUP: inlineimages +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] +- [[#prerequisites][Prerequisites]] +- [[#troubleshooting][Troubleshooting]] + - [[#mouse-wheel-and-wrapadditional-wrap-key-themes-in-tty-emacs-2573][Mouse wheel and =wrap=/=additional-wrap= key themes in TTY Emacs (#2573)]] + +* Description This module adds [[https://github.com/noctuid/lispyville][lispy]] key functionality in Lisp languages. This includes: @@ -24,13 +34,19 @@ The default key themes that are set are as follows: (prettify insert) (atom-movement normal visual) slurp/barf-lispy - (wrap normal insert) additional - additional-insert - (additional-wrap normal insert) - (escape insert))) + additional-insert)) #+END_SRC See noctuid's [[https://github.com/noctuid/lispyville/blob/master/README.org][README]] for more info on specific keybindings (starting [[https://github.com/noctuid/lispyville#operators-key-theme][here]]) of each key theme. Think of ~lispyville-set-key-theme~ as adding ~parinfer-extensions~ via ~(setq parinfer-extensions '(blah blah blah))~. + +* Prerequisites +This module has no prerequisites. + +* Troubleshooting +** Mouse wheel and =wrap=/=additional-wrap= key themes in TTY Emacs ([[https://github.com/hlissner/doom-emacs/issues/2573][#2573]]) +lispyville binds =M-[= to ~lispyville-wrap-brackets~ when the =wrap= or +=additional-wrap= key theme are enabled. In terminal Emacs, this is the key +Emacs receives when you scroll with your mouse wheel. From a08431893218cd28b83d939d44b5802c2e0e2d8e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 21 Feb 2020 00:39:06 -0500 Subject: [PATCH 927/983] Prevent backtick auto-pairing before word/same --- modules/lang/markdown/config.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/lang/markdown/config.el b/modules/lang/markdown/config.el index 3ab052322..f549cee33 100644 --- a/modules/lang/markdown/config.el +++ b/modules/lang/markdown/config.el @@ -50,6 +50,9 @@ capture, the end position, and the output buffer.") ;; buffer. No good way to tell, so pretend it's async. :file '(markdown-follow-thing-at-point :async t)) + (sp-local-pair '(markdown-mode gfm-mode) "`" "`" + :unless '(:add sp-point-before-word-p sp-point-before-same-p)) + (setq-hook! 'markdown-mode-hook fill-nobreak-predicate (cons #'markdown-code-block-at-point-p fill-nobreak-predicate)) From cd2f01e9ab0171f460722536c980896870f2a2e0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 21 Feb 2020 01:05:18 -0500 Subject: [PATCH 928/983] Set fixed-pitch font too --- core/core-ui.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/core-ui.el b/core/core-ui.el index 8d02d4210..e1b705739 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -566,6 +566,8 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.") "Loads `doom-variable-pitch-font',`doom-serif-font' and `doom-unicode-font'." (condition-case e (with-selected-frame (or frame (selected-frame)) + (when doom-font + (set-face-attribute 'fixed-pitch nil :font doom-font)) (when doom-serif-font (set-face-attribute 'fixed-pitch-serif nil :font doom-serif-font)) (when doom-variable-pitch-font From bd944634bc6cb60ced53e206c42447252d79f86a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 21 Feb 2020 10:41:45 -0500 Subject: [PATCH 929/983] Fix defadvice! functions omitted from elisp imenu --- modules/lang/emacs-lisp/autoload.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/emacs-lisp/autoload.el b/modules/lang/emacs-lisp/autoload.el index 6941ebfb5..228a3a8ef 100644 --- a/modules/lang/emacs-lisp/autoload.el +++ b/modules/lang/emacs-lisp/autoload.el @@ -186,7 +186,7 @@ if it's callable, `apropos' otherwise." ("Minor modes" "^\\s-*(define-\\(?:global\\(?:ized\\)?-minor\\|generic\\|minor\\)-mode +\\([^ ()\n]+\\)" 1) ("Modelines" "^\\s-*(def-modeline! +\\([^ ()\n]+\\)" 1) ("Modeline segments" "^\\s-*(def-modeline-segment! +\\([^ ()\n]+\\)" 1) - ("Advice" "^\\s-*(\\(?:def\\(?:\\(?:ine\\)?-advice\\)\\) +\\([^ )\n]+\\)" 1) + ("Advice" "^\\s-*(\\(?:def\\(?:\\(?:ine-\\)?advice!?\\)\\) +\\([^ )\n]+\\)" 1) ("Macros" "^\\s-*(\\(?:cl-\\)?def\\(?:ine-compile-macro\\|macro\\) +\\([^ )\n]+\\)" 1) ("Inline functions" "\\s-*(\\(?:cl-\\)?defsubst +\\([^ )\n]+\\)" 1) ("Functions" "^\\s-*(\\(?:cl-\\)?def\\(?:un\\|un\\*\\|method\\|generic\\|-memoized!\\) +\\([^ ,)\n]+\\)" 1) From 900ec70ee3a1e26d886f065483c8c3988888a50d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 21 Feb 2020 12:36:29 -0500 Subject: [PATCH 930/983] Ensure menu/tool/scroll bars are disabled --- core/core-ui.el | 8 ++++---- early-init.el | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index e1b705739..6592485ec 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -282,14 +282,14 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (setq window-resize-pixelwise t frame-resize-pixelwise t) -(when (bound-and-true-p tool-bar-mode) +(unless (assq 'menu-bar-lines default-frame-alist) ;; We do this in early-init.el too, but in case the user is on Emacs 26 we do ;; it here too: disable tool and scrollbars, as Doom encourages ;; keyboard-centric workflows, so these are just clutter (the scrollbar also ;; impacts performance). - (push '(menu-bar-lines . 0) default-frame-alist) - (push '(tool-bar-lines . 0) default-frame-alist) - (push '(vertical-scroll-bars) default-frame-alist)) + (add-to-list 'default-frame-alist '(menu-bar-lines . 0)) + (add-to-list 'default-frame-alist '(tool-bar-lines . 0)) + (add-to-list 'default-frame-alist '(vertical-scroll-bars))) (when IS-MAC ;; Curse Lion and its sudden but inevitable fullscreen mode! diff --git a/early-init.el b/early-init.el index eea1e8fc2..cf3138571 100644 --- a/early-init.el +++ b/early-init.el @@ -13,10 +13,9 @@ (advice-add #'package--ensure-init-file :override #'ignore) ;; Prevent the glimpse of un-styled Emacs by disabling these UI elements early. -(setq tool-bar-mode nil - menu-bar-mode nil) -(when (fboundp 'set-scroll-bar-mode) - (set-scroll-bar-mode nil)) +(push '(menu-bar-lines . 0) default-frame-alist) +(push '(tool-bar-lines . 0) default-frame-alist) +(push '(vertical-scroll-bars) default-frame-alist) ;; Resizing the Emacs frame can be a terribly expensive part of changing the ;; font. By inhibiting this, we easily halve startup times with fonts that are From 731e1c503da8163e60bb1c48d10fe7cefbbcb7c0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 21 Feb 2020 13:40:14 -0500 Subject: [PATCH 931/983] Lazily revert affected buffers after magit --- modules/tools/magit/autoload.el | 44 ++++++++++++++++++--------------- modules/tools/magit/config.el | 17 +++++++++---- 2 files changed, 36 insertions(+), 25 deletions(-) diff --git a/modules/tools/magit/autoload.el b/modules/tools/magit/autoload.el index ee21b7d42..3b9e6ff91 100644 --- a/modules/tools/magit/autoload.el +++ b/modules/tools/magit/autoload.el @@ -41,28 +41,37 @@ ;; -;; Commands +;;; Auto-revert -(defun +magit--refresh-vc-in-buffer (buffer) +(defvar-local +magit--stale-p nil) + +(defun +magit--revert-buffer (buffer) (with-current-buffer buffer - (when (and vc-mode (fboundp 'vc-refresh-state)) - (vc-refresh-state)) - (when (and (bound-and-true-p git-gutter-mode) - (fboundp '+version-control|update-git-gutter)) - (+version-control|update-git-gutter)) - (setq +magit--vc-is-stale-p nil))) + (setq +magit--stale-p nil) + (revert-buffer t (not (buffer-modified-p))))) ;;;###autoload -(defvar-local +magit--vc-is-stale-p nil) +(defun +magit-mark-stale-buffers-h () + "Revert all visible buffers and mark buried buffers as stale. + +Stale buffers are reverted when they are switched to, assuming they haven't been +modified." + (dolist (buffer (buffer-list)) + (when (buffer-live-p buffer) + (if (get-buffer-window buffer) + (+magit--revert-buffer buffer) + (with-current-buffer buffer + (setq +magit--stale-p t)))))) ;;;###autoload -(defun +magit-refresh-vc-state-maybe-h () +(defun +magit-revert-buffer-maybe-h () "Update `vc' and `git-gutter' if out of date." - (when +magit--vc-is-stale-p - (+magit--refresh-vc-in-buffer (current-buffer)))) + (when +magit--stale-p + (+magit--revert-buffer (current-buffer)))) -;;;###autoload -(add-hook 'doom-switch-buffer-hook #'+magit-refresh-vc-state-maybe-h) + +;; +;;; Commands ;;;###autoload (defun +magit/quit (&optional kill-buffer) @@ -76,12 +85,7 @@ control in buffers." (eq major-mode 'magit-status-mode))) (window-list))) (mapc #'+magit--kill-buffer (magit-mode-get-buffers)) - (dolist (buffer (buffer-list)) - (when (buffer-live-p buffer) - (if (get-buffer-window buffer) - (+magit--refresh-vc-in-buffer buffer) - (with-current-buffer buffer - (setq +magit--vc-is-stale-p t))))))) + (+magit-mark-stale-buffers-h))) (defun +magit--kill-buffer (buf) "TODO" diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index 65d19abed..8205a4aa3 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -7,7 +7,7 @@ :commands magit-file-delete :defer-incrementally (dash f s with-editor git-commit package eieio lv transient) :init - (setq magit-auto-revert-mode nil) ; we do this ourselves + (setq magit-auto-revert-mode nil) ; we do this ourselves further down ;; Must be set early to prevent ~/.emacs.d/transient from being created (setq transient-levels-file (concat doom-etc-dir "transient/levels") transient-values-file (concat doom-etc-dir "transient/values") @@ -21,10 +21,16 @@ ;; formatters. Trust us to know what we're doing. magit-save-repository-buffers nil) - (defadvice! +magit-invalidate-projectile-cache-a (&rest _args) - ;; We ignore the args to `magit-checkout'. + (defadvice! +magit-revert-repo-buffers-deferred-a (&rest _) :after '(magit-checkout magit-branch-and-checkout) - (projectile-invalidate-cache nil)) + ;; Since the project likely now contains new files, best we undo the + ;; projectile cache so it can be regenerated later. + (projectile-invalidate-cache nil) + ;; Use a more efficient strategy to auto-revert buffers whose git state has + ;; changed: refresh the visible buffers immediately... + (+magit-mark-stale-buffers-h)) + ;; ...then refresh the rest only when we switch to them, not all at once. + (add-hook 'doom-switch-buffer-hook #'+magit-revert-buffer-maybe-h) ;; The default location for git-credential-cache is in ;; ~/.cache/git/credential. However, if ~/.git-credential-cache/ exists, then @@ -63,7 +69,8 @@ (and (derived-mode-p 'magit-mode) (not (eq major-mode 'magit-process-mode)))))) - ;; properly kill leftover magit buffers on quit + ;; Clean up after magit by killing leftover magit buffers and reverting + ;; affected buffers (or at least marking them as need-to-be-reverted). (define-key magit-status-mode-map [remap magit-mode-bury-buffer] #'+magit/quit) ;; Close transient with ESC From a0a7c34517db81b3f8c83ac87c882c4f0b0b72ee Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 21 Feb 2020 14:58:14 -0500 Subject: [PATCH 932/983] Revert to ox-reveal (remove org-re-reveal) ox-reveal is maintained again, and org-re-reveal was exhibiting (wrong-type-argument wholenump -1) errors in some corner cases. --- modules/lang/org/contrib/present.el | 9 +++++++-- modules/lang/org/packages.el | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/lang/org/contrib/present.el b/modules/lang/org/contrib/present.el index a92ff6572..cf4b6a461 100644 --- a/modules/lang/org/contrib/present.el +++ b/modules/lang/org/contrib/present.el @@ -11,10 +11,15 @@ ;; ;;; Packages -(use-package! org-re-reveal +(use-package! ox-reveal :after ox :init - (setq org-re-reveal-root "https://revealjs.com")) + ;; Fix #1127, where ox-reveal adds an errant entry to + ;; `org-structure-template-alist' + (setq org-reveal-note-key-char nil) + :config + (setq org-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js@3/" + org-reveal-mathjax t)) (use-package! org-tree-slide diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index 9408b8cba..8abd798ad 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -71,7 +71,7 @@ :recipe (:host github :repo "anler/centered-window-mode") :pin "24f7c5be9d") (package! org-tree-slide :pin "7bf09a02bd") - (package! org-re-reveal :pin "14df7542f2")) + (package! ox-reveal :pin "aafedfd805")) (when (featurep! +journal) (package! org-journal :pin "128f0533a7")) From 0f4c0cce5b4b8af4837a0dec43995ead2c8d947f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 21 Feb 2020 17:03:47 -0500 Subject: [PATCH 933/983] Only unset file-name-handler-alist in interactive sessions --- core/core.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core.el b/core/core.el index d6288781c..30c666ae2 100644 --- a/core/core.el +++ b/core/core.el @@ -23,7 +23,8 @@ ;; This is consulted on every `require', `load' and various path/io functions. ;; You get a minor speed up by nooping this. -(setq file-name-handler-alist nil) +(unless noninteractive + (setq file-name-handler-alist nil)) ;; Restore `file-name-handler-alist', because it is needed for handling ;; encrypted or compressed files, among other things. From 33ebf514d6886bf01c903bf76ceae426be0f76d3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 21 Feb 2020 19:49:45 -0500 Subject: [PATCH 934/983] Revert to redguardtoo/evil-nerd-commenter@fd2fba7 From redguardtoo/evil-nerd-commenter@c9fa23e Due to redguardtoo/evil-nerd-commenter#107 --- modules/editor/evil/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index 391d3af7d..5877a197a 100644 --- a/modules/editor/evil/packages.el +++ b/modules/editor/evil/packages.el @@ -8,7 +8,7 @@ (package! evil-escape :pin "f4e9116bfb") (package! evil-exchange :pin "3030e21ee1") (package! evil-indent-plus :pin "0c7501e6ef") -(package! evil-nerd-commenter :pin "c9fa23ee7e") +(package! evil-nerd-commenter :pin "fd2fba722e") (package! evil-numbers :recipe (:host github :repo "janpath/evil-numbers") :pin "d988041c1f") From 9d4f38346f2782c10f633b182bc9c53268a26091 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 21 Feb 2020 19:57:12 -0500 Subject: [PATCH 935/983] Bump to ema2159/centaur-tabs@96b7c90 From ema2159/centaur-tabs@3658efc ema2159/centaur-tabs@96b7c90 hopefully introduces a fix for the flickering issue. --- modules/ui/tabs/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/tabs/packages.el b/modules/ui/tabs/packages.el index 898a642e3..a558bf457 100644 --- a/modules/ui/tabs/packages.el +++ b/modules/ui/tabs/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/tabs/packages.el -(package! centaur-tabs :pin "3658efccd8") +(package! centaur-tabs :pin "96b7c90bdc") From 80b5c8a30f9a5341f556b413c5d5fc253710e324 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 21 Feb 2020 23:20:43 -0500 Subject: [PATCH 936/983] Remove Fuco1/smartparens#963 workaround Causes double closing parens in 27. --- modules/config/default/config.el | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index f852d20f9..3ab8601cc 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -71,11 +71,6 @@ ;; or specific :post-handlers with: ;; (sp-pair "{" nil :post-handlers '(:rem ("| " "SPC"))) (after! smartparens - ;; Smartparens is broken in `cc-mode' as of Emacs 27. See - ;; https://github.com/Fuco1/smartparens/issues/963. - (unless EMACS27+ - (pushnew! sp--special-self-insert-commands 'c-electric-paren 'c-electric-brace)) - ;; Smartparens' navigation feature is neat, but does not justify how ;; expensive it is. It's also less useful for evil users. This may need to ;; be reactivated for non-evil users though. Needs more testing! From 3c8520b1fc904367b55bc6a141bb3d8f21a85668 Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Sun, 29 Dec 2019 00:37:40 +0800 Subject: [PATCH 937/983] Change clojure linter to clj-kondo --- modules/lang/clojure/config.el | 2 +- modules/lang/clojure/packages.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/clojure/config.el b/modules/lang/clojure/config.el index 55f52738b..685044f85 100644 --- a/modules/lang/clojure/config.el +++ b/modules/lang/clojure/config.el @@ -157,6 +157,6 @@ :desc "refactor" "R" #'hydra-cljr-help-menu/body)) -(use-package! flycheck-joker +(use-package! flycheck-clj-kondo :when (featurep! :checkers syntax) :after flycheck) diff --git a/modules/lang/clojure/packages.el b/modules/lang/clojure/packages.el index b10e142f0..6937c8f4b 100644 --- a/modules/lang/clojure/packages.el +++ b/modules/lang/clojure/packages.el @@ -5,4 +5,4 @@ (package! clj-refactor :pin "e24ba62843") (when (featurep! :checkers syntax) - (package! flycheck-joker :pin "51e99e6977")) + (package! flycheck-clj-kondo :pin "f652a8dc4c")) From 23d6ec70db5b7cc60c96fdda0d0f1dfd89a91fe5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 22 Feb 2020 13:11:07 -0500 Subject: [PATCH 938/983] Bump to emacs-evil/evil@810eaf6 From emacs-evil/evil@3b03a4e Closes #2570 --- modules/editor/evil/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index 5877a197a..ed69a231e 100644 --- a/modules/editor/evil/packages.el +++ b/modules/editor/evil/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/evil/packages.el -(package! evil :pin "3b03a4ef9a") +(package! evil :pin "810eaf6c82") (package! evil-args :pin "758ad5ae54") (package! evil-easymotion :pin "79c13ed3bc") (package! evil-embrace :pin "4379adea03") From 3f50dad5eefb211526a7be478fff0a413db9e5dd Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Sat, 22 Feb 2020 21:30:21 +0100 Subject: [PATCH 939/983] completion/ivy: sort projectile files with prescient --- modules/completion/ivy/config.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 9b32c097e..64b3598bd 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -303,7 +303,10 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." #'+ivy/projectile-find-file) ;; no highlighting visited files; slows down the filtering - (ivy-set-display-transformer #'counsel-projectile-find-file nil)) + (ivy-set-display-transformer #'counsel-projectile-find-file nil) + + (if (featurep! +prescient) + (setq counsel-projectile-sort-files t))) (use-package! wgrep From 65a71d564740893b6626a8207b4d2c5f091b542e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 22 Feb 2020 18:31:10 -0500 Subject: [PATCH 940/983] Link to doom-real-buffer-p in other real buffer functions To make the explanation easier to find. --- core/autoload/buffers.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/autoload/buffers.el b/core/autoload/buffers.el index f997f2d68..419284845 100644 --- a/core/autoload/buffers.el +++ b/core/autoload/buffers.el @@ -195,7 +195,9 @@ If DERIVED-P, test with `derived-mode-p', otherwise use `eq'." ;;;###autoload (defun doom-set-buffer-real (buffer flag) - "Forcibly mark BUFFER as FLAG (non-nil = real)." + "Forcibly mark BUFFER as FLAG (non-nil = real). + +See `doom-real-buffer-p' for an explanation for real buffers." (with-current-buffer buffer (setq doom-real-buffer-p flag))) @@ -251,7 +253,9 @@ regex PATTERN. Returns the number of killed buffers." ;;;###autoload (defun doom-mark-buffer-as-real-h () - "Hook function that marks the current buffer as real." + "Hook function that marks the current buffer as real. + +See `doom-real-buffer-p' for an explanation for real buffers." (doom-set-buffer-real (current-buffer) t)) From a7b945be0e15ecd44dd608257f7b88240c83af7d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 22 Feb 2020 18:42:18 -0500 Subject: [PATCH 941/983] Revert cb86fd046cdf (restore macrostep-expand) sly-macroexpand changes macrostep-expand to behavior correctly in CL buffers. --- modules/lang/common-lisp/config.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/lang/common-lisp/config.el b/modules/lang/common-lisp/config.el index 8320e1232..900261c79 100644 --- a/modules/lang/common-lisp/config.el +++ b/modules/lang/common-lisp/config.el @@ -71,8 +71,7 @@ :map lisp-mode-map :desc "Sly" "'" #'sly :desc "Sly (ask)" ";" (λ!! #'sly '-) - :desc "Expand macro" "m" #'sly-macroexpand-1-inplace - :desc "Expand macro in popup" "M" #'sly-macroexpand-1 + :desc "Expand macro" "m" #'macrostep-expand (:prefix ("c" . "compile") :desc "Compile file" "c" #'sly-compile-file :desc "Compile/load file" "C" #'sly-compile-and-load-file From bfd6d5ede8c03e5b069fc53ce8110fd0f1939783 Mon Sep 17 00:00:00 2001 From: Matt Briggs Date: Sat, 22 Feb 2020 18:46:08 -0500 Subject: [PATCH 942/983] vterm returns to where it was entering insert --- modules/term/vterm/autoload.el | 12 ++++++++++++ modules/term/vterm/config.el | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/modules/term/vterm/autoload.el b/modules/term/vterm/autoload.el index 85f8b22fc..78cd2f82e 100644 --- a/modules/term/vterm/autoload.el +++ b/modules/term/vterm/autoload.el @@ -55,3 +55,15 @@ If prefix ARG is non-nil, cd into `default-directory' instead of project root." default-directory (or (doom-project-root) default-directory)))) (vterm))) + +;;;###autoload +(defun +vterm-remember-insert-point-h () + "Remember point when leaving insert mode." + (setq-local +vterm-insert-point (point))) + +;;;###autoload +(defun +vterm-goto-insert-point-h () + "Go to the point we were at when we left insert mode." + (when +vterm-insert-point + (goto-char +vterm-insert-point) + (setq-local +vterm-insert-point nil))) diff --git a/modules/term/vterm/config.el b/modules/term/vterm/config.el index 097e9d597..2ec2ef996 100644 --- a/modules/term/vterm/config.el +++ b/modules/term/vterm/config.el @@ -15,6 +15,13 @@ (setq vterm-kill-buffer-on-exit t) + (when (featurep! :editor evil) + (defvar +vterm-insert-point nil) + (add-hook 'vterm-mode-hook + (lambda () + (add-hook 'evil-insert-state-exit-hook '+vterm-remember-insert-point-h nil t) + (add-hook 'evil-insert-state-entry-hook '+vterm-goto-insert-point-h nil t)))) + (add-hook 'vterm-mode-hook #'doom-mark-buffer-as-real-h) ;; Modeline serves no purpose in vterm (add-hook 'vterm-mode-hook #'hide-mode-line-mode)) From 50c61c57bc627f3512e4b98ac590c36b7e235443 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 22 Feb 2020 20:38:34 -0500 Subject: [PATCH 943/983] Update def-project-mode! macro docstring Remove mention of `doom-project`, since it no longer exists. --- core/core-projects.el | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/core/core-projects.el b/core/core-projects.el index 6f978fc01..05c6a0ba7 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -191,16 +191,15 @@ state are passed in.") on-load on-enter on-exit) - "Define a project minor-mode named NAME (a symbol) and declare where and how -it is activated. Project modes allow you to configure 'sub-modes' for -major-modes that are specific to a folder, project structure, framework or -whatever arbitrary context you define. These project modes can have their own -settings, keymaps, hooks, snippets, etc. + "Define a project minor mode named NAME and where/how it is activated. + +Project modes allow you to configure 'sub-modes' for major-modes that are +specific to a folder, project structure, framework or whatever arbitrary context +you define. These project modes can have their own settings, keymaps, hooks, +snippets, etc. This creates NAME-hook and NAME-map as well. -A project can be enabled through .dir-locals.el too, by setting `doom-project'. - PLIST may contain any of these properties, which are all checked to see if NAME should be activated. If they are *all* true, NAME is activated. From 12249753e64bf6a1dc4570d6576ee5ce3369011a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 22 Feb 2020 20:40:03 -0500 Subject: [PATCH 944/983] Revert aw-keys to default if +numbers is enabled --- modules/ui/window-select/config.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/ui/window-select/config.el b/modules/ui/window-select/config.el index fd34980d4..a82f7eb2a 100644 --- a/modules/ui/window-select/config.el +++ b/modules/ui/window-select/config.el @@ -16,8 +16,9 @@ :init (global-set-key [remap other-window] #'ace-window) :config - (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l) - aw-scope 'frame + (unless (featurep! +numbers) + (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l))) + (setq aw-scope 'frame aw-background t)) From 1fe584fc214b2520b8bfc88de262762f9590a35f Mon Sep 17 00:00:00 2001 From: Matt Briggs Date: Sat, 22 Feb 2020 21:42:04 -0500 Subject: [PATCH 945/983] address feedback --- modules/term/vterm/autoload.el | 11 +++++++---- modules/term/vterm/config.el | 9 ++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/term/vterm/autoload.el b/modules/term/vterm/autoload.el index 78cd2f82e..8d71a56ae 100644 --- a/modules/term/vterm/autoload.el +++ b/modules/term/vterm/autoload.el @@ -56,14 +56,17 @@ If prefix ARG is non-nil, cd into `default-directory' instead of project root." (or (doom-project-root) default-directory)))) (vterm))) + +(defvar +vterm--insert-point nil) + ;;;###autoload (defun +vterm-remember-insert-point-h () "Remember point when leaving insert mode." - (setq-local +vterm-insert-point (point))) + (setq-local +vterm--insert-point (point))) ;;;###autoload (defun +vterm-goto-insert-point-h () "Go to the point we were at when we left insert mode." - (when +vterm-insert-point - (goto-char +vterm-insert-point) - (setq-local +vterm-insert-point nil))) + (when +vterm--insert-point + (goto-char +vterm--insert-point) + (setq-local +vterm--insert-point nil))) diff --git a/modules/term/vterm/config.el b/modules/term/vterm/config.el index 2ec2ef996..319096e80 100644 --- a/modules/term/vterm/config.el +++ b/modules/term/vterm/config.el @@ -16,11 +16,10 @@ (setq vterm-kill-buffer-on-exit t) (when (featurep! :editor evil) - (defvar +vterm-insert-point nil) - (add-hook 'vterm-mode-hook - (lambda () - (add-hook 'evil-insert-state-exit-hook '+vterm-remember-insert-point-h nil t) - (add-hook 'evil-insert-state-entry-hook '+vterm-goto-insert-point-h nil t)))) + (add-hook! 'vterm-mode-hook + (defun +vterm-init-remember-point-h () + (add-hook 'evil-insert-state-exit-hook #'+vterm-remember-insert-point-h nil t) + (add-hook 'evil-insert-state-entry-hook #'+vterm-goto-insert-point-h nil t)))) (add-hook 'vterm-mode-hook #'doom-mark-buffer-as-real-h) ;; Modeline serves no purpose in vterm From 5a0657ed164b9a8a8822e21d9f8e032fd62e9045 Mon Sep 17 00:00:00 2001 From: Dan LaManna Date: Sun, 23 Feb 2020 14:18:54 -0500 Subject: [PATCH 946/983] lang/python: use error! instead of assert! --- modules/lang/python/doctor.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/python/doctor.el b/modules/lang/python/doctor.el index a711ca9ea..e4979e5ea 100644 --- a/modules/lang/python/doctor.el +++ b/modules/lang/python/doctor.el @@ -5,7 +5,7 @@ "This module requires (:tools lsp)") (if (not (executable-find "python")) - (assert! "Python isn't installed.") + (error! "Python isn't installed.") (unless (featurep! +lsp) (unless (zerop (shell-command "python -c 'import setuptools'")) (warn! "setuptools wasn't detected, which anaconda-mode requires")))) From ef055778e97a4d619bc4c425a7180dfd5da3fba3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 23 Feb 2020 15:00:35 -0500 Subject: [PATCH 947/983] Pin to mrkkrp/vimish-fold@d3248a4 And add hideshow declaration (so `SPC h d p` knows where to find it). --- modules/editor/fold/packages.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/editor/fold/packages.el b/modules/editor/fold/packages.el index b236d8ae9..9420d41a5 100644 --- a/modules/editor/fold/packages.el +++ b/modules/editor/fold/packages.el @@ -1,5 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/fold/packages.el +(package! hideshow :built-in t) + +(package! vimish-fold :pin "d3248a41a7") (when (featurep! :editor evil) (package! evil-vimish-fold :pin "b6e0e6b91b")) From bd833091c25d7001e3cc0b2af33defd99fb07994 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 23 Feb 2020 15:03:30 -0500 Subject: [PATCH 948/983] Bump to flycheck/flycheck@74377fa From flycheck/flycheck@269237f --- modules/checkers/syntax/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/checkers/syntax/packages.el b/modules/checkers/syntax/packages.el index 968f75a84..98a04b57a 100644 --- a/modules/checkers/syntax/packages.el +++ b/modules/checkers/syntax/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; checkers/syntax/packages.el -(package! flycheck :pin "269237f652") +(package! flycheck :pin "74377fa9c7") (package! flycheck-popup-tip :pin "ef86aad907") (when (featurep! +childframe) (package! flycheck-posframe :pin "2b3e94c2e4")) From 80c827119d9b1deb9a900c5a281ebb084d02ab48 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 23 Feb 2020 15:35:12 -0500 Subject: [PATCH 949/983] Fix references to old rust-analyzer binary Closes #2588 --- modules/lang/rust/doctor.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/rust/doctor.el b/modules/lang/rust/doctor.el index 8cc8af442..b8af96745 100644 --- a/modules/lang/rust/doctor.el +++ b/modules/lang/rust/doctor.el @@ -17,8 +17,8 @@ (setq lsp-server rustic-lsp-server)) (pcase lsp-server (`rust-analyzer - (unless (executable-find "ra_lsp_server") - (warn! "Couldn't find rust analyzer (ra_lsp_server)"))) + (unless (executable-find "rust-analyzer") + (warn! "Couldn't find rust analyzer (rust-analyzer)"))) (`rls (unless (executable-find "rls") (warn! "Couldn't find rls"))))) From b30f38ac062fed216c311cc507951108b77e1cba Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 23 Feb 2020 15:41:49 -0500 Subject: [PATCH 950/983] Minor refactor & reformatting across the board --- core/autoload/debug.el | 21 +++++++++--------- modules/config/default/+emacs-bindings.el | 2 +- modules/editor/evil/config.el | 27 ++++++++++++----------- modules/editor/fold/config.el | 2 +- modules/lang/clojure/config.el | 3 +-- modules/lang/common-lisp/config.el | 25 ++++++++++++--------- modules/lang/org/config.el | 7 +----- modules/ui/vc-gutter/config.el | 12 +++++----- 8 files changed, 49 insertions(+), 50 deletions(-) diff --git a/core/autoload/debug.el b/core/autoload/debug.el index d54256035..6ebf2e2df 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -100,6 +100,15 @@ ready to be pasted in a bug report on github." "package!")) (error (format "<%S>" e))) '("n/a"))) + (unpin + ,@(or (condition-case e + (mapcan #'identity + (mapcar + #'cdr (doom--collect-forms-in + (doom-path doom-private-dir "packages.el") + "unpin!"))) + (error (format "<%S>" e))) + '("n/a"))) (elpa ,@(or (condition-case e (progn @@ -107,15 +116,7 @@ ready to be pasted in a bug report on github." (cl-loop for (name . _) in package-alist collect (format "%s" name))) (error (format "<%S>" e))) - '("n/a"))) - (unpin ,@(or (condition-case e - (mapcan #'identity - (mapcar - #'cdr (doom--collect-forms-in - (doom-path doom-private-dir "packages.el") - "unpin!"))) - (error (format "<%S>" e))) - '("n/a")))))))) + '("n/a")))))))) ;; @@ -216,7 +217,7 @@ markdown and copies it to your clipboard, ready to be pasted into bug reports!" (prin1-to-string (macroexp-progn (append `((setq noninteractive nil - doom-debug-mode t + init-file-debug t load-path ',load-path package--init-file-ensured t package-user-dir ,package-user-dir diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index a65bd0642..9d884186a 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -411,7 +411,7 @@ "C-S-h" #'company-show-doc-buffer "C-s" #'company-search-candidates "M-s" #'company-filter-candidates - "" #'company-complete-common-or-cycle + [C-tab] #'company-complete-common-or-cycle [tab] #'company-complete-common-or-cycle [backtab] #'company-select-previous "C-RET" #'counsel-company diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index ffa82f65b..be32ad320 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -126,17 +126,26 @@ directives. By default, this only recognizes C directives.") (count-lines (point-min) (point-max)) (buffer-size))))) - ;; '=' moves the cursor to the beginning of selection. Disable this, since - ;; it's more disruptive than helpful. + ;; HACK '=' moves the cursor to the beginning of selection. Disable this, + ;; since it's more disruptive than helpful. (defadvice! +evil--dont-move-cursor-a (orig-fn &rest args) :around #'evil-indent (save-excursion (apply orig-fn args))) - ;; In evil, registers 2-9 are buffer-local. In vim, they're global, so... + ;; REVIEW In evil, registers 2-9 are buffer-local. In vim, they're global, + ;; so... Perhaps this should be PRed upstream? (defadvice! +evil--make-numbered-markers-global-a (char) :after-until #'evil-global-marker-p (and (>= char ?2) (<= char ?9))) + ;; REVIEW Fix #2493: dir-locals cannot target fundamental-mode when evil-mode + ;; is active. See https://github.com/hlissner/doom-emacs/issues/2493. + ;; Revert this if this is ever fixed upstream. + (defadvice! +evil--fix-local-vars-a (&rest _) + :before #'turn-on-evil-mode + (when (eq major-mode 'fundamental-mode) + (hack-local-variables))) + ;; Make ESC (from normal mode) the universal escaper. See `doom-escape-hook'. (advice-add #'evil-force-normal-state :after #'+evil-escape-a) @@ -156,14 +165,6 @@ directives. By default, this only recognizes C directives.") (advice-add #'evil-open-above :around #'+evil--insert-newline-above-and-respect-comments-a) (advice-add #'evil-open-below :around #'+evil--insert-newline-below-and-respect-comments-a) - ;; REVIEW Fix #2493: dir-locals cannot target fundamental-mode when evil-mode - ;; is active. See https://github.com/hlissner/doom-emacs/issues/2493. - ;; Revert this if this is ever fixed upstream. - (defadvice! +evil--fix-local-vars-a (&rest _) - :before #'turn-on-evil-mode - (when (eq major-mode 'fundamental-mode) - (hack-local-variables))) - ;; Recenter screen after most searches (dolist (fn '(evil-visualstar/begin-search-forward evil-visualstar/begin-search-backward @@ -404,11 +405,11 @@ To change these keys see `+evil-repeat-keys'." ;; `evil-collection' (when (featurep! +everywhere) + (setq evil-collection-company-use-tng (featurep! :completion company +tng)) + (unless doom-reloading-p (load! "+everywhere")) - (setq evil-collection-company-use-tng (featurep! :completion company +tng)) - ;; Don't let evil-collection interfere with certain keys (appendq! evil-collection-key-blacklist (append (when (featurep! :tools lookup) diff --git a/modules/editor/fold/config.el b/modules/editor/fold/config.el index 05ab1000f..f72f2fe53 100644 --- a/modules/editor/fold/config.el +++ b/modules/editor/fold/config.el @@ -29,7 +29,7 @@ hs-set-up-overlay #'+fold-hideshow-set-up-overlay-fn) (defadvice! +fold--hideshow-ensure-mode-a (&rest _) - "Ensure `hs-minor-mode' is enabled." + "Ensure `hs-minor-mode' is enabled when we need it, no sooner or later." :before '(hs-toggle-hiding hs-hide-block hs-hide-level hs-show-all hs-hide-all) (unless (bound-and-true-p hs-minor-mode) (hs-minor-mode +1))) diff --git a/modules/lang/clojure/config.el b/modules/lang/clojure/config.el index 55f52738b..a609e93ae 100644 --- a/modules/lang/clojure/config.el +++ b/modules/lang/clojure/config.el @@ -16,8 +16,7 @@ (use-package! cider - ;; NOTE: if you don't have an org directory set (the dir doesn't exist), cider - ;; jack in won't work. + ;; NOTE if `org-directory' doesn't exist, `cider-jack' in won't work :hook (clojure-mode-local-vars . cider-mode) :init (after! clojure-mode diff --git a/modules/lang/common-lisp/config.el b/modules/lang/common-lisp/config.el index 900261c79..a401dd657 100644 --- a/modules/lang/common-lisp/config.el +++ b/modules/lang/common-lisp/config.el @@ -8,19 +8,22 @@ ;; ;; packages +;;;###package lisp-mode (defvar inferior-lisp-program "sbcl") - -(after! lisp-mode - (set-repl-handler! 'lisp-mode #'sly-mrepl) - (set-eval-handler! 'lisp-mode #'sly-eval-region) - (set-lookup-handlers! 'lisp-mode - :definition #'sly-edit-definition - :documentation #'sly-describe-symbol) - - (add-hook 'lisp-mode-hook #'rainbow-delimiters-mode)) +(add-hook 'lisp-mode-hook #'rainbow-delimiters-mode) -(after! sly +(use-package! sly + :defer t + :init + (after! lisp-mode + (set-repl-handler! 'lisp-mode #'sly-mrepl) + (set-eval-handler! 'lisp-mode #'sly-eval-region) + (set-lookup-handlers! 'lisp-mode + :definition #'sly-edit-definition + :documentation #'sly-describe-symbol)) + + :config (setq sly-mrepl-history-file-name (concat doom-cache-dir "sly-mrepl-history") sly-kill-without-query-p t sly-net-coding-system 'utf-8-unix @@ -133,4 +136,4 @@ (use-package! sly-repl-ansi-color :defer t :init - (add-to-list 'sly-contribs 'sly-repl-ansi-color nil #'eq)) + (add-to-list 'sly-contribs 'sly-repl-ansi-color)) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 1db8c52d7..0a9f6df0d 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -52,10 +52,6 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default (defvar +org-initial-fold-level 2 "The initial fold level of org files when no #+STARTUP options for it.") -(defvar +org-export-directory ".export/" - "Where to store exported files relative to `org-directory'. Can be an absolute -path too.") - (defvar +org-habit-graph-padding 2 "The padding added to the end of the consistency graph") @@ -238,8 +234,7 @@ path too.") :override #'org-babel-do-load-languages (message (concat "`org-babel-do-load-languages' is redundant with Doom's lazy loading mechanism for babel " - "packages. There is no need to use it, so it has been disabled"))) - ) + "packages. There is no need to use it, so it has been disabled")))) (defun +org-init-capture-defaults-h () diff --git a/modules/ui/vc-gutter/config.el b/modules/ui/vc-gutter/config.el index 0f6ede1f6..1ceb09bc3 100644 --- a/modules/ui/vc-gutter/config.el +++ b/modules/ui/vc-gutter/config.el @@ -11,9 +11,9 @@ diffing, even for unsaved buffers.") (defvar +vc-gutter-default-style t - "If non-nil, enable the default look of the vc gutter. This means subtle thin -bitmaps on the left, an arrow bitmap for flycheck, and flycheck indicators moved -to the right fringe.") + "If non-nil, enable the default look of the vc gutter. +This means subtle thin bitmaps on the left, an arrow bitmap for flycheck, and +flycheck indicators moved to the right fringe.") ;; @@ -58,9 +58,6 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'." ;; assigned. I don't know why this is the case, but adding `fundamental-mode' ;; here fixes the issue. (setq git-gutter:disabled-modes '(fundamental-mode image-mode pdf-view-mode)) - - ;; standardize default fringe width - (if (fboundp 'fringe-mode) (fringe-mode '4)) :config (set-popup-rule! "^\\*git-gutter" :select nil :size '+popup-shrink-to-fit) @@ -93,6 +90,9 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'." ;; subtle diff indicators in the fringe (when +vc-gutter-default-style + ;; standardize default fringe width + (if (fboundp 'fringe-mode) (fringe-mode '4)) + (after! git-gutter-fringe ;; places the git gutter outside the margins. (setq-default fringes-outside-margins t) From a65403011e930fceaa59664dceabdee27b4c4cb4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 23 Feb 2020 16:23:36 -0500 Subject: [PATCH 951/983] lang/clojure: add +lsp support --- docs/modules.org | 2 +- modules/lang/clojure/config.el | 14 ++++++++++++++ modules/lang/clojure/packages.el | 4 +++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/modules.org b/docs/modules.org index a0e7b9971..42045eb3f 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -92,7 +92,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/agda/README.org][agda]] - TODO + assembly - TODO + [[file:../modules/lang/cc/README.org][cc]] =+lsp= - TODO -+ clojure - TODO ++ clojure =+lsp= - TODO + common-lisp - TODO + [[file:../modules/lang/coq/README.org][coq]] - TODO + crystal - TODO diff --git a/modules/lang/clojure/config.el b/modules/lang/clojure/config.el index a609e93ae..32f3df9cc 100644 --- a/modules/lang/clojure/config.el +++ b/modules/lang/clojure/config.el @@ -13,10 +13,24 @@ ;;;###package clojure-mode (add-hook 'clojure-mode-hook #'rainbow-delimiters-mode) +(when (featurep! +lsp) + (add-hook! '(clojure-mode-local-vars-hook + clojurec-mode-local-vars-hook + clojurescript-mode-local-vars-hook) + (defun +clojure-disable-lsp-indentation-h () + (setq-local lsp-enable-indentation nil)) + #'lsp!) + (after! lsp-clojure + (dolist (m '(clojure-mode + clojurec-mode + clojurescript-mode + clojurex-mode)) + (add-to-list 'lsp-language-id-configuration (cons m "clojure")))) (use-package! cider ;; NOTE if `org-directory' doesn't exist, `cider-jack' in won't work + :unless (featurep! +lsp) :hook (clojure-mode-local-vars . cider-mode) :init (after! clojure-mode diff --git a/modules/lang/clojure/packages.el b/modules/lang/clojure/packages.el index b10e142f0..b80eaa379 100644 --- a/modules/lang/clojure/packages.el +++ b/modules/lang/clojure/packages.el @@ -1,7 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/clojure/packages.el -(package! cider :pin "7437c67f0e") +(unless (featurep! +lsp) + (package! cider :pin "7437c67f0e")) + (package! clj-refactor :pin "e24ba62843") (when (featurep! :checkers syntax) From 887d1277481b7a2c7bae6d5a86175f932b3f6451 Mon Sep 17 00:00:00 2001 From: hackeryarn Date: Sat, 22 Feb 2020 18:16:25 -0600 Subject: [PATCH 952/983] Conditionally enable racket-smart-open-bracket-mode --- modules/editor/evil/config.el | 2 +- modules/editor/parinfer/config.el | 7 ++++- modules/lang/racket/README.org | 45 +++++++++++++++++++++++++++++++ modules/lang/racket/config.el | 7 +++-- 4 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 modules/lang/racket/README.org diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index ffa82f65b..21bb3e1ea 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -233,7 +233,7 @@ directives. By default, this only recognizes C directives.") :hook (org-mode . embrace-org-mode-hook) :hook ((ruby-mode enh-ruby-mode) . embrace-ruby-mode-hook) :hook (emacs-lisp-mode . embrace-emacs-lisp-mode-hook) - :hook ((lisp-mode emacs-lisp-mode clojure-mode racket-mode) + :hook ((lisp-mode emacs-lisp-mode clojure-mode racket-mode hy-mode) . +evil-embrace-lisp-mode-hook-h) :hook ((org-mode LaTeX-mode) . +evil-embrace-latex-mode-hook-h) :hook ((c++-mode rustic-mode csharp-mode java-mode swift-mode typescript-mode) diff --git a/modules/editor/parinfer/config.el b/modules/editor/parinfer/config.el index 93e481da2..912dfff39 100644 --- a/modules/editor/parinfer/config.el +++ b/modules/editor/parinfer/config.el @@ -1,7 +1,12 @@ ;;; editor/parinfer/config.el -*- lexical-binding: t; -*- (use-package! parinfer - :hook ((emacs-lisp-mode clojure-mode scheme-mode lisp-mode) . parinfer-mode) + :hook ((emacs-lisp-mode + clojure-mode + scheme-mode + lisp-mode + racket-mode + hy-mode) . parinfer-mode) :init (setq parinfer-extensions '(defaults diff --git a/modules/lang/racket/README.org b/modules/lang/racket/README.org new file mode 100644 index 000000000..b1698c92e --- /dev/null +++ b/modules/lang/racket/README.org @@ -0,0 +1,45 @@ +#+TITLE: lang/racket +#+DATE: July 29, 2018 +#+SINCE: v2.0.9 +#+STARTUP: inlineimages nofold + +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#maintainers][Maintainers]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] +- [[#prerequisites][Prerequisites]] +- [[#features][Features]] +- [[#configuration][Configuration]] + - [[#racket-smart-open-bracket-mode][racket-smart-open-bracket-mode]] +- [[#troubleshooting][Troubleshooting]] + +* Description +This module provide integration for [[https://github.com/greghendershott/racket-mode][racket-mode]]. + +** Maintainers +This module has no dedicated maintainers. + +** Module Flags +This module provides no flags. + +** Plugins ++ [[https://github.com/greghendershott/racket-mode][racket-mode]] + +* Prerequisites +This module only require `racket`. Install it directly from the [[https://download.racket-lang.org/][racket website]], +or check your package manger. + +* TODO Features + +* Configuration +** racket-smart-open-bracket-mode +~racket-smart-open-bracket-mode~ gets turned off automatically if you use ~parinfer~, +~lispy~. If you wish to enable it, add the following to your ~config.el~: +#+BEGIN_SRC elisp +(after! racket-mode + (add-hook! racket-mode + #'racket-smart-open-bracket-mode)) +#+END_SRC + +* TODO Troubleshooting diff --git a/modules/lang/racket/config.el b/modules/lang/racket/config.el index 894eb3b39..c54fb8997 100644 --- a/modules/lang/racket/config.el +++ b/modules/lang/racket/config.el @@ -24,8 +24,11 @@ (add-hook! 'racket-mode-hook #'rainbow-delimiters-mode - #'highlight-quoted-mode - #'racket-smart-open-bracket-mode) + #'highlight-quoted-mode) + + (unless (or (featurep! :editor parinfer) + (featurep! :editor lispy)) + (add-hook! 'racket-mode-hook #'racket-smart-open-bracket-mode)) (map! :localleader :map racket-mode-map From 38ea1385428fae2ed4dbbf6315980fd8743aa601 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 23 Feb 2020 16:24:11 -0500 Subject: [PATCH 953/983] lang/clojure: add README #1166 --- docs/modules.org | 2 +- modules/lang/clojure/README.org | 62 +++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 modules/lang/clojure/README.org diff --git a/docs/modules.org b/docs/modules.org index 42045eb3f..1e4249e76 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -92,7 +92,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/agda/README.org][agda]] - TODO + assembly - TODO + [[file:../modules/lang/cc/README.org][cc]] =+lsp= - TODO -+ clojure =+lsp= - TODO ++ [[file:/mnt/projects/conf/doom-emacs/modules/lang/clojure/README.org][clojure]] =+lsp= - TODO + common-lisp - TODO + [[file:../modules/lang/coq/README.org][coq]] - TODO + crystal - TODO diff --git a/modules/lang/clojure/README.org b/modules/lang/clojure/README.org new file mode 100644 index 000000000..08d5f3227 --- /dev/null +++ b/modules/lang/clojure/README.org @@ -0,0 +1,62 @@ +#+TITLE: lang/clojure +#+DATE: May 30, 2017 +#+SINCE: v2.0 +#+STARTUP: inlineimages nofold + +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#maintainers][Maintainers]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] + - [[#hacks][Hacks]] +- [[#prerequisites][Prerequisites]] +- [[#features][Features]] +- [[#configuration][Configuration]] +- [[#troubleshooting][Troubleshooting]] + +* Description +# A summary of what this module does. + ++ If possible, include a brief list of feature highlights here ++ Like code completion, syntax checking or available snippets ++ Include links to packages & external things where possible + +** Maintainers ++ @username_linked_to_gihub (Author) ++ @username_linked_to_gihub ++ @username_linked_to_gihub + +# If this module has no maintainers, then... +This module has no dedicated maintainers. + +** Module Flags ++ =+lsp= Enables LSP support. Disables cider. + +** Plugins ++ [[https://github.com/clojure-emacs/cider][cider]] (unless =+lsp=) ++ [[https://github.com/clojure-emacs/clj-refactor.el][clj-refactor]] ++ [[https://github.com/candid82/flycheck-joker][flycheck-joker]] + +** Hacks ++ Error messages emitted from CIDER are piped into the REPL buffer when it is + first opened, to make them easier to notice. ++ Disabled the help banner when opening the cider REPL. + +* Prerequisites +This module requires: + ++ clojure ++ With =+lsp= + + clojure-lsp ++ Without =+lsp= + + leiningen (REPL) + + joker (linter) + +* TODO Features +# An in-depth list of features, how to use them, and their dependencies. + +* TODO Configuration +# How to configure this module, including common problems and how to address them. + +* TODO Troubleshooting +# Common issues and their solution, or places to look for help. From acf6d5b78b3bdccc0286fe3fba4d3c81379f26ab Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 23 Feb 2020 16:25:16 -0500 Subject: [PATCH 954/983] Bump to agda/agda@74d9fd5 From agda/agda@e9e23b9 --- modules/lang/agda/packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/agda/packages.el b/modules/lang/agda/packages.el index 38614c430..e5b27f296 100644 --- a/modules/lang/agda/packages.el +++ b/modules/lang/agda/packages.el @@ -6,11 +6,11 @@ :recipe (:host github :repo "agda/agda" :files ("src/data/emacs-mode/agda-input.el") :nonrecursive t) - :pin "e9e23b973d") + :pin "74d9fd53cd") (package! agda2-mode :recipe (:host github :repo "agda/agda" :files ("src/data/emacs-mode/*.el" (:exclude "agda-input.el")) :nonrecursive t) - :pin "e9e23b973d")) + :pin "74d9fd53cd")) From 844d145f9740500b2366273e5bcf028fde0174a5 Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Mon, 24 Feb 2020 15:14:00 +0100 Subject: [PATCH 955/983] Construct org-id-locations-file using expand-file-name --- modules/lang/org/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 46b046288..996cfead8 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -985,7 +985,7 @@ compelling reason, so..." ;; Global ID state means we can have ID links anywhere. This is required for ;; `org-brain', however. (setq org-id-track-globally t - org-id-locations-file (concat org-directory ".orgids") + org-id-locations-file (expand-file-name ".orgids" org-directory) org-id-locations-file-relative t) ;; HACK `org-id' doesn't check if `org-id-locations-file' exists or is From a323ca9a2221105b938b17ad02c1f88a48824d0a Mon Sep 17 00:00:00 2001 From: "Robert J. Lambert III" Date: Mon, 24 Feb 2020 11:17:22 -0500 Subject: [PATCH 956/983] mdempsky no longer maintains docode, updating to stamblerre --- modules/lang/go/README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/go/README.org b/modules/lang/go/README.org index 664e4742d..04ea402fa 100644 --- a/modules/lang/go/README.org +++ b/modules/lang/go/README.org @@ -77,7 +77,7 @@ This module requires a valid ~GOPATH~, and the following Go packages: export GOPATH=~/work/go go get -u github.com/motemen/gore/cmd/gore -go get -u github.com/mdempsky/gocode +go get -u github.com/stamblerre/gocode go get -u golang.org/x/tools/cmd/godoc go get -u golang.org/x/tools/cmd/goimports go get -u golang.org/x/tools/cmd/gorename From 1f3ff337626ccd39d8cb2b16c99434e2ac1f23a7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 14:59:14 -0500 Subject: [PATCH 957/983] Add +lsp/uninstall-server command --- modules/tools/lsp/autoload.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/tools/lsp/autoload.el b/modules/tools/lsp/autoload.el index ae45c1ef1..5d9ed2c52 100644 --- a/modules/tools/lsp/autoload.el +++ b/modules/tools/lsp/autoload.el @@ -2,3 +2,13 @@ ;;;###autodef (defalias 'lsp! #'lsp-deferred) + +;;;###autoload +(defun +lsp/uninstall-server (dir) + "Delete a LSP server from `lsp-server-install-dir'." + (interactive + (list (read-directory-name "Uninstall LSP server: " lsp-server-install-dir nil t))) + (unless (file-directory-p dir) + (user-error "Couldn't find %S directory" dir)) + (delete-directory dir 'recursive) + (message "Uninstalled %S" (file-name-nondirectory dir))) From 24282a454e533dfe9cf99ef7da6a74eebd10990c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 19:23:37 -0500 Subject: [PATCH 958/983] Fix revert-buffer--default error after using magit It too aggressively tries to revert all buffers, even ones that can't be reverted. --- modules/tools/magit/autoload.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/tools/magit/autoload.el b/modules/tools/magit/autoload.el index 3b9e6ff91..5b5a40bcc 100644 --- a/modules/tools/magit/autoload.el +++ b/modules/tools/magit/autoload.el @@ -43,12 +43,17 @@ ;; ;;; Auto-revert -(defvar-local +magit--stale-p nil) +(defvar +magit--stale-p nil) (defun +magit--revert-buffer (buffer) (with-current-buffer buffer - (setq +magit--stale-p nil) - (revert-buffer t (not (buffer-modified-p))))) + (kill-local-variable '+magit--stale-p) + (if (buffer-file-name (buffer-base-buffer)) + (and (or (not (buffer-modified-p)) + (y-or-n-p "Version control data is outdated in this buffer, but it is unsaved. Revert anyway?")) + (revert-buffer t t)) + (when (and vc-mode (fboundp 'vc-refresh-state)) + (vc-refresh-state))))) ;;;###autoload (defun +magit-mark-stale-buffers-h () @@ -61,7 +66,7 @@ modified." (if (get-buffer-window buffer) (+magit--revert-buffer buffer) (with-current-buffer buffer - (setq +magit--stale-p t)))))) + (setq-local +magit--stale-p t)))))) ;;;###autoload (defun +magit-revert-buffer-maybe-h () From 59b57b7eaeb64fb21e268cd0283629218434a4aa Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 19:44:21 -0500 Subject: [PATCH 959/983] Fix empty list on +file-templates/insert-license In case yasnippet hasn't loaded text-mode snippets yet. --- modules/editor/file-templates/autoload.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/editor/file-templates/autoload.el b/modules/editor/file-templates/autoload.el index 70c416dbd..1ff309528 100644 --- a/modules/editor/file-templates/autoload.el +++ b/modules/editor/file-templates/autoload.el @@ -100,6 +100,8 @@ evil is loaded and enabled)." "Insert a license file template into the current file." (interactive) (require 'yasnippet) + (unless (gethash 'text-mode yas--tables) + (yas-reload-all t)) (let ((templates (let (yas-choose-tables-first ; avoid prompts yas-choose-keys-first) From f55bcdfd30a696a7f38d9dd757be5366778f3699 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 19:58:03 -0500 Subject: [PATCH 960/983] Have browse-to-remote default to master in detached repos Instead of producing links with nil branch. --- modules/emacs/vc/config.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/emacs/vc/config.el b/modules/emacs/vc/config.el index 348bc3ebe..3fea39ef2 100644 --- a/modules/emacs/vc/config.el +++ b/modules/emacs/vc/config.el @@ -71,3 +71,12 @@ otherwise in default state." (when (and (bound-and-true-p evil-mode) (bobp) (eolp)) (evil-insert-state))))) + + +;; HACK `browse-at-remote' produces urls with `nil' in them, when the repo +;; detached. This creates broken links. I think it is more sensible to at +;; least refer to master in those case. +(defadvice! +vc--fallback-to-master-branch-a () + "Return 'master' in detached state." + :after-until #'browse-at-remote--get-local-branch + "master") From 899987fb911e7f689647ac70eeab8395fd709f21 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 20:07:35 -0500 Subject: [PATCH 961/983] Bump to Alexander-Miller/treemacs@4eb8eb8 From Alexander-Miller/treemacs@4d4a955 --- modules/ui/treemacs/packages.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ui/treemacs/packages.el b/modules/ui/treemacs/packages.el index cc3c0d1e5..6336e7a45 100644 --- a/modules/ui/treemacs/packages.el +++ b/modules/ui/treemacs/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/treemacs/packages.el -(package! treemacs :pin "4d4a955fcb") +(package! treemacs :pin "4eb8eb8821") (when (featurep! :editor evil +everywhere) - (package! treemacs-evil :pin "4d4a955fcb")) -(package! treemacs-projectile :pin "4d4a955fcb") + (package! treemacs-evil :pin "4eb8eb8821")) +(package! treemacs-projectile :pin "4eb8eb8821") (when (featurep! :tools magit) - (package! treemacs-magit :pin "4d4a955fcb")) + (package! treemacs-magit :pin "4eb8eb8821")) (when (featurep! :ui workspaces) - (package! treemacs-persp :pin "4d4a955fcb")) + (package! treemacs-persp :pin "4eb8eb8821")) From ccac04fbd44a734a1fdad27bf66e30c6ce12619c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 20:09:10 -0500 Subject: [PATCH 962/983] Bump to seagle0128/doom-modeline@41015d7 From seagle0128/doom-modeline@c4969ff --- modules/ui/modeline/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/modeline/packages.el b/modules/ui/modeline/packages.el index 024796440..d08c7c954 100644 --- a/modules/ui/modeline/packages.el +++ b/modules/ui/modeline/packages.el @@ -2,7 +2,7 @@ ;;; ui/modeline/packages.el (unless (featurep! +light) - (package! doom-modeline :pin "c4969ff149")) + (package! doom-modeline :pin "41015d72e7")) (package! anzu :pin "592f8ee6d0") (when (featurep! :editor evil) (package! evil-anzu :pin "9bca6ca14d")) From 15e7d01bfa63217e5a7020689eaa5f919a00a180 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 20:13:37 -0500 Subject: [PATCH 963/983] Bump :editor evil emacs-evil/evil@810eaf6 -> emacs-evil/evil@7c42ba4 redguardtoo/evil-nerd-commenter@fd2fba7 -> redguardtoo/evil-nerd-commenter@fa40dab Fixes redguardtoo/evil-nerd-commenter#107 --- modules/editor/evil/packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index ed69a231e..ec52fb684 100644 --- a/modules/editor/evil/packages.el +++ b/modules/editor/evil/packages.el @@ -1,14 +1,14 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/evil/packages.el -(package! evil :pin "810eaf6c82") +(package! evil :pin "7c42ba4de0") (package! evil-args :pin "758ad5ae54") (package! evil-easymotion :pin "79c13ed3bc") (package! evil-embrace :pin "4379adea03") (package! evil-escape :pin "f4e9116bfb") (package! evil-exchange :pin "3030e21ee1") (package! evil-indent-plus :pin "0c7501e6ef") -(package! evil-nerd-commenter :pin "fd2fba722e") +(package! evil-nerd-commenter :pin "fa40dab8d2") (package! evil-numbers :recipe (:host github :repo "janpath/evil-numbers") :pin "d988041c1f") From 2f696ff5c51e050580fd35fc2cc08baf854b6a4e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 20:16:54 -0500 Subject: [PATCH 964/983] Temp fix #2446: yy in magit when evil-want-Y-yank-or-eol --- modules/tools/magit/config.el | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index 8205a4aa3..d16d1b198 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -172,4 +172,21 @@ ensure it is built when we actually use Forge." (setcar desc (cdr key)))) (evil-define-key* evil-magit-state git-rebase-mode-map "gj" #'git-rebase-move-line-down - "gk" #'git-rebase-move-line-up))) + "gk" #'git-rebase-move-line-up)) + + ;; HACK Temporarily fix hlissner/doom-emacs#2446. evil-magit binds yy to + ;; evil-yank-line. This command is what Y is bound to in normal mode and + ;; it respects evil-want-Y-yank-to-eol, which is set to t by default (the + ;; default behavior in vim). + (evil-define-operator evil-magit-yank (beg end type register) + :motion evil-line-or-visual-line + :move-point nil + (interactive "") + (evil-yank beg end type register)) + (evil-magit-define-key 'normal 'magit-mode-map "yy" #'evil-magit-yank) + (after! evil-goggles + (pushnew! evil-goggles--commands + '(evil-magit-yank + :face evil-goggles-yank-face + :switch evil-goggles-enable-yank + :advice evil-goggles--generic-async-advice)))) From cbd9cab23d1e53aa930e5903bd6f0995424c79b1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 20:23:59 -0500 Subject: [PATCH 965/983] Bump :completion ivy DarwinAwardWinner/amx@3af93ca -> DarwinAwardWinner/amx@e512e74 Yevgnen/ivy-rich@7bfc726 -> Yevgnen/ivy-rich@af43aba abo-abo/swiper@098f8fe -> abo-abo/swiper@7084d60 asok/all-the-icons-ivy@babea62 -> asok/all-the-icons-ivy@a70cbfa ericdanan/counsel-projectile@cadc6de -> ericdanan/counsel-projectile@b556ed8 mhayashi1120/Emacs-wgrep@e67e737 -> mhayashi1120/Emacs-wgrep@5977b8e --- modules/completion/ivy/packages.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/completion/ivy/packages.el b/modules/completion/ivy/packages.el index 47e935078..7fb20ae1b 100644 --- a/modules/completion/ivy/packages.el +++ b/modules/completion/ivy/packages.el @@ -1,15 +1,15 @@ ;; -*- no-byte-compile: t; -*- ;;; completion/ivy/packages.el -(package! swiper :pin "098f8fe5ba") +(package! swiper :pin "7084d60312") (package! ivy) (package! ivy-hydra) (package! counsel) -(package! amx :pin "3af93ca066") -(package! counsel-projectile :pin "cadc6de707") -(package! ivy-rich :pin "7bfc7262fd") -(package! wgrep :pin "e67e737184") +(package! amx :pin "e512e74e83") +(package! counsel-projectile :pin "b556ed8995") +(package! ivy-rich :pin "af43abad5c") +(package! wgrep :pin "5977b8e000") (if (featurep! +prescient) (package! ivy-prescient :pin "7fd8c3b802") @@ -20,4 +20,4 @@ (package! ivy-posframe :pin "6d697ff00a")) (when (featurep! +icons) - (package! all-the-icons-ivy :pin "babea626db")) + (package! all-the-icons-ivy :pin "a70cbfa1ef")) From 9c6d614f313af2db048aed380e836a3bf9ccb52a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 20:30:25 -0500 Subject: [PATCH 966/983] Bump :completion helm emacs-helm/helm@c17f1c76e4 -> emacs-helm/helm@8f56312053 tumashu/posframe@c250771589 -> tumashu/posframe@087a7fc3c8 --- modules/completion/helm/packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/completion/helm/packages.el b/modules/completion/helm/packages.el index ba150610e..444ccb8a7 100644 --- a/modules/completion/helm/packages.el +++ b/modules/completion/helm/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; completion/helm/packages.el -(package! helm :pin "c17f1c76e4") +(package! helm :pin "8f56312053") (package! helm-rg :pin "785a80fe5c") (package! helm-c-yasnippet :pin "65ca732b51") (package! helm-company :pin "6eb5c2d730") @@ -13,6 +13,6 @@ (when (featurep! +fuzzy) (package! helm-flx :pin "6640fac5cb")) (when (featurep! +childframe) - (package! posframe :pin "c250771589")) + (package! posframe :pin "087a7fc3c8")) (when (featurep! :lang org) (package! helm-org :pin "8457e1e462")) From 8de7a6e53d0c348775d496a01a1950287bf3177b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 20:33:33 -0500 Subject: [PATCH 967/983] Bump :config default noctuid/link-hint.el@8d8f950 -> noctuid/link-hint.el@0d9cabc magnars/expand-region.el@0fa7c2d -> magnars/expand-region.el@1603d01 --- modules/config/default/packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/config/default/packages.el b/modules/config/default/packages.el index 8207564a5..ad818e198 100644 --- a/modules/config/default/packages.el +++ b/modules/config/default/packages.el @@ -3,7 +3,7 @@ (package! avy :pin "cf95ba9582") (package! drag-stuff :pin "6d06d846cd") -(package! link-hint :pin "8d8f9505f8") +(package! link-hint :pin "0d9cabcdb7") (unless (featurep! :editor evil) - (package! expand-region :pin "0fa7c2d349")) + (package! expand-region :pin "1603d01fbf")) From ca97300f8401cb1b7d56feaf18373b1e3040c267 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 20:37:46 -0500 Subject: [PATCH 968/983] Load sly-contribs immediately, after sly loads To fix a load order issue with some sly plugins (like sly-macrostep) not loading early enough, thus requiring the buffer be reloaded or reverted to activate them. --- modules/lang/common-lisp/config.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/lang/common-lisp/config.el b/modules/lang/common-lisp/config.el index a401dd657..a0b1a450c 100644 --- a/modules/lang/common-lisp/config.el +++ b/modules/lang/common-lisp/config.el @@ -23,6 +23,12 @@ :definition #'sly-edit-definition :documentation #'sly-describe-symbol)) + ;; HACK Ensures that sly's contrib modules are loaded as soon as possible, but + ;; also as late as possible, so users have an opportunity to override + ;; `sly-contrib' in an `after!' block. + (add-hook! 'doom-after-init-modules-hook + (after! sly (sly-setup))) + :config (setq sly-mrepl-history-file-name (concat doom-cache-dir "sly-mrepl-history") sly-kill-without-query-p t From 8049914e0ed85dd32f79650fa140ea4a6c8d62c9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 20:46:58 -0500 Subject: [PATCH 969/983] Fix #2591: fix project switch hooks not running When :ui workspaces was enabled. --- modules/ui/workspaces/autoload/workspaces.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/ui/workspaces/autoload/workspaces.el b/modules/ui/workspaces/autoload/workspaces.el index 74ee32b89..3175fcf84 100644 --- a/modules/ui/workspaces/autoload/workspaces.el +++ b/modules/ui/workspaces/autoload/workspaces.el @@ -526,6 +526,12 @@ This be hooked to `projectile-after-switch-project-hook'." (when dir (setq +workspaces--project-dir dir)) (when (and persp-mode +workspaces--project-dir) + (with-temp-buffer + ;; Load the project dir-local variables into the switch buffer, so the + ;; action can make use of them + (setq default-directory +workspaces--project-dir) + (hack-dir-local-variables-non-file-buffer) + (run-hooks 'projectile-before-switch-project-hook)) (unwind-protect (if (and (not (null +workspaces-on-switch-project-behavior)) (or (eq +workspaces-on-switch-project-behavior t) @@ -550,6 +556,7 @@ This be hooked to `projectile-after-switch-project-hook'." (+workspace-rename (+workspace-current-name) (doom-project-name +workspaces--project-dir))) (unless current-prefix-arg (funcall +workspaces-switch-project-function +workspaces--project-dir))) + (run-hooks 'projectile-after-switch-project-hook) (setq +workspaces--project-dir nil)))) From 5ed8c1db76c4d6095fafecbf7dcecc22a2850182 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 20:49:03 -0500 Subject: [PATCH 970/983] Bump :tools magit magit/magit@57f2d0f -> magit/magit@8cb6cdf magit/forge@0081afd -> magit/forge@fb04716 --- modules/tools/magit/packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tools/magit/packages.el b/modules/tools/magit/packages.el index 08e7fd80c..0f9a09ec0 100644 --- a/modules/tools/magit/packages.el +++ b/modules/tools/magit/packages.el @@ -1,8 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/magit/packages.el -(when (package! magit :pin "57f2d0f830") - (package! forge :pin "0081afd2c8") +(when (package! magit :pin "8cb6cdf3e4") + (package! forge :pin "fb04716b64") (package! magit-gitflow :pin "cc41b561ec") (package! magit-todos :pin "ad5663aa26") (package! github-review :pin "1de2d6d148") From a426b735011577f143d808a1def36875f28db6be Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 20:55:45 -0500 Subject: [PATCH 971/983] Bump :lang org emacs-straight/org-mode@2096c9c -> emacs-straight/org-mode@30d0b6e Kungsgeten/org-brain@8cb2efc -> Kungsgeten/org-brain@a062585 abo-abo/org-download@7040188 -> abo-abo/org-download@3c48102 bastibe/org-journal@128f053 -> bastibe/org-journal@dc120bf kaushalmodi/ox-hugo@a80b250 -> kaushalmodi/ox-hugo@16f1b0c --- modules/lang/org/packages.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index 8abd798ad..bc0244e85 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -27,7 +27,7 @@ :recipe (:host github :repo "emacs-straight/org-mode" :files ("*.el" "lisp/*.el" "contrib/lisp/*.el")) - :pin "2096c9c76f") + :pin "30d0b6e1f6") ;; ...And prevent other packages from pulling org; org-plus-contrib satisfies ;; the dependency already: https://github.com/raxod502/straight.el/issues/352 (package! org :recipe (:local-repo nil)) @@ -54,9 +54,9 @@ (when (featurep! :tools magit) (package! orgit :pin "e7cddf39e3")) (when (featurep! +brain) - (package! org-brain :pin "8cb2efc860")) + (package! org-brain :pin "a0625854df")) (when (featurep! +dragndrop) - (package! org-download :pin "70401884e9")) + (package! org-download :pin "3c48102793")) (when (featurep! +gnuplot) (package! gnuplot :pin "a406143d52") (package! gnuplot-mode :pin "601f639298")) @@ -73,7 +73,7 @@ (package! org-tree-slide :pin "7bf09a02bd") (package! ox-reveal :pin "aafedfd805")) (when (featurep! +journal) - (package! org-journal :pin "128f0533a7")) + (package! org-journal :pin "dc120bf42a")) ;;; Babel (package! ob-async :pin "80a30b96a0") @@ -100,6 +100,6 @@ (when (featurep! +hugo) (package! ox-hugo :recipe (:host github :repo "kaushalmodi/ox-hugo" :nonrecursive t) - :pin "a80b250987")) + :pin "16f1b0c9a9")) (when (featurep! :lang rst) (package! ox-rst :pin "9158bfd180")) From 93936809099f79f227912aa61b0ff6cd1a217e90 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 22:11:36 -0500 Subject: [PATCH 972/983] Fix counsel-file-jump advice for windows users Was using the wrong arguments for windows version of ripgrep. --- modules/completion/ivy/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 64b3598bd..0d1eef6d6 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -267,7 +267,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex." (cond ((executable-find doom-projectile-fd-binary) (cons doom-projectile-fd-binary (list "-t" "f" "-E" ".git"))) ((executable-find "rg") - (cons "rg" (list "--files" "--hidden" "--no-messages"))) + (split-string (format counsel-rg-base-command "--files --no-messages") " " t)) ((cons find-program args))) (unless (listp args) (user-error "`counsel-file-jump-args' is a list now, please customize accordingly.")) From e220549bb884c0b08a76096698066e0f7d67ecc0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 22:27:25 -0500 Subject: [PATCH 973/983] Fix #2595: immortal find-file prompt on project switch Regression caused by 8049914e0, for #2591 --- modules/ui/workspaces/config.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/ui/workspaces/config.el b/modules/ui/workspaces/config.el index a348ac07e..f7c6cfbf0 100644 --- a/modules/ui/workspaces/config.el +++ b/modules/ui/workspaces/config.el @@ -180,8 +180,6 @@ stored in `persp-save-dir'.") ("xt" counsel-projectile-switch-project-action-run-term "invoke term from project root") ("X" counsel-projectile-switch-project-action-org-capture "org-capture into project"))) - (add-hook 'projectile-after-switch-project-hook #'+workspaces-switch-to-project-h) - ;; Fix #1973: visual selection surviving workspace changes (add-hook 'persp-before-deactivate-functions #'deactivate-mark) From 8cd8c3ef7b73f64ce31925f5ff3652370072c718 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 22:31:50 -0500 Subject: [PATCH 974/983] Bump to hlissner/emacs-doom-themes@ecffdf8 From hlissner/emacs-doom-themes@c8dd976 --- modules/ui/doom/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/doom/packages.el b/modules/ui/doom/packages.el index 186d872e8..5d7acb5bc 100644 --- a/modules/ui/doom/packages.el +++ b/modules/ui/doom/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/doom/packages.el -(package! doom-themes :pin "c8dd976067") +(package! doom-themes :pin "ecffdf82ff") (package! solaire-mode :pin "4ac324ccb0") From 981ed73e66a135fd75b6a1b4a15e184aafa06a64 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 Feb 2020 22:56:58 -0500 Subject: [PATCH 975/983] Fix void-variable straight-process-buffer error #2596 --- bin/doom | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/doom b/bin/doom index 5ac35bf82..919b6ed40 100755 --- a/bin/doom +++ b/bin/doom @@ -100,10 +100,11 @@ with a different private module." (dolist (item (cdr e)) (print! "%S" item)) (print! "n/a"))) - (when (string-match-p (regexp-quote straight-process-buffer) - (error-message-string e)) - (print! (bold "Straight output:")) - (print-group! (print! "%s" (straight--process-get-output))))) + (when (featurep 'straight) + (when (string-match-p (regexp-quote straight-process-buffer) + (error-message-string e)) + (print! (bold "Straight output:")) + (print-group! (print! "%s" (straight--process-get-output)))))) (unless debug-on-error (terpri) (print! From c3f3f83a793c20be273271aacd1083c39467d897 Mon Sep 17 00:00:00 2001 From: Akhil Wali Date: Tue, 25 Feb 2020 20:00:44 +1300 Subject: [PATCH 976/983] Fix syntax error in modules/clojure/config.el --- modules/lang/clojure/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/clojure/config.el b/modules/lang/clojure/config.el index 501776fd9..746199de3 100644 --- a/modules/lang/clojure/config.el +++ b/modules/lang/clojure/config.el @@ -25,7 +25,7 @@ clojurec-mode clojurescript-mode clojurex-mode)) - (add-to-list 'lsp-language-id-configuration (cons m "clojure")))) + (add-to-list 'lsp-language-id-configuration (cons m "clojure"))))) (use-package! cider From f4d908852a3b14f0070c7f5addbc88798c7da294 Mon Sep 17 00:00:00 2001 From: yoavm448 Date: Tue, 25 Feb 2020 00:22:26 +0200 Subject: [PATCH 977/983] Integrate evil-lion to evil-mode adds `gl`, `gL` operators for alignment. --- modules/editor/evil/README.org | 2 ++ modules/editor/evil/config.el | 6 ++++++ modules/editor/evil/packages.el | 1 + 3 files changed, 9 insertions(+) diff --git a/modules/editor/evil/README.org b/modules/editor/evil/README.org index 05b6a2fde..d83e57182 100644 --- a/modules/editor/evil/README.org +++ b/modules/editor/evil/README.org @@ -34,6 +34,7 @@ This holy module brings the vim experience to Emacs. + [[https://github.com/syl20bnr/evil-escape][evil-escape]] + [[https://github.com/Dewdrops/evil-exchange][evil-exchange]] + [[https://github.com/TheBB/evil-indent-plus][evil-indent-plus]] ++ [[https://github.com/edkolev/evil-lion][evil-lion]] + [[https://github.com/redguardtoo/evil-nerd-commenter][evil-nerd-commentary]] + [[https://github.com/redguardtoo/evil-matchit][evil-matchit]] + [[https://github.com/cofi/evil-numbers][evil-numbers]] @@ -68,6 +69,7 @@ The following vim plugins have been ported to evil: |-----------------------+--------------------------------+--------------------------------------------| | vim-commentary | evil-nerd-commenter | omap =gc= | | vim-easymotion | evil-easymotion | omap =gs= | +| vim-lion | evil-lion | omap =gl= / =gL= | | vim-seek or vim-sneak | evil-snipe | mmap =s= / =S=, omap =z= / =Z= & =x= / =X= | | vim-surround | evil-embrace and evil-surround | vmap =S=, omap =ys= | diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 5aa64cf81..910922427 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -589,6 +589,12 @@ To change these keys see `+evil-repeat-keys'." :o "s" #'evil-surround-edit :o "S" #'evil-Surround-edit + ;; evil-lion + :n "gl" #'evil-lion-left + :n "gL" #'evil-lion-right + :v "gl" #'evil-lion-left + :v "gL" #'evil-lion-right + ;; Omni-completion (:when (featurep! :completion company) (:prefix "C-x" diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index ec52fb684..9e116ce96 100644 --- a/modules/editor/evil/packages.el +++ b/modules/editor/evil/packages.el @@ -8,6 +8,7 @@ (package! evil-escape :pin "f4e9116bfb") (package! evil-exchange :pin "3030e21ee1") (package! evil-indent-plus :pin "0c7501e6ef") +(package! evil-lion :pin "6b03593f5d") (package! evil-nerd-commenter :pin "fa40dab8d2") (package! evil-numbers :recipe (:host github :repo "janpath/evil-numbers") From 3c1860143728f60de6d76783c4248f627e756f08 Mon Sep 17 00:00:00 2001 From: Mingwei Zhang Date: Tue, 25 Feb 2020 07:11:56 -0800 Subject: [PATCH 978/983] add `open-in-iterm` shortcut for macos module `+macos/open-in-iterm` opens the current directory in `iTerm`, which as far as i know is a popular alternative to the macos's default terminal emulator `term`. --- modules/tools/macos/autoload.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/tools/macos/autoload.el b/modules/tools/macos/autoload.el index 0aa9f8b53..6aa1f006c 100644 --- a/modules/tools/macos/autoload.el +++ b/modules/tools/macos/autoload.el @@ -49,3 +49,6 @@ ;;;###autoload (autoload '+macos/send-project-to-launchbar "tools/macos/autoload" nil t) (+macos--open-with send-project-to-launchbar "LaunchBar" (or (doom-project-root) default-directory)) + +;;;###autoload (autoload '+macos/open-in-iterm "tools/macos/autoload" nil t) +(+macos--open-with open-in-iterm "iTerm" default-directory) From b72e00b6caae8c160466de09548232e63d4259c2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 25 Feb 2020 10:26:21 -0500 Subject: [PATCH 979/983] Bind `SPC p D` to +default/discover-projects Closes #2601 --- modules/config/default/+evil-bindings.el | 1 + modules/config/default/autoload/files.el | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 5d5851f8f..70ab26aba 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -539,6 +539,7 @@ :desc "Compile in project" "c" #'projectile-compile-project :desc "Repeat last command" "C" #'projectile-repeat-last-command :desc "Remove known project" "d" #'projectile-remove-known-project + :desc "Discover projects in folder" "D" #'+default/discover-projects :desc "Edit project .dir-locals" "e" #'projectile-edit-dir-locals :desc "Find file in project" "f" #'projectile-find-file :desc "Find file in other project" "F" #'doom/find-file-in-other-project diff --git a/modules/config/default/autoload/files.el b/modules/config/default/autoload/files.el index ee25f33a0..3c90f6d23 100644 --- a/modules/config/default/autoload/files.el +++ b/modules/config/default/autoload/files.el @@ -40,3 +40,12 @@ (if (featurep! :completion ivy) (call-interactively #'counsel-file-jump) (λ! (doom-project-find-file default-directory)))) + +;;;###autoload +(defun +default/discover-projects (arg) + "Discover projects in `projectile-project-search-path'. +If prefix ARG is non-nil, prompt for the search path." + (interactive "P") + (if arg + (call-interactively #'projectile-discover-projects-in-directory) + (mapc #'projectile-discover-projects-in-directory projectile-project-search-path))) From d522a7816decaae5faed649d379716bc81bbe64b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 25 Feb 2020 12:45:30 -0500 Subject: [PATCH 980/983] Move flycheck customization out of git-gutter after block To simplify the load path users would have to be aware of in order to customize flycheck-indication-mode. --- modules/ui/vc-gutter/config.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/ui/vc-gutter/config.el b/modules/ui/vc-gutter/config.el index 1ceb09bc3..c45be123d 100644 --- a/modules/ui/vc-gutter/config.el +++ b/modules/ui/vc-gutter/config.el @@ -102,10 +102,10 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'." (define-fringe-bitmap 'git-gutter-fr:modified [224] nil nil '(center repeated)) (define-fringe-bitmap 'git-gutter-fr:deleted [128 192 224 240] - nil nil 'bottom) + nil nil 'bottom)) + (after! flycheck ;; let diff have left fringe, flycheck can have right fringe - (after! flycheck - (setq flycheck-indication-mode 'right-fringe) - ;; A non-descript, left-pointing arrow - (define-fringe-bitmap 'flycheck-fringe-bitmap-double-arrow - [16 48 112 240 112 48 16] nil nil 'center)))) + (setq flycheck-indication-mode 'right-fringe) + ;; A non-descript, left-pointing arrow + (define-fringe-bitmap 'flycheck-fringe-bitmap-double-arrow + [16 48 112 240 112 48 16] nil nil 'center))) From e20f574b2e679a65facfba176f5671443cc50f88 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 25 Feb 2020 12:49:52 -0500 Subject: [PATCH 981/983] Fix git-gutter in indirect buffers --- modules/ui/vc-gutter/config.el | 43 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/modules/ui/vc-gutter/config.el b/modules/ui/vc-gutter/config.el index c45be123d..a5dd92887 100644 --- a/modules/ui/vc-gutter/config.el +++ b/modules/ui/vc-gutter/config.el @@ -28,27 +28,28 @@ flycheck indicators moved to the right fringe.") If the buffer doesn't represent an existing file, `git-gutter-mode's activation is deferred until the file is saved. Respects `git-gutter:disabled-modes'." - (when (or +vc-gutter-in-remote-files - (not (file-remote-p (or buffer-file-name default-directory)))) - (if (not buffer-file-name) - (add-hook 'after-save-hook #'+vc-gutter-init-maybe-h nil 'local) - (when (and (vc-backend buffer-file-name) - (progn - (require 'git-gutter) - (not (memq major-mode git-gutter:disabled-modes)))) - (if (and (display-graphic-p) - (require 'git-gutter-fringe nil t)) - (progn - (setq-local git-gutter:init-function #'git-gutter-fr:init) - (setq-local git-gutter:view-diff-function #'git-gutter-fr:view-diff-infos) - (setq-local git-gutter:clear-function #'git-gutter-fr:clear) - (setq-local git-gutter:window-width -1)) - (setq-local git-gutter:init-function 'nil) - (setq-local git-gutter:view-diff-function #'git-gutter:view-diff-infos) - (setq-local git-gutter:clear-function #'git-gutter:clear-diff-infos) - (setq-local git-gutter:window-width 1)) - (git-gutter-mode +1) - (remove-hook 'after-save-hook #'+vc-gutter-init-maybe-h 'local)))))) + (let ((file-name (buffer-file-name (buffer-base-buffer)))) + (when (or +vc-gutter-in-remote-files + (not (file-remote-p (or file-name default-directory)))) + (if (null file-name) + (add-hook 'after-save-hook #'+vc-gutter-init-maybe-h nil 'local) + (when (and (vc-backend file-name) + (progn + (require 'git-gutter) + (not (memq major-mode git-gutter:disabled-modes)))) + (if (and (display-graphic-p) + (require 'git-gutter-fringe nil t)) + (progn + (setq-local git-gutter:init-function #'git-gutter-fr:init) + (setq-local git-gutter:view-diff-function #'git-gutter-fr:view-diff-infos) + (setq-local git-gutter:clear-function #'git-gutter-fr:clear) + (setq-local git-gutter:window-width -1)) + (setq-local git-gutter:init-function 'nil) + (setq-local git-gutter:view-diff-function #'git-gutter:view-diff-infos) + (setq-local git-gutter:clear-function #'git-gutter:clear-diff-infos) + (setq-local git-gutter:window-width 1)) + (git-gutter-mode +1) + (remove-hook 'after-save-hook #'+vc-gutter-init-maybe-h 'local))))))) ;; Disable in Org mode, as per ;; and From f716aa515873d030a16973c8830efb31276c08c6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 25 Feb 2020 13:36:18 -0500 Subject: [PATCH 982/983] Fix conflict between :ui popup & org-src-window-setup When set to split-window-*, other-frame, or current-window. --- modules/ui/popup/+hacks.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index 4cc8f9e3d..7eefa7c7e 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -266,7 +266,18 @@ Ugh, such an ugly hack." :around #'org-switch-to-buffer-other-window (if +popup-mode (pop-to-buffer buf nil norecord) - (funcall orig-fn buf norecord)))) + (funcall orig-fn buf norecord))) + + ;; HACK `pop-to-buffer-same-window' consults `display-buffer-alist', which is + ;; what our popup manager uses to manage popup windows. However, + ;; `org-src-switch-to-buffer' already does its own window management + ;; prior to calling `pop-to-buffer-same-window', so there's no need to + ;; _then_ hand off the buffer to the pop up manager. + (defadvice! +popup--org-src-switch-to-buffer-a (orig-fn &rest args) + :around #'org-src-switch-to-buffer + (cl-letf (((symbol-function #'pop-to-buffer-same-window) + (symbol-function #'switch-to-buffer))) + (apply orig-fn args)))) ;;;###package persp-mode From 505ca8712d7ea986dc736a05604d98cd3d460a77 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 25 Feb 2020 14:13:07 -0500 Subject: [PATCH 983/983] Prevent 'not in valid workspace' error on switch project --- modules/ui/workspaces/autoload/workspaces.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ui/workspaces/autoload/workspaces.el b/modules/ui/workspaces/autoload/workspaces.el index 3175fcf84..f3fde1000 100644 --- a/modules/ui/workspaces/autoload/workspaces.el +++ b/modules/ui/workspaces/autoload/workspaces.el @@ -535,6 +535,7 @@ This be hooked to `projectile-after-switch-project-hook'." (unwind-protect (if (and (not (null +workspaces-on-switch-project-behavior)) (or (eq +workspaces-on-switch-project-behavior t) + (equal (safe-persp-name (get-current-persp)) persp-nil-name) (+workspace-buffer-list))) (let* ((persp (let ((project-name (doom-project-name +workspaces--project-dir)))