From be216115719e3eef5ad3be5d77a729fa714159ab Mon Sep 17 00:00:00 2001 From: benneti Date: Fri, 4 Dec 2020 15:59:01 +0100 Subject: [PATCH 001/183] org: jupyter prerequisites Add some more instructions to use +jupyter for jupyter babel blocks. --- modules/lang/org/README.org | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/lang/org/README.org b/modules/lang/org/README.org index 8af539491..4b279751f 100644 --- a/modules/lang/org/README.org +++ b/modules/lang/org/README.org @@ -173,6 +173,8 @@ esoteric features: + To execute babel code blocks, you need whatever dependencies those languages need. It is recommended you enable the associated =:lang= module and ensure its dependencies are met, e.g. install the =ruby= executable for ruby support. + To use ~jupyter kernels~ you need the =+jupyter= flag, the associatet kernel as + well as the ~jupyter~ program. + =org-roam= (with the =+roam= flag) requires =sqlite3= to be installed. ** MacOS @@ -185,6 +187,8 @@ brew install gnuplot #+BEGIN_SRC sh pacman -S texlive-core texlive-bin texlive-science pacman -S gnuplot +# +jupyter needs jupyter +pacman -S jupyter #+END_SRC ** NixOS @@ -192,6 +196,8 @@ pacman -S gnuplot environment.systemPackages = with pkgs; [ # any less than medium isn't guaranteed to work texlive.combined.scheme-medium + # +jupyter needs jupyter + (python38.withPackages(ps: with ps; [jupyter])) ]; #+END_SRC From a51be66d303ac1e0928282c2240947575f3355e8 Mon Sep 17 00:00:00 2001 From: Ian Wahbe Date: Sun, 6 Dec 2020 19:18:36 +0100 Subject: [PATCH 002/183] Add word existence checking for +spell/correct `(bounds-of-thing-at-point 'word)` can return `nil`. This checks that it does not, giving an `user-error` if no word is found. --- modules/checkers/spell/autoload/+spell-fu.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/checkers/spell/autoload/+spell-fu.el b/modules/checkers/spell/autoload/+spell-fu.el index 25a0a1063..a0ae0bbd1 100644 --- a/modules/checkers/spell/autoload/+spell-fu.el +++ b/modules/checkers/spell/autoload/+spell-fu.el @@ -64,8 +64,9 @@ (if (not (or (featurep! :completion ivy) (featurep! :completion helm))) (call-interactively #'ispell-word) - (cl-destructuring-bind (start . end) - (bounds-of-thing-at-point 'word) + (let ((current-point (bounds-of-thing-at-point 'word))) + (if current-point + (cl-destructuring-bind (start . end) current-point (let ((word (thing-at-point 'word t)) (orig-pt (point)) poss ispell-filter) @@ -106,7 +107,8 @@ (+spell--correct cmd poss wrd orig-pt start end) (unless (string-equal wrd word) (+spell--correct wrd poss word orig-pt start end)))))) - (ispell-pdict-save t))))))) + (ispell-pdict-save t))))) + (user-error "No word at point"))))) ;;;###autoload (defalias '+spell/add-word #'spell-fu-word-add) ;;;###autoload (defalias '+spell/remove-word #'spell-fu-word-remove) From 448bff2fd81fde28305996ecc778fed975ac6bb9 Mon Sep 17 00:00:00 2001 From: Ian Wahbe Date: Sun, 6 Dec 2020 23:57:40 +0100 Subject: [PATCH 003/183] Implement cleaner version --- modules/checkers/spell/autoload/+spell-fu.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/checkers/spell/autoload/+spell-fu.el b/modules/checkers/spell/autoload/+spell-fu.el index a0ae0bbd1..d90eeeebe 100644 --- a/modules/checkers/spell/autoload/+spell-fu.el +++ b/modules/checkers/spell/autoload/+spell-fu.el @@ -64,9 +64,9 @@ (if (not (or (featurep! :completion ivy) (featurep! :completion helm))) (call-interactively #'ispell-word) - (let ((current-point (bounds-of-thing-at-point 'word))) - (if current-point - (cl-destructuring-bind (start . end) current-point + (cl-destructuring-bind (start . end) + (or (bounds-of-thing-at-point 'word) + (user-error "No word at point")) (let ((word (thing-at-point 'word t)) (orig-pt (point)) poss ispell-filter) @@ -107,8 +107,7 @@ (+spell--correct cmd poss wrd orig-pt start end) (unless (string-equal wrd word) (+spell--correct wrd poss word orig-pt start end)))))) - (ispell-pdict-save t))))) - (user-error "No word at point"))))) + (ispell-pdict-save t))))))) ;;;###autoload (defalias '+spell/add-word #'spell-fu-word-add) ;;;###autoload (defalias '+spell/remove-word #'spell-fu-word-remove) From a7546bcea9866593b0f2d6f313be6f91fd6ecc5d Mon Sep 17 00:00:00 2001 From: benneti Date: Mon, 7 Dec 2020 10:32:37 +0100 Subject: [PATCH 004/183] implement requested changes --- modules/lang/org/README.org | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/lang/org/README.org b/modules/lang/org/README.org index 4b279751f..d6a094380 100644 --- a/modules/lang/org/README.org +++ b/modules/lang/org/README.org @@ -173,7 +173,7 @@ esoteric features: + To execute babel code blocks, you need whatever dependencies those languages need. It is recommended you enable the associated =:lang= module and ensure its dependencies are met, e.g. install the =ruby= executable for ruby support. - To use ~jupyter kernels~ you need the =+jupyter= flag, the associatet kernel as + To use ~jupyter kernels~ you need the =+jupyter= flag, the associated kernel as well as the ~jupyter~ program. + =org-roam= (with the =+roam= flag) requires =sqlite3= to be installed. @@ -187,8 +187,7 @@ brew install gnuplot #+BEGIN_SRC sh pacman -S texlive-core texlive-bin texlive-science pacman -S gnuplot -# +jupyter needs jupyter -pacman -S jupyter +pacman -S jupyter # required by +jupyter #+END_SRC ** NixOS @@ -196,7 +195,7 @@ pacman -S jupyter environment.systemPackages = with pkgs; [ # any less than medium isn't guaranteed to work texlive.combined.scheme-medium - # +jupyter needs jupyter + # required by +jupyter (python38.withPackages(ps: with ps; [jupyter])) ]; #+END_SRC From 465251144002c5c9a4be1bff9052a714bd6c4afd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 8 Dec 2020 21:40:10 -0500 Subject: [PATCH 005/183] Fix #4384: save server auth files to EMACSDIR It's where the daemon looks for them. It's too much hassle to move it elsewhere. --- core/core-editor.el | 1 + 1 file changed, 1 insertion(+) diff --git a/core/core-editor.el b/core/core-editor.el index f17cd4936..d2c4714c5 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -331,6 +331,7 @@ files, so we replace calls to `pp' with the much faster `prin1'." (when-let (name (getenv "EMACS_SERVER_NAME")) (setq server-name name)) :config + (setq server-auth-dir (concat doom-emacs-dir "server/")) (unless (server-running-p) (server-start))) From 65bd7c3414ef5e134d50efbf91301de7874f84b1 Mon Sep 17 00:00:00 2001 From: Ryan Faulhaber Date: Tue, 8 Dec 2020 22:20:56 -0500 Subject: [PATCH 006/183] Adds MDN search to online lookup --- 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 5dc20b33f..650bc7aa3 100644 --- a/modules/tools/lookup/config.el +++ b/modules/tools/lookup/config.el @@ -26,7 +26,8 @@ ("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")) + ("Wikipedia" "https://wikipedia.org/search-redirect.php?language=en&go=Go&search=%s") + ("MDN" "https://developer.mozilla.org/en-US/search?q=%s")) (when (featurep! :lang rust) '(("Rust Docs" "https://doc.rust-lang.org/std/?search=%s")))) "An alist that maps online resources to either: From fc9dd5748e862266f22b777bd61dff030ee8c270 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 8 Dec 2020 22:44:53 -0500 Subject: [PATCH 007/183] Fix #4386: interop between ivy-xref & dired-do-find-regexp --- modules/tools/lookup/config.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/tools/lookup/config.el b/modules/tools/lookup/config.el index 5dc20b33f..673f91d1f 100644 --- a/modules/tools/lookup/config.el +++ b/modules/tools/lookup/config.el @@ -170,7 +170,16 @@ Dictionary.app behind the scenes to get definitions.") (setq xref-show-definitions-function #'ivy-xref-show-defs)) ;; Necessary in Emacs <27. In Emacs 27 it will affect all xref-based ;; commands other than xref-find-definitions too (eg project-find-regexp) - (setq xref-show-xrefs-function #'ivy-xref-show-xrefs)) + (setq xref-show-xrefs-function #'ivy-xref-show-xrefs) + + ;; HACK Fix #4386: `ivy-xref-show-xrefs' calls `fetcher' twice, which has + ;; side effects that breaks in some cases (i.e. on `dired-do-find-regexp'). + (defadvice! +lookup--fix-ivy-xrefs (orig-fn fetcher alist) + :around #'ivy-xref-show-xrefs + (when (functionp fetcher) + (setf (alist-get 'fetched-xrefs alist) + (funcall fetcher))) + (funcall orig-fn fetcher alist))) (use-package! helm-xref :when (featurep! :completion helm))) From 9e56927b5f8cbbdffdb9a397e9f564b347103223 Mon Sep 17 00:00:00 2001 From: Nikita Bloshchanevich Date: Wed, 9 Dec 2020 21:51:00 +0100 Subject: [PATCH 008/183] Enable smartparens for `edebug-eval-expression' `doom-init-smartparens-in-minibuffer-maybe-h' is responsible for enabling `smartparens' in the minibuffer, which it does by checking `this-command'. However, the list of commands doesn't include `edebug-eval-expression', preventing the mode from being enabled for it. Fix this by enabling `smartparens' in `eval-expression-minibuffer-setup-hook', unconditionally, which means that anything using `interactive' "x" or `read--expression' will work correctly. --- core/core-editor.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index e8e768816..9ef3b0127 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -498,13 +498,11 @@ files, so we replace calls to `pp' with the much faster `prin1'." (dolist (key '(:unmatched-expression :no-matching-tag)) (setf (alist-get key sp-message-alist) nil)) - (add-hook! 'minibuffer-setup-hook + (add-hook! 'eval-expression-minibuffer-setup-hook (defun doom-init-smartparens-in-minibuffer-maybe-h () - "Enable `smartparens-mode' in the minibuffer, during `eval-expression', -`pp-eval-expression' or `evil-ex'." - (and (memq this-command '(eval-expression pp-eval-expression evil-ex)) - smartparens-global-mode - (smartparens-mode)))) + "Enable `smartparens-mode' in the minibuffer for `eval-expression'. +Only enable it if `smartparens-global-mode' is on." + (when smartparens-global-mode (smartparens-mode)))) ;; You're likely writing lisp in the minibuffer, therefore, disable these ;; quote pairs, which lisps doesn't use for strings: From 46ac4191e169b073df7dd46da52054686420f84b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 9 Dec 2020 17:10:15 -0500 Subject: [PATCH 009/183] Bump :tools debugger lsp emacs-lsp/dap-mode@e582ff9 -> emacs-lsp/dap-mode@041db8e emacs-lsp/lsp-mode@e1c4241 -> emacs-lsp/lsp-mode@61443f3 emacs-lsp/lsp-ui@b1693d6 -> emacs-lsp/lsp-ui@49bc513 emacs-straight/project@67216fb -> emacs-straight/project@0003fe4 Fix #4396 --- modules/tools/debugger/packages.el | 2 +- modules/tools/lsp/packages.el | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/tools/debugger/packages.el b/modules/tools/debugger/packages.el index f3075ad02..65f8d9070 100644 --- a/modules/tools/debugger/packages.el +++ b/modules/tools/debugger/packages.el @@ -6,5 +6,5 @@ (package! realgud-trepan-ni :pin "6e38cf838c7b47b5f1353d00901b939ffa36d707"))) (when (featurep! +lsp) - (package! dap-mode :pin "e582ff90c104703ed65c1f3174d4c4690e9cf1fd") + (package! dap-mode :pin "041db8eb7f0ceb9477ffff1730b5940814001158") (package! posframe :pin "e1552c82dffaadc5e7de09a44880a498197ffbee")) diff --git a/modules/tools/lsp/packages.el b/modules/tools/lsp/packages.el index 5ee2055f7..267dc9568 100644 --- a/modules/tools/lsp/packages.el +++ b/modules/tools/lsp/packages.el @@ -4,9 +4,9 @@ (if (featurep! +eglot) (progn (package! eglot :pin "21726416e6e580b20dfa90833c6dab2a8a15ea48") - (package! project :pin "67216fba813461a8b8d5db1a12aaca08a0389423")) - (package! lsp-mode :pin "e1c42412eac0d742196efe64a82699326e72b391") - (package! lsp-ui :pin "b1693d610c4d2c44305eba2719e8d4097fdcdcb8") + (package! project :pin "0003fe4f3f81be08a9427888ead29f182e0b2527")) + (package! lsp-mode :pin "61443f32531d1e94026c379319c99f21414ee3e7") + (package! lsp-ui :pin "49bc5134c15d92b866c389c16e8e551a9285961a") (when (featurep! :completion ivy) (package! lsp-ivy :pin "c70ee8b54357c56d1b972393ee53e57a2e545fbb")) (when (featurep! :completion helm) From a5af17b6aabfe2301f248924bcbf521309e724ff Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 9 Dec 2020 17:16:34 -0500 Subject: [PATCH 010/183] Fix #4397: call pdf-tools-install-noverify So pdf-tools has a chance to set up its hooks. --- modules/tools/pdf/config.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/tools/pdf/config.el b/modules/tools/pdf/config.el index 1371b5434..f32bc01a9 100644 --- a/modules/tools/pdf/config.el +++ b/modules/tools/pdf/config.el @@ -38,9 +38,8 @@ (message nil) ; flush lingering prompt in echo-area ;; Make sure this doesn't run more than once (advice-remove #'pdf-view-mode #'+pdf--install-epdfinfo-a) - (if (or (pdf-info-running-p) - (ignore-errors (pdf-info-check-epdfinfo) t)) - (pdf-tools-install-noverify) + (unless (or (pdf-info-running-p) + (ignore-errors (pdf-info-check-epdfinfo) t)) ;; HACK On the first pdf you open (before pdf-tools loaded) ;; `pdf-tools-install' throws errors because it has hardcoded ;; opinions about what buffer should be focused when it is run. @@ -61,6 +60,8 @@ (revert-buffer t t)))))))))) ((message "Aborted"))))) + (pdf-tools-install-noverify) + ;; For consistency with other special modes (map! :map pdf-view-mode-map :gn "q" #'kill-current-buffer) From c9dff2f957f11e40717b25e84acd4829e34d85db Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 9 Dec 2020 17:19:07 -0500 Subject: [PATCH 011/183] Bump :lang javascript mooz/js2-mode@ffb7099 -> mooz/js2-mode@f7816bd Added support for logical assignment operators in mooz/js2-mode@f7816bd Closes #4398 --- 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 8aa249503..f2057558b 100644 --- a/modules/lang/javascript/packages.el +++ b/modules/lang/javascript/packages.el @@ -3,7 +3,7 @@ ;; Major modes (package! coffee-mode :pin "35a41c7d8233eac0b267d9593e67fb8b6235e134") -(package! js2-mode :pin "ffb70990c1a4d4616034cb810b4ce36953aecb47") +(package! js2-mode :pin "f7816bdd3e8e84ed1d64b6a13c9ba488363b7e91") (package! rjsx-mode :pin "b697fe4d92cc84fa99a7bcb476f815935ea0d919") (package! typescript-mode :pin "54f14c482701c4f937bf51469f70812624e07f87") From 1b6b122317c7245dd519e05bb8a8e1d535d1bed1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 10 Dec 2020 16:14:05 -0500 Subject: [PATCH 012/183] Bump :tools magit magit/magit@2e0c697 -> magit/magit@acfe22a magit/forge@844aa6d -> magit/forge@953764d Fixes odd errors on magit-status --- 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 ea5723419..e74d9c056 100644 --- a/modules/tools/magit/packages.el +++ b/modules/tools/magit/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/magit/packages.el -(when (package! magit :pin "2e0c697188ca728c240b5aa677f4a5e853692b6e") +(when (package! magit :pin "acfe22ab60a56c61aae3ca6d4f2b7b826fe3b071") (when (featurep! +forge) - (package! forge :pin "844aa6d52792dd56a14f1759312c96a3de9b988e")) + (package! forge :pin "953764d2bb57b6bbaec4a2048722050fd15732db")) (package! magit-gitflow :pin "cc41b561ec6eea947fe9a176349fb4f771ed865b") (package! magit-todos :pin "78d24cf419138b543460f40509c8c1a168b52ca0") (package! github-review :pin "db723740e02348c0760407e532ad667ef89210ec")) From 55e90f064f8639ad69150230089ee1e1aa1e4f0c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 11 Dec 2020 01:41:38 -0500 Subject: [PATCH 013/183] Load gcmh-mode a little sooner Ensures it is loaded in time when files are loaded directly from the terminal. --- core/core.el | 2 +- modules/tools/lsp/config.el | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/core/core.el b/core/core.el index 961f82733..429289344 100644 --- a/core/core.el +++ b/core/core.el @@ -612,7 +612,7 @@ to least)." (eval-after-load 'straight '(doom-initialize-packages)) ;; Bootstrap our GC manager - (add-hook 'doom-first-input-hook #'gcmh-mode) + (add-hook 'doom-first-buffer-hook #'gcmh-mode) ;; Bootstrap the interactive session (add-hook 'after-change-major-mode-hook #'doom-run-local-var-hooks-h) diff --git a/modules/tools/lsp/config.el b/modules/tools/lsp/config.el index c105ef365..c09e1c050 100644 --- a/modules/tools/lsp/config.el +++ b/modules/tools/lsp/config.el @@ -41,8 +41,6 @@ killing and opening many LSP/eglot-powered buffers.") ;; GC strategy, so we modify its variables rather than ;; `gc-cons-threshold' directly. (setq-default gcmh-high-cons-threshold (* 2 +lsp--default-gcmh-high-cons-threshold)) - (unless (bound-and-true-p gcmh-mode) - (gcmh-mode +1)) (gcmh-set-high-threshold) (setq +lsp--optimization-init-p t)))) From f0a5d454c56117c7fba0910a2bb777413f9480b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Fri, 11 Dec 2020 15:48:43 +0400 Subject: [PATCH 014/183] Bind useful magit-file-dispatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to this blog post for teaching me about it: https://emacsredux.com/blog/2020/12/10/essential-magit-file-commands/ Signed-off-by: Marc-André Lureau --- modules/config/default/+emacs-bindings.el | 1 + modules/config/default/+evil-bindings.el | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index d58560566..e1a864449 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -307,6 +307,7 @@ :desc "Jump to previous hunk" "p" #'git-gutter:previous-hunk) (:when (featurep! :tools magit) :desc "Magit dispatch" "/" #'magit-dispatch + :desc "Magit file dispatch" "." #'magit-file-dispatch :desc "Forge dispatch" "'" #'forge-dispatch :desc "Magit status" "g" #'magit-status :desc "Magit status here" "G" #'magit-status-here diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index d7d82add6..4968999aa 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -411,6 +411,7 @@ :desc "Jump to previous hunk" "[" #'git-gutter:previous-hunk) (:when (featurep! :tools magit) :desc "Magit dispatch" "/" #'magit-dispatch + :desc "Magit file dispatch" "." #'magit-file-dispatch :desc "Forge dispatch" "'" #'forge-dispatch :desc "Magit switch branch" "b" #'magit-branch-checkout :desc "Magit status" "g" #'magit-status From a3b8be52a875f43c7aaf97faa3fb5ace1dba0a50 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 11 Dec 2020 01:42:21 -0500 Subject: [PATCH 015/183] Improve doom/help-packages + Cache package list + Show "generating package list" message the first time (better ux) + Display location of package files in package information + Turn links/file paths into buttons + Add link to module readmes (if any) Mentioned in #4406 --- core/autoload/help.el | 141 ++++++++++++++++++++++++++++-------------- 1 file changed, 94 insertions(+), 47 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index a292937ce..1a2980041 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -381,25 +381,33 @@ current file is in, or d) the module associated with the current major mode (see ;; ;;; `doom/help-packages' -(defun doom--help-package-insert-button (label path &optional regexp) - (declare (indent defun)) - (insert-text-button - (string-trim label) - 'face 'link - 'follow-link t - 'action - `(lambda (_) - (unless (file-exists-p ,path) - (user-error "Module doesn't exist")) - (when (window-dedicated-p) - (other-window 1)) - (let ((buffer (find-file ,path))) - (when ,(stringp regexp) - (with-current-buffer buffer - (goto-char (point-min)) - (if (re-search-forward ,regexp nil t) - (recenter) - (message "Couldn't find the config block")))))))) +(defun doom--help-insert-button (label &optional path) + (cl-destructuring-bind (uri . qs) + (let ((parts (split-string label "::" t))) + (cons (string-trim (car parts)) + (string-join (cdr parts) "::"))) + (let ((path (or path label))) + (insert-text-button + uri + 'face 'link + 'follow-link t + 'action + (lambda (_) + (when (window-dedicated-p) + (other-window 1)) + (pcase (cond ((string-match-p "^https?://" qs) 'url) + ('file)) + ((or `file `nil) + (unless (file-exists-p path) + (user-error "Path does not exist: %S" path)) + (let ((buffer (or (get-file-buffer path) + (find-file path)))) + (when qs + (with-current-buffer buffer + (goto-char (point-min)) + (re-search-forward qs) + (recenter))))) + (`url (browse-url uri)))))))) (defun doom--help-package-configs (package) (let ((default-directory doom-emacs-dir)) @@ -413,6 +421,7 @@ current file is in, or d) the module associated with the current major mode (see ":(exclude)*.org")) "\n" t))) +(defvar doom--help-packages-list nil) ;;;###autoload (defun doom/help-packages (package) "Like `describe-package', but for packages installed by Doom modules. @@ -427,12 +436,18 @@ If prefix arg is present, refresh the cache." (require 'finder-inf nil t) (require 'package) (require 'straight) - (let ((packages (delete-dups - (append (mapcar #'car package-alist) - (mapcar #'car package--builtins) - (mapcar #'intern (hash-table-keys straight--build-cache)) - (mapcar #'car (doom-package-list 'all)) - nil)))) + (let ((packages + (if (and doom--help-packages-list (null current-prefix-arg)) + doom--help-packages-list + (message "Generating packages list for the first time...") + (sit-for 0.1) + (setq doom--help-packages-list + (delete-dups + (append (mapcar #'car package-alist) + (mapcar #'car package--builtins) + (mapcar #'intern (hash-table-keys straight--build-cache)) + (mapcar #'car (doom-package-list 'all)) + nil)))))) (unless (memq guess packages) (setq guess nil)) (list @@ -440,9 +455,10 @@ If prefix arg is present, refresh the cache." (completing-read (if guess (format "Select Doom package to search for (default %s): " guess) - "Describe Doom package: ") + (format "Describe Doom package (%d): " (length packages))) packages nil t nil nil (if guess (symbol-name guess)))))))) + ;; TODO Refactor me. (require 'core-packages) (doom-initialize-packages) (if (or (package-desc-p package) @@ -477,20 +493,39 @@ If prefix arg is present, refresh the cache." "unpinned") "\n") (package--print-help-section "Build") - (insert (let ((default-directory (straight--repos-dir (symbol-name package)))) - (cdr - (doom-call-process "git" "log" "-1" "--format=%D %h %ci"))) - "\n") + (let ((default-directory (straight--repos-dir (symbol-name package)))) + (insert (cdr (doom-call-process "git" "log" "-1" "--format=%D %h %ci")) + "\n" indent)) + (package--print-help-section "Build location") + (let ((build-dir (straight--build-dir (symbol-name package)))) + (if (file-exists-p build-dir) + (doom--help-insert-button (abbreviate-file-name build-dir)) + (insert "n/a"))) + (insert "\n" indent) + (package--print-help-section "Repo location") + (let ((repo-dir (straight--repos-dir (symbol-name package)))) + (if (file-exists-p repo-dir) + (doom--help-insert-button (abbreviate-file-name repo-dir)) + (insert "n/a")) + (insert "\n")) (let ((recipe (doom-package-build-recipe package))) - (insert (format! "%s\n" - (indent 13 - (string-trim (pp-to-string recipe))))) - + (package--print-help-section "Recipe") + (insert (format "%s\n" (string-trim (pp-to-string recipe)))) (package--print-help-section "Homepage") - (insert (doom--package-url package)))) - (`elpa (insert "[M]ELPA " (doom--package-url package))) - (`builtin (insert "Built-in")) - (`other (insert + (doom--help-insert-button (doom--package-url package))) + (insert "\n" indent)) + (`elpa (insert "[M]ELPA ") + (doom--help-insert-button (doom--package-url package)) + (package--print-help-section "Location") + (doom--help-insert-button + (abbreviate-file-name + (file-name-directory (locate-library (symbol-name package)))))) + (`builtin (insert "Built-in\n") + (package--print-help-section "Location") + (doom--help-insert-button + (abbreviate-file-name + (file-name-directory (locate-library (symbol-name package)))))) + (`other (doom--help-insert-button (abbreviate-file-name (or (symbol-file package) (locate-library (symbol-name package)))))) @@ -506,14 +541,24 @@ If prefix arg is present, refresh the cache." (package--print-help-section "Modules") (insert "Declared by the following Doom modules:\n") (dolist (m modules) - (insert indent) - (doom--help-package-insert-button - (format "%s %s" (car m) (or (cdr m) "")) - (pcase (car m) - (:core doom-core-dir) - (:private doom-private-dir) - (category (doom-module-path category (cdr m))))) - (insert "\n"))) + (let* ((module-path (pcase (car m) + (:core doom-core-dir) + (:private doom-private-dir) + (category (doom-module-path category (cdr m))))) + (readme-path (expand-file-name "README.org" module-path))) + (insert indent) + (doom--help-insert-button + (format "%s %s" (car m) (or (cdr m) "")) + module-path) + (insert " (") + (if (file-exists-p readme-path) + (doom--help-insert-button + "readme" + (expand-file-name + "README.org" + readme-path)) + (insert "no readme")) + (insert ")\n")))) (package--print-help-section "Configs") (insert "This package is configured in the following locations:") @@ -582,7 +627,9 @@ If prefix arg is present, refresh the cache." (format "%s.el" package)))) (_ (plist-get plist :url)))))) ((and (require 'package nil t) - (or package-archive-contents (doom-refresh-packages-maybe)) + (or package-archive-contents + (progn (package-refresh-contents) + package-archive-contents)) (pcase (package-desc-archive (cadr (assq package package-archive-contents))) ("org" "https://orgmode.org") ((or "melpa" "melpa-mirror") From 96d7e50f3e1a6b95889f34ae07601af9c8b14fd9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 11 Dec 2020 01:44:41 -0500 Subject: [PATCH 016/183] Distinguish from "C-i" --- core/core-keybinds.el | 9 +++++++++ modules/editor/evil/config.el | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/core/core-keybinds.el b/core/core-keybinds.el index c2ed788c7..bfeb54667 100644 --- a/core/core-keybinds.el +++ b/core/core-keybinds.el @@ -39,6 +39,15 @@ and Emacs states, and for non-evil users.") (setq w32-lwindow-modifier 'super w32-rwindow-modifier 'super))) +;; HACK Fixes Emacs' disturbing inability to distinguish C-i from TAB. +(define-key key-translation-map [?\C-i] + (cmd! (if (and (not (cl-position 'tab (this-single-command-raw-keys))) + (not (cl-position 'kp-tab (this-single-command-raw-keys))) + (display-graphic-p)) + [C-i] [?\C-i]))) +;; However, ensure falls back to the old keybind if it has no binding. +(global-set-key [C-i] [?\C-i]) + ;; ;;; Universal, non-nuclear escape diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index f8f90e37c..ef7e38a93 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -20,7 +20,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-g-bindings t) -(defvar evil-want-C-i-jump (or (daemonp) (display-graphic-p))) +(defvar evil-want-C-i-jump nil) (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) @@ -419,6 +419,8 @@ directives. By default, this only recognizes C directives.") ;; zu{q,w} - undo last marking (map! :v "@" #'+evil:apply-macro + :m [C-i] #'evil-jump-forward + :m [tab] #'evil-jump-item ;; implement dictionary keybinds ;; evil already defines 'z=' to `ispell-word' = correct word at point From 2c646df0279091eb1ad32196ac93ff172c067997 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 11 Dec 2020 02:12:56 -0500 Subject: [PATCH 017/183] Initialize more straight state in doom-initialize-packages May address #3172 and some issues with certain files failing to byte-compile because certain dependencies were missing at compile-time. --- core/core-packages.el | 50 ++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index bd2e916c5..9e9440d22 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -187,28 +187,34 @@ processed." (error "Failed to initialize package.el"))) (when (or force-p (null doom-packages)) (doom-log "Initializing straight.el") - (or (setq doom-disabled-packages nil - doom-packages (doom-package-list)) - (error "Failed to read any packages")) - (dolist (package doom-packages) - (cl-destructuring-bind - (name &key recipe disable ignore shadow &allow-other-keys) package - (unless ignore - (if disable - (cl-pushnew name doom-disabled-packages) - (when shadow - (straight-override-recipe (cons shadow '(:local-repo nil))) - (let ((site-load-path (copy-sequence doom--initial-load-path)) - lib) - (while (setq - lib (locate-library (concat (symbol-name shadow) ".el") - nil site-load-path)) - (let ((lib (directory-file-name (file-name-directory lib)))) - (setq site-load-path (delete lib site-load-path) - load-path (delete lib load-path)))))) - (when recipe - (straight-override-recipe (cons name recipe))) - (straight-register-package name))))))) + (setq doom-disabled-packages nil + doom-packages (doom-package-list)) + (let (loaded) + (dolist (package doom-packages) + (cl-destructuring-bind + (name &key recipe disable ignore shadow &allow-other-keys) package + (unless ignore + (if disable + (cl-pushnew name doom-disabled-packages) + (when shadow + (straight-override-recipe (cons shadow '(:local-repo nil))) + (let ((site-load-path (copy-sequence doom--initial-load-path)) + lib) + (while (setq + lib (locate-library (concat (symbol-name shadow) ".el") + nil site-load-path)) + (let ((lib (directory-file-name (file-name-directory lib)))) + (setq site-load-path (delete lib site-load-path) + load-path (delete lib load-path)))))) + (when recipe + (straight-override-recipe (cons name recipe))) + (dolist (pkg (cons name (straight--get-dependencies name))) + (unless (memq pkg loaded) + (push pkg loaded) + (straight-register-package pkg) + (let ((pkg-name (symbol-name pkg))) + (add-to-list 'load-path (directory-file-name (straight--build-dir pkg-name))) + (straight--load-package-autoloads pkg-name))))))))))) ;; From 863063b60d016b394e06d0dbaeb5a0007fe8e5fa Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 11 Dec 2020 05:01:33 -0500 Subject: [PATCH 018/183] Defer internal help & help-mode packages To simplify load order so users can easily modify help-mode-map after evil-collection has. e.g. (map! :after help :map help-mode-map :n "C-o" nil) --- modules/editor/evil/init.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/editor/evil/init.el b/modules/editor/evil/init.el index b309b0f74..f9d65e816 100644 --- a/modules/editor/evil/init.el +++ b/modules/editor/evil/init.el @@ -37,7 +37,6 @@ elisp-mode ert free-keys - help helm indent image @@ -263,10 +262,15 @@ and complains if a module is loaded too early (during startup)." "q" #'kill-current-buffer "d" #'process-menu-delete-process) - (mapc #'+evil-collection-init '(comint custom help))) + (mapc #'+evil-collection-init '(comint custom))) ;; ...or on first invokation of their associated major/minor modes. (after! evil + ;; Emacs loads these two packages immediately, at startup, which needlessly + ;; convolutes load order for evil-collection-help. + (defer-feature! help help-mode) + (defer-feature! help-mode help-mode) + (add-transient-hook! 'Buffer-menu-mode (+evil-collection-init '(buff-menu "buff-menu"))) (add-transient-hook! 'image-mode From 07db84bfe266408a4b9acf8990d1511d6d6f43fb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 11 Dec 2020 05:03:42 -0500 Subject: [PATCH 019/183] Don't chase symlinks This should make more exotic symlink config setups viable, but should also speed up a few internal operations. There are too many possible symlink configurations to support them all, however. --- core/core-modules.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/core-modules.el b/core/core-modules.el index 6a1f776b2..2b22e25df 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -203,7 +203,7 @@ This doesn't require modules to be enabled. For enabled modules us for default-directory in doom-modules-dirs for path = (concat category "/" module "/" file) if (file-exists-p path) - return (file-truename path))) + return (expand-file-name path))) (defun doom-module-from-path (&optional path enabled-only) "Returns a cons cell (CATEGORY . MODULE) derived from PATH (a file path). @@ -218,7 +218,7 @@ If ENABLED-ONLY, return nil if the containing module isn't enabled." (ignore-errors (doom-module-from-path (file!)))) (let* ((file-name-handler-alist nil) - (path (file-truename (or path (file!))))) + (path (expand-file-name (or path (file!))))) (save-match-data (cond ((string-match "/modules/\\([^/]+\\)/\\([^/]+\\)\\(?:/.*\\)?$" path) (when-let* ((category (doom-keyword-intern (match-string 1 path))) @@ -226,9 +226,11 @@ If ENABLED-ONLY, return nil if the containing module isn't enabled." (and (or (null enabled-only) (doom-module-p category module)) (cons category module)))) - ((file-in-directory-p path doom-core-dir) + ((or (string-match-p (concat "^" (regexp-quote doom-core-dir)) path) + (file-in-directory-p path doom-core-dir)) (cons :core (intern (file-name-base path)))) - ((file-in-directory-p path doom-private-dir) + ((or (string-match-p (concat "^" (regexp-quote doom-private-dir)) path) + (file-in-directory-p path doom-private-dir)) (cons :private (intern (file-name-base path))))))))) (defun doom-module-load-path (&optional module-dirs) From 3c8a2a655fcab29049c03c5764eb3707563a41f8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 11 Dec 2020 15:03:55 -0500 Subject: [PATCH 020/183] Fix envvar file encoding for Windows users --- core/cli/env.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cli/env.el b/core/cli/env.el index 9467858bd..4fcb84b05 100644 --- a/core/cli/env.el +++ b/core/cli/env.el @@ -92,7 +92,7 @@ default, on Linux, this is '$SHELL -ic /usr/bin/env'. Variables in (process-environment doom--initial-process-environment)) (when (or force-p (not (file-exists-p env-file))) (with-temp-file env-file - (setq-local coding-system-for-write 'utf-8) + (setq-local coding-system-for-write 'utf-8-unix) (print! (start "%s envvars file at %S") (if (file-exists-p env-file) "Regenerating" @@ -104,7 +104,7 @@ default, on Linux, this is '$SHELL -ic /usr/bin/env'. Variables in (goto-char (point-min)) (insert (concat - "# -*- mode: sh -*-\n" + "# -*- mode: sh; coding: utf-8-unix -*-\n" "# ---------------------------------------------------------------------------\n" "# This file was auto-generated by `doom env'. It contains a list of environment\n" "# variables scraped from your default shell (excluding variables blacklisted\n" From 2772ca8e70996f704e41936b55bd0957d416739a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 11 Dec 2020 15:45:06 -0500 Subject: [PATCH 021/183] Conditionally switch to insert mode on snippet expansion If already in insert (or emacs) state, don't switch mode when expanding a yasnippet snippet. --- modules/editor/snippets/autoload/snippets.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/editor/snippets/autoload/snippets.el b/modules/editor/snippets/autoload/snippets.el index 1a651e6d2..90468383e 100644 --- a/modules/editor/snippets/autoload/snippets.el +++ b/modules/editor/snippets/autoload/snippets.el @@ -312,5 +312,7 @@ is." (defun region-end () evil-visual-end)) (funcall orig-fn no-condition))) (when (and (bound-and-true-p evil-local-mode) + (not (or (evil-emacs-state-p) + (evil-insert-state-p))) (yas-active-snippets)) (evil-insert-state +1))) From 8edabbecfa88f3f72bc52182531ca31a13a0ddbe Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 11 Dec 2020 16:59:47 -0500 Subject: [PATCH 022/183] Add kbd! alias for general-simulate-key macro --- core/core-lib.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/core-lib.el b/core/core-lib.el index 51bd1b596..a6035dba0 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -228,6 +228,8 @@ aliases." :docstring ,docstring ,@branches))) +(defalias 'kbd! 'general-simulate-key) + ;; For backwards compatibility (defalias 'λ! 'cmd!) (defalias 'λ!! 'cmd!!) From d149c59d2e6c55ee3d681bf82d7b7c2d3cd8f1e1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 11 Dec 2020 17:36:12 -0500 Subject: [PATCH 023/183] Add emacs mode checks to insert mode checks This is to accommodate users who default to emacs mode, rather than insert mode. The two are also very alike, so many of these checks should apply to both (almost) equally. --- modules/checkers/spell/config.el | 5 ++++- modules/editor/evil/autoload/advice.el | 6 ++++-- modules/emacs/vc/config.el | 1 + modules/lang/org/autoload/org.el | 6 ++++-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/modules/checkers/spell/config.el b/modules/checkers/spell/config.el index b28bc4b05..b2eb5935a 100644 --- a/modules/checkers/spell/config.el +++ b/modules/checkers/spell/config.el @@ -199,7 +199,10 @@ e.g. proselint and langtool." (add-hook 'flyspell-mode-hook #'+spell-init-flyspell-predicate-h) (let ((flyspell-correct - (cmds! (and (not (or mark-active (ignore-errors (evil-insert-state-p)))) + (cmds! (and (not mark-active) + (not (and (bound-and-true-p evil-local-mode) + (or (evil-insert-state-p) + (evil-emacs-state-p)))) (memq 'flyspell-incorrect (face-at-point nil t))) #'flyspell-correct-at-point))) (map! :map flyspell-mouse-map diff --git a/modules/editor/evil/autoload/advice.el b/modules/editor/evil/autoload/advice.el index 51d0d3a9f..e904e4f56 100644 --- a/modules/editor/evil/autoload/advice.el +++ b/modules/editor/evil/autoload/advice.el @@ -121,7 +121,8 @@ more information on modifiers." (defun +evil--insert-newline-below-and-respect-comments-a (orig-fn count) (if (or (not +evil-want-o/O-to-continue-comments) (not (eq this-command 'evil-open-below)) - (evil-insert-state-p)) + (evil-insert-state-p) + (evil-emacs-state-p)) (funcall orig-fn count) (letf! (defun evil-insert-newline-below () (+evil--insert-newline)) (let ((evil-auto-indent evil-auto-indent)) @@ -131,7 +132,8 @@ more information on modifiers." (defun +evil--insert-newline-above-and-respect-comments-a (orig-fn count) (if (or (not +evil-want-o/O-to-continue-comments) (not (eq this-command 'evil-open-above)) - (evil-insert-state-p)) + (evil-insert-state-p) + (evil-emacs-state-p)) (funcall orig-fn count) (letf! (defun evil-insert-newline-above () (+evil--insert-newline 'above)) (let ((evil-auto-indent evil-auto-indent)) diff --git a/modules/emacs/vc/config.el b/modules/emacs/vc/config.el index a358955dd..8cbf746de 100644 --- a/modules/emacs/vc/config.el +++ b/modules/emacs/vc/config.el @@ -93,6 +93,7 @@ info in the `header-line-format' is a more visible indicator." "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) + (not (evil-emacs-state-p)) (bobp) (eolp)) (evil-insert-state))))) diff --git a/modules/lang/org/autoload/org.el b/modules/lang/org/autoload/org.el index 385da9c66..ad2462b0a 100644 --- a/modules/lang/org/autoload/org.el +++ b/modules/lang/org/autoload/org.el @@ -387,7 +387,8 @@ another level of headings on each invocation." Made for `org-tab-first-hook' in evil-mode." (interactive) (cond ((not (and (bound-and-true-p evil-local-mode) - (evil-insert-state-p))) + (or (evil-insert-state-p) + (evil-emacs-state-p)))) nil) ((org-at-item-p) (if (eq this-command 'org-shifttab) @@ -424,7 +425,8 @@ Made for `org-tab-first-hook'." ;; in the few cases where it does. (yas-indent-line 'fixed)) (cond ((and (or (not (bound-and-true-p evil-local-mode)) - (evil-insert-state-p)) + (evil-insert-state-p) + (evil-emacs-state-p)) (yas--templates-for-key-at-point)) (yas-expand) t) From 10f1b8040a2088161679f6937f16e681e8dc6854 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 11 Dec 2020 17:38:18 -0500 Subject: [PATCH 024/183] Remove extraneous newline in doom/help-packages output --- core/autoload/help.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 1a2980041..4f95ed11a 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -512,8 +512,7 @@ If prefix arg is present, refresh the cache." (package--print-help-section "Recipe") (insert (format "%s\n" (string-trim (pp-to-string recipe)))) (package--print-help-section "Homepage") - (doom--help-insert-button (doom--package-url package))) - (insert "\n" indent)) + (doom--help-insert-button (doom--package-url package)))) (`elpa (insert "[M]ELPA ") (doom--help-insert-button (doom--package-url package)) (package--print-help-section "Location") From 4281a772b1f7692ca2f918914e962efec973a416 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 11 Dec 2020 17:38:59 -0500 Subject: [PATCH 025/183] Revise core lib docstrings for clarity --- core/core-lib.el | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index a6035dba0..2a43c2407 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -67,8 +67,8 @@ list is returned as-is." (defmacro doom-log (format-string &rest args) "Log to *Messages* if `doom-debug-p' is on. -Does not interrupt the minibuffer if it is in use, but still logs to *Messages*. -Accepts the same arguments as `message'." +Does not display text in echo area, but still logs to *Messages*. Accepts the +same arguments as `message'." `(when doom-debug-p (let ((inhibit-message (active-minibuffer-window))) (message @@ -85,7 +85,7 @@ Accepts the same arguments as `message'." (defalias 'doom-partial #'apply-partially) (defun doom-rpartial (fn &rest args) - "Return a function that is a partial application of FUN to right-hand ARGS. + "Return a partial application of FUN to right-hand ARGS. 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 @@ -123,6 +123,7 @@ at the values with which this function was called." (defmacro letf! (bindings &rest body) "Temporarily rebind function and macros in BODY. +Intended as a simpler version of `cl-letf' and `cl-macrolet'. BINDINGS is either a) a list of, or a single, `defun' or `defmacro'-ish form, or b) a list of (PLACE VALUE) bindings as `cl-letf*' would accept. @@ -157,7 +158,8 @@ the same name, for use with `funcall' or `apply'. ARGLIST and BODY are as in "Run FORMS without generating any output. This silences calls to `message', `load', `write-region' and anything that -writes to `standard-output'." +writes to `standard-output'. In interactive sessions this won't suppress writing +to *Messages*, only inhibit output in the echo area." `(if doom-debug-p (progn ,@forms) ,(if doom-interactive-p @@ -193,21 +195,24 @@ See `eval-if!' for details on this macro's purpose." ;;; Closure factories (defmacro fn! (arglist &rest body) - "Expands to (cl-function (lambda ARGLIST BODY...))" + "Returns (cl-function (lambda ARGLIST BODY...)) +The closure is wrapped in `cl-function', meaning ARGLIST will accept anything +`cl-defun' will. " (declare (indent defun) (doc-string 1) (pure t) (side-effect-free t)) `(cl-function (lambda ,arglist ,@body))) (defmacro cmd! (&rest body) - "Expands to (lambda () (interactive) ,@body). + "Returns (lambda () (interactive) ,@body) A factory for quickly producing interaction commands, particularly for keybinds or aliases." (declare (doc-string 1) (pure t) (side-effect-free t)) `(lambda (&rest _) (interactive) ,@body)) (defmacro cmd!! (command &optional prefix-arg &rest args) - "Expands to a closure that interactively calls COMMAND with ARGS. -A factory for quickly producing interactive, prefixed commands for keybinds or -aliases." + "Returns a closure that interactively calls COMMAND with ARGS and PREFIX-ARG. +Like `cmd!', but allows you to change `current-prefix-arg' or pass arguments to +COMMAND. This macro is meant to be used as a target for keybinds (e.g. with +`define-key' or `map!')." (declare (doc-string 1) (pure t) (side-effect-free t)) `(lambda (arg &rest _) (interactive "P") (let ((current-prefix-arg (or ,prefix-arg arg))) @@ -217,7 +222,20 @@ aliases." ,command ,@args)))) (defmacro cmds! (&rest branches) - "Expands to a `menu-item' dispatcher for keybinds." + "Returns a dispatcher that runs the a command in BRANCHES. +Meant to be used as a target for keybinds (e.g. with `define-key' or `map!'). + +BRANCHES is a flat list of CONDITION COMMAND pairs. CONDITION is a lisp form +that is evaluated when (and each time) the dispatcher is invoked. If it returns +non-nil, COMMAND is invoked, otherwise it falls through to the next pair. + +The last element of BRANCHES can be a COMMANd with no CONDITION. This acts as +the fallback if all other conditions fail. + +Otherwise, Emacs will fall through the keybind and search the next keymap for a +keybind (as if this keybind never existed). + +See `general-key-dispatch' for what other arguments it accepts in BRANCHES." (declare (doc-string 1)) (let ((docstring (if (stringp (car branches)) (pop branches) "")) fallback) From 1fba2ea303f66f739d3bfed774d0deda6b19c2ef Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 11 Dec 2020 17:39:50 -0500 Subject: [PATCH 026/183] Bump :emacs vc magit/magit@2fb3bf7 -> magit/magit@acfe22a --- modules/emacs/vc/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/emacs/vc/packages.el b/modules/emacs/vc/packages.el index 02c56d0d0..7bab0e188 100644 --- a/modules/emacs/vc/packages.el +++ b/modules/emacs/vc/packages.el @@ -6,7 +6,7 @@ (package! smerge-mode :built-in t) (package! browse-at-remote :pin "fadf99d6d8e891f3b112e36c772e0eea0b9bc7f2") -(package! git-commit :pin "2fb3bf782ccf5652b98f8de989f014749473eacf") +(package! git-commit :pin "acfe22ab60a56c61aae3ca6d4f2b7b826fe3b071") (package! git-timemachine :pin "8d675750e921a047707fcdc36d84f8439b19a907") (package! gitconfig-mode :pin "55468314a5f6b77d2c96be62c7005ac94545e217") (package! gitignore-mode :pin "55468314a5f6b77d2c96be62c7005ac94545e217") From 7053bfbeb7843986d066981062e695d3dd5dce06 Mon Sep 17 00:00:00 2001 From: icmor <54549777+icmor@users.noreply.github.com> Date: Sat, 12 Dec 2020 00:55:43 -0500 Subject: [PATCH 027/183] Add "python3" to possible names for the python binary Followed lang/python/config.el which already checks for python3 when setting the python-shell-interpreter. Python version naming is a hot mess: https://www.python.org/dev/peps/pep-0394/ --- modules/lang/python/doctor.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/lang/python/doctor.el b/modules/lang/python/doctor.el index 546df9a8d..d1d2c08e4 100644 --- a/modules/lang/python/doctor.el +++ b/modules/lang/python/doctor.el @@ -4,10 +4,12 @@ (featurep! :tools lsp)) "This module requires (:tools lsp)") -(if (not (executable-find "python")) +(if (not (or (executable-find "python") + (executable-find "python3"))) (error! "Couldn't find python in your PATH") (unless (featurep! +lsp) - (unless (zerop (shell-command "python -c 'import setuptools'")) + (unless (or (zerop (shell-command "python -c 'import setuptools'")) + (zerop (shell-command "python3 -c 'import setuptools'"))) (warn! "setuptools wasn't detected, which anaconda-mode requires")))) (when (featurep! +pyenv) From 09f3597069f73b4a2b901156a877dc40172c3db2 Mon Sep 17 00:00:00 2001 From: icmor <54549777+icmor@users.noreply.github.com> Date: Sat, 12 Dec 2020 01:01:45 -0500 Subject: [PATCH 028/183] Update link for nose.el Switched from melpa -> emacsmirror. --- 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 2ae54de86..41b2aafb1 100644 --- a/modules/lang/python/README.org +++ b/modules/lang/python/README.org @@ -36,7 +36,7 @@ Adds Python support to Doom Emacs. + [[https://github.com/pythonic-emacs/anaconda-mode][anaconda-mode]]* + [[https://github.com/Wilfred/pyimport][pyimport]]* + [[https://github.com/paetzke/py-isort.el][py-isort]]* -+ [[https://melpa.org/#/nose][nose]]* ++ [[https://github.com/emacsattic/nose/][nose]]* + [[https://github.com/wbolster/emacs-python-pytest][python-pytest]]* + [[https://github.com/Wilfred/pip-requirements.el][pip-requirements]]* + [[https://github.com/pwalsh/pipenv.el][pipenv]]* From 61135f53740d6dd2fadf70abf50d7014caafd0e1 Mon Sep 17 00:00:00 2001 From: Nikita Bloshchanevich Date: Sat, 12 Dec 2020 12:49:33 +0100 Subject: [PATCH 029/183] Enable `smartparens' for `evil-ex' febf960 introduced a regression, in that it caused `smartparens-mode' to no longer be enabled for `evil-ex'. This is because the latter doesn't call `read--expression', but calls the minibuffer directly instead. Return `doom-init-smartparens-in-minibuffer-maybe-h', enabling `smartparens' for `evil-ex'. The hook responsibly for enabling it in `eval-expression-minibuffer-setup-hook' was renamed to `doom-init-smartparens-in-eval-expression-h', since otherwise the naming would have been awkward. Also explicity enable `smartparens-mode' instead of toggling it. --- core/core-editor.el | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 08db8e25e..357169599 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -505,10 +505,19 @@ files, so we replace calls to `pp' with the much faster `prin1'." (setf (alist-get key sp-message-alist) nil)) (add-hook! 'eval-expression-minibuffer-setup-hook - (defun doom-init-smartparens-in-minibuffer-maybe-h () + (defun doom-init-smartparens-in-eval-expression-h () "Enable `smartparens-mode' in the minibuffer for `eval-expression'. -Only enable it if `smartparens-global-mode' is on." - (when smartparens-global-mode (smartparens-mode)))) +This includes everything that calls `read--expression', e.g. +`edebug-eval-expression' Only enable it if +`smartparens-global-mode' is on." + (when smartparens-global-mode (smartparens-mode +1)))) + (add-hook! 'minibuffer-setup-hook + (defun doom-init-smartparens-in-minibuffer-maybe-h () + "Enable `smartparens' for non-`eval-expression' commands. +Only enable `smartparens-mode' if `smartparens-global-mode' is +on." + (when (and smartparens-global-mode (memq this-command '(evil-ex))) + (smartparens-mode +1)))) ;; You're likely writing lisp in the minibuffer, therefore, disable these ;; quote pairs, which lisps doesn't use for strings: From 621cb60e7565a155a9c752089ce5d5cce20dbef7 Mon Sep 17 00:00:00 2001 From: Nikita Bloshchanevich Date: Sat, 12 Dec 2020 12:41:05 +0100 Subject: [PATCH 030/183] Workaround: fix goto definition on modules `+emacs-lisp-lookup-definition' does not work when browsing the directory of a module, because, due to a possible bug in `counsel', the visited buffer is not immediately visible after calling `counsel-find-file' (unlike with `find-file'). As such, the backend should return `deferred' for that case. See abo-abo/swiper#2752. This should be removed once that PR is merged. --- modules/lang/emacs-lisp/autoload.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/lang/emacs-lisp/autoload.el b/modules/lang/emacs-lisp/autoload.el index b7257add7..d85ec57f6 100644 --- a/modules/lang/emacs-lisp/autoload.el +++ b/modules/lang/emacs-lisp/autoload.el @@ -61,7 +61,9 @@ to a pop up buffer." (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) + ;; FIXME: this is probably a bug in `counsel'. See + ;; https://github.com/abo-abo/swiper/pull/2752. + (progn (doom/help-modules (car module) (cadr module) 'visit-dir) 'deferred) (call-interactively #'elisp-def))) ;;;###autoload From 0d330f7a7e879b6ec49a294c9c6672e6a44eb47e Mon Sep 17 00:00:00 2001 From: Nikita Bloshchanevich Date: Sat, 12 Dec 2020 12:34:32 +0100 Subject: [PATCH 031/183] `doom/help-modules': C-u -> browse directory If called with a C-u prefix, `doom/help-modules' now browses the module's directory instead of opening its documentation. This exposes the VISIT-DIR argument to `interactive' use. --- core/autoload/help.el | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 4f95ed11a..96b918c53 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -351,13 +351,15 @@ 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 - (mapcar #'intern - (split-string - (completing-read "Describe module: " - (doom--help-modules-list) - nil t nil nil - (doom--help-current-module-str)) - " " t))) + (nconc + (mapcar #'intern + (split-string + (completing-read "Describe module: " + (doom--help-modules-list) + nil t nil nil + (doom--help-current-module-str)) + " " t)) + (list current-prefix-arg))) (cl-check-type category symbol) (cl-check-type module symbol) (cl-destructuring-bind (module-string path) From 784acaa64d892c155c3d7f4c0e85f8fd656f507c Mon Sep 17 00:00:00 2001 From: "M. Yas. Davoodeh" <30480116+Davoodeh@users.noreply.github.com> Date: Sat, 12 Dec 2020 22:10:24 +0330 Subject: [PATCH 032/183] Set ligratures for csharp-mode --- modules/lang/csharp/config.el | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/modules/lang/csharp/config.el b/modules/lang/csharp/config.el index 19345c26c..dff7a683a 100644 --- a/modules/lang/csharp/config.el +++ b/modules/lang/csharp/config.el @@ -7,6 +7,26 @@ (set-rotate-patterns! 'csharp-mode :symbols '(("public" "protected" "private") ("class" "struct"))) + (set-ligatures! 'csharp-mode + ;; Functional + :lambda "() =>" + ;; Types + :null "null" + :true "true" + :false "false" + :int "int" + :float "float" + :str "string" + :bool "bool" + :list "List" + ;; Flow + :not "!" + :in "in" + :and "&&" + :or "||" + :for "for" + :return "return" + :yield "yield") (sp-local-pair 'csharp-mode "<" ">" :when '(+csharp-sp-point-in-type-p) From d2005ab5dabcc4d474857ebd714b0d023632460e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 11 Dec 2020 17:50:04 -0500 Subject: [PATCH 033/183] docs/api: add cmds! & kbd! demos --- docs/api.org | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/api.org b/docs/api.org index 68375bdcc..05ad88ad6 100644 --- a/docs/api.org +++ b/docs/api.org @@ -20,6 +20,8 @@ It is integrated into Helpful, in Doom. - [[#file-exists-p][file-exists-p!]] - [[#cmd][cmd!]] - [[#cmd-1][cmd!!]] + - [[#cmds][cmds!]] + - [[#kbd][kbd!]] - [[#letenv][letenv!]] - [[#load][load!]] - [[#map][map!]] @@ -263,6 +265,32 @@ Or to create aliases for functions that behave differently: (fset 'org-reset-global-visibility (cmd!! #'org-global-cycle '(4)) #+END_SRC +*** cmds! +#+BEGIN_SRC elisp :eval no +(map! :i [tab] (cmds! (and (featurep! :editor snippets) + (bound-and-true-p yas-minor-mode) + (yas-maybe-expand-abbrev-key-filter 'yas-expand)) + #'yas-expand + (featurep! :completion company +tng) + #'company-indent-or-complete-common) + :m [tab] (cmds! (and (bound-and-true-p yas-minor-mode) + (evil-visual-state-p) + (or (eq evil-visual-selection 'line) + (not (memq (char-after) (list ?\( ?\[ ?\{ ?\} ?\] ?\)))))) + #'yas-insert-snippet + (and (featurep! :editor fold) + (save-excursion (end-of-line) (invisible-p (point)))) + #'+fold/toggle + (fboundp 'evil-jump-item) + #'evil-jump-item)) +#+END_SRC + +*** kbd! +#+BEGIN_SRC elisp :eval no +(map! "," (kbd! "SPC") + ";" (kbd! ":")) +#+END_SRC + *** letenv! #+BEGIN_SRC elisp (letenv! (("SHELL" "/bin/sh")) From 144714e7f5f898b4de096507d6f37e5a311f1e3a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 12 Dec 2020 13:12:34 -0500 Subject: [PATCH 034/183] Add popup rule for flycheck error list --- modules/checkers/syntax/config.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/checkers/syntax/config.el b/modules/checkers/syntax/config.el index 93b7d73da..13b05e6ff 100644 --- a/modules/checkers/syntax/config.el +++ b/modules/checkers/syntax/config.el @@ -24,7 +24,9 @@ ;; Don't commandeer input focus if the error message pops up (happens when ;; tooltips and childframes are disabled). - (set-popup-rule! "^\\*Flycheck error messages\\*" :select nil) + (set-popup-rules! + '(("^\\*Flycheck error messages\\*" :select nil) + ("^\\*Flycheck errors\\*" :size 0.25))) (add-hook! 'doom-escape-hook :append (defun +syntax-check-buffer-h () From c4a0174fe2d02741df73e1ff97fa56b2c3ea2a42 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 12 Dec 2020 13:45:10 -0500 Subject: [PATCH 035/183] ivy-read-action-format-function = ivy-hydra-read-action Makes ivy's C-o dispatching commands easier to see. --- 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 806ede1ef..8f4ee64e6 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -59,6 +59,7 @@ results buffer.") (setq ivy-height 17 ivy-wrap t ivy-fixed-height-minibuffer t + ivy-read-action-format-function #'ivy-hydra-read-action projectile-completion-system 'ivy ;; don't show recent files in switch-buffer ivy-use-virtual-buffers nil From 765b6dcfcab1479c520fcd3ce313fe0f0e45370e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 12 Dec 2020 15:00:30 -0500 Subject: [PATCH 036/183] Unset unused markers In case of overlay leaks. --- modules/completion/ivy/config.el | 1 + modules/editor/evil/autoload/advice.el | 21 ++++++++++---------- modules/tools/lookup/autoload/lookup.el | 26 +++++++++++++------------ 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 8f4ee64e6..e9a09aee0 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -89,6 +89,7 @@ results buffer.") +ivy--origin)) (with-current-buffer (marker-buffer +ivy--origin) (better-jumper-set-jump +ivy--origin))) + (set-marker +ivy--origin nil) (setq +ivy--origin nil))) (after! yasnippet diff --git a/modules/editor/evil/autoload/advice.el b/modules/editor/evil/autoload/advice.el index e904e4f56..7b2300f31 100644 --- a/modules/editor/evil/autoload/advice.el +++ b/modules/editor/evil/autoload/advice.el @@ -190,16 +190,17 @@ From https://github.com/emacs-evil/evil/issues/606" (let* ((count (count-lines beg end)) (count (if (> count 1) (1- count) count)) (fixup-mark (make-marker))) - (dotimes (var count) - (if (and (bolp) (eolp)) - (join-line 1) - (let* ((end (line-beginning-position 3)) - (fill-column (1+ (- end beg)))) - (set-marker fixup-mark (line-end-position)) - (fill-region-as-paragraph beg end nil t) - (goto-char fixup-mark) - (fixup-whitespace)))) - (set-marker fixup-mark nil))) + (unwind-protect + (dotimes (var count) + (if (and (bolp) (eolp)) + (join-line 1) + (let* ((end (line-beginning-position 3)) + (fill-column (1+ (- end beg)))) + (set-marker fixup-mark (line-end-position)) + (fill-region-as-paragraph beg end nil t) + (goto-char fixup-mark) + (fixup-whitespace)))) + (set-marker fixup-mark nil)))) ;;;###autoload (defun +evil--fix-dabbrev-in-minibuffer-h () diff --git a/modules/tools/lookup/autoload/lookup.el b/modules/tools/lookup/autoload/lookup.el index dc5b94843..6d529f183 100644 --- a/modules/tools/lookup/autoload/lookup.el +++ b/modules/tools/lookup/autoload/lookup.el @@ -163,18 +163,20 @@ This can be passed nil as its second argument to unset handlers for MODES. e.g. (+lookup--run-handlers handler identifier origin) (user-error "No lookup handler selected")) (run-hook-wrapped handlers #'+lookup--run-handlers identifier origin)))) - (when (cond ((null result) - (message "No lookup handler could find %S" identifier) - nil) - ((markerp result) - (funcall (or display-fn #'switch-to-buffer) - (marker-buffer result)) - (goto-char result) - result) - (result)) - (with-current-buffer (marker-buffer origin) - (better-jumper-set-jump (marker-position origin))) - result))) + (unwind-protect + (when (cond ((null result) + (message "No lookup handler could find %S" identifier) + nil) + ((markerp result) + (funcall (or display-fn #'switch-to-buffer) + (marker-buffer result)) + (goto-char result) + result) + (result)) + (with-current-buffer (marker-buffer origin) + (better-jumper-set-jump (marker-position origin))) + result) + (set-marker origin nil)))) ;; From 89db59769d3f3fd6ead0edd451f7bdeb7398dba2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 12 Dec 2020 15:09:35 -0500 Subject: [PATCH 037/183] Re-enable ivy in evil-ex completion Seems its earlier issues are no longer a problem. --- modules/completion/ivy/config.el | 7 ------- 1 file changed, 7 deletions(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index e9a09aee0..7cf440e41 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -95,13 +95,6 @@ results buffer.") (after! yasnippet (add-hook 'yas-prompt-functions #'+ivy-yas-prompt-fn)) - (defadvice! +ivy--inhibit-completion-in-region-a (orig-fn &rest args) - "`ivy-completion-in-region' struggles with completing certain -evil-ex-specific constructs, so we disable it solely in evil-ex." - :around #'evil-ex - (let ((completion-in-region-function #'completion--in-region)) - (apply orig-fn args))) - (define-key! ivy-minibuffer-map [remap doom/delete-backward-word] #'ivy-backward-kill-word "C-c C-e" #'+ivy/woccur From 6075e6f143c5ebc0aa8d1d534de71a6ede70e670 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 12 Dec 2020 15:10:53 -0500 Subject: [PATCH 038/183] Refactor initialization of package state --- core/core-packages.el | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index 9e9440d22..eb509dfe0 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -189,7 +189,7 @@ processed." (doom-log "Initializing straight.el") (setq doom-disabled-packages nil doom-packages (doom-package-list)) - (let (loaded) + (let (packages) (dolist (package doom-packages) (cl-destructuring-bind (name &key recipe disable ignore shadow &allow-other-keys) package @@ -208,13 +208,12 @@ processed." load-path (delete lib load-path)))))) (when recipe (straight-override-recipe (cons name recipe))) - (dolist (pkg (cons name (straight--get-dependencies name))) - (unless (memq pkg loaded) - (push pkg loaded) - (straight-register-package pkg) - (let ((pkg-name (symbol-name pkg))) - (add-to-list 'load-path (directory-file-name (straight--build-dir pkg-name))) - (straight--load-package-autoloads pkg-name))))))))))) + (appendq! packages (cons name (straight--get-dependencies name))))))) + (dolist (package (cl-delete-duplicates packages :test #'equal)) + (straight-register-package package) + (let ((name (symbol-name package))) + (add-to-list 'load-path (directory-file-name (straight--build-dir name))) + (straight--load-package-autoloads name)))))) ;; From 97d8de81fe37638eeeaaf41193ed83bc4b05efb1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 12 Dec 2020 15:11:34 -0500 Subject: [PATCH 039/183] Remove defunct straight-fix-org setting It was removed upstream. --- core/core-packages.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index eb509dfe0..d0af30e26 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -99,9 +99,7 @@ uses a straight or package.el command directly).") straight-vc-git-default-clone-depth 1 ;; Prefix declarations are unneeded bulk added to our autoloads file. Best ;; we don't have to deal with them at all. - autoload-compute-prefixes nil - ;; We handle it ourselves - straight-fix-org nil) + autoload-compute-prefixes nil) (with-eval-after-load 'straight ;; `let-alist' is built into Emacs 26 and onwards From 20c873d45bea88471fec5a506d6d163bdac6c479 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 12 Dec 2020 15:14:00 -0500 Subject: [PATCH 040/183] Update flycheck on idle-change I get too many "bug reports" about flycheck not doing this. Too much hassle to uphold a misunderstood default. --- modules/checkers/syntax/config.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/checkers/syntax/config.el b/modules/checkers/syntax/config.el index 13b05e6ff..e535ab226 100644 --- a/modules/checkers/syntax/config.el +++ b/modules/checkers/syntax/config.el @@ -9,10 +9,10 @@ :config (setq flycheck-emacs-lisp-load-path 'inherit) - ;; Check only when saving or opening files. Newline & idle checks are a mote - ;; excessive and can catch code in an incomplete state, producing false - ;; positives, so we removed them. - (setq flycheck-check-syntax-automatically '(save mode-enabled idle-buffer-switch)) + ;; Rerunning checks on every newline is a mote excessive. + (delq 'new-line flycheck-check-syntax-automatically) + ;; And don't recheck on idle as often + (setq flycheck-idle-change-delay 1.0) ;; For the above functionality, check syntax in a buffer that you switched to ;; only briefly. This allows "refreshing" the syntax check state for several From 09ac5a48c129aa24e6206e54a2dd14855d6826b9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 12 Dec 2020 15:38:29 -0500 Subject: [PATCH 041/183] Add org-export-async-debug to debug vars --- 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 d52892bc4..7adb082f9 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -1128,6 +1128,8 @@ compelling reason, so..." (run-hooks 'org-load-hook)) :config + (add-to-list 'doom-debug-variables 'org-export-async-debug) + (set-company-backend! 'org-mode 'company-capf 'company-dabbrev) (set-eval-handler! 'org-mode #'+org-eval-handler) (set-lookup-handlers! 'org-mode From eea4709354bf78571c09a1cf49b3c70182bd14f4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 12 Dec 2020 15:54:46 -0500 Subject: [PATCH 042/183] cli: run post-script indirectly Fixes cases where /tmp is mounted with noexec. --- bin/doom | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/doom b/bin/doom index 867e3a36c..8dc0fcc84 100755 --- a/bin/doom +++ b/bin/doom @@ -3,7 +3,7 @@ :; case "$EMACS" in *term*) EMACS=emacs ;; *) EMACS="${EMACS:-emacs}" ;; esac :; $EMACS --version >/dev/null 2>&1 || { >&2 echo "Can't find emacs in your PATH"; exit 1; } :; $EMACS --no-site-file --script "$0" -- "$@" || __DOOMCODE=$? -:; [ "${__DOOMCODE:-0}" -eq 128 ] && { "`$EMACS -Q --batch --eval '(princ temporary-file-directory)'`/doom.sh" "$0" "$@" && true; __DOOMCODE=$?; } +:; [ "${__DOOMCODE:-0}" -eq 128 ] && { sh "`$EMACS -Q --batch --eval '(princ temporary-file-directory)'`/doom.sh" "$0" "$@" && true; __DOOMCODE=$?; } :; exit $__DOOMCODE ;; The garbage collector isn't as important during CLI ops. A higher threshold @@ -125,7 +125,7 @@ (shell-quote-argument (match-string 2 env))))) (format "PATH=\"%s%s$PATH\" \\\n" (concat doom-emacs-dir "bin/") path-separator) "_postscript $@\n")) - (set-file-modes script #o700)) + (set-file-modes script #o600)) ;; Error code 128 is special: it means run the post-script after this ;; session ends. 128) From 5d3496575c402405f75ca47e8503ee4a74a5402c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 12 Dec 2020 22:54:48 -0500 Subject: [PATCH 043/183] Fix #4421: masquerade doom/escape as keyboard-quit Or abort-recursive-edit, depending. Some other packages/commands listen for these two (like undo-fu), and by remapping C-g we break those. --- core/core-keybinds.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/core-keybinds.el b/core/core-keybinds.el index bfeb54667..53c2ab47f 100644 --- a/core/core-keybinds.el +++ b/core/core-keybinds.el @@ -77,13 +77,15 @@ all hooks after it are ignored.") (interactive) (cond ((minibuffer-window-active-p (minibuffer-window)) ;; quit the minibuffer if open. + (setq this-command 'abort-recursive-edit) (abort-recursive-edit)) ;; Run all escape hooks. If any returns non-nil, then stop there. ((run-hook-with-args-until-success 'doom-escape-hook)) ;; don't abort macros ((or defining-kbd-macro executing-kbd-macro) nil) ;; Back to the default - ((keyboard-quit)))) + ((setq this-command 'keyboard-quit) + (keyboard-quit)))) (global-set-key [remap keyboard-quit] #'doom/escape) From 930524f3ac9148f60c8411f6516c47deef68aee9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 12 Dec 2020 23:22:00 -0500 Subject: [PATCH 044/183] Apply spell-fu blacklist to derived modes --- modules/checkers/spell/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/checkers/spell/config.el b/modules/checkers/spell/config.el index b2eb5935a..dbeb39b4f 100644 --- a/modules/checkers/spell/config.el +++ b/modules/checkers/spell/config.el @@ -147,7 +147,7 @@ (add-hook! 'spell-fu-mode-hook (defun +spell-init-excluded-faces-h () "Set `spell-fu-faces-exclude' according to `+spell-excluded-faces-alist'." - (when-let (excluded (alist-get major-mode +spell-excluded-faces-alist)) + (when-let (excluded (cdr (cl-find-if #'derived-mode-p +spell-excluded-faces-alist :key #'car))) (setq-local spell-fu-faces-exclude excluded)))) ;; TODO custom `spell-fu-check-range' function to reduce false positives From fc955f4100f0efbfe5b92fed22723e2739c7a16f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 12 Dec 2020 23:23:24 -0500 Subject: [PATCH 045/183] Don't set a default ispell-dictionary May address #4420, #4422, and/or #4407 --- modules/checkers/spell/config.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/checkers/spell/config.el b/modules/checkers/spell/config.el index dbeb39b4f..f72713b26 100644 --- a/modules/checkers/spell/config.el +++ b/modules/checkers/spell/config.el @@ -32,8 +32,6 @@ ispell-extra-args '("--sug-mode=ultra" "--run-together")) - (unless ispell-dictionary - (setq ispell-dictionary "english")) (unless ispell-aspell-dict-dir (setq ispell-aspell-dict-dir (ispell-get-aspell-config-value "dict-dir"))) From 2e61fbbf08675f6e0e6b2715f0768b0deebff504 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 13 Dec 2020 00:19:36 -0500 Subject: [PATCH 046/183] Fix #4407: regression in +markdown-flyspell-word-p Preventing misspelled words from being highlighted. May address #4420 --- modules/lang/markdown/autoload.el | 52 +++++++++++++++++-------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/modules/lang/markdown/autoload.el b/modules/lang/markdown/autoload.el index c4f6b8d8f..81d0185d3 100644 --- a/modules/lang/markdown/autoload.el +++ b/modules/lang/markdown/autoload.el @@ -2,31 +2,37 @@ ;;;###autoload (defun +markdown-flyspell-word-p () - "Return t if `flyspell' should check work before point. + "Return t if `flyspell' should check word before point. -Used for `flyspell-generic-check-word-predicate'. Augments -`markdown-flyspell-check-word-p' to: +Used for `flyspell-generic-check-word-predicate'. Like +`markdown-flyspell-check-word-p', but also: -a) Do spell check in code comments and -b) Inhibit spell check in html markup" - (and (markdown-flyspell-check-word-p) - (save-excursion - (goto-char (1- (point))) - (if (or - ;; Spell check in code comments - (not (and (markdown-code-block-at-point-p) - (markdown--face-p (point) '(font-lock-comment-face)))) - ;; Don't spell check in html markup - (markdown--face-p (point) '(markdown-html-attr-name-face - markdown-html-attr-value-face - markdown-html-tag-name-face))) - (prog1 nil - ;; If flyspell overlay is put, then remove it - (when-let (bounds (bounds-of-thing-at-point 'word)) - (cl-loop for ov in (overlays-in (car bounds) (cdr bounds)) - when (overlay-get ov 'flyspell-overlay) - do (delete-overlay ov)))) - t)))) +a) Performs spell check in code comments and +b) Inhibits spell check in html markup" + (save-excursion + (goto-char (1- (point))) + (if (or (and (markdown-code-block-at-point-p) + (not (or (markdown-text-property-at-point 'markdown-yaml-metadata-section) + (markdown--face-p (point) '(font-lock-comment-face))))) + (markdown-inline-code-at-point-p) + (markdown-in-comment-p) + (markdown--face-p (point) '(markdown-reference-face + markdown-markup-face + markdown-plain-url-face + markdown-inline-code-face + markdown-url-face + markdown-html-attr-name-face + markdown-html-attr-value-face + markdown-html-tag-name-face))) + (prog1 nil + ;; If flyspell overlay is put, then remove it + (let ((bounds (bounds-of-thing-at-point 'word))) + (when bounds + (cl-loop for ov in (overlays-in (car bounds) (cdr bounds)) + when (overlay-get ov 'flyspell-overlay) + do + (delete-overlay ov))))) + t))) ;; From 99a83ca18f21e25fa8c6c914906a07deac83df02 Mon Sep 17 00:00:00 2001 From: Sam Whitlock <433170+samwhitlock@users.noreply.github.com> Date: Sun, 13 Dec 2020 15:36:56 +0100 Subject: [PATCH 047/183] A workaround for formatting org mode If point is in a source block, format that source block. Else don't try to format the buffer. format-all-buffer does not support org mode. --- modules/editor/format/autoload/format.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/editor/format/autoload/format.el b/modules/editor/format/autoload/format.el index 9e1020b50..6565b7c7d 100644 --- a/modules/editor/format/autoload/format.el +++ b/modules/editor/format/autoload/format.el @@ -225,9 +225,9 @@ If nil, BEG and/or END will default to the boundaries of the src block at point. (defun +format/buffer () "Reformat the current buffer using LSP or `format-all-buffer'." (interactive) - (if (and (eq major-mode 'org-mode) - (org-in-src-block-p t)) - (+format--org-region nil nil) + (if (eq major-mode 'org-mode) + (when (org-in-src-block-p t) + (+format--org-region nil nil)) (call-interactively (cond ((and +format-with-lsp (bound-and-true-p lsp-mode) From 9c510159ff00cb66acda410509a5cf6170daf610 Mon Sep 17 00:00:00 2001 From: Mikhail Skorzhinskii Date: Sun, 13 Dec 2020 15:34:16 +0100 Subject: [PATCH 048/183] popup.el: consider auto-saving indirect buffers too Function (buffer-file-name) always returns nil with indirect buffer as an argument. Extracting base buffer and checking if base buffer visiting file fixes data loss in indirect buffers showed in popups. E-mail thread in the org-mode mailing list: https://lists.gnu.org/archive/html/emacs-orgmode/2020-12/msg00085.html --- modules/ui/popup/autoload/popup.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ui/popup/autoload/popup.el b/modules/ui/popup/autoload/popup.el index 62fd79014..15999df6d 100644 --- a/modules/ui/popup/autoload/popup.el +++ b/modules/ui/popup/autoload/popup.el @@ -45,7 +45,9 @@ the buffer is visible, then set another timer and try again later." + And finally deletes the window!" (let ((buffer (window-buffer window)) (inhibit-quit t)) - (and (buffer-file-name buffer) + (and (or (buffer-file-name buffer) + (if-let (base-buffer (buffer-base-buffer buffer)) + (buffer-file-name base-buffer))) (buffer-modified-p buffer) (let ((autosave (+popup-parameter 'autosave window))) (cond ((eq autosave 't)) From cd37300cc048dc85c317866d4b1679dc9ff36b31 Mon Sep 17 00:00:00 2001 From: brotzeit Date: Sun, 13 Dec 2020 15:13:19 +0000 Subject: [PATCH 049/183] Bump :lang rust brotzeit/rustic@91ad5db -> brotzeit/rustic@f7d5ac0 --- 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 c0a0cc5b9..993702b72 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 "91ad5db27b86bb2ba6f3019b764d0f45ec93f484") +(package! rustic :pin "f7d5ac0c930ae435421f3f5bc827e8c61ce73662") (unless (featurep! +lsp) (package! racer :pin "a0bdf778f01e8c4b8a92591447257422ac0b455b")) From 65416ff472e46239ea18995a8db27e6e75c5e979 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 13 Dec 2020 15:40:29 -0500 Subject: [PATCH 050/183] Fix #4427: ivy-read-action-format-function = ivy-read-action-format-columns And remove max-mini-window-height, which interferes with ivy's own minibuffer resizing logic, and isn't a terribly helpful default anyway. --- core/core-ui.el | 4 +--- modules/completion/ivy/config.el | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index a57448729..beeba5d20 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -344,9 +344,7 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original ;; Expand the minibuffer to fit multi-line text displayed in the echo-area. This ;; doesn't look too great with direnv, however... -(setq resize-mini-windows 'grow-only - ;; But don't let the minibuffer grow beyond this size - max-mini-window-height 0.15) +(setq resize-mini-windows 'grow-only) ;; Typing yes/no is obnoxious when y/n will do (fset #'yes-or-no-p #'y-or-n-p) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 7cf440e41..ab23c5572 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -59,7 +59,7 @@ results buffer.") (setq ivy-height 17 ivy-wrap t ivy-fixed-height-minibuffer t - ivy-read-action-format-function #'ivy-hydra-read-action + ivy-read-action-format-function #'ivy-read-action-format-columns projectile-completion-system 'ivy ;; don't show recent files in switch-buffer ivy-use-virtual-buffers nil From 084defb16584b12515b15b2a339c4c46d2319b08 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 13 Dec 2020 19:38:33 -0500 Subject: [PATCH 051/183] Reset sp-pair-overlay-keymap for evil users Smartparens creates a conditional keybind on C-g when its overlays are present (whether or not they're visible). This causes confusion when evil users are forced to press C-g twice to exit insert mode. --- core/core-editor.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/core-editor.el b/core/core-editor.el index 357169599..a30183c80 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -487,7 +487,12 @@ files, so we replace calls to `pp' with the much faster `prin1'." ;; 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)) + (setq sp-cancel-autoskip-on-backward-movement nil) + ;; Smartparens conditional binds a key to C-g when sp overlays are active + ;; (even if they're invisible). This disruptively changes the behavior of + ;; C-g in insert mode, requiring two presses of the key to exit insert mode. + ;; I don't see the point of this keybind, so... + (setq sp-pair-overlay-keymap (make-sparse-keymap))) ;; The default is 100, because smartparen's scans are relatively expensive ;; (especially with large pair lists for some modes), we reduce it, as a From 04b29c70d2403f7adcb75edb454b7534fb6fc850 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 13 Dec 2020 19:48:09 -0500 Subject: [PATCH 052/183] doom/escape: change this-command only if interactive --- core/core-keybinds.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/core-keybinds.el b/core/core-keybinds.el index 53c2ab47f..705dde5ec 100644 --- a/core/core-keybinds.el +++ b/core/core-keybinds.el @@ -72,20 +72,22 @@ and Emacs states, and for non-evil users.") More specifically, when `doom/escape' is pressed. If any hook returns non-nil, all hooks after it are ignored.") -(defun doom/escape () +(defun doom/escape (&optional interactive) "Run `doom-escape-hook'." - (interactive) + (interactive (list 'interactive)) (cond ((minibuffer-window-active-p (minibuffer-window)) ;; quit the minibuffer if open. - (setq this-command 'abort-recursive-edit) + (when interactive + (setq this-command 'abort-recursive-edit)) (abort-recursive-edit)) ;; Run all escape hooks. If any returns non-nil, then stop there. ((run-hook-with-args-until-success 'doom-escape-hook)) ;; don't abort macros ((or defining-kbd-macro executing-kbd-macro) nil) ;; Back to the default - ((setq this-command 'keyboard-quit) - (keyboard-quit)))) + ((unwind-protect (keyboard-quit) + (when interactive + (setq this-command 'keyboard-quit)))))) (global-set-key [remap keyboard-quit] #'doom/escape) From d69d245778ee38af061d2a965940900c27eca6b3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 13 Dec 2020 19:48:43 -0500 Subject: [PATCH 053/183] Remove sp-escape-quotes-after-insert hack Was fixed upstream at some point. --- core/core-editor.el | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index a30183c80..4f5c62e69 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -501,9 +501,6 @@ files, so we replace calls to `pp' with the much faster `prin1'." ;; 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. - (setq sp-escape-quotes-after-insert nil) ;; Silence some harmless but annoying echo-area spam (dolist (key '(:unmatched-expression :no-matching-tag)) From 5827985085196e1a8d12233b23a48474aa7e27e8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 14 Dec 2020 01:11:45 -0500 Subject: [PATCH 054/183] Don't increase gc-cons-threshold in org-mode This was likely unnecessary and may be the cause of recent reports of slowness/freezing over time. --- modules/lang/org/config.el | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 7adb082f9..fec979344 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -541,12 +541,6 @@ the exported output (i.e. formatters)." :before-while #'org-fix-tags-on-the-fly org-auto-align-tags) - ;; HACK Org is known to use a lot of unicode symbols (and large org files tend - ;; to be especially memory hungry). Compounded with - ;; `inhibit-compacting-font-caches' being non-nil, org needs more memory - ;; to be performant. - (setq-hook! 'org-mode-hook gcmh-high-cons-threshold (* 2 gcmh-high-cons-threshold)) - (defadvice! +org--recenter-after-follow-link-a (&rest _args) "Recenter after following a link, but only internal or file links." :after '(org-footnote-action From 49f3bc193a4984f0b5a01a71ad91bb26f643c6d8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 14 Dec 2020 15:13:29 -0500 Subject: [PATCH 055/183] Fix #4430: wrong-num-of-args error on expand-region --- modules/config/default/+emacs.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/config/default/+emacs.el b/modules/config/default/+emacs.el index 56981eec0..5510fda65 100644 --- a/modules/config/default/+emacs.el +++ b/modules/config/default/+emacs.el @@ -12,7 +12,7 @@ (use-package! expand-region :commands (er/contract-region er/mark-symbol er/mark-word) :config - (defadvice! doom--quit-expand-region-a () + (defadvice! doom--quit-expand-region-a (&rest _) "Properly abort an expand-region region." :before '(evil-escape doom/escape) (when (memq last-command '(er/expand-region er/contract-region)) From 9490d42cd3c1f09ccd727200eab73a2183e08a7b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 14 Dec 2020 15:48:29 -0500 Subject: [PATCH 056/183] Comment revision --- core/core-cli.el | 2 +- core/core-editor.el | 6 +++--- modules/editor/evil/config.el | 2 +- modules/ui/popup/config.el | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/core-cli.el b/core/core-cli.el index 12f23ac6d..a0fcba9d8 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -20,7 +20,7 @@ ;; Don't generate superfluous files when writing temp buffers (setq make-backup-files nil) -;; Stop user configuration from interfering with Doom +;; Stop user configuration from interfering with package management (setq enable-dir-local-variables nil) diff --git a/core/core-editor.el b/core/core-editor.el index 4f5c62e69..fd339ea71 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -573,11 +573,11 @@ on." highlight-indent-guides-mode hl-fill-column-mode)) (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. (unless (bound-and-true-p visual-line-mode) (let ((so-long-skip-leading-comments + ;; HACK Fix #2183: `so-long-detected-long-line-p' tries to parse + ;; comment syntax, but comment state may not be initialized, + ;; leading to a wrong-type-argument: stringp error. (bound-and-true-p comment-use-syntax))) (so-long-detected-long-line-p)))) (setq so-long-predicate #'doom-buffer-has-long-lines-p)) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index ef7e38a93..1b4c97b88 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -20,7 +20,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-g-bindings t) -(defvar evil-want-C-i-jump nil) +(defvar evil-want-C-i-jump nil) ; we do this ourselves (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) diff --git a/modules/ui/popup/config.el b/modules/ui/popup/config.el index e2b183f43..3e85e1525 100644 --- a/modules/ui/popup/config.el +++ b/modules/ui/popup/config.el @@ -174,6 +174,6 @@ prevent the popup(s) from messing up the UI (or vice versa)." ;; -;; Hacks +;;; Hacks (load! "+hacks") From 8c397902bcc2b4094e6fa358b7f0b021a9b840f9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 14 Dec 2020 16:48:03 -0500 Subject: [PATCH 057/183] Fix #4432: comp-deferred-compilation-{black,deny}-list --- 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 6e7ed77e7..9a9edff7e 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -10,7 +10,7 @@ one wants that.") (defvar doom-autoloads-cached-vars '(doom-modules doom-disabled-packages - comp-deferred-compilation-black-list + comp-deferred-compilation-deny-list load-path auto-mode-alist interpreter-mode-alist From a4392b2c0d28216398569083df014ca9906d0ebf Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 14 Dec 2020 16:50:40 -0500 Subject: [PATCH 058/183] Fix #4431: don't use // in [JT]SX markup --- modules/lang/web/+html.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/lang/web/+html.el b/modules/lang/web/+html.el index 81f2f88b4..8188d0c12 100644 --- a/modules/lang/web/+html.el +++ b/modules/lang/web/+html.el @@ -65,12 +65,9 @@ (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))) + ;; Use // instead of /* as the default comment delimited in JS + (setf (alist-get "javascript" web-mode-comment-formats nil nil #'equal) + "//") (add-hook! 'web-mode-hook (defun +web--fix-js-comments-h () From 55c37710f53a44415afca630b03ef5fd93999baf Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Mon, 14 Dec 2020 15:42:15 -0600 Subject: [PATCH 059/183] Do not panic when xclip is not available --- modules/os/tty/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/os/tty/config.el b/modules/os/tty/config.el index 5546166e8..bcd6ee018 100644 --- a/modules/os/tty/config.el +++ b/modules/os/tty/config.el @@ -22,7 +22,7 @@ ;; wl-copy, termux-clipboard-get, or getclip (cygwin); depending on what ;; is available. (and (require 'xclip nil t) - (xclip-mode +1))))) + (with-demoted-errors "%s" (xclip-mode +1)))))) (when (featurep! :editor evil) ;; Fix cursor shape-changing in the terminal. Only supported in XTerm, Gnome From e7696893f45675f752efd0fd7b1dc318101eead8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alois=20Jan=C3=AD=C4=8Dek?= Date: Tue, 15 Dec 2020 00:10:29 +0100 Subject: [PATCH 060/183] ivy-read-action-function = ivy-hydra-read-action Use hydra to read user action when calling `ivy-dispatching-done` --- 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 ab23c5572..72d0a23c5 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -59,6 +59,7 @@ results buffer.") (setq ivy-height 17 ivy-wrap t ivy-fixed-height-minibuffer t + ivy-read-action-function #'ivy-hydra-read-action ivy-read-action-format-function #'ivy-read-action-format-columns projectile-completion-system 'ivy ;; don't show recent files in switch-buffer From 8afd8a6ce89606a72b53fd693bc512049da6c0a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alois=20Jan=C3=AD=C4=8Dek?= Date: Tue, 15 Dec 2020 00:28:50 +0100 Subject: [PATCH 061/183] Restore user ability to toggle ivy related hydras There are two hydras that can be opened from ivy interface: 1. `ivy-dispatching-done' (doom key: "C-o", vanilla key: "M-o") 2. `hydra-ivy/body' (doom key: "M-o", vanilla key: "C-o") Original behavior is that they both can be exited / toggled by the same key they were opened. This commit restores the original behaviour but does it without reverting the decision to swap the "C-o" and "M-o" key bindings. --- modules/completion/ivy/config.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 72d0a23c5..fd5867ccb 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -96,6 +96,12 @@ results buffer.") (after! yasnippet (add-hook 'yas-prompt-functions #'+ivy-yas-prompt-fn)) + (after! ivy-hydra + ;; Ensure `ivy-dispatching-done' and `hydra-ivy/body' hydras can be + ;; exited / toggled by the same key binding they were opened + (add-to-list 'ivy-dispatching-done-hydra-exit-keys '("C-o" nil)) + (defhydra+ hydra-ivy () ("M-o" nil))) + (define-key! ivy-minibuffer-map [remap doom/delete-backward-word] #'ivy-backward-kill-word "C-c C-e" #'+ivy/woccur From 715c736815445b6f6541170fe7d22f04bcf8bee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alois=20Jan=C3=AD=C4=8Dek?= Date: Tue, 15 Dec 2020 01:48:14 +0100 Subject: [PATCH 062/183] Prioritize company-capf back-end in org-journal This allows functionality like completion of org-roam items seamlessly work in org-journal-mode files too. Same setting is already set for org-mode itself. --- modules/lang/org/contrib/journal.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/lang/org/contrib/journal.el b/modules/lang/org/contrib/journal.el index 6f93b05ca..b9fff2559 100644 --- a/modules/lang/org/contrib/journal.el +++ b/modules/lang/org/contrib/journal.el @@ -45,6 +45,8 @@ (set-popup-rule! "^\\*Org-journal search" :select t :quit t) + (set-company-backend! 'org-journal-mode 'company-capf 'company-dabbrev) + (map! (:map org-journal-mode-map :n "]f" #'org-journal-next-entry :n "[f" #'org-journal-previous-entry From 5aaaf3d99cd253594d3b6b15496deefff2d42079 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 15 Dec 2020 16:58:43 -0500 Subject: [PATCH 063/183] Remove text-mode from so-long-target-modes This is too buggy as a general rule. Too many false positive bug reports from plugins writing text files that are too large/long. Fixes #4419 --- core/core-editor.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index fd339ea71..da57b100b 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -555,8 +555,6 @@ on." (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 or ;; wide buffers. (appendq! so-long-minor-modes From aba28824a0a7eeeff029333cf175c9231bf425f1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 15 Dec 2020 17:03:40 -0500 Subject: [PATCH 064/183] Fail gracefully on files with no large-file-size-alist entry --- 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 da57b100b..22b10b908 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -40,10 +40,11 @@ runtime costs (or disable themselves) to ensure the buffer is as fast as possible." :before #'abort-if-file-too-large (and (numberp size) - (> size - (* 1024 1024 - (assoc-default filename doom-large-file-size-alist - #'string-match-p))) + (ignore-errors + (> size + (* 1024 1024 + (assoc-default filename doom-large-file-size-alist + #'string-match-p)))) (setq doom-large-file-p size))) (defadvice! doom--optimize-for-large-files-a (&rest _) From 354fb748f349ec968e1c19b33746d3bc829736e1 Mon Sep 17 00:00:00 2001 From: "Itai Y. Efrat" Date: Thu, 17 Dec 2020 20:25:23 +0200 Subject: [PATCH 065/183] :editor fold - minor documentation fix --- modules/editor/fold/README.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/editor/fold/README.org b/modules/editor/fold/README.org index 517c83714..6ff0db9c1 100644 --- a/modules/editor/fold/README.org +++ b/modules/editor/fold/README.org @@ -20,8 +20,8 @@ marker, indent and syntax-based code folding for as many languages as possible. This module provides no flags. ** Plugins -+[[https://github.com/alexmurray/evil-vimish-fold][evil-vimish-fold]] -+[[https://github.com/matsievskiysv/vimish-fold][vimish-fold]] ++ [[https://github.com/alexmurray/evil-vimish-fold][evil-vimish-fold]] ++ [[https://github.com/matsievskiysv/vimish-fold][vimish-fold]] * Prerequisites This module has no prerequisites. From 2253e7f4679559cb518560b6e46a04e6a9cc3453 Mon Sep 17 00:00:00 2001 From: Ho-Yon Mak Date: Thu, 17 Dec 2020 22:57:17 +0000 Subject: [PATCH 066/183] Add `--exclude .git` to fd in `projectile-generic-command` --- core/core-projects.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-projects.el b/core/core-projects.el index 487015d47..7693d4dd4 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -179,7 +179,7 @@ And if it's a function, evaluate it." (cl-find-if (doom-rpartial #'executable-find t) (list "fdfind" "fd")) doom-projectile-fd-binary)) - (concat (format "%s . -0 -H --color=never --type file --type symlink --follow" + (concat (format "%s . -0 -H --color=never --type file --type symlink --follow --exclude .git" bin) (if IS-WINDOWS " --path-separator=/")))) ;; Otherwise, resort to ripgrep, which is also faster than find From eca50f476666a4923ecf62b4c5d55629102d5fb9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 18 Dec 2020 16:05:31 -0500 Subject: [PATCH 067/183] Fix #4446: activate org-fancy-priorities-mode in org-agenda --- modules/lang/org/contrib/pretty.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/lang/org/contrib/pretty.el b/modules/lang/org/contrib/pretty.el index 3ca56e071..497707b0a 100644 --- a/modules/lang/org/contrib/pretty.el +++ b/modules/lang/org/contrib/pretty.el @@ -21,4 +21,5 @@ (use-package! org-fancy-priorities ; priority icons :hook (org-mode . org-fancy-priorities-mode) + :hook (org-agenda-mode . org-fancy-priorities-mode) :config (setq org-fancy-priorities-list '("⚑" "⬆" "■"))) From 0f2bb647eb8b1ef22c92bbbf59f4c41b75306ec5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 18 Dec 2020 16:08:22 -0500 Subject: [PATCH 068/183] Rewrite "large file" detection Adds a doom-inhibit-large-file-detection letvar for disabling it in some contexts. --- core/core-editor.el | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 22b10b908..a7e099763 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -9,7 +9,10 @@ detected.") indentation settings or not. This should be set by editorconfig if it successfully sets indent_style/indent_size.") -(defvar-local doom-large-file-p nil) +(defvar doom-inhibit-large-file-detection nil + "If non-nil, inhibit large/long file detection when opening files.") + +(defvar doom-large-file-p nil) (put 'doom-large-file-p 'permanent-local t) (defvar doom-large-file-size-alist '(("." . 1.0)) @@ -40,22 +43,25 @@ runtime costs (or disable themselves) to ensure the buffer is as fast as possible." :before #'abort-if-file-too-large (and (numberp size) + (null doom-inhibit-large-file-detection) (ignore-errors (> size (* 1024 1024 (assoc-default filename doom-large-file-size-alist #'string-match-p)))) - (setq doom-large-file-p size))) + (setq-local doom-large-file-p size))) + +(add-hook! 'find-file-hook + (defun doom-optimize-for-large-files-h () + "Trigger `so-long-minor-mode' if the file is large." + (when (and doom-large-file-p buffer-file-name) + (if (or doom-inhibit-large-file-detection + (memq major-mode doom-large-file-excluded-modes)) + (kill-local-variable 'doom-large-file-p) + (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..."))))) -(defadvice! doom--optimize-for-large-files-a (&rest _) - "Trigger `so-long-minor-mode' if the file is large." - :after #'after-find-file - (when (and doom-large-file-p buffer-file-name) - (if (memq major-mode doom-large-file-excluded-modes) - (setq doom-large-file-p nil) - (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...")))) ;; Resolve symlinks when opening files, so that any operations are conducted ;; from the file's true directory (like `find-file'). From f2d71ae8feae5a833e819f3509e6e941372a5348 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 18 Dec 2020 16:08:58 -0500 Subject: [PATCH 069/183] Fix #4419: suppress large-file message in org-agenda buffers --- 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 fec979344..fbcb152ab 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -606,7 +606,7 @@ buffers." "Prevent temporarily opened agenda buffers from polluting recentf." :around #'org-get-agenda-file-buffer (let ((recentf-exclude (list (lambda (_file) t))) - (doom-large-file-p t) + (doom-inhibit-large-file-detection t) find-file-hook org-mode-hook) (funcall orig-fn file))) From 3967d6001b3f3e6355b146a2162ba27b49958712 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 18 Dec 2020 16:10:06 -0500 Subject: [PATCH 070/183] Comment/docstring revision --- core/core-editor.el | 4 ++-- modules/lang/org/config.el | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index a7e099763..b120f62e5 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -108,7 +108,7 @@ possible." ;; the purpose of a failsafe. This adds the risk of losing the data we ;; just deleted, but I believe that's VCS's jurisdiction, not ours. auto-save-include-big-deletions t - ;; ...but have directories set up in case we use it. + ;; Keep it out of `doom-emacs-dir' or the local directory. auto-save-list-file-prefix (concat doom-cache-dir "autosave/") tramp-auto-save-directory (concat doom-cache-dir "tramp-autosave/") auto-save-file-name-transforms @@ -119,7 +119,7 @@ possible." (add-hook! 'after-save-hook (defun doom-guess-mode-h () - "Guess mode when saving a file in `fundamental-mode'." + "Guess major mode when saving a file in `fundamental-mode'." (when (eq major-mode 'fundamental-mode) (let ((buffer (or (buffer-base-buffer) (current-buffer)))) (and (buffer-file-name buffer) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index fbcb152ab..6119d061b 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -582,8 +582,7 @@ eldoc string." (add-hook! 'org-agenda-finalize-hook (defun +org-exclude-agenda-buffers-from-workspace-h () - "Prevent temporary agenda buffers being associated with current -workspace." + "Don't associate temporary agenda buffers with current workspace." (when (and org-agenda-new-buffers (bound-and-true-p persp-mode) (not org-agenda-sticky)) @@ -592,11 +591,12 @@ workspace." (get-current-persp) nil)))) (defun +org-defer-mode-in-agenda-buffers-h () - "Org agenda opens temporary agenda incomplete org-mode buffers. -These are great for extracting agenda information from, but what if the user -tries to visit one of these buffers? Then we remove it from the to-be-cleaned -queue and restart `org-mode' so they can grow up to be full-fledged org-mode -buffers." + "`org-agenda' opens temporary, incomplete org-mode buffers. +I've disabled a lot of org-mode's startup processes for these invisible buffers +to speed them up (in `+org--exclude-agenda-buffers-from-recentf-a'). However, if +the user tries to visit one of these buffers they'll see a gimped, half-broken +org buffer. To avoid that, restart `org-mode' when they're switched to so they +can grow up to be fully-fledged org-mode buffers." (dolist (buffer org-agenda-new-buffers) (with-current-buffer buffer (add-hook 'doom-switch-buffer-hook #'+org--restart-mode-h From 3cae62cacf50b056d07f87f42fc40c035378e14e Mon Sep 17 00:00:00 2001 From: ejez Date: Sun, 20 Dec 2020 11:58:48 +0300 Subject: [PATCH 071/183] Fix typos in `docs/getting_started.org` --- docs/getting_started.org | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/getting_started.org b/docs/getting_started.org index 90669c4bc..828ffdb14 100644 --- a/docs/getting_started.org +++ b/docs/getting_started.org @@ -50,7 +50,7 @@ us know! - [[#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-recipe-for-a-included-package][Changing a recipe for a included package]] + - [[#changing-a-recipe-for-an-included-package][Changing a recipe for an included package]] - [[#usingloading-local-packages][Using/loading local packages]] - [[#configuring-doom][Configuring Doom]] - [[#configuring-packages][Configuring packages]] @@ -886,7 +886,7 @@ packages: ensure your changes take effect. #+end_quote -*** Changing a recipe for a included package +*** Changing a recipe for an 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 @@ -1176,7 +1176,7 @@ Placing this on top of a lisp form will do one of two things: =~/.emacs.d/.local/autoloads.el=, which is read very early in the startup process). 2. Or copy that lisp form to Doom's autoload file verbatim (usually the case for - anything other then ~def*~ forms, like ~defun~ or ~defmacro~). + anything other than ~def*~ forms, like ~defun~ or ~defmacro~). Doom's autoload file is generated by scanning these files when you execute ~doom sync~. @@ -1414,9 +1414,9 @@ org module documentation]] for details on how to add support for it. #+END_SRC These two lines are a common sight in Emacs configs, but they are unnecessary -for Doom Emacs. We already use the more sophisticated =wsbutler= to manage +for Doom Emacs. We already use the more sophisticated =ws-butler= to manage extraneous whitespace. However, you might have the impression that it isn't -working. That's because =wsbutler= works in two unusual ways, meant to be less +working. That's because =ws-butler= works in two unusual ways, meant to be less imposing than its alternatives: 1. It only cleans up trailing whitespace /on lines that you've touched/ (but @@ -1431,7 +1431,7 @@ imposing than its alternatives: However, if it's truly deliberate, ~M-x delete-trailing-whitespaces~ and ~M-x whitespace-cleanup~ are available to be called =deliberately=, instead. -2. =wsbutler= replaces trailing whitespace and newlines with *virtual* +2. =ws-butler= replaces trailing whitespace and newlines with *virtual* whitespace. This is whitespace that only exists in the Emacs buffer, but isn't actually written to the file. @@ -1470,7 +1470,7 @@ provide tools to make this easier. Here are a few things you can try, first: 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 + documentation (press = h d 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 @@ -1559,9 +1559,9 @@ and before the subcommand. This will be fixed eventually. Often, you may find it helpful for debugging to evaluate some Emacs Lisp. Here are couple things you can do: -+ Use =M-;= (bound to ~eval-expression~), ++ Use =M-:= (bound to ~eval-expression~), + =SPC x= will open a scratch buffer. ~M-x emacs-lisp-mode~ will change it to - the appropriate major mode, then use ~+eval:region~ (=gr=) and ~+eval:buffer~ + the appropriate major mode, then use ~+eval:region~ (=gr=) and ~+eval/buffer~ (=gR=) to evaluate code, ** How to determine the origin of a bug @@ -1571,7 +1571,7 @@ in a fresh instance of Emacs with varying amounts of Doom loaded (none at all, 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 +If you can recreate a bug in vanilla Emacs then it should be reported to the 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 From 712d6a7c4051286b097f8e55f4a4060b3801606a Mon Sep 17 00:00:00 2001 From: Ralf Beckmann Date: Sun, 20 Dec 2020 17:37:29 +0100 Subject: [PATCH 072/183] Fix interactive call of doom/bump-package The function expects 'package' to be a symbol instead of a string. --- core/autoload/packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/autoload/packages.el b/core/autoload/packages.el index efcfafec4..3b77d2278 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -177,8 +177,8 @@ each package." (defun doom/bump-package (package) "Bump PACKAGE in all modules that install it." (interactive - (list (completing-read "Bump package: " - (mapcar #'car (doom-package-list 'all))))) + (list (intern (completing-read "Bump package: " + (mapcar #'car (doom-package-list 'all)))))) (let* ((packages (doom-package-list 'all)) (modules (plist-get (alist-get package packages) :modules))) (unless modules From 93ca92666488b3c3010674af2bdd12a0319d2f28 Mon Sep 17 00:00:00 2001 From: Ian Wahbe Date: Tue, 22 Dec 2020 15:39:05 -0800 Subject: [PATCH 073/183] Disable scheme-mode for .rkt files if :lang racket --- 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 41249b72c..4b2f57175 100644 --- a/modules/lang/scheme/config.el +++ b/modules/lang/scheme/config.el @@ -11,7 +11,9 @@ (setq geiser-active-implementations '(guile chicken mit chibi chez) geiser-autodoc-identifier-format "%s → %s" geiser-repl-current-project-function 'doom-project-root) - (unless (featurep! :lang racket) + (if (featurep! :lang racket) + (setq auto-mode-alist + (remove '("\\.rkt\\'" . scheme-mode) auto-mode-alist)) (push 'racket geiser-active-implementations)) (after! scheme ; built-in (set-repl-handler! 'scheme-mode #'+scheme/open-repl) From 51e3e37f7eb7c21ce16975feed4b336196cff8da Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Wed, 23 Dec 2020 17:34:04 +0100 Subject: [PATCH 074/183] Add checks for executables needed by org-download - Added platform-dependent checks for some of the executables needed for org-download-clipboard to work. - Fixed a typo in one of the error messages for org-roam. --- modules/lang/org/doctor.el | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/lang/org/doctor.el b/modules/lang/org/doctor.el index 1ebfb3f9d..c4c672d24 100644 --- a/modules/lang/org/doctor.el +++ b/modules/lang/org/doctor.el @@ -9,4 +9,20 @@ (unless (executable-find "sqlite3") (warn! "Couldn't find the sqlite3 executable. org-roam will not work.")) (unless (executable-find "dot") - (warn! "Couldn't find the dot executable (from graphviz). org-roam will not be able to generate graph visuallizations."))) + (warn! "Couldn't find the dot executable (from graphviz). org-roam will not be able to generate graph visualizations."))) + +(when (featurep! +dragndrop) + (when IS-MAC + (unless (executable-find "pngpaste") + (warn! "Couldn't find the pngpaste executable. org-download-clipboard will not work."))) + (when IS-LINUX + (unless (or (executable-find "maim") (executable-find "scrot") (executable-find "gnome-screenshot")) + (warn! "Couldn't find the maim, scrot or gnome-screenshot executable. org-download-clipboard will not work.")) + (if (string= "wayland" (getenv "XDG_SESSION_TYPE")) + (unless (executable-find "wl-paste") + (warn! "Couldn't find the wl-paste executable (from wl-clipboard). org-download-clipboard will not work.")) + (unless (executable-find "xclip") + (warn! "Couldn't find the xclip executable. org-download-clipboard will not work.")))) + (when IS-WINDOWS + (unless (executable-find "convert") + (warn! "Couldn't find the convert program (from ImageMagick). org-download-clipboard will not work.")))) From 1f3530da6ff9aefdb33b3e3258ddb6c876ac6f98 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 23 Dec 2020 15:34:15 -0500 Subject: [PATCH 075/183] Remove gh from excluded packages for autoloads Fixed upstream. --- core/cli/autoloads.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 9a9edff7e..09193c565 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -1,7 +1,7 @@ ;;; core/cli/autoloads.el -*- lexical-binding: t; -*- -(defvar doom-autoloads-excluded-packages '("gh") - "What packages whose autoloads file we won't index. +(defvar doom-autoloads-excluded-packages () + "What packages whose autoloads files 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 From de94a7381c1fc1dc0171e863070a52e9057db327 Mon Sep 17 00:00:00 2001 From: Matthieu Petiteau Date: Thu, 24 Dec 2020 16:48:26 +0100 Subject: [PATCH 076/183] Add missing install commands for spell checkers --- modules/checkers/spell/README.org | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/modules/checkers/spell/README.org b/modules/checkers/spell/README.org index 93fb7e483..408570acf 100644 --- a/modules/checkers/spell/README.org +++ b/modules/checkers/spell/README.org @@ -65,6 +65,7 @@ with anything other than =aspell= yet. ** Aspell + Ubuntu: ~apt-get install aspell aspell-en~ ++ macOS: ~brew install aspell~ + Arch Linux: ~pacman -S aspell aspell-en~ + NixOS: #+BEGIN_SRC nix @@ -75,10 +76,22 @@ with anything other than =aspell= yet. } #+END_SRC -** TODO Hunspell +** Hunspell ++ Ubuntu: ~apt-get install hunspell~ ++ macOS: ~brew install hunspell~ ++ Arch Linux: ~pacman -S hunspell~ ++ NixOS: + #+BEGIN_SRC nix + { + environment.systemPackages = with pkgs; [ + hunspell + ]; + } + #+END_SRC ** Enchant + Ubuntu: ~apt-get install enchant-2~ ++ macOS: ~brew install enchant~ + Arch Linux: ~pacman -S enchant~ + NixOS: #+BEGIN_SRC nix From 2465539e192bd668fb967005e5e6330774327460 Mon Sep 17 00:00:00 2001 From: ejez Date: Fri, 25 Dec 2020 09:44:18 +0300 Subject: [PATCH 077/183] Fix company backends for text and org modes --- modules/completion/company/autoload.el | 2 +- modules/lang/org/config.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/completion/company/autoload.el b/modules/completion/company/autoload.el index 95197780f..55f770750 100644 --- a/modules/completion/company/autoload.el +++ b/modules/completion/company/autoload.el @@ -2,7 +2,7 @@ ;;;###autoload (defvar +company-backend-alist - '((text-mode company-dabbrev company-yasnippet company-ispell) + '((text-mode (:separate company-dabbrev company-yasnippet company-ispell)) (prog-mode company-capf company-yasnippet) (conf-mode company-capf company-dabbrev-code company-yasnippet)) "An alist matching modes to company backends. The backends for any mode is diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index fec979344..857ab68f6 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -1124,7 +1124,7 @@ compelling reason, so..." :config (add-to-list 'doom-debug-variables 'org-export-async-debug) - (set-company-backend! 'org-mode 'company-capf 'company-dabbrev) + (set-company-backend! 'org-mode 'company-capf) (set-eval-handler! 'org-mode #'+org-eval-handler) (set-lookup-handlers! 'org-mode :definition #'+org-lookup-definition-handler From ae5cb5b957299739a224f25f9ed170b28cb8b9a5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 29 Dec 2020 00:52:12 -0500 Subject: [PATCH 078/183] Always prioritize custom-theme-directory Over plugins/built-in themes. --- core/core-ui.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/core-ui.el b/core/core-ui.el index beeba5d20..0bbece4b1 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -548,6 +548,11 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original ;; ;;; Theme & font +;; Always prioritize the user's themes above the built-in/packaged ones. +(setq custom-theme-load-path + (cons 'custom-theme-directory + (remq 'custom-theme-directory custom-theme-load-path))) + ;; Underline looks a bit better when drawn lower (setq x-underline-at-descent-line t) From f40f025fb25f956d7f824ab1c89ff3fa1bbccfed Mon Sep 17 00:00:00 2001 From: Nikita Bloshchanevich Date: Tue, 29 Dec 2020 21:06:45 +0100 Subject: [PATCH 079/183] Fix `+eshell/split-window' error `+eshell/split-window' eventually calls `+eshell--bury-buffer', which invoked `+eshell/here' with `t' instead of a command string, erroring. --- modules/term/eshell/autoload/eshell.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/term/eshell/autoload/eshell.el b/modules/term/eshell/autoload/eshell.el index 0a4604a0b..b9d183332 100644 --- a/modules/term/eshell/autoload/eshell.el +++ b/modules/term/eshell/autoload/eshell.el @@ -28,7 +28,7 @@ (switch-to-buffer (doom-fallback-buffer))) (when +eshell-enable-new-shell-on-split (let ((default-directory directory)) - (when-let (win (get-buffer-window (+eshell/here t))) + (when-let (win (get-buffer-window (+eshell/here))) (set-window-dedicated-p win dedicated-p)))))) (defun +eshell--setup-window (window &optional flag) From ded4532cb6c2081c522f0fbbffad2e5ecd361682 Mon Sep 17 00:00:00 2001 From: Bryan Gilbert Date: Wed, 30 Dec 2020 16:14:03 -0500 Subject: [PATCH 080/183] Bump better-jumper gilbertw1/better-jumper@e3a6546 -> gilbertw1/better-jumper@fe548d2 Fixes #2826 --- core/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/packages.el b/core/packages.el index d96ace855..8ba3389dc 100644 --- a/core/packages.el +++ b/core/packages.el @@ -32,7 +32,7 @@ (package! restart-emacs :pin "e5707491d7ac20879465bb52e282ad1416748378") ;; core-editor.el -(package! better-jumper :pin "fe548d22c9228b60d9c8a2a452a6c2e03dfdf238") +(package! better-jumper :pin "e3a6546aa626b9a79ae451c88f44cf26f9d1a919") (package! dtrt-indent :pin "a7ade6d244eeeda2ada9f7eca565491cea4b622a") (package! helpful :pin "584ecc887bb92133119f93a6716cdf7af0b51dca") (package! pcre2el :pin "0b5b2a2c173aab3fd14aac6cf5e90ad3bf58fa7d") From 52c5449659ff9e4979750d286ea27dc2848a2c54 Mon Sep 17 00:00:00 2001 From: Shon Feder Date: Fri, 1 Jan 2021 14:04:19 -0500 Subject: [PATCH 081/183] Update to document localleader instead of SPC m --- modules/lang/ocaml/README.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/ocaml/README.org b/modules/lang/ocaml/README.org index e9d1b07f2..bf0cc060a 100644 --- a/modules/lang/ocaml/README.org +++ b/modules/lang/ocaml/README.org @@ -76,8 +76,6 @@ tools. ** Commands | Command | Key | Description | |------------------------------+-----------+-----------------------------------------------------------| - | =merlin-type-enclosing= | =SPC m t= | display type under point | - | =tuareg-find-alternate-file= | =SPC m a= | switch between =.ml= and =.mli= | | =merlin-locate= | =gd= | lookup definition | | =merlin-occurences= | =SPC c D= | lookup references | | =merlin-document= | =K= | lookup documentation | @@ -85,6 +83,8 @@ tools. | =merlin-iedit-occurrences= | =v R= | visual refactor identifier under point (multiple cursors) | | =utop= | =SPC o r= | open =utop= as REPL | | =utop-eval-region= | =SPC c e= | evaluate selected region in =utop= | + | =merlin-type-enclosing= | = t= | display type under point | + | =tuareg-find-alternate-file= | = a= | switch between =.ml= and =.mli= | ** Hacks + =set-ligatures!= is called with the full tuareg prettify symbol list, this From 05e9e72d5babadb8b510da34309faad3f2b21863 Mon Sep 17 00:00:00 2001 From: Shon Feder Date: Fri, 1 Jan 2021 14:04:57 -0500 Subject: [PATCH 082/183] Add missing space between gd key sequence --- modules/lang/ocaml/README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/ocaml/README.org b/modules/lang/ocaml/README.org index bf0cc060a..acfd69d76 100644 --- a/modules/lang/ocaml/README.org +++ b/modules/lang/ocaml/README.org @@ -76,7 +76,6 @@ tools. ** Commands | Command | Key | Description | |------------------------------+-----------+-----------------------------------------------------------| - | =merlin-locate= | =gd= | lookup definition | | =merlin-occurences= | =SPC c D= | lookup references | | =merlin-document= | =K= | lookup documentation | | =merlin-imenu= | =SPC / i= | symbol lookup in file | @@ -85,6 +84,7 @@ tools. | =utop-eval-region= | =SPC c e= | evaluate selected region in =utop= | | =merlin-type-enclosing= | = t= | display type under point | | =tuareg-find-alternate-file= | = a= | switch between =.ml= and =.mli= | + | =merlin-locate= | =g d= | lookup definition | ** Hacks + =set-ligatures!= is called with the full tuareg prettify symbol list, this From 96f7dfd5ac5a8425d272816fce013f538efe5586 Mon Sep 17 00:00:00 2001 From: Shon Feder Date: Fri, 1 Jan 2021 14:22:21 -0500 Subject: [PATCH 083/183] Update symbol lookup binding --- modules/lang/ocaml/README.org | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/lang/ocaml/README.org b/modules/lang/ocaml/README.org index acfd69d76..fa4f55586 100644 --- a/modules/lang/ocaml/README.org +++ b/modules/lang/ocaml/README.org @@ -74,17 +74,17 @@ tools. * Appendix ** Commands - | Command | Key | Description | - |------------------------------+-----------+-----------------------------------------------------------| - | =merlin-occurences= | =SPC c D= | lookup references | - | =merlin-document= | =K= | lookup documentation | - | =merlin-imenu= | =SPC / i= | symbol lookup in file | - | =merlin-iedit-occurrences= | =v R= | visual refactor identifier under point (multiple cursors) | - | =utop= | =SPC o r= | open =utop= as REPL | - | =utop-eval-region= | =SPC c e= | evaluate selected region in =utop= | + | Command | Key | Description | + |------------------------------+-------------------+-----------------------------------------------------------| | =merlin-type-enclosing= | = t= | display type under point | | =tuareg-find-alternate-file= | = a= | switch between =.ml= and =.mli= | | =merlin-locate= | =g d= | lookup definition | + | =merlin-occurences= | =SPC c D= | lookup references | + | =merlin-document= | =K= | lookup documentation | + | =merlin-imenu= | =SPC s i= | symbol lookup in file | + | =merlin-iedit-occurrences= | =v R= | visual refactor identifier under point (multiple cursors) | + | =utop= | =SPC o r= | open =utop= as REPL | + | =utop-eval-region= | =SPC c e= | evaluate selected region in =utop= | ** Hacks + =set-ligatures!= is called with the full tuareg prettify symbol list, this From 2849efdf2e3c25cf71ee050bbef738baf276d6f9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 3 Jan 2021 17:07:22 -0500 Subject: [PATCH 084/183] lang/lua: update README & refactor Mentioned in #4462 --- modules/lang/lua/README.org | 27 ++++++++++++++------- modules/lang/lua/config.el | 48 +++++++++++++++++-------------------- modules/tools/lsp/+lsp.el | 5 +++- 3 files changed, 44 insertions(+), 36 deletions(-) diff --git a/modules/lang/lua/README.org b/modules/lang/lua/README.org index a48afb5c0..43776cdc9 100644 --- a/modules/lang/lua/README.org +++ b/modules/lang/lua/README.org @@ -39,19 +39,28 @@ This module has no dedicated maintainers. * Prerequisites ** Language Server Protocol servers -Currently the servers supported depend on the =:tools lsp= flavor you are using +LSP server support depends on which flavor of the =:tools lsp= module you have +installed (Eglot or LSP-mode). + *** LSP-mode -This server is built in Java, so a ~java~ environment will be necessary -+ [[https://github.com/EmmyLua/EmmyLua-LanguageServer][EmmyLua-LanguageServer]] must be installed and configured to use the - configuration provided by emacs-lsp. +Three servers are supported, ordered from highest to lowest priority: + ++ [[https://github.com/EmmyLua/EmmyLua-LanguageServer][EmmyLua-LanguageServer]] :: Must be in =~/.emacs.d/.local/etc/lsp/EmmyLua-LS-all.jar=. See ~lsp-clients-emmy-lua-jar-path~ variable to change this. ++ [[https://github.com/sumneko/lua-language-server][Sumneko language server]] (lua-language-server) :: Must be in + =~/.config/emacs/.local/etc/lsp/lua-language-server/=. See + ~lsp-clients-lua-language-server-bin~ variable to change this. ++ [[https://github.com/Alloyed/lua-lsp][lua-lsp]] :: Must be available in =~/.luarocks/bin/lua-lsp=. See + ~lsp-clients-lua-lsp-server-install-dir~ variable to change this. [[https://emacs-lsp.github.io/lsp-mode/page/lsp-emmy-lua/][LSP-mode documentation]] has more information about setting up the server and the -configuration variables correctly (use a bare ~(setq -lsp-clients-emmy-lua-java-path value)~ in your =config.el=) +configuration variables correctly. + *** Eglot -This server is built in Lua, so a =lua= environment will be necessary -+ [[https://github.com/sumneko/lua-language-server][lua-language-server]] must be installed and built locally, with =+lua-lsp-dir= - variable pointing to the root of the repository +Eglot currently only supports one of the above servers out of the box: + ++ [[https://github.com/sumneko/lua-language-server][Sumneko language server]] (lua-language-server) :: Must be in + =~/.config/emacs/.local/etc/lsp/lua-language-server/=. See + ~+lua-lsp-dir~ variable to change this. * TODO Features # An in-depth list of features, how to use them, and their dependencies. diff --git a/modules/lang/lua/config.el b/modules/lang/lua/config.el index 9137b7806..4dc22b2ef 100644 --- a/modules/lang/lua/config.el +++ b/modules/lang/lua/config.el @@ -1,11 +1,5 @@ ;;; lang/lua/config.el -*- lexical-binding: t; -*- -(defvar +lua-lsp-dir (concat doom-etc-dir "lsp/lua-language-server/") - "Absolute path to the directory of sumneko's lua-language-server. - -This directory MUST contain the 'main.lua' file and be the in-source build of -lua-language-server.") - ;; sp's default rules are obnoxious, so disable them (provide 'smartparens-lua) @@ -25,27 +19,29 @@ lua-language-server.") (set-company-backend! 'lua-mode '(company-lua company-yasnippet)) (when (featurep! +lsp) - (defun +lua-generate-lsp-server-command () - ;; The absolute path to lua-language-server binary is necessary because - ;; the bundled dependencies aren't found otherwise. The only reason this - ;; is a function is to dynamically change when/if `+lua-lsp-dir' does - (list (doom-path +lua-lsp-dir - (cond (IS-MAC "bin/macOS") - (IS-LINUX "bin/Linux") - (IS-WINDOWS "bin/Windows")) - "lua-language-server") - "-E" "-e" "LANG=en" - (doom-path +lua-lsp-dir "main.lua"))) + (add-hook 'lua-mode-local-vars-hook #'lsp!) - (if (featurep! :tools lsp +eglot) - (set-eglot-client! 'lua-mode (+lua-generate-lsp-server-command)) - (after! lsp-mode - (lsp-register-client - (make-lsp-client :new-connection (lsp-stdio-connection '+lua-generate-lsp-server-command) - :major-modes '(lua-mode) - :priority -1 - :server-id 'lua-langserver)))) - (add-hook 'lua-mode-local-vars-hook #'lsp!))) + (when (featurep! :tools lsp +eglot) + (defvar +lua-lsp-dir (concat doom-etc-dir "lsp/lua-language-server/") + "Absolute path to the directory of sumneko's lua-language-server. + +This directory MUST contain the 'main.lua' file and be the in-source build of +lua-language-server.") + + (defun +lua-generate-lsp-server-command () + ;; The absolute path to lua-language-server binary is necessary because + ;; the bundled dependencies aren't found otherwise. The only reason this + ;; is a function is to dynamically change when/if `+lua-lsp-dir' does + (list (or (executable-find "lua-language-server") + (doom-path +lua-lsp-dir + (cond (IS-MAC "bin/macOS") + (IS-LINUX "bin/Linux") + (IS-WINDOWS "bin/Windows")) + "lua-language-server")) + "-E" "-e" "LANG=en" + (doom-path +lua-lsp-dir "main.lua"))) + + (set-eglot-client! 'lua-mode (+lua-generate-lsp-server-command))))) (use-package! moonscript diff --git a/modules/tools/lsp/+lsp.el b/modules/tools/lsp/+lsp.el index 0196866dc..8504610c5 100644 --- a/modules/tools/lsp/+lsp.el +++ b/modules/tools/lsp/+lsp.el @@ -40,7 +40,10 @@ Can be a list of backends; accepts any value `company-backends' accepts.") lsp-vetur-global-snippets-dir (expand-file-name "vetur" (or (bound-and-true-p +snippets-dir) (concat doom-private-dir "snippets/"))) - lsp-clients-emmy-lua-jar-path (concat lsp-server-install-dir "EmmyLua-LS-all.jar") + lsp-clients-lua-language-server-bin (concat lsp-server-install-dir "lua-language-server/" + (cond (IS-MAC "bin/macOS") + (IS-LINUX "bin/Linux") + (IS-WINDOWS "bin/Windows"))) lsp-xml-jar-file (concat lsp-server-install-dir "org.eclipse.lsp4xml-0.3.0-uber.jar") lsp-groovy-server-file (concat lsp-server-install-dir "groovy-language-server-all.jar")) From 6970903a4386bab42746a9f22c9f48c111f7832c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 3 Jan 2021 17:18:43 -0500 Subject: [PATCH 085/183] Fix #4465: >,< not shifting whole lines This fixes make > and < behave as it does in vim in regular visual mode. --- modules/editor/evil/autoload/evil.el | 8 ++++---- modules/editor/evil/config.el | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/editor/evil/autoload/evil.el b/modules/editor/evil/autoload/evil.el index aece9766a..c8c0223c3 100644 --- a/modules/editor/evil/autoload/evil.el +++ b/modules/editor/evil/autoload/evil.el @@ -15,18 +15,18 @@ ;;; Interactive commands ;;;###autoload -(defun +evil/visual-indent () +(defun +evil/shift-right () "vnoremap < >gv" (interactive) - (evil-shift-left (region-beginning) (region-end)) + (call-interactively #'evil-shift-left) (evil-normal-state) (evil-visual-restore)) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 1b4c97b88..70113818f 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -518,8 +518,8 @@ directives. By default, this only recognizes C directives.") :n "zx" #'kill-current-buffer :n "ZX" #'doom/save-and-kill-buffer ;; don't leave visual mode after shifting - :v "<" #'+evil/visual-dedent ; vnoremap < " #'+evil/visual-indent ; vnoremap > >gv + :v "<" #'+evil/shift-left ; vnoremap < " #'+evil/shift-right ; vnoremap > >gv ;; window management (prefix "C-w") (:map evil-window-map From c9877948848c1560b89443989b4cdf2f620dacc3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 3 Jan 2021 17:40:33 -0500 Subject: [PATCH 086/183] Fix #4478: backport exec-path function from 27.1 --- core/core-lib.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/core-lib.el b/core/core-lib.el index 2a43c2407..783fb5fa8 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -653,5 +653,18 @@ REMOTE is non-nil, search on the remote host indicated by (file-name-quote default-directory)))) (locate-file command exec-path exec-suffixes 1))))) +(unless (fboundp 'exec-path) + ;; DEPRECATED Backported from Emacs 27.1 + (defun exec-path () + "Return list of directories to search programs to run in remote subprocesses. +The remote host is identified by `default-directory'. For remote +hosts that do not support subprocesses, this returns `nil'. +If `default-directory' is a local directory, this function returns +the value of the variable `exec-path'." + (let ((handler (find-file-name-handler default-directory 'exec-path))) + (if handler + (funcall handler 'exec-path) + exec-path)))) + (provide 'core-lib) ;;; core-lib.el ends here From 4e2a473bc00b64cc52059fd4d3748b0f75070cf9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 3 Jan 2021 18:13:12 -0500 Subject: [PATCH 087/183] Bump :completion ivy Yevgnen/ivy-rich@c0a164c -> Yevgnen/ivy-rich@f8a1f5c abo-abo/swiper@778d8bf -> abo-abo/swiper@d2891aa raxod502/prescient.el@5d139e5 -> raxod502/prescient.el@42adc80 tumashu/ivy-posframe@08a00b8 -> tumashu/ivy-posframe@83047d4 Closes #4491: the previous pin broke regex. Using anything other than $ would make the prompt hang. Looks like this pin fixes it. --- modules/completion/ivy/packages.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/completion/ivy/packages.el b/modules/completion/ivy/packages.el index 834f2b93c..578571141 100644 --- a/modules/completion/ivy/packages.el +++ b/modules/completion/ivy/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; completion/ivy/packages.el -(package! swiper :pin "778d8bffa33ae0bf432aa23370bb2a535d2132ce") +(package! swiper :pin "d2891aab7b816aebf21ebd01ce33933a6ac6244f") (package! ivy) (package! ivy-hydra) (package! ivy-avy) @@ -9,16 +9,16 @@ (package! amx :pin "ccfc92c600df681df5e8b5fecec328c462ceb71e") (package! counsel-projectile :pin "06b03c1080d3ccc3fa9b9c41b1ccbcf13f058e4b") -(package! ivy-rich :pin "c0a164ce42920df0629c87dad5ea1bddc79ceac3") +(package! ivy-rich :pin "f8a1f5c90d2a113b597ef5903634c089fce3365b") (package! wgrep :pin "f0ef9bfa44db503cdb2f83fcfbd2fa4e2382ef1f") (if (featurep! +prescient) - (package! ivy-prescient :pin "5d139e5b1fe03ccaddff8c250ab8e9d795071b95") + (package! ivy-prescient :pin "42adc802d3ba6c747bed7ea1f6e3ffbbdfc7192d") (when (featurep! +fuzzy) (package! flx :pin "647cb2f92f9936c62e277d7a74ad54a80502d255"))) (when (featurep! +childframe) - (package! ivy-posframe :pin "08a00b81747c6b623dd1adc7491a1e2a4c3a3d2a")) + (package! ivy-posframe :pin "83047d440ff132d5a45acde5955f71853edeefb9")) (when (featurep! +icons) (package! all-the-icons-ivy :pin "a70cbfa1effe36efc946a823a580cec686d5e88d")) From 3af185a05baf254ca0c1940085e6fe28e6fcd393 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 3 Jan 2021 18:16:23 -0500 Subject: [PATCH 088/183] Bump :lang clojure clojure-emacs/cider@ef47c1d -> clojure-emacs/cider@1a34f89 clojure-emacs/clj-refactor.el@6db85b3 -> clojure-emacs/clj-refactor.el@9dcc50d Closes #4479 --- modules/lang/clojure/packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/clojure/packages.el b/modules/lang/clojure/packages.el index 548883ca9..9f340fd13 100644 --- a/modules/lang/clojure/packages.el +++ b/modules/lang/clojure/packages.el @@ -2,8 +2,8 @@ ;;; lang/clojure/packages.el (package! clojure-mode :pin "53ef8ac076ae7811627fbdd408e519ab7fca9a0b") -(package! cider :pin "ef47c1de151c212b8d2ddeb9af6c8b0dfc0e300f") -(package! clj-refactor :pin "6db85b37b57497b56d97d5e5512160e5db85f798") +(package! cider :pin "1a34f893e1fe81982fb5099192122a72ee8e94ea") +(package! clj-refactor :pin "9dcc50da7ce6f3c10276c87f09022e80c03e8bef") (when (featurep! :checkers syntax) (package! flycheck-clj-kondo :pin "a558bda44c4cb65b69fa53df233e8941ebd195c5")) From 2c51be5b2ceda33d61fd4276d8c2c45ca8ca0556 Mon Sep 17 00:00:00 2001 From: midchildan Date: Mon, 4 Jan 2021 08:42:57 +0900 Subject: [PATCH 089/183] Respect the :ignore property for packages installed as dependencies (#4497) * Respect the :ignore property for packages installed as dependencies * Fix indentation Co-authored-by: Henrik Lissner --- 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 d0af30e26..40b0e73f4 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -191,7 +191,8 @@ processed." (dolist (package doom-packages) (cl-destructuring-bind (name &key recipe disable ignore shadow &allow-other-keys) package - (unless ignore + (if ignore + (straight-override-recipe (cons name '(:type built-in))) (if disable (cl-pushnew name doom-disabled-packages) (when shadow From d07508189991ad070443db202784ba4d87977848 Mon Sep 17 00:00:00 2001 From: Seth Mason Date: Sun, 3 Jan 2021 15:43:44 -0800 Subject: [PATCH 090/183] Add cider pprint to local map. (#4461) * Add cider-pprint defuns to local map. Add the `cider-pprint-*` defuns to ` p`. * Merge hanging paren Co-authored-by: Seth Mason Co-authored-by: Henrik Lissner --- modules/lang/clojure/README.org | 5 +++++ modules/lang/clojure/config.el | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/modules/lang/clojure/README.org b/modules/lang/clojure/README.org index 6db97a7ad..4eb140edb 100644 --- a/modules/lang/clojure/README.org +++ b/modules/lang/clojure/README.org @@ -86,6 +86,11 @@ This module requires: | = n N= | =cider-browse-ns-all= | | = n n= | =cider-browse-ns= | | = n r= | =cider-ns-refresh= | +| = p d= | =cider-pprint-eval-defun-at-point= | +| = p D= | =cider-pprint-eval-defun-to-comment= | +| = p p= | =cider-pprint-eval-last-sexp= | +| = p P= | =cider-pprint-eval-last-sexp-to-comment= | +| = p r= | =cider-pprint-eval-last-sexp-to-repl= | | = r B= | =+clojure/cider-switch-to-repl-buffer-and-switch-ns= | | = r L= | =cider-load-buffer-and-switch-to-repl-buffer= | | = r R= | =cider-restart= | diff --git a/modules/lang/clojure/config.el b/modules/lang/clojure/config.el index efc1b6242..f8e9bdb9a 100644 --- a/modules/lang/clojure/config.el +++ b/modules/lang/clojure/config.el @@ -126,6 +126,12 @@ "n" #'cider-browse-ns "N" #'cider-browse-ns-all "r" #'cider-ns-refresh) + (:prefix ("p" . "print") + "p" #'cider-pprint-eval-last-sexp + "P" #'cider-pprint-eval-last-sexp-to-comment + "d" #'cider-pprint-eval-defun-at-point + "D" #'cider-pprint-eval-defun-to-comment + "r" #'cider-pprint-eval-last-sexp-to-repl) (:prefix ("r" . "repl") "n" #'cider-repl-set-ns "q" #'cider-quit From c63eceb43b1faa5340afa511e17a0d474e26cb78 Mon Sep 17 00:00:00 2001 From: Nathan Lovato Date: Sat, 26 Dec 2020 21:04:08 -0600 Subject: [PATCH 091/183] Markdown: add keymap for insert commands --- modules/lang/markdown/config.el | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/modules/lang/markdown/config.el b/modules/lang/markdown/config.el index ef8524846..89a351349 100644 --- a/modules/lang/markdown/config.el +++ b/modules/lang/markdown/config.el @@ -86,12 +86,35 @@ capture, the end position, and the output buffer.") "p" #'markdown-preview "e" #'markdown-export (:when (featurep! +grip) - "p" #'grip-mode) + "p" #'grip-mode) (:prefix ("i" . "insert") - "t" #'markdown-toc-generate-toc - "i" #'markdown-insert-image - "l" #'markdown-insert-link))) - + :desc "Table Of Content" "T" #'markdown-toc-generate-toc + :desc "Image" "i" #'markdown-insert-image + :desc "Link" "l" #'markdown-insert-link + :desc "
" "-" #'markdown-insert-hr + :desc "Heading 1" "1" #'markdown-insert-header-atx-1 + :desc "Heading 2" "2" #'markdown-insert-header-atx-2 + :desc "Heading 3" "3" #'markdown-insert-header-atx-3 + :desc "Heading 4" "4" #'markdown-insert-header-atx-4 + :desc "Heading 5" "5" #'markdown-insert-header-atx-5 + :desc "Heading 6" "6" #'markdown-insert-header-atx-6 + :desc "Code block" "C" #'markdown-insert-gfm-code-block + :desc "Pre region" "P" #'markdown-pre-region + :desc "Blockquote region" "Q" #'markdown-blockquote-region + :desc "Checkbox" "[" #'markdown-insert-gfm-checkbox + :desc "Bold" "b" #'markdown-insert-bold + :desc "Inline code" "c" #'markdown-insert-code + :desc "Italic" "e" #'markdown-insert-italic + :desc "Footnote" "f" #'markdown-insert-footnote + :desc "Header dwim" "h" #'markdown-insert-header-dwim + :desc "Italic" "i" #'markdown-insert-italic + :desc "Kbd" "k" #'markdown-insert-kbd + :desc "Link" "l" #'markdown-insert-link + :desc "Pre" "p" #'markdown-insert-pre + :desc "New blockquote" "q" #'markdown-insert-blockquote + :desc "Strike through" "s" #'markdown-insert-strike-through + :desc "Table" "t" #'markdown-insert-table + :desc "Wiki link" "w" #'markdown-insert-wiki-link))) (use-package! evil-markdown :when (featurep! :editor evil +everywhere) From 12d8691fa8b233be54016da87e4c890361236b99 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 3 Jan 2021 22:37:51 -0500 Subject: [PATCH 092/183] Fix #4460: simplify +org--strip-properties-from-outline-a Link cleanup is done upstream, in org, so we don't have to. --- modules/lang/org/config.el | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 63d557aaf..0f0a6063d 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -550,20 +550,14 @@ the exported output (i.e. formatters)." (when (get-buffer-window) (recenter))) - (defadvice! +org--strip-properties-from-outline-a (orig-fn path &optional width prefix separator) - "Remove link syntax and fix variable height text (e.g. org headings) in the -eldoc string." + (defadvice! +org--strip-properties-from-outline-a (orig-fn &rest args) + "Fix variable height faces in eldoc breadcrumbs." :around #'org-format-outline-path - (funcall orig-fn - (cl-loop for part in path - ;; Remove full link syntax - for fixedpart = (replace-regexp-in-string org-link-any-re "\\4" (or part "")) - for n from 0 - for face = (nth (% n org-n-level-faces) org-level-faces) - collect - (org-add-props fixedpart - nil 'face `(:foreground ,(face-foreground face nil t) :weight bold))) - width prefix separator)) + (let ((org-level-faces + (cl-loop for face in org-level-faces + collect `(:foreground ,(face-foreground face nil t) + :weight bold)))) + (apply orig-fn args))) (after! org-eldoc ;; HACK Fix #2972: infinite recursion when eldoc kicks in in 'org' or From a567834ff8feb890c40ae7860d65625cebf029f0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 3 Jan 2021 22:40:06 -0500 Subject: [PATCH 093/183] Fix #4457: broken key sequences ending with C-i --- core/core-keybinds.el | 14 +++++++++----- core/core-lib.el | 12 ++++++++++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/core/core-keybinds.el b/core/core-keybinds.el index 705dde5ec..6d78c6db1 100644 --- a/core/core-keybinds.el +++ b/core/core-keybinds.el @@ -41,12 +41,16 @@ and Emacs states, and for non-evil users.") ;; HACK Fixes Emacs' disturbing inability to distinguish C-i from TAB. (define-key key-translation-map [?\C-i] - (cmd! (if (and (not (cl-position 'tab (this-single-command-raw-keys))) - (not (cl-position 'kp-tab (this-single-command-raw-keys))) - (display-graphic-p)) + (cmd! (if (let ((keys (this-single-command-raw-keys))) + (and keys + (not (cl-position 'tab keys)) + (not (cl-position 'kp-tab keys)) + (display-graphic-p) + (let ((key + (doom-lookup-key + (vconcat (cl-subseq keys 0 -1) [C-i])))) + (not (or (numberp key) (null key)))))) [C-i] [?\C-i]))) -;; However, ensure falls back to the old keybind if it has no binding. -(global-set-key [C-i] [?\C-i]) ;; diff --git a/core/core-lib.el b/core/core-lib.el index 783fb5fa8..eed0837ab 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -94,6 +94,18 @@ at the values with which this function was called." (lambda (&rest pre-args) (apply fn (append pre-args args)))) +(defun doom-lookup-key (keys &optional keymap) + "Like `lookup-key', but search active keymaps if KEYMAP is omitted." + (if keymap + (lookup-key keymap keys) + (cl-loop for keymap + in (append (mapcar #'cdr (mapcar #'symbol-value emulation-mode-map-alists)) + (list (current-local-map)) + (mapcar #'cdr minor-mode-alist) + (list (current-global-map))) + if (lookup-key keymap keys) + return it))) + ;; ;;; Sugars From b12df73cc123f2b514f0c5d360ea729a1e1b1c7d Mon Sep 17 00:00:00 2001 From: Nikita Bloshchanevich Date: Sat, 2 Jan 2021 12:24:31 +0100 Subject: [PATCH 094/183] Emacs-lisp eldoc: fix error if symbol unbound `+emacs-lisp-append-value-to-eldoc-a' `error's if the symbol isn't bound, because `symbol-value' errors in that case. Fix that bug by only modifying the result of `elisp-get-var-docstring' if the symbol is bound. --- modules/lang/emacs-lisp/config.el | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/lang/emacs-lisp/config.el b/modules/lang/emacs-lisp/config.el index 1286a7588..bf8c5553d 100644 --- a/modules/lang/emacs-lisp/config.el +++ b/modules/lang/emacs-lisp/config.el @@ -99,15 +99,17 @@ employed so that flycheck still does *some* helpful linting.") "Display variable value next to documentation in eldoc." :around #'elisp-get-var-docstring (when-let (ret (funcall orig-fn sym)) - (concat ret " " - (let* ((truncated " [...]") - (print-escape-newlines t) - (str (symbol-value sym)) - (str (prin1-to-string str)) - (limit (- (frame-width) (length ret) (length truncated) 1))) - (format (format "%%0.%ds%%s" (max limit 0)) - (propertize str 'face 'warning) - (if (< (length str) limit) "" truncated)))))) + (if (fboundp sym) + (concat ret " " + (let* ((truncated " [...]") + (print-escape-newlines t) + (str (symbol-value sym)) + (str (prin1-to-string str)) + (limit (- (frame-width) (length ret) (length truncated) 1))) + (format (format "%%0.%ds%%s" (max limit 0)) + (propertize str 'face 'warning) + (if (< (length str) limit) "" truncated)))) + ret))) (map! :localleader :map emacs-lisp-mode-map From 5b8d8aed5171af5b9acda05fcb63c60cbef0a111 Mon Sep 17 00:00:00 2001 From: Ralf Beckmann Date: Mon, 4 Jan 2021 18:33:45 +0100 Subject: [PATCH 095/183] Enable company-ansible upfront --- modules/tools/ansible/config.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/tools/ansible/config.el b/modules/tools/ansible/config.el index 0e425be03..efef20a50 100644 --- a/modules/tools/ansible/config.el +++ b/modules/tools/ansible/config.el @@ -7,6 +7,8 @@ :config (setq ansible-section-face 'font-lock-variable-name-face ansible-task-label-face 'font-lock-doc-face) + (when (featurep! :completion company) + (set-company-backend! 'ansible 'company-ansible)) (map! :map ansible-key-map :localleader :desc "Decrypt buffer" "d" #'ansible-decrypt-buffer From db82474a58d6b5f0430051b174ea56da2018dc94 Mon Sep 17 00:00:00 2001 From: Ralf Beckmann Date: Mon, 4 Jan 2021 18:34:24 +0100 Subject: [PATCH 096/183] Add doctor.el for :tools ansible --- modules/tools/ansible/doctor.el | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 modules/tools/ansible/doctor.el diff --git a/modules/tools/ansible/doctor.el b/modules/tools/ansible/doctor.el new file mode 100644 index 000000000..343875d14 --- /dev/null +++ b/modules/tools/ansible/doctor.el @@ -0,0 +1,5 @@ +;; -*- lexical-binding: t; no-byte-compile: t; -*- +;;; tools/ansible/doctor.el + +(unless (executable-find "ansible") + (warn! "Couldn't find ansible executable. Some features of the ansible module won't work")) From 6ef517353ba0bf077327f3df066260a56659805a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 4 Jan 2021 18:26:08 -0500 Subject: [PATCH 097/183] Bump :tools NicolasPetton/pass@919d8e3 -> NicolasPetton/pass@a095d24 abo-abo/define-word@3af6825 -> abo-abo/define-word@6e4a427 editorconfig/editorconfig-emacs@da84471 -> editorconfig/editorconfig-emacs@d73333c emacs-lsp/dap-mode@041db8e -> emacs-lsp/dap-mode@612388d emacs-lsp/lsp-mode@61443f3 -> emacs-lsp/lsp-mode@dbfbe1a emacs-lsp/lsp-ui@49bc513 -> emacs-lsp/lsp-ui@94673cd emacs-straight/project@0003fe4 -> emacs-straight/project@a1997af emacsorphanage/terraform-mode@63fafc6 -> emacsorphanage/terraform-mode@a9fa5bd joaotavora/eglot@2172641 -> joaotavora/eglot@4c85df2 k1LoW/emacs-ansible@cf6b8f0 -> k1LoW/emacs-ansible@40af0d2 magit/forge@953764d -> magit/forge@e340c2b magit/magit@acfe22a -> magit/magit@2145477 millejoh/emacs-ipython-notebook@a019ee3 -> millejoh/emacs-ipython-notebook@917f2a0 nicolaisingh/saveplace-pdf-view@88e07be -> nicolaisingh/saveplace-pdf-view@b037091 realgud/realgud@ff66001 -> realgud/realgud@f73c039 spotify/dockerfile-mode@d31f768 -> spotify/dockerfile-mode@6a56c1c tmalsburg/helm-bibtex@8d84d8b -> tmalsburg/helm-bibtex@1bb81d7 tmalsburg/helm-bibtex@8d84d8b -> tmalsburg/helm-bibtex@1bb81d7 tmalsburg/helm-bibtex@8d84d8b -> tmalsburg/helm-bibtex@1bb81d7 tumashu/posframe@e1552c8 -> tumashu/posframe@ae8ac91 --- modules/tools/ansible/packages.el | 2 +- modules/tools/biblio/packages.el | 6 +++--- modules/tools/debugger/packages.el | 6 +++--- modules/tools/docker/packages.el | 2 +- modules/tools/editorconfig/packages.el | 2 +- modules/tools/ein/packages.el | 2 +- modules/tools/lookup/packages.el | 2 +- modules/tools/lsp/packages.el | 8 ++++---- modules/tools/magit/packages.el | 4 ++-- modules/tools/pass/packages.el | 2 +- modules/tools/pdf/packages.el | 2 +- modules/tools/terraform/packages.el | 2 +- 12 files changed, 20 insertions(+), 20 deletions(-) diff --git a/modules/tools/ansible/packages.el b/modules/tools/ansible/packages.el index 4314ba690..bb8cf2457 100644 --- a/modules/tools/ansible/packages.el +++ b/modules/tools/ansible/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/ansible/packages.el -(package! ansible :recipe (:nonrecursive t) :pin "cf6b8f06c2628357fc2a72ea9817a2c2d0ebf690") +(package! ansible :recipe (:nonrecursive t) :pin "40af0d2bbb6c5bbcf7aa9269ac9a07e22622d263") (package! ansible-doc :pin "86083a7bb2ed0468ca64e52076b06441a2f8e9e0") (package! jinja2-mode :pin "ecd19a40b7832bb00f0a2244e3b0713d0bf3850d") (package! yaml-mode :pin "fc5e1c58f94472944c4aa838f00f6adcac6fa992") diff --git a/modules/tools/biblio/packages.el b/modules/tools/biblio/packages.el index 81425bb59..7861658a9 100644 --- a/modules/tools/biblio/packages.el +++ b/modules/tools/biblio/packages.el @@ -1,8 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/biblio/packages.el -(package! bibtex-completion :pin "8d84d8beb3bfafaa060d7e956fcc569ecf010d9c") +(package! bibtex-completion :pin "1bb81d77e08296a50de7ebfe5cf5b0c715b7f3d6") (when (featurep! :completion ivy) - (package! ivy-bibtex :pin "8d84d8beb3bfafaa060d7e956fcc569ecf010d9c")) + (package! ivy-bibtex :pin "1bb81d77e08296a50de7ebfe5cf5b0c715b7f3d6")) (when (featurep! :completion helm) - (package! helm-bibtex :pin "8d84d8beb3bfafaa060d7e956fcc569ecf010d9c")) + (package! helm-bibtex :pin "1bb81d77e08296a50de7ebfe5cf5b0c715b7f3d6")) diff --git a/modules/tools/debugger/packages.el b/modules/tools/debugger/packages.el index 65f8d9070..6f82c63e5 100644 --- a/modules/tools/debugger/packages.el +++ b/modules/tools/debugger/packages.el @@ -1,10 +1,10 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/debugger/packages.el -(when (package! realgud :pin "ff660011c82c6af504915833e2d981a547b7ad58") +(when (package! realgud :pin "f73c039a340579a98e6716c901fd4e80e7eaa2eb") (when (featurep! :lang javascript) (package! realgud-trepan-ni :pin "6e38cf838c7b47b5f1353d00901b939ffa36d707"))) (when (featurep! +lsp) - (package! dap-mode :pin "041db8eb7f0ceb9477ffff1730b5940814001158") - (package! posframe :pin "e1552c82dffaadc5e7de09a44880a498197ffbee")) + (package! dap-mode :pin "612388d0b85e77972a9c28391bac6224a63408c7") + (package! posframe :pin "ae8ac91744010c8975f07cf18282f58ce56605d0")) diff --git a/modules/tools/docker/packages.el b/modules/tools/docker/packages.el index b786965dc..f3b149df6 100644 --- a/modules/tools/docker/packages.el +++ b/modules/tools/docker/packages.el @@ -3,4 +3,4 @@ (package! docker :pin "3773112eea3fc99704b5ca50c1e9a3db2cb8e4f3") (package! docker-tramp :pin "8e2b671eff7a81af43b76d9dfcf94ddaa8333a23") -(package! dockerfile-mode :pin "d31f7685ebc5832d957e25070a930aa42984327d") +(package! dockerfile-mode :pin "6a56c1cc1713b501040b08fdbf0c4159a4fe95f9") diff --git a/modules/tools/editorconfig/packages.el b/modules/tools/editorconfig/packages.el index fb6222b93..517eb50d7 100644 --- a/modules/tools/editorconfig/packages.el +++ b/modules/tools/editorconfig/packages.el @@ -3,4 +3,4 @@ (package! editorconfig :recipe (:nonrecursive t) - :pin "da844718bfe1ca51919c63fdffedaba5d0cc1bba") + :pin "d73333c224de783e42acd225a20330a667fe5191") diff --git a/modules/tools/ein/packages.el b/modules/tools/ein/packages.el index 74ee841a3..b9fe836f8 100644 --- a/modules/tools/ein/packages.el +++ b/modules/tools/ein/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/ein/packages.el -(package! ein :pin "a019ee3994585e4ed4700d2591d693fda3232616") +(package! ein :pin "917f2a0b6ca76ed9e966985ca6f19d8b57690d40") diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index da3273b38..3c707eaa2 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -27,7 +27,7 @@ (when (featurep! +dictionary) (if IS-MAC (package! osx-dictionary :pin "1b79ff64c72485cb078db9ab7ee3256b11a99f4b") - (package! define-word :pin "3af6825c5f3bf4f6176a3f5b2e499616c65e2fe0") + (package! define-word :pin "6e4a427503aef096484f88332962c346cdd10847") (package! powerthesaurus :pin "93036d3b111925ebc34f747ff846cb0b8669b92e") (when (featurep! +offline) (package! wordnut :pin "feac531404041855312c1a046bde7ea18c674915") diff --git a/modules/tools/lsp/packages.el b/modules/tools/lsp/packages.el index 267dc9568..564389447 100644 --- a/modules/tools/lsp/packages.el +++ b/modules/tools/lsp/packages.el @@ -3,10 +3,10 @@ (if (featurep! +eglot) (progn - (package! eglot :pin "21726416e6e580b20dfa90833c6dab2a8a15ea48") - (package! project :pin "0003fe4f3f81be08a9427888ead29f182e0b2527")) - (package! lsp-mode :pin "61443f32531d1e94026c379319c99f21414ee3e7") - (package! lsp-ui :pin "49bc5134c15d92b866c389c16e8e551a9285961a") + (package! eglot :pin "4c85df2b04e467b8ed0eca68bd202fd0e7b671f4") + (package! project :pin "a1997af9a6de5b10cebe8c06875508249ad559ea")) + (package! lsp-mode :pin "dbfbe1a221de78e5d42e93ab2833d68c7f27f1b7") + (package! lsp-ui :pin "94673cd08c35acc3b6c34301f74f1852487a5558") (when (featurep! :completion ivy) (package! lsp-ivy :pin "c70ee8b54357c56d1b972393ee53e57a2e545fbb")) (when (featurep! :completion helm) diff --git a/modules/tools/magit/packages.el b/modules/tools/magit/packages.el index e74d9c056..528716738 100644 --- a/modules/tools/magit/packages.el +++ b/modules/tools/magit/packages.el @@ -1,9 +1,9 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/magit/packages.el -(when (package! magit :pin "acfe22ab60a56c61aae3ca6d4f2b7b826fe3b071") +(when (package! magit :pin "21454777281247d97814ce5fb64f4afe39fab5da") (when (featurep! +forge) - (package! forge :pin "953764d2bb57b6bbaec4a2048722050fd15732db")) + (package! forge :pin "e340c2be2aa5337c8c4c81cd6eab87961c6848b6")) (package! magit-gitflow :pin "cc41b561ec6eea947fe9a176349fb4f771ed865b") (package! magit-todos :pin "78d24cf419138b543460f40509c8c1a168b52ca0") (package! github-review :pin "db723740e02348c0760407e532ad667ef89210ec")) diff --git a/modules/tools/pass/packages.el b/modules/tools/pass/packages.el index 20ef7d3c9..52b809493 100644 --- a/modules/tools/pass/packages.el +++ b/modules/tools/pass/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/pass/packages.el -(package! pass :pin "919d8e3826d556433ab67d4ee21a509d209d1baa") +(package! pass :pin "a095d24cf06a7b0fbc3add480c101304a91cf788") (package! password-store :pin "f152064da9832d6d3d2b4e75f43f63bf2d50716f") (package! password-store-otp :pin "04998c8578a060ab4a4e8f46f2ee0aafad4ab4d5") diff --git a/modules/tools/pdf/packages.el b/modules/tools/pdf/packages.el index d198a277c..8c08f99b7 100644 --- a/modules/tools/pdf/packages.el +++ b/modules/tools/pdf/packages.el @@ -8,4 +8,4 @@ :branch "fix-macros") :pin "eb6d40663069f2b7e6b52e907eeaa4e37375feb6") -(package! saveplace-pdf-view :pin "88e07be656544bcdfa332d25880abff168ca1423") +(package! saveplace-pdf-view :pin "b0370912049222f3a4c943856de3d69d48d53a35") diff --git a/modules/tools/terraform/packages.el b/modules/tools/terraform/packages.el index f30525da1..7bbecb3aa 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 "63fafc635b04b1b72e408e7dcb21c1fac78fc60b") +(package! terraform-mode :pin "a9fa5bdaf58e9cae32ee44b7d0883f5600441b05") (when (featurep! :completion company) (package! company-terraform :pin "2d11a21fee2f298e48968e479ddcaeda4d736e12")) From da177d58c4c1d58b7258226ef2603b9cbd527a2c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 5 Jan 2021 01:50:48 -0500 Subject: [PATCH 098/183] Fix #4457: wrong-type-arg keymapp on C-i keybinds --- 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 eed0837ab..cc330d903 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -99,10 +99,14 @@ at the values with which this function was called." (if keymap (lookup-key keymap keys) (cl-loop for keymap - in (append (mapcar #'cdr (mapcar #'symbol-value emulation-mode-map-alists)) + in (append (cl-loop for alist in emulation-mode-map-alists + if (boundp alist) + append (mapcar #'cdr (symbol-value alist))) (list (current-local-map)) + (mapcar #'cdr minor-mode-overriding-map-alist) (mapcar #'cdr minor-mode-alist) (list (current-global-map))) + if (keymapp keymap) if (lookup-key keymap keys) return it))) From b89929f3f85804e8cf7e79cf4e25e94b404ce6f8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 5 Jan 2021 19:08:27 -0500 Subject: [PATCH 099/183] Bind {C-h, SPC h} V to doom/help-custom-variable For looking up custom variables (i.e. variables intended to be customized; defined with defcustom). --- core/autoload/help.el | 23 +++++++++++++++++++++++ modules/config/default/config.el | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 96b918c53..3497d46b6 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -379,6 +379,29 @@ current file is in, or d) the module associated with the current major mode (see (doom-project-browse (file-name-directory path))) ((user-error "Aborted module lookup"))))) +;;;###autoload +(defun doom/help-custom-variable (var) + "Look up documentation for a custom variable. + +Unlike `helpful-variable', which casts a wider net that includes internal +variables, this only lists variables that exist to be customized (defined with +`defcustom')." + (interactive + (list (helpful--read-symbol + "Custom variable: " + (helpful--variable-at-point) + (lambda (sym) + (and (helpful--variable-p sym) + (or (get sym 'custom-type) + (get sym 'custom-package-version) + (get sym 'custom-set)) + ;; Exclude minor mode state variables, which aren't meant to be + ;; modified directly, but through their associated function. + (not (or (and (string-suffix-p "-mode" (symbol-name sym)) + (fboundp sym)) + (eq (get sym 'custom-set) 'custom-set-minor-mode)))))))) + (helpful-variable var)) + ;; ;;; `doom/help-packages' diff --git a/modules/config/default/config.el b/modules/config/default/config.el index f8e38b9c9..2f29f5940 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -310,7 +310,7 @@ Continues comments if executed from a commented line. Consults "M" #'doom/describe-active-minor-mode "O" #'+lookup/online "T" #'doom/toggle-profiler - "V" #'set-variable + "V" #'doom/help-custom-variable "W" #'+default/man-or-woman "C-k" #'describe-key-briefly "C-l" #'describe-language-environment From 34c5dad750ba5c2c7626b9e1d31c0930ab218fa5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 5 Jan 2021 19:28:09 -0500 Subject: [PATCH 100/183] Add value+docstring columns to doom/help-custom-variable When used with ivy. Also: slight refactor of doom/help-custom-variable. --- core/autoload/help.el | 4 +--- modules/completion/ivy/config.el | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 3497d46b6..3218e10af 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -392,9 +392,7 @@ variables, this only lists variables that exist to be customized (defined with (helpful--variable-at-point) (lambda (sym) (and (helpful--variable-p sym) - (or (get sym 'custom-type) - (get sym 'custom-package-version) - (get sym 'custom-set)) + (custom-variable-p sym) ;; Exclude minor mode state variables, which aren't meant to be ;; modified directly, but through their associated function. (not (or (and (string-suffix-p "-mode" (symbol-name sym)) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index fd5867ccb..261acf953 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -235,6 +235,10 @@ results buffer.") (setq counsel-describe-function-function #'helpful-callable counsel-describe-variable-function #'helpful-variable) + ;; Decorate `doom/help-custom-variable' results the same way as + ;; `counsel-describe-variable' (adds value and docstring columns). + (ivy-configure 'doom/help-custom-variable :parent 'counsel-describe-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) (add-hook 'counsel-grep-post-action-hook #'recenter) From 70e71f3f6d48a8e3728ff70ef150148f4b7d6e52 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 6 Jan 2021 20:55:36 -0500 Subject: [PATCH 101/183] lsp-headerline-breadcrumb-enable = nil --- modules/tools/lsp/+lsp.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/tools/lsp/+lsp.el b/modules/tools/lsp/+lsp.el index 8504610c5..cc541e71b 100644 --- a/modules/tools/lsp/+lsp.el +++ b/modules/tools/lsp/+lsp.el @@ -28,6 +28,8 @@ Can be a list of backends; accepts any value `company-backends' accepts.") lsp-enable-text-document-color nil) ;; Reduce unexpected modifications to code (setq lsp-enable-on-type-formatting nil) + ;; Make breadcrumbs opt-in; they're redundant with the modeline and imenu + (setq lsp-headerline-breadcrumb-enable nil) ;; Let doom bind the lsp keymap. (when (featurep! :config default +bindings) From 1ba06ed5df646dd69a1fc6c38a1b42cc87d4ad94 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 7 Jan 2021 01:42:15 -0500 Subject: [PATCH 102/183] Enable eshell-tramp by default --- 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 755c598fe..33458f007 100644 --- a/modules/term/eshell/config.el +++ b/modules/term/eshell/config.el @@ -73,6 +73,8 @@ You should use `set-eshell-alias!' to change this.") eshell-glob-case-insensitive t eshell-error-if-no-glob t) + (add-to-list 'eshell-modules-list 'eshell-tramp) + ;; Consider eshell buffers real (add-hook 'eshell-mode-hook #'doom-mark-buffer-as-real-h) From cae1766d8ef2d1588501f141922b7bd166bda7b5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 7 Jan 2021 01:42:38 -0500 Subject: [PATCH 103/183] redisplay-skip-fontification-on-input = t This setting was introduced recently in Emacs HEAD. --- core/core.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/core.el b/core/core.el index 429289344..7fd29cbf7 100644 --- a/core/core.el +++ b/core/core.el @@ -296,6 +296,10 @@ config.el instead." ;; usage, however! (setq inhibit-compacting-font-caches t) +;; Introduced in Emacs HEAD (b2f8c9f), this inhibits fontification while +;; receiving input, which should help with performance while scrolling. +(setq redisplay-skip-fontification-on-input t) + ;; Performance on Windows is considerably worse than elsewhere. We'll need ;; everything we can get. (when IS-WINDOWS From c0c932ae09850d81e5c865d8e8f0320f97015624 Mon Sep 17 00:00:00 2001 From: Sam Whitlock <433170+samwhitlock@users.noreply.github.com> Date: Thu, 7 Jan 2021 09:05:18 +0100 Subject: [PATCH 104/183] Improving snippet lookup behavior This enables snippets to be accessed by UUID in parent modes of the current mode. Prior behavior was to only look up for the current mode, but the active modes (and those suggested in the prompt) include parent-mode snippets (e.g., text-mode snippets when major-mode is org-mode). --- modules/editor/snippets/autoload/snippets.el | 22 ++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/modules/editor/snippets/autoload/snippets.el b/modules/editor/snippets/autoload/snippets.el index 90468383e..e7cbd105d 100644 --- a/modules/editor/snippets/autoload/snippets.el +++ b/modules/editor/snippets/autoload/snippets.el @@ -33,6 +33,24 @@ ignored. This makes it easy to override built-in snippets with private ones." (make-directory dir t) (error "%S doesn't exist" (abbreviate-file-name dir))))) +(defun +snippet--get-exact-template-by-uuid (mode uuid) + "Similar behavior to yas--get-template-by-uuid, but deal with empty tables better. +Yas' behavior introduces a bug for this case (no table for mode)" + (when-let* ((table (gethash mode yas--tables)) + (uuid-hash (yas--table-uuidhash table))) + (gethash uuid uuid-hash))) + +(defun +snippet--get-template-by-uuid (uuid &optional mode) + "Look up the template by uuid in child-most to parent-most mode order. +Finds correctly active snippets from parent modes (based on Yas' logic)." + (let* ((mode (or mode major-mode)) + (active-modes (yas--modes-to-activate mode))) + (cl-loop + for active-mode in active-modes + for template = (+snippet--get-exact-template-by-uuid active-mode uuid) + if (not (null template)) + return template))) + (defun +snippet--completing-read-uuid (prompt all-snippets &rest args) (plist-get (text-properties-at @@ -169,7 +187,7 @@ buggy behavior when is pressed in an empty field." (interactive (list (+snippet--completing-read-uuid "Visit snippet: " current-prefix-arg))) - (if-let* ((template (yas--get-template-by-uuid major-mode template-uuid)) + (if-let* ((template (+snippet--get-template-by-uuid template-uuid major-mode)) (template-path (yas--template-load-file template))) (progn (unless (file-readable-p template-path) @@ -242,7 +260,7 @@ shadow the default snippet)." (if-let* ((major-mode (if (eq major-mode 'snippet-mode) (intern (file-name-base (directory-file-name default-directory))) major-mode)) - (template (yas--get-template-by-uuid major-mode template-uuid)) + (template (+snippet--get-template-by-uuid template-uuid major-mode)) (template-path (yas--template-load-file template))) (if (file-in-directory-p template-path +snippets-dir) (find-file template-path) From 670c8d519d22bb30bd909882c836163af6c9288f Mon Sep 17 00:00:00 2001 From: Sam Whitlock <433170+samwhitlock@users.noreply.github.com> Date: Thu, 7 Jan 2021 11:40:50 +0100 Subject: [PATCH 105/183] Inlining the uuid function --- modules/editor/snippets/autoload/snippets.el | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/modules/editor/snippets/autoload/snippets.el b/modules/editor/snippets/autoload/snippets.el index e7cbd105d..b87a91b72 100644 --- a/modules/editor/snippets/autoload/snippets.el +++ b/modules/editor/snippets/autoload/snippets.el @@ -33,23 +33,14 @@ ignored. This makes it easy to override built-in snippets with private ones." (make-directory dir t) (error "%S doesn't exist" (abbreviate-file-name dir))))) -(defun +snippet--get-exact-template-by-uuid (mode uuid) - "Similar behavior to yas--get-template-by-uuid, but deal with empty tables better. -Yas' behavior introduces a bug for this case (no table for mode)" - (when-let* ((table (gethash mode yas--tables)) - (uuid-hash (yas--table-uuidhash table))) - (gethash uuid uuid-hash))) - (defun +snippet--get-template-by-uuid (uuid &optional mode) "Look up the template by uuid in child-most to parent-most mode order. Finds correctly active snippets from parent modes (based on Yas' logic)." - (let* ((mode (or mode major-mode)) - (active-modes (yas--modes-to-activate mode))) - (cl-loop - for active-mode in active-modes - for template = (+snippet--get-exact-template-by-uuid active-mode uuid) - if (not (null template)) - return template))) + (cl-loop with mode = (or mode major-mode) + for active-mode in (yas--modes-to-activate mode) + if (gethash active-mode yas--tables) + if (gethash uuid (yas--table-uuidhash it)) + return it)) (defun +snippet--completing-read-uuid (prompt all-snippets &rest args) (plist-get From 39deb6aedb5364af3ce5f5cf90e9110c6b93c7c4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 8 Jan 2021 17:13:46 -0500 Subject: [PATCH 106/183] Resolve remote path to fd/rg for counsel-find-file --- modules/completion/ivy/config.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 261acf953..364a8bb2d 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -291,10 +291,10 @@ results buffer.") "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 ((when-let (fd (executable-find (or doom-projectile-fd-binary "fd"))) + (cond ((when-let (fd (executable-find (or doom-projectile-fd-binary "fd") t)) (append (list fd "-H" "--color=never" "--type" "file" "--type" "symlink" "--follow") (if IS-WINDOWS '("--path-separator=/"))))) - ((executable-find "rg") + ((executable-find "rg" t) (append (list "rg" "--files" "--follow" "--color=never" "--hidden" "-g!.git" "--no-messages") (cl-loop for dir in projectile-globally-ignored-directories collect "--glob" From 5da3641aad62887c76ee69bd5e0aae52892109be Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 3 Jan 2021 22:56:36 -0500 Subject: [PATCH 107/183] Move init.el to early-init.el Our first step toward dropping 26.x support. Allows our optimizations to reach a little further into the startup. --- core/core-ui.el | 19 +++++++++---------- early-init.el | 45 ++++++++++++++++++++++++++++++--------------- init.el | 42 +++++------------------------------------- 3 files changed, 44 insertions(+), 62 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index 0bbece4b1..0ea3085d5 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -289,14 +289,13 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original ;; where we resize windows too quickly. (setq window-resize-pixelwise nil) -(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). - (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))) +;; 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) ;; These are disabled directly through their frame parameters, to avoid the ;; extra work their minor modes do, but we have to unset these variables @@ -592,8 +591,8 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.") (when doom-variable-pitch-font (set-face-attribute 'variable-pitch nil :font doom-variable-pitch-font)) (when (fboundp 'set-fontset-font) - (dolist (font (append doom-unicode-extra-fonts (doom-enlist doom-unicode-font))) - (set-fontset-font t 'unicode font nil 'prepend))) + (dolist (font (cons doom-unicode-font doom-unicode-extra-fonts)) + (set-fontset-font t nil font nil 'prepend))) (run-hooks 'after-setting-font-hook)) ((debug error) (if (string-prefix-p "Font not available: " (error-message-string e)) diff --git a/early-init.el b/early-init.el index 224213d9a..4d182684b 100644 --- a/early-init.el +++ b/early-init.el @@ -1,28 +1,43 @@ ;;; early-init.el -*- lexical-binding: t; -*- -;; Emacs HEAD (27+) introduces early-init.el, which is run before init.el, -;; before package and UI initialization happens. +;; Emacs 27.1 introduced early-init.el, which is run before init.el, before +;; package and UI initialization happens, and before site files are loaded. -;; Defer garbage collection further back in the startup process +;; A big contributor to startup times is garbage collection. We up the gc +;; 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 +;; prevent the use of stale byte-code. Otherwise, it saves us a little IO time +;; to skip the mtime checks on every *.elc file. +(setq load-prefer-newer noninteractive) + ;; In Emacs 27+, package initialization occurs before `user-init-file' is ;; 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) (fset #'package--ensure-init-file #'ignore) ; DEPRECATED Removed in 28 -;; 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) +;; `file-name-handler-alist' is consulted on every `require', `load' and various +;; path/io functions. You get a minor speed up by nooping this. However, this +;; may cause problems on builds of Emacs where its site lisp files aren't +;; byte-compiled and we're forced to load the *.el.gz files (e.g. on Alpine) +(unless (daemonp) + (defvar doom--initial-file-name-handler-alist file-name-handler-alist) + (setq file-name-handler-alist nil) + ;; Restore `file-name-handler-alist' later, because it is needed for handling + ;; encrypted or compressed files, among other things. + (defun doom-reset-file-handler-alist-h () + ;; Re-add rather than `setq', because changes to `file-name-handler-alist' + ;; since startup ought to be preserved. + (dolist (handler file-name-handler-alist) + (add-to-list 'doom--initial-file-name-handler-alist handler)) + (setq file-name-handler-alist doom--initial-file-name-handler-alist)) + (add-hook 'emacs-startup-hook #'doom-reset-file-handler-alist-h)) -;; 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 -;; larger than the system default. -(setq frame-inhibit-implied-resize t) +;; Ensure Doom is running out of this file's directory +(setq user-emacs-directory (file-name-directory load-file-name)) -;; Prevent unwanted runtime builds in gccemacs (native-comp); packages are -;; compiled ahead-of-time when they are installed and site files are compiled -;; when gccemacs is installed. -(setq comp-deferred-compilation nil) +;; Load the heart of Doom Emacs +(load (concat user-emacs-directory "core/core") nil 'nomessage) diff --git a/init.el b/init.el index bbcc64468..9ac6c416f 100644 --- a/init.el +++ b/init.el @@ -27,43 +27,11 @@ ;; ;;; License: MIT -(when (< emacs-major-version 26) - (error "Detected Emacs v%s. Doom only supports Emacs 26 and newer" - emacs-version)) - -;; A big contributor to startup times is garbage collection. We up the gc -;; 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 -;; prevent the use of stale byte-code. Otherwise, it saves us a little IO time -;; to skip the mtime checks on every *.elc file. -(setq load-prefer-newer noninteractive) - -;; `file-name-handler-alist' is consulted on every `require', `load' and various -;; path/io functions. You get a minor speed up by nooping this. However, this -;; may cause problems on builds of Emacs where its site lisp files aren't -;; byte-compiled and we're forced to load the *.el.gz files (e.g. on Alpine) -(unless (daemonp) - (defvar doom--initial-file-name-handler-alist file-name-handler-alist) - (setq file-name-handler-alist nil) - ;; Restore `file-name-handler-alist' later, because it is needed for handling - ;; encrypted or compressed files, among other things. - (defun doom-reset-file-handler-alist-h () - ;; Re-add rather than `setq', because changes to `file-name-handler-alist' - ;; since startup ought to be preserved. - (dolist (handler file-name-handler-alist) - (add-to-list 'doom--initial-file-name-handler-alist handler)) - (setq file-name-handler-alist doom--initial-file-name-handler-alist)) - (add-hook 'emacs-startup-hook #'doom-reset-file-handler-alist-h)) - -;; Ensure Doom is running out of this file's directory -(setq user-emacs-directory (file-name-directory load-file-name)) - -;; Load the heart of Doom Emacs -(load (concat user-emacs-directory "core/core") - nil 'nomessage) +;; In the strange case that early-init.el wasn't loaded (e.g. you're using +;; Chemacs 1? Or you're loading this file directly?), we do it explicitly: +(unless (boundp 'doom-version) + (load (concat (file-name-directory load-file-name) "early-init") + nil t)) ;; And let 'er rip! (doom-initialize) From c8bfbda556b998499d8155081cc848254ee05ecd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 8 Jan 2021 17:45:33 -0500 Subject: [PATCH 108/183] Make anaconda & pipenv integrations remote-aware Resolve paths to pipenv and python-shell-interpreter on the remote if over tramp. --- modules/lang/python/config.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/python/config.el b/modules/lang/python/config.el index f1d23d19e..043045bef 100644 --- a/modules/lang/python/config.el +++ b/modules/lang/python/config.el @@ -102,7 +102,7 @@ (unless (or (bound-and-true-p lsp-mode) (bound-and-true-p eglot--managed-mode) (bound-and-true-p lsp--buffer-deferred) - (not (executable-find python-shell-interpreter))) + (not (executable-find python-shell-interpreter t))) (anaconda-mode +1)))) :config (set-company-backend! 'anaconda-mode '(company-anaconda)) @@ -207,7 +207,7 @@ (set-eval-handler! 'python-mode '((:command . (lambda () python-shell-interpreter)) (:exec (lambda () - (if-let* ((bin (executable-find "pipenv")) + (if-let* ((bin (executable-find "pipenv" t)) (_ (pipenv-project-p))) (format "PIPENV_MAX_DEPTH=9999 %s run %%c %%o %%s %%a" bin) "%c %o %s %a"))) From cfb8a866dc6181889b0c056abf4fdd3f34fb144b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 8 Jan 2021 23:56:27 -0500 Subject: [PATCH 109/183] Bump :core Fuco1/smartparens@7f5825d -> Fuco1/smartparens@63695c6 bbatsov/projectile@d1cfad0 -> bbatsov/projectile@c31bd41 domtronn/all-the-icons.el@6917b08 -> domtronn/all-the-icons.el@9aa16ae iqbalansari/restart-emacs@e570749 -> iqbalansari/restart-emacs@1607da2 jscheid/dtrt-indent@a7ade6d -> jscheid/dtrt-indent@854b9a1 justbur/emacs-which-key@ca268fd -> justbur/emacs-which-key@428aedf jwiegley/use-package@caa92f1 -> jwiegley/use-package@365c73d raxod502/straight.el@3277e1c -> raxod502/straight.el@a32c97c + Closes #4513 + Fixes (wrong-number-of-arguments (3 . 4) 2) error for users on Emacs HEAD (see bbatsov/projectile#1635). + package! :build semantics have changed due to upstream changes. What was :build is now :pre-build. What was :no-build is now :build nil. + Now we must be careful not to auto-disable the "use-package" psuedo theme. It is used as a place to store :custom assignments without them being saved to custom.el. --- core/autoload/packages.el | 18 ++++++++++++------ core/cli/packages.el | 25 +++++++++++++++++-------- core/core-packages.el | 19 +++++++++++++++---- core/core-ui.el | 4 ++-- core/packages.el | 16 ++++++++-------- modules/lang/org/packages.el | 9 +++++---- 6 files changed, 59 insertions(+), 32 deletions(-) diff --git a/core/autoload/packages.el b/core/autoload/packages.el index 3b77d2278..8355da24d 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -13,18 +13,24 @@ ;; ;;; Bump commands -(defun doom--package-full-recipe (package plist) +(defun doom--package-merge-recipes (package plist) (require 'straight) (doom-plist-merge (plist-get plist :recipe) - (or (cdr (straight-recipes-retrieve package)) - (plist-get (cdr (assq package doom-packages)) - :recipe)))) + (if-let (recipe (straight-recipes-retrieve package)) + (cdr (if (memq (car recipe) '(quote \`)) + (eval recipe t) + recipe)) + (let ((recipe (plist-get (cdr (assq package doom-packages)) + :recipe))) + (if (keywordp (car recipe)) + recipe + (cdr recipe)))))) (defun doom--package-to-bump-string (package plist) "Return a PACKAGE and its PLIST in 'username/repo@commit' format." (format "%s@%s" - (plist-get (doom--package-full-recipe package plist) :repo) + (plist-get (doom--package-merge-recipes package plist) :repo) (substring-no-properties (plist-get plist :pin) 0 7))) (defun doom--package-at-point (&optional point) @@ -78,7 +84,7 @@ Grabs the latest commit id of the package using 'git'." (cl-destructuring-bind (&key package plist beg end) (or (doom--package-at-point) (user-error "Not on a `package!' call")) - (let* ((recipe (doom--package-full-recipe package plist)) + (let* ((recipe (doom--package-merge-recipes package plist)) (branch (plist-get recipe :branch)) (oldid (or (plist-get plist :pin) (doom-package-get package :pin))) diff --git a/core/cli/packages.el b/core/cli/packages.el index 0bd47ee93..bccd3f07a 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -335,17 +335,26 @@ declaration) or dependency thereof that hasn't already been." (doom--with-package-recipes recipes (package local-repo recipe) (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 (not (plist-get recipe :no-build)) + (let* ((build-dir (straight--build-dir package)) + (repo-dir (straight--repos-dir local-repo)) + (build (plist-get recipe :build)) + (want-byte-compile + (or (eq build t) + (memq 'compile build))) + (want-native-compile + (and (or (eq build t) + (memq 'native-compile build)) + (require 'comp nil t)))) + (when (eq (car build) :not) + (setq want-byte-compile (not want-byte-compile) + want-native-compile (not want-native-compile))) + (and (or want-byte-compile want-native-compile) (or (file-newer-than-file-p repo-dir build-dir) (file-exists-p (straight--modified-dir (or local-repo package))) - (cl-loop with want-byte = (straight--byte-compile-package-p recipe) - with want-native = (if (require 'comp nil t) (straight--native-compile-package-p recipe)) - with outdated = nil + (cl-loop with outdated = nil for file in (doom-files-in build-dir :match "\\.el$" :full t) - if (or (if want-byte (doom--elc-file-outdated-p file)) - (if want-native (doom--eln-file-outdated-p file))) + if (or (if want-byte-compile (doom--elc-file-outdated-p file)) + (if want-native-compile (doom--eln-file-outdated-p file))) do (setq outdated t) (when want-native (push file doom--eln-output-expected)) diff --git a/core/core-packages.el b/core/core-packages.el index 40b0e73f4..3f984c601 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -235,7 +235,12 @@ processed." (defun doom-package-recipe (package &optional prop nil-value) "Returns the `straight' recipe PACKAGE was registered with." - (let ((plist (gethash (symbol-name package) straight--recipe-cache))) + (let* ((recipe (straight-recipes-retrieve package)) + (plist (doom-plist-merge + (plist-get (alist-get package doom-packages) :recipe) + (cdr (if (memq (car recipe) '(quote \`)) + (eval recipe t) + recipe))))) (if prop (if (plist-member plist prop) (plist-get plist prop) @@ -244,8 +249,14 @@ processed." (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))) + (if-let* ((recipe (copy-sequence (doom-package-recipe package))) + (recipe (if (and (not (plist-member recipe :type)) + (memq (plist-get recipe :host) '(github gitlab bitbucket))) + (plist-put recipe :type 'git) + recipe)) + (repo (if-let (local-repo (plist-get recipe :local-repo)) + (file-name-nondirectory (directory-file-name local-repo)) + (ignore-errors (straight-vc-local-repo-name recipe))))) repo (symbol-name package))) @@ -482,7 +493,7 @@ elsewhere." (when-let (recipe (plist-get plist :recipe)) (cl-destructuring-bind (&key local-repo _files _flavor - _no-build _build _post-build _no-byte-compile + _build _pre-build _post-build _no-byte-compile _no-native-compile _no-autoloads _type _repo _host _branch _remote _nonrecursive _fork _depth) recipe diff --git a/core/core-ui.el b/core/core-ui.el index 0ea3085d5..d6b354d66 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -629,7 +629,7 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.") ;; `load-theme' doesn't disable previously enabled themes, which seems ;; like what you'd want. You could always use `enable-theme' to activate ;; multiple themes instead. - (mapc #'disable-theme (remq theme custom-enabled-themes)) + (mapc #'disable-theme (remq theme (remq 'use-package custom-enabled-themes))) (run-hooks 'doom-load-theme-hook)) result))) @@ -641,7 +641,7 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.") "Disable other themes when loading a new one." :before #'load-theme (unless no-enable - (mapc #'disable-theme custom-enabled-themes))) + (mapc #'disable-theme (remq 'use-package custom-enabled-themes)))) ;; DEPRECATED Not needed in Emacs 27 (defadvice! doom--prefer-compiled-theme-a (orig-fn &rest args) diff --git a/core/packages.el b/core/packages.el index 8ba3389dc..4dacca6d9 100644 --- a/core/packages.el +++ b/core/packages.el @@ -17,26 +17,26 @@ :branch ,straight-repository-branch :local-repo "straight.el" :files ("straight*.el")) - :pin "3277e1c9648b41dd5bfb239c067b8374ed2ec2bb") + :pin "a32c97cb427b7f14dfd066f36a58d1740e20ed69") ;; core-modules.el (package! use-package :type 'core - :pin "caa92f1d64fc25480551757d854b4b49981dfa6b") + :pin "365c73d2618dd0040a32c2601c5456ab5495b812") ;; core-ui.el -(package! all-the-icons :pin "6917b08f64dd8487e23769433d6cb9ba11f4152f") +(package! all-the-icons :pin "9aa16ae198073fe839a0abfa9a7d3a9dc85ef5f9") (package! hide-mode-line :pin "88888825b5b27b300683e662fa3be88d954b1cea") (package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307") (package! rainbow-delimiters :pin "f43d48a24602be3ec899345a3326ed0247b960c6") -(package! restart-emacs :pin "e5707491d7ac20879465bb52e282ad1416748378") +(package! restart-emacs :pin "1607da2bc657fe05ae01f7fdf26f716eafead02c") ;; core-editor.el (package! better-jumper :pin "e3a6546aa626b9a79ae451c88f44cf26f9d1a919") -(package! dtrt-indent :pin "a7ade6d244eeeda2ada9f7eca565491cea4b622a") +(package! dtrt-indent :pin "854b9a1ce93d9926018a0eb18e6e552769c5407d") (package! helpful :pin "584ecc887bb92133119f93a6716cdf7af0b51dca") (package! pcre2el :pin "0b5b2a2c173aab3fd14aac6cf5e90ad3bf58fa7d") -(package! smartparens :pin "7f5825dd655942c3d56d14acabab1ffab1aa2ae2") +(package! smartparens :pin "63695c64233d215a92bf08e762f643cdb595bdd9") (package! so-long :built-in 'prefer ; included in Emacs 27+ ;; REVIEW so-long is slated to be published to ELPA eventually, but until then @@ -51,8 +51,8 @@ :pin "2bb49d3ee7d2cba133bc7e9cdac416cd1c5e4fe0") ;; core-projects.el -(package! projectile :pin "d1cfad008b1719a6bee17fbe9479db414c0dc5d9") +(package! projectile :pin "c31bd41c0b9d6fba8837ebfd3a31dec0b3cd73c6") ;; core-keybinds.el (package! general :pin "a0b17d207badf462311b2eef7c065b884462cb7c") -(package! which-key :pin "ca268fd313d3fb2bd03a8b5e4bdcca675ce58ca7") +(package! which-key :pin "428aedfce0157920814fbb2ae5d00b4aea89df88") diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index d5d2a5926..a1fcf744d 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -14,10 +14,11 @@ ;; root. Of course, this command won't work in a sparse clone, ;; and more than that, initiating these compilation step is a ;; hassle, so... - :build (with-temp-file (expand-file-name "org-version.el" (straight--repos-dir "org-mode")) - (insert "(fset 'org-release (lambda () \"9.5\"))\n" - "(fset 'org-git-version #'ignore)\n" - "(provide 'org-version)\n"))) + :pre-build + (with-temp-file (expand-file-name "org-version.el" (straight--repos-dir "org-mode")) + (insert "(fset 'org-release (lambda () \"9.5\"))\n" + "(fset 'org-git-version #'ignore)\n" + "(provide 'org-version)\n"))) :pin "7c8dce72bd5d86157dd1dda2ba0a21ac86084426" ;; Prevents built-in Org from sneaking into the byte-compilation of ;; `org-plus-contrib', and inform other packages that `org-mode' satisfies the From a9e6f88831622084220387d454b2d3d91ab66c39 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 9 Jan 2021 03:10:43 -0500 Subject: [PATCH 110/183] Remove evil-collection-vterm from comp blacklist Issue was fixed upstream in native-comp branch. --- core/core.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/core.el b/core/core.el index 7fd29cbf7..db5ef74ca 100644 --- a/core/core.el +++ b/core/core.el @@ -158,11 +158,10 @@ users).") ;; HACK Disable native-compilation for some troublesome packages (mapc (doom-partial #'add-to-list 'comp-deferred-compilation-deny-list) (let ((local-dir-re (concat "\\`" (regexp-quote doom-local-dir)))) - (list (concat local-dir-re ".*/evil-collection-vterm\\.el\\'") - ;; https://github.com/nnicandro/emacs-jupyter/issues/297 - (concat local-dir-re ".*/jupyter-channel\\.el\\'") + (list (concat "\\`" (regexp-quote doom-autoloads-file) "\\'") (concat local-dir-re ".*/with-editor\\.el\\'") - (concat "\\`" (regexp-quote doom-autoloads-file) "\\'")))) + ;; https://github.com/nnicandro/emacs-jupyter/issues/297 + (concat local-dir-re ".*/jupyter-channel\\.el\\'")))) ;; Default to using all cores, rather than half of them, since we compile ;; things ahead-of-time in a non-interactive session. (defadvice! doom--comp-use-all-cores-a () From b98476e1fd1e52ee01778fbd6ea9e043186208ec Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 9 Jan 2021 03:12:56 -0500 Subject: [PATCH 111/183] Bump :lang org Kungsgeten/org-brain@1ae4fd4 -> Kungsgeten/org-brain@f7939ef abo-abo/org-download@42ac361 -> abo-abo/org-download@97bec74 alf/ob-restclient.el@f7449b2 -> alf/ob-restclient.el@0ebfc7c bastibe/org-journal@14ce011 -> bastibe/org-journal@c083648 emacs-straight/org-mode@7c8dce7 -> emacs-straight/org-mode@6b83c6e emacsorphanage/gnuplot@f0001c3 -> emacsorphanage/gnuplot@116cad8 fuxialexander/org-pdftools@3c2b9a4 -> fuxialexander/org-pdftools@bcf0084 kaushalmodi/ox-hugo@f24c9bd -> kaushalmodi/ox-hugo@6bc8ee0 oer/org-re-reveal@0062756 -> oer/org-re-reveal@47339ef org-roam/org-roam@be95b42 -> org-roam/org-roam@15d864a takaxp/org-tree-slide@18034c4 -> takaxp/org-tree-slide@d6e8e91 Fixes #4506: org-mode bump fixes broken id linking functionality. Fixes #4505: addresses org-roam/org-roam#1341. Co-authored-by: RBckmnn --- modules/lang/org/packages.el | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index a1fcf744d..ce0e4504b 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -15,11 +15,11 @@ ;; and more than that, initiating these compilation step is a ;; hassle, so... :pre-build - (with-temp-file (expand-file-name "org-version.el" (straight--repos-dir "org-mode")) + (with-temp-file (doom-path (straight--repos-dir "org-mode") "org-version.el") (insert "(fset 'org-release (lambda () \"9.5\"))\n" "(fset 'org-git-version #'ignore)\n" "(provide 'org-version)\n"))) - :pin "7c8dce72bd5d86157dd1dda2ba0a21ac86084426" + :pin "6b83c6e4eaec4af47a90d05c3410d4637d8cb8da" ;; Prevents built-in Org from sneaking into the byte-compilation of ;; `org-plus-contrib', and inform other packages that `org-mode' satisfies the ;; `org' dependency: https://github.com/raxod502/straight.el/issues/352 @@ -39,22 +39,22 @@ :recipe (:host github :repo "hlissner/evil-org-mode") :pin "a9706da260c45b98601bcd72b1d2c0a24a017700")) (when (featurep! :tools pdf) - (package! org-pdftools :pin "3c2b9a413eb841c781cfb49d8c343bf07aa0ad1f")) + (package! org-pdftools :pin "bcf0084883ede36e91c72be73c0fbd7098439c99")) (when (featurep! :tools magit) (package! orgit :pin "ac9b1a42863a864fde9d225890ef5464bffdc646")) (when (featurep! +brain) - (package! org-brain :pin "1ae4fd46165fc56f34f36ce38cb2ae816b07e207")) + (package! org-brain :pin "f7939ef5071895930eebccf490ea7cb25cc54b2c")) (when (featurep! +dragndrop) - (package! org-download :pin "42ac361ef5502017e6fc1bceb00333eba90402f4")) + (package! org-download :pin "97bec7412e1a4d6e9031c7a0568d0f065cd9fd00")) (when (featurep! +gnuplot) - (package! gnuplot :pin "f0001c30010b2899e36d7d89046322467e923088") + (package! gnuplot :pin "116cad8e09024223f97e81b0a4503cef20de9bf5") (package! gnuplot-mode :pin "601f6392986f0cba332c87678d31ae0d0a496ce7")) (when (featurep! +ipython) ; DEPRECATED (package! ob-ipython :pin "7147455230841744fb5b95dcbe03320313a77124")) (when (featurep! +jupyter) (package! jupyter :pin "360cae2c70ab28c7a7848c0c56473d984f0243e5")) (when (featurep! +journal) - (package! org-journal :pin "14ce0119fe2d89f2f2207788be2edce0b9372822")) + (package! org-journal :pin "c0836483ae43e525bf7547b7a789d171eda84c84")) (when (featurep! +noter) (package! org-noter :pin "9ead81d42dd4dd5074782d239b2efddf9b8b7b3d")) (when (featurep! +pomodoro) @@ -66,14 +66,14 @@ (package! centered-window :recipe (:host github :repo "anler/centered-window-mode") :pin "f50859941ab5c7cbeaee410f2d38716252b552ac") - (package! org-tree-slide :pin "18034c476038adcc1c4697168b8068f4d0ce62fe") - (package! org-re-reveal :pin "0062756e9a5b6ec96c7de5ca94372cc6495296a1") + (package! org-tree-slide :pin "d6e8e91433dfe4968f1343b483f2680f45a77d52") + (package! org-re-reveal :pin "47339ef6772c79849a9764716df8361649ea7bdc") (package! revealjs :recipe (:host github :repo "hakimel/reveal.js" :files ("css" "dist" "js" "plugin")) :pin "0582f57517c97a4c7bfeb58762138c78883f94c5")) (when (featurep! +roam) - (package! org-roam :pin "be95b42d32d9707309ab373f1d8182c84db41c5c")) + (package! org-roam :pin "15d864a500d90c9dc2e16d888e93343528ec3941")) ;;; Babel (package! ob-async :pin "de1cd6c93242a4cb8773bbe115b7be3d4dd6b97e") @@ -90,7 +90,7 @@ :recipe (:host github :repo "DEADB17/ob-racket") :pin "d8fd51bddb019b0eb68755255f88fc800cfe03cb")) (when (featurep! :lang rest) - (package! ob-restclient :pin "f7449b2068498fe9d8ab9589e0a638148861533f")) + (package! ob-restclient :pin "0ebfc7c5ebf96d2fe1a476439831363a5a43b9b6")) (when (featurep! :lang scala) (package! ob-ammonite :pin "39937dff395e70aff76a4224fa49cf2ec6c57cca")) @@ -100,6 +100,6 @@ (when (featurep! +hugo) (package! ox-hugo :recipe (:host github :repo "kaushalmodi/ox-hugo" :nonrecursive t) - :pin "f24c9bd522ae22bee2327c2b53858d0a5066707d")) + :pin "6bc8ee08023695fa167ac0ddf1fc61e1975fa1ce")) (when (featurep! :lang rst) (package! ox-rst :pin "99fa790da55b57a3f2e9aa187493ba434a64250e")) From 5e6de97b56546c38dba5f9973e10e8110f580c90 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 9 Jan 2021 03:51:40 -0500 Subject: [PATCH 112/183] ui/minimap: allow in more major modes --- modules/ui/minimap/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ui/minimap/config.el b/modules/ui/minimap/config.el index 86afde935..40389aa22 100644 --- a/modules/ui/minimap/config.el +++ b/modules/ui/minimap/config.el @@ -6,4 +6,5 @@ (setq minimap-window-location 'right minimap-update-delay 0 minimap-width-fraction 0.09 - minimap-minimum-width 15)) + minimap-minimum-width 15) + (pushnew! minimap-major-modes 'text-mode 'conf-mode)) From 8bac3bc6c6ac52e770106eff3134caa835a34fe9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 9 Jan 2021 04:12:54 -0500 Subject: [PATCH 113/183] Remove with-editor from comp blacklist --- core/core.el | 1 - 1 file changed, 1 deletion(-) diff --git a/core/core.el b/core/core.el index db5ef74ca..85b0f9d9f 100644 --- a/core/core.el +++ b/core/core.el @@ -159,7 +159,6 @@ users).") (mapc (doom-partial #'add-to-list 'comp-deferred-compilation-deny-list) (let ((local-dir-re (concat "\\`" (regexp-quote doom-local-dir)))) (list (concat "\\`" (regexp-quote doom-autoloads-file) "\\'") - (concat local-dir-re ".*/with-editor\\.el\\'") ;; https://github.com/nnicandro/emacs-jupyter/issues/297 (concat local-dir-re ".*/jupyter-channel\\.el\\'")))) ;; Default to using all cores, rather than half of them, since we compile From 2b53df56e578a3029d991137b19b0bc85df40c95 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 9 Jan 2021 19:43:13 -0500 Subject: [PATCH 114/183] Bump :editor evil emacs-evil/evil-collection@ab5bb7c -> emacs-evil/evil-collection@e7be9f5 emacs-evil/evil@d6cf668 -> emacs-evil/evil@cc9d688 mamapanda/evil-traces@bc25cae -> mamapanda/evil-traces@290b532 Fixes `(wrong-number-of-arguments (3 . 4) 2)` on Emacs HEAD for evil (other packages may still be problematic). --- modules/editor/evil/init.el | 3 +++ modules/editor/evil/packages.el | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/editor/evil/init.el b/modules/editor/evil/init.el index f9d65e816..4bf17bee4 100644 --- a/modules/editor/evil/init.el +++ b/modules/editor/evil/init.el @@ -94,6 +94,7 @@ variable for an explanation of the defaults (in comments). See comint company compile + consult (custom cus-edit) cus-theme daemons @@ -101,6 +102,7 @@ variable for an explanation of the defaults (in comments). See deadgrep debbugs debug + dictionary diff-mode dired dired-sidebar @@ -190,6 +192,7 @@ variable for an explanation of the defaults (in comments). See reftex restclient rg + ripgrep rjsx-mode robe rtags diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index 19bb23bb3..272e51954 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 "d6cf6680ec52733ea78dc530ed75fadc5171c758") +(package! evil :pin "cc9d6886b418389752a0591b9fcb270e83234cf9") (package! evil-args :pin "758ad5ae54ad34202064fec192c88151c08cb387") (package! evil-easymotion :pin "f96c2ed38ddc07908db7c3c11bcd6285a3e8c2e9") (package! evil-embrace :pin "4379adea032b25e359d01a36301b4a5afdd0d1b7") @@ -18,7 +18,7 @@ (package! evil-snipe :pin "6dcac7f2516c6137a2de532fc2c052f242559ee3") (package! evil-surround :pin "346d4d85fcf1f9517e9c4991c1efe68b4130f93a") (package! evil-textobj-anyblock :pin "ff00980f0634f95bf2ad9956b615a155ea8743be") -(package! evil-traces :pin "bc25cae9fa5ab0ba1507827f0944f52ce0ca7462") +(package! evil-traces :pin "290b5323542c46af364ec485c8ec9000040acf90") (package! evil-visualstar :pin "06c053d8f7381f91c53311b1234872ca96ced752") (package! exato :pin "aee7af7b7a0e7551478f453d1de7d5b9cb2e06c4") (package! evil-quick-diff @@ -33,4 +33,4 @@ (package! neotree) (autoload 'neotree-make-executor "neotree" nil nil 'macro)) - (package! evil-collection :pin "ab5bb7c39199518d98035ef201096704a21a97ea")) + (package! evil-collection :pin "e7be9f53a05c81ef9e89c2f053ba62048e6afd69")) From f2035811dbda21c3ae6a1de115f508bdef8abccb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 9 Jan 2021 21:40:32 -0500 Subject: [PATCH 115/183] Bump :ui Alexander-Miller/treemacs@389bca1 -> Alexander-Miller/treemacs@559fa09 ema2159/centaur-tabs@b172646 -> ema2159/centaur-tabs@23eda0a hlissner/emacs-doom-themes@74ebd77 -> hlissner/emacs-doom-themes@5adcc29 iqbalansari/emacs-emojify@4b96f37 -> iqbalansari/emacs-emojify@cfa0086 jabranham/mixed-pitch@d305108 -> jabranham/mixed-pitch@beb22e8 joostkremers/writeroom-mode@92c47df -> joostkremers/writeroom-mode@b648b34 jrblevin/deft@fca9ea0 -> jrblevin/deft@c4af448 seagle0128/doom-modeline@fb34eb5 -> seagle0128/doom-modeline@4956606 tarsius/hl-todo@0598b98 -> tarsius/hl-todo@9661a46 --- modules/ui/deft/packages.el | 2 +- modules/ui/doom/packages.el | 2 +- modules/ui/emoji/packages.el | 2 +- modules/ui/hl-todo/packages.el | 2 +- modules/ui/modeline/packages.el | 2 +- modules/ui/tabs/packages.el | 2 +- modules/ui/treemacs/packages.el | 2 +- modules/ui/zen/packages.el | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/ui/deft/packages.el b/modules/ui/deft/packages.el index c295162db..f8280e01c 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 "fca9ea05ef4fdac825e2ad3921baa7042f6b82c8") +(package! deft :pin "c4af44827f4257e7619e63abfd22094a29a9ab52") diff --git a/modules/ui/doom/packages.el b/modules/ui/doom/packages.el index 0ec3ba0ce..55f1342c3 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 "74ebd778571a2ba2a490d45a3f4161ea7251e050") +(package! doom-themes :pin "5adcc29eeccb251937fe002594bc21ce08ae5317") (package! solaire-mode :pin "c697925f7e03819a4046a233f6ab31664aca9d6a") diff --git a/modules/ui/emoji/packages.el b/modules/ui/emoji/packages.el index 921e6ada2..6b29cb73e 100644 --- a/modules/ui/emoji/packages.el +++ b/modules/ui/emoji/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/emoji/packages.el -(package! emojify :pin "4b96f37f315182f95d4ea9ff33a9b5af9f1b1620") +(package! emojify :pin "cfa00865388809363df3f884b4dd554a5d44f835") diff --git a/modules/ui/hl-todo/packages.el b/modules/ui/hl-todo/packages.el index 299a46912..d4477f408 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 "0598b98f63b623c1778cbd2e2f60b774b7a311b9") +(package! hl-todo :pin "9661a462d86b22293caaa4c3d94f971a15dbf1d5") diff --git a/modules/ui/modeline/packages.el b/modules/ui/modeline/packages.el index f7bc4c6f9..572d70df5 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 "fb34eb5eb60f41ce1bc23c2bad6ac20de5669f22")) + (package! doom-modeline :pin "4956606a5455a3968ca10cbdb8de3889e6bd1d85")) (package! anzu :pin "bdb3da5028935a4aea55c40769bc191a81afb54e") (when (featurep! :editor evil) (package! evil-anzu :pin "d3f6ed4773b48767bd5f4708c7f083336a8a8a86")) diff --git a/modules/ui/tabs/packages.el b/modules/ui/tabs/packages.el index ebbf99467..d2a843ed9 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 "b172646b49d00c7e11fe4a4eaa80bbf026e58ab5") +(package! centaur-tabs :pin "23eda0a0292a84c7e0a0aa2b598f9e29c7e5b54f") diff --git a/modules/ui/treemacs/packages.el b/modules/ui/treemacs/packages.el index 4f4e7bfc6..13a083411 100644 --- a/modules/ui/treemacs/packages.el +++ b/modules/ui/treemacs/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; ui/treemacs/packages.el -(package! treemacs :pin "389bca1c3bdd4c4cf8245d6c4bdf8aa875e40d14") +(package! treemacs :pin "559fa09e32d5db7f620fdd08e03b938e67bf398b") ;; These packages have no :pin because they're in the same repo (when (featurep! :editor evil +everywhere) (package! treemacs-evil)) diff --git a/modules/ui/zen/packages.el b/modules/ui/zen/packages.el index 90193e2fc..b5440b28d 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 "92c47dfa659c418700d064a479e30590bcfc1904") -(package! mixed-pitch :pin "d305108f9520e196b533f05d1dcc284cf535faaf") +(package! writeroom-mode :pin "b648b340172ce4e44307375697e190bc723203e0") +(package! mixed-pitch :pin "beb22e85f6073a930f7338a78bd186e3090abdd7") From 1b6cf5777a42181f6276cfa3db54916a8aa5efde Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 10 Jan 2021 04:49:00 -0500 Subject: [PATCH 116/183] Fix void-variable eshell-modules-list Only affected Emacs 26 users. --- modules/term/eshell/config.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/term/eshell/config.el b/modules/term/eshell/config.el index 33458f007..d1e52b065 100644 --- a/modules/term/eshell/config.el +++ b/modules/term/eshell/config.el @@ -73,8 +73,6 @@ You should use `set-eshell-alias!' to change this.") eshell-glob-case-insensitive t eshell-error-if-no-glob t) - (add-to-list 'eshell-modules-list 'eshell-tramp) - ;; Consider eshell buffers real (add-hook 'eshell-mode-hook #'doom-mark-buffer-as-real-h) @@ -105,6 +103,10 @@ You should use `set-eshell-alias!' to change this.") ;; or configure `+eshell-aliases' via elisp. (advice-add #'eshell-write-aliases-list :override #'ignore) + ;; REVIEW In Emacs 27 and newer, waiting for esh-module is unnecessary. + (after! esh-module + (add-to-list 'eshell-modules-list 'eshell-tramp)) + ;; Visual commands require a proper terminal. Eshell can't handle that, so ;; it delegates these commands to a term buffer. (after! em-term From 042fd4d9292a11ff35366b8bc6bf5f064d694e18 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 10 Jan 2021 04:56:40 -0500 Subject: [PATCH 117/183] Fix obsolete `case` alias compiler warnings --- modules/editor/multiple-cursors/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/multiple-cursors/config.el b/modules/editor/multiple-cursors/config.el index 1dfc0443f..4afd246db 100644 --- a/modules/editor/multiple-cursors/config.el +++ b/modules/editor/multiple-cursors/config.el @@ -168,7 +168,7 @@ (defun +multiple-cursors-compat-back-to-previous-state-h () (when +mc--compat-evil-prev-state (unwind-protect - (case +mc--compat-evil-prev-state + (cl-case +mc--compat-evil-prev-state ((normal visual) (evil-force-normal-state)) (t (message "Don't know how to handle previous state: %S" +mc--compat-evil-prev-state))) From 3f2c4b80e9adf1c7809e3fe3c299030cbcc7de33 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 10 Jan 2021 05:02:00 -0500 Subject: [PATCH 118/183] Add Emacs 26.x warning to doctor checks We'll be dropping support for it in the next few months. --- core/cli/doctor.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/cli/doctor.el b/core/cli/doctor.el index e7e3fc4c5..ae121a175 100644 --- a/core/cli/doctor.el +++ b/core/cli/doctor.el @@ -48,9 +48,15 @@ in." ;; REVIEW Refactor me (print! (start "Checking your Emacs version...")) - (when EMACS28+ - (warn! "Emacs %s detected. Doom doesn't support Emacs 28/HEAD. It is unstable and may cause errors." + (cond + (EMACS28+ + (warn! (concat "Emacs %s detected. Doom should support this version, but be prepared for " + "Emacs updates causing breakages.") emacs-version)) + ((= emacs-major-version 26) + (warn! (concat "Emacs %s detected. Doom is dropping Emacs 26.x support very soon. Consider " + "upgrading to Emacs 27.x.") + emacs-version))) (print! (start "Checking for Emacs config conflicts...")) (when (file-exists-p "~/.emacs") From 5cb2395e08c5932bbbb79056a49f022dacdc8634 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 10 Jan 2021 08:07:27 -0500 Subject: [PATCH 119/183] Set custom-theme-directory in core-ui --- core/core-ui.el | 3 +++ core/core.el | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/core-ui.el b/core/core-ui.el index d6b354d66..212f95bc5 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -547,6 +547,9 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original ;; ;;; Theme & font +;; User themes should live in ~/.doom.d/themes, not ~/.emacs.d +(setq custom-theme-directory (concat doom-private-dir "themes/")) + ;; Always prioritize the user's themes above the built-in/packaged ones. (setq custom-theme-load-path (cons 'custom-theme-directory diff --git a/core/core.el b/core/core.el index 85b0f9d9f..f5d641003 100644 --- a/core/core.el +++ b/core/core.el @@ -217,7 +217,6 @@ users).") ;; We avoid `no-littering' because it's a mote too opinionated for our needs. (setq async-byte-compile-log-file (concat doom-etc-dir "async-bytecomp.log") custom-file (concat doom-private-dir "custom.el") - custom-theme-directory (concat doom-private-dir "themes/") desktop-dirname (concat doom-etc-dir "desktop") desktop-base-file-name "autosave" desktop-base-lock-name "autosave-lock" From 1235ea74cfc18ebaba085320343ac333ecf0152e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 10 Jan 2021 19:46:50 -0500 Subject: [PATCH 120/183] Bump better-jumper gilbertw1/better-jumper@e3a6546 -> gilbertw1/better-jumper@5ef53fc Fixes 'void-variable better-jumper-jump-list-struct' at startup, because cl-defstruct macro is unavailable when the better-jumper package is compiled (as of raxod502/straight.el@6a273d1, straight compiles packages in a child process where cl-lib isn't preloaded). First reported in https://www.reddit.com/r/DoomEmacs/comments/kts81q/spacemacslike_menu_when_pressing_leader_key/ --- core/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/packages.el b/core/packages.el index 4dacca6d9..e0e1d51a6 100644 --- a/core/packages.el +++ b/core/packages.el @@ -32,7 +32,7 @@ (package! restart-emacs :pin "1607da2bc657fe05ae01f7fdf26f716eafead02c") ;; core-editor.el -(package! better-jumper :pin "e3a6546aa626b9a79ae451c88f44cf26f9d1a919") +(package! better-jumper :pin "5ef53fcee4e74f397c8d275679e5596b52582b57") (package! dtrt-indent :pin "854b9a1ce93d9926018a0eb18e6e552769c5407d") (package! helpful :pin "584ecc887bb92133119f93a6716cdf7af0b51dca") (package! pcre2el :pin "0b5b2a2c173aab3fd14aac6cf5e90ad3bf58fa7d") From 8c258c272d015920cb0ddb4e10796f5f5a2e7e72 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 11 Jan 2021 02:41:14 -0500 Subject: [PATCH 121/183] Update comments --- core/core-keybinds.el | 2 ++ core/core-ui.el | 13 ++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/core/core-keybinds.el b/core/core-keybinds.el index 6d78c6db1..608b00ed9 100644 --- a/core/core-keybinds.el +++ b/core/core-keybinds.el @@ -46,6 +46,8 @@ and Emacs states, and for non-evil users.") (not (cl-position 'tab keys)) (not (cl-position 'kp-tab keys)) (display-graphic-p) + ;; Fall back if no keybind can be found, otherwise + ;; we've broken all pre-existing C-i keybinds. (let ((key (doom-lookup-key (vconcat (cl-subseq keys 0 -1) [C-i])))) diff --git a/core/core-ui.el b/core/core-ui.el index 212f95bc5..9587b0f9a 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -289,17 +289,16 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original ;; where we resize windows too quickly. (setq window-resize-pixelwise nil) -;; 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). +;; Disable tool, menu, and scrollbars. Doom is designed to be keyboard-centric, +;; so these are just clutter (the scrollbar also impacts performance). Whats +;; more, the menu bar exposes functionality that Doom doesn't endorse. (push '(menu-bar-lines . 0) default-frame-alist) (push '(tool-bar-lines . 0) default-frame-alist) (push '(vertical-scroll-bars) default-frame-alist) -;; These are disabled directly through their frame parameters, to avoid the -;; extra work their minor modes do, but we have to unset these variables -;; ourselves, otherwise users will have to cycle them twice to re-enable them. +;; These are disabled directly through their frame parameters to avoid the extra +;; work their minor modes do, but their variables must be unset too, otherwise +;; users will have to cycle them twice to re-enable them. (setq menu-bar-mode nil tool-bar-mode nil scroll-bar-mode nil) From 8cd7a1dbc674798e7ff8f6809c2f605fac373aff Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 11 Jan 2021 02:41:28 -0500 Subject: [PATCH 122/183] Fix doom-unicode-font --- 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 9587b0f9a..4748cffbf 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -594,7 +594,7 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.") (set-face-attribute 'variable-pitch nil :font doom-variable-pitch-font)) (when (fboundp 'set-fontset-font) (dolist (font (cons doom-unicode-font doom-unicode-extra-fonts)) - (set-fontset-font t nil font nil 'prepend))) + (set-fontset-font t 'unicode font nil 'prepend))) (run-hooks 'after-setting-font-hook)) ((debug error) (if (string-prefix-p "Font not available: " (error-message-string e)) From f587630e1701ef44016459a4033fa95c88fed838 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 11 Jan 2021 02:41:44 -0500 Subject: [PATCH 123/183] Use module instead of package detection Otherwise, the dashboard will break if the user has perspective.el installed, instead of persp-mode. --- 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 494205178..8de62e8ad 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -48,7 +48,7 @@ Possible values: (defvar +doom-dashboard-menu-sections '(("Reload last session" :icon (all-the-icons-octicon "history" :face 'doom-dashboard-menu-title) - :when (cond ((require 'persp-mode nil t) + :when (cond ((featurep! :ui workspaces) (file-exists-p (expand-file-name persp-auto-save-fname persp-save-dir))) ((require 'desktop nil t) (file-exists-p (desktop-full-file-name)))) From fc184852d0236769c971e94ec5ec220d8cd24fd1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 11 Jan 2021 02:45:15 -0500 Subject: [PATCH 124/183] Only replace usernames in file paths in 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 d13dbdfd8..2c3c5f653 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -113,7 +113,7 @@ ready to be pasted in a bug report on github." (letf! ((defun sh (&rest args) (cdr (apply #'doom-call-process args))) (defun abbrev-path (path) (replace-regexp-in-string - (regexp-quote (user-login-name)) "$USER" + (concat "\\<" (regexp-quote (user-login-name)) "\\>") "$USER" (abbreviate-file-name path)))) `((system (type . ,system-type) From b03fdabe4fa8a07a7bd74cd02d9413339a485253 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 13 Jan 2021 14:05:43 -0500 Subject: [PATCH 125/183] Bump posframe tumashu/posframe@e1552c8 -> tumashu/posframe@efd7ea4 Fixes void-function fit-frame-to-buffer-1 errors. --- modules/completion/helm/packages.el | 2 +- modules/tools/debugger/packages.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/completion/helm/packages.el b/modules/completion/helm/packages.el index cd5580d23..36eb3450c 100644 --- a/modules/completion/helm/packages.el +++ b/modules/completion/helm/packages.el @@ -13,7 +13,7 @@ (when (featurep! +fuzzy) (package! helm-flx :pin "6640fac5cb16bee73c95b8ed1248a4e5e113690e")) (when (featurep! +childframe) - (package! posframe :pin "e1552c82dffaadc5e7de09a44880a498197ffbee")) + (package! posframe :pin "efd7ea490defc53a5b78e7469a3a35d225b766cc")) (when (featurep! :lang org) (package! helm-org :pin "b7a18dfc17e8b933956d61d68c435eee03a96c24")) (package! helm-descbinds :pin "b72515982396b6e336ad7beb6767e95a80fca192") diff --git a/modules/tools/debugger/packages.el b/modules/tools/debugger/packages.el index 6f82c63e5..13efc670d 100644 --- a/modules/tools/debugger/packages.el +++ b/modules/tools/debugger/packages.el @@ -7,4 +7,4 @@ (when (featurep! +lsp) (package! dap-mode :pin "612388d0b85e77972a9c28391bac6224a63408c7") - (package! posframe :pin "ae8ac91744010c8975f07cf18282f58ce56605d0")) + (package! posframe :pin "efd7ea490defc53a5b78e7469a3a35d225b766cc")) From 198712060ae40e91c185d656d28a1d647ee7a1d5 Mon Sep 17 00:00:00 2001 From: Saulius Menkevicius Date: Sun, 17 Jan 2021 15:52:04 +0200 Subject: [PATCH 126/183] Fix +evil--insert-new-line advice when opening new line inside a comment. `comment-line-break-function` requires a single `soft-newlines` argument. --- modules/editor/evil/autoload/advice.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/autoload/advice.el b/modules/editor/evil/autoload/advice.el index 7b2300f31..c2abbd821 100644 --- a/modules/editor/evil/autoload/advice.el +++ b/modules/editor/evil/autoload/advice.el @@ -106,7 +106,7 @@ more information on modifiers." (cond ((sp-point-in-comment pos) (setq evil-auto-indent nil) (if comment-line-break-function - (funcall comment-line-break-function) + (funcall comment-line-break-function nil) (comment-indent-new-line))) ;; TODO Find a better way to do this ((and (eq major-mode 'haskell-mode) From 583f854298763346eaadd3db64cf522b1afc107d Mon Sep 17 00:00:00 2001 From: John Bampton Date: Mon, 18 Jan 2021 02:16:45 +1000 Subject: [PATCH 127/183] Fix spelling --- core/core-lib.el | 2 +- core/core-modules.el | 2 +- core/core.el | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index cc330d903..7fd6bc6d7 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -648,7 +648,7 @@ set earlier in the ‘setq-local’. The return value of the (macroexp-progn (nreverse expr))))) (eval-when! (version< emacs-version "27.1") - ;; DEPRECATED Backported from Emacs 27; earlier verisons don't have REMOTE arg + ;; DEPRECATED Backported from Emacs 27; earlier versions don't have REMOTE arg (defun executable-find (command &optional remote) "Search for COMMAND in `exec-path' and return the absolute file name. Return nil if COMMAND is not found anywhere in `exec-path'. If diff --git a/core/core-modules.el b/core/core-modules.el index 2b22e25df..bee9f3b65 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -331,7 +331,7 @@ This value is cached. If REFRESH-P, then don't use the cached value." use-package-minimum-reported-time (if doom-debug-p 0 0.1) use-package-expand-minimally doom-interactive-p) -;; A common mistake for new users is that they inadvertantly install their +;; A common mistake for new users is that they inadvertently install their ;; packages with package.el, by copying over old `use-package' declarations with ;; an :ensure t property. Doom doesn't use package.el, so this will throw an ;; error that will confuse beginners, so we disable `:ensure'. diff --git a/core/core.el b/core/core.el index f5d641003..3232a0f9f 100644 --- a/core/core.el +++ b/core/core.el @@ -379,7 +379,7 @@ config.el instead." (defvar doom-incremental-packages '(t) "A list of packages to load incrementally after startup. Any large packages -here may cause noticable pauses, so it's recommended you break them up into +here may cause noticeable pauses, so it's recommended you break them up into sub-packages. For example, `org' is comprised of many packages, and can be broken up into: From 08354f3316d1c9788df26b2338f65d339fa06244 Mon Sep 17 00:00:00 2001 From: Dan LaManna Date: Wed, 13 Jan 2021 01:13:38 -0500 Subject: [PATCH 128/183] Fix various broken links --- modules/editor/evil/config.el | 2 +- .../file-templates/templates/emacs-lisp-mode/__package | 2 +- modules/lang/fsharp/README.org | 6 +++--- modules/lang/julia/config.el | 2 +- modules/ui/doom/README.org | 2 +- modules/ui/unicode/README.org | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 70113818f..1c8d1d754 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -66,7 +66,7 @@ directives. By default, this only recognizes C directives.") (put 'evil-define-key* 'lisp-indent-function 'defun) ;; stop copying each visual state move to the clipboard: - ;; https://bitbucket.org/lyro/evil/issue/336/osx-visual-state-copies-the-region-on + ;; https://github.com/emacs-evil/evil/issues/336 ;; grokked from: ;; http://stackoverflow.com/questions/15873346/elisp-rename-macro (advice-add #'evil-visual-update-x-selection :override #'ignore) diff --git a/modules/editor/file-templates/templates/emacs-lisp-mode/__package b/modules/editor/file-templates/templates/emacs-lisp-mode/__package index b040adbb6..28a64d9f2 100644 --- a/modules/editor/file-templates/templates/emacs-lisp-mode/__package +++ b/modules/editor/file-templates/templates/emacs-lisp-mode/__package @@ -2,7 +2,7 @@ ;; ;; Copyright (C) `(format-time-string "%Y")` `user-full-name` ;; -;; Author: `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")` diff --git a/modules/lang/fsharp/README.org b/modules/lang/fsharp/README.org index a11f9502e..bb37fdf73 100644 --- a/modules/lang/fsharp/README.org +++ b/modules/lang/fsharp/README.org @@ -31,9 +31,9 @@ This module adds [[https://fsharp.org/][F#]] support. ** Module Flags + =+lsp= Enables lsp-fsharp (this requires ~:tools lsp~ to be enabled). ** Plugins -+ [[https://github.com/fsharp/emacs-fsharp-mod+e][fsharp-mode]] ++ [[https://github.com/fsharp/emacs-fsharp-mode][fsharp-mode]] + =+lsp= - + [[https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-fsharp.el][lsp-fsharp]] + + [[https://github.com/emacs-lsp/lsp-mode/blob/master/clients/lsp-fsharp.el][lsp-fsharp]] ** Hacks None so far. @@ -47,7 +47,7 @@ Do *NOT* install mono via brew. See this [[https://github.com/fsharp/FsAutoCompl sudo pacman -S mono #+END_SRC ** LSP -The language server is automatically installed by [[https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-fsharp.el][lsp-fsharp]]. +The language server is automatically installed by [[https://github.com/emacs-lsp/lsp-mode/blob/master/clients/lsp-fsharp.el][lsp-fsharp]]. * Features An in-depth list of features, how to use them, and their dependencies. diff --git a/modules/lang/julia/config.el b/modules/lang/julia/config.el index dd0edaf07..65dde2cca 100644 --- a/modules/lang/julia/config.el +++ b/modules/lang/julia/config.el @@ -6,7 +6,7 @@ (set-repl-handler! 'julia-mode #'+julia/open-repl) ;; Borrow matlab.el's fontification of math operators. From - ;; + ;; (dolist (mode '(julia-mode ess-julia-mode)) (font-lock-add-keywords mode diff --git a/modules/ui/doom/README.org b/modules/ui/doom/README.org index 17d365df6..51fd24ea4 100644 --- a/modules/ui/doom/README.org +++ b/modules/ui/doom/README.org @@ -42,7 +42,7 @@ Although this module uses the ~doom-one~ theme by default, [[https://github.com/ + *doom-one:* doom-themes' flagship theme, inspired by [[https://atom.io/][Atom's]] One Dark themes + *doom-vibrant:* a more vibrant version of doom-one + *doom-molokai:* based on Textmate's monokai -+ *doom-nova:* adapted from [[https://trevordmiller.com/projects/nova][Nova]] ++ *doom-nova:* adapted from [[https://github.com/trevordmiller/nova-colors][Nova]] + *doom-one-light:* light version of doom-one + *doom-peacock:* based on Peacock from [[https://daylerees.github.io/][daylerees' themes]] + *doom-tomorrow-night:* by [[https://github.com/ChrisKempson/Tomorrow-Theme][Chris Kempson]] diff --git a/modules/ui/unicode/README.org b/modules/ui/unicode/README.org index 83509613a..82de5312c 100644 --- a/modules/ui/unicode/README.org +++ b/modules/ui/unicode/README.org @@ -61,7 +61,7 @@ If your font does not provide some glyphs, this package will try its best to fin A list of fonts with good unicode coverage can be found on the page of the [[https://github.com/rolandwalker/unicode-fonts#minimum-useful-fonts][unicode-fonts]] package. ** Advanced configuration -Consult the [[https://github.com/rolandwalker/unicode-font][unicode-fonts]] package documentation for a description of more advanced configuration. The configuration should be placed, as usual, in your private =config.el= wrapped in an ~(after! unicode-fonts)~ block. The variable ~unicode-fonts-blocks~ contains a list of all unicode block names and their character ranges. The default fonts to search for glyphs are in the variable ~unicode-fonts-block-font-mapping~. +Consult the [[https://github.com/rolandwalker/unicode-fonts][unicode-fonts]] package documentation for a description of more advanced configuration. The configuration should be placed, as usual, in your private =config.el= wrapped in an ~(after! unicode-fonts)~ block. The variable ~unicode-fonts-blocks~ contains a list of all unicode block names and their character ranges. The default fonts to search for glyphs are in the variable ~unicode-fonts-block-font-mapping~. If you want to use the font =Symbola= for =Miscellaneous Symbols= by default you could add #+BEGIN_SRC elisp From bb4d17efb7ccb816ffeaedd6debc1412fb1d5fd0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 16 Jan 2021 16:30:19 -0500 Subject: [PATCH 129/183] Revert 8bac3bc6c, a9e6f8883 Add evil-collection-vterm and with-editor to comp blacklist. Fixes #4517 --- core/core.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/core.el b/core/core.el index f5d641003..89545c505 100644 --- a/core/core.el +++ b/core/core.el @@ -159,6 +159,8 @@ users).") (mapc (doom-partial #'add-to-list 'comp-deferred-compilation-deny-list) (let ((local-dir-re (concat "\\`" (regexp-quote doom-local-dir)))) (list (concat "\\`" (regexp-quote doom-autoloads-file) "\\'") + (concat local-dir-re ".*/evil-collection-vterm\\.el\\'") + (concat local-dir-re ".*/with-editor\\.el\\'") ;; https://github.com/nnicandro/emacs-jupyter/issues/297 (concat local-dir-re ".*/jupyter-channel\\.el\\'")))) ;; Default to using all cores, rather than half of them, since we compile From 1ddeb119dd77c322a56300eb5365f71b611051ba Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 17 Jan 2021 15:52:02 -0500 Subject: [PATCH 130/183] AN UPDATE UNLIKE ANYTHING YOU'VE EVER SEEN What have we done? --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index cb8f2620c..5f4d5a097 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016-2020 Henrik Lissner. +Copyright (c) 2016-2021 Henrik Lissner. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the From 1c8451e50914f08312f9628fbf8e5488f3ff71b6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 17 Jan 2021 15:53:12 -0500 Subject: [PATCH 131/183] Move docs/api.org to emacs-lisp module --- modules/lang/emacs-lisp/config.el | 4 +- .../lang/emacs-lisp/demos.org | 200 ++++++------------ 2 files changed, 61 insertions(+), 143 deletions(-) rename docs/api.org => modules/lang/emacs-lisp/demos.org (74%) diff --git a/modules/lang/emacs-lisp/config.el b/modules/lang/emacs-lisp/config.el index bf8c5553d..a255f642e 100644 --- a/modules/lang/emacs-lisp/config.el +++ b/modules/lang/emacs-lisp/config.el @@ -183,12 +183,12 @@ employed so that flycheck still does *some* helpful linting.") "Add Doom's own demos to help buffers." :around #'elisp-demos--search (or (funcall orig-fn symbol) - (when-let (demos-file (doom-glob doom-docs-dir "api.org")) + (when-let (demos-file (doom-module-locate-path :lang 'emacs-lisp "demos.org")) (with-temp-buffer (insert-file-contents demos-file) (goto-char (point-min)) (when (re-search-forward - (format "^\\*\\*\\* %s$" (regexp-quote (symbol-name symbol))) + (format "^\\*\\* %s$" (regexp-quote (symbol-name symbol))) nil t) (let (beg end) (forward-line 1) diff --git a/docs/api.org b/modules/lang/emacs-lisp/demos.org similarity index 74% rename from docs/api.org rename to modules/lang/emacs-lisp/demos.org index 05ad88ad6..9ab9ba7a2 100644 --- a/docs/api.org +++ b/modules/lang/emacs-lisp/demos.org @@ -1,48 +1,42 @@ #+TITLE: API Demos #+PROPERTY: header-args:elisp :results pp -This appendix serves as a reference on how to use Doom Emacs' standard library. -It is integrated into Helpful, in Doom. +This file contains demos of Doom's public API; its core library, macros, and +autodefs. It is used by the =elisp-demos= package to display examples of their +usage from their documentation (e.g. =SPC h f add-hook\!=). * Table of Contents :TOC_3: -- [[#examples-for-dooms-library][Examples for Doom's library]] - - [[#core-lib][core-lib]] - - [[#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!]] - - [[#defer-until][defer-until!]] - - [[#disable-packages][disable-packages!]] - - [[#doom][doom!]] - - [[#file-exists-p][file-exists-p!]] - - [[#cmd][cmd!]] - - [[#cmd-1][cmd!!]] - - [[#cmds][cmds!]] - - [[#kbd][kbd!]] - - [[#letenv][letenv!]] - - [[#load][load!]] - - [[#map][map!]] - - [[#package][package!]] - - [[#pushnew][pushnew!]] - - [[#prependq][prependq!]] - - [[#quiet][quiet!]] - - [[#remove-hook][remove-hook!]] - - [[#setq][setq!]] - - [[#setq-hook][setq-hook!]] - - [[#unsetq-hook][unsetq-hook!]] - - [[#use-package][use-package!]] -- [[#interesting-snippets][Interesting snippets]] - - [[#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]] - - [[#create-a-paste-transient-state-to-cycle-through-kill-ring-on-paste][Create a paste-transient-state to cycle through kill ring on paste]] +- [[#core-lib][core-lib]] + - [[#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!]] + - [[#defer-until][defer-until!]] + - [[#disable-packages][disable-packages!]] + - [[#doom][doom!]] + - [[#file-exists-p][file-exists-p!]] + - [[#cmd][cmd!]] + - [[#cmd-1][cmd!!]] + - [[#cmds][cmds!]] + - [[#kbd][kbd!]] + - [[#letenv][letenv!]] + - [[#load][load!]] + - [[#map][map!]] + - [[#package][package!]] + - [[#pushnew][pushnew!]] + - [[#prependq][prependq!]] + - [[#quiet][quiet!]] + - [[#remove-hook][remove-hook!]] + - [[#setq][setq!]] + - [[#setq-hook][setq-hook!]] + - [[#unsetq-hook][unsetq-hook!]] + - [[#use-package][use-package!]] -* Examples for Doom's library -** core-lib -*** add-hook! +* core-lib +** add-hook! #+BEGIN_SRC elisp :eval no ;; With only one hook and one function, this is identical to `add-hook'. In that ;; case, use that instead. @@ -70,8 +64,8 @@ It is integrated into Helpful, in Doom. ...)) #+END_SRC -*** TODO add-transient-hook! -*** after! +** TODO add-transient-hook! +** after! #+BEGIN_SRC elisp :eval no ;;; `after!' will take: @@ -97,7 +91,7 @@ It is integrated into Helpful, in Doom. (after! rustic ...) (after! python ...) #+END_SRC -*** appendq! +** appendq! #+BEGIN_SRC elisp (let ((x '(a b c))) (appendq! x '(c d e)) @@ -118,7 +112,7 @@ It is integrated into Helpful, in Doom. #+RESULTS: : (a b c c d e f g h) -*** custom-set-faces! +** custom-set-faces! #+BEGIN_SRC elisp :eval no (custom-set-faces! '(outline-1 :weight normal) @@ -152,7 +146,7 @@ It is integrated into Helpful, in Doom. `(outline-2 :background ,(doom-color 'blue))) #+END_SRC -*** custom-theme-set-faces! +** custom-theme-set-faces! #+BEGIN_SRC elisp :eval no (custom-theme-set-faces! 'doom-one '(outline-1 :weight normal) @@ -186,15 +180,15 @@ It is integrated into Helpful, in Doom. `(outline-2 :background ,(doom-color 'blue))) #+END_SRC -*** TODO defer-feature! -*** TODO defer-until! -*** disable-packages! +** TODO defer-feature! +** TODO defer-until! +** disable-packages! #+BEGIN_SRC elisp :eval no ;; Disable packages enabled by DOOM (disable-packages! some-package second-package) #+END_SRC -*** doom! +** doom! #+BEGIN_SRC elisp :eval no (doom! :completion company @@ -224,7 +218,7 @@ It is integrated into Helpful, in Doom. (default +bindings +smartparens)) #+END_SRC -*** file-exists-p! +** file-exists-p! #+BEGIN_SRC elisp (file-exists-p! "init.el" doom-emacs-dir) #+END_SRC @@ -241,12 +235,12 @@ It is integrated into Helpful, in Doom. #+RESULTS: : /home/hlissner/.emacs.d/LICENSE -*** cmd! +** cmd! #+BEGIN_SRC elisp :eval no (map! "C-j" (cmd! (newline) (indent-according-to-mode))) #+END_SRC -*** cmd!! +** cmd!! When ~newline~ is passed a numerical prefix argument (=C-u 5 M-x newline=), it inserts N newlines. We can use ~cmd!!~ to easily create a keybinds that bakes in the prefix arg into the command call: @@ -265,7 +259,7 @@ Or to create aliases for functions that behave differently: (fset 'org-reset-global-visibility (cmd!! #'org-global-cycle '(4)) #+END_SRC -*** cmds! +** cmds! #+BEGIN_SRC elisp :eval no (map! :i [tab] (cmds! (and (featurep! :editor snippets) (bound-and-true-p yas-minor-mode) @@ -285,13 +279,13 @@ Or to create aliases for functions that behave differently: #'evil-jump-item)) #+END_SRC -*** kbd! +** kbd! #+BEGIN_SRC elisp :eval no (map! "," (kbd! "SPC") ";" (kbd! ":")) #+END_SRC -*** letenv! +** letenv! #+BEGIN_SRC elisp (letenv! (("SHELL" "/bin/sh")) (shell-command-to-string "echo $SHELL")) @@ -300,7 +294,7 @@ Or to create aliases for functions that behave differently: #+RESULTS: : "/bin/sh\n" -*** load! +** load! #+BEGIN_SRC elisp :eval no ;;; Lets say we're in ~/.doom.d/config.el (load! "lisp/module") ; loads ~/.doom.d/lisp/module.el @@ -311,7 +305,7 @@ Or to create aliases for functions that behave differently: (load! "~/.maynotexist" nil t) #+END_SRC -*** map! +** map! #+BEGIN_SRC elisp :eval no (map! :map magit-mode-map :m "C-r" 'do-something ; C-r in motion state @@ -406,7 +400,7 @@ These are side-by-side comparisons, showing how to bind keys with and without (:map go-lisp-mode :n "C-x x" #'do-something-else)) #+END_SRC -*** package! +** package! #+BEGIN_SRC elisp :eval no ;; To install a package that can be found on ELPA or any of the sources ;; specified in `straight-recipe-repositories': @@ -438,7 +432,7 @@ 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 -*** pushnew! +** pushnew! #+BEGIN_SRC elisp (let ((list '(a b c))) (pushnew! list 'c 'd 'e) @@ -448,7 +442,7 @@ These are side-by-side comparisons, showing how to bind keys with and without #+RESULTS: : (e d a b c) -*** prependq! +** prependq! #+BEGIN_SRC elisp (let ((x '(a b c))) (prependq! x '(c d e)) @@ -469,12 +463,12 @@ These are side-by-side comparisons, showing how to bind keys with and without #+RESULTS: : (c d e f g h a b c) -*** quiet! +** quiet! #+BEGIN_SRC elisp :eval no ;; Enters recentf-mode without extra output (quiet! (recentf-mode +1)) #+END_SRC -*** remove-hook! +** remove-hook! #+BEGIN_SRC elisp :eval no ;; With only one hook and one function, this is identical to `remove-hook'. In ;; that case, use that instead. @@ -492,7 +486,7 @@ 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! +** 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. @@ -500,7 +494,7 @@ These are side-by-side comparisons, showing how to bind keys with and without evil-want-C-u-scroll nil evil-want-C-d-scroll nil) #+END_SRC -*** setq-hook! +** setq-hook! #+BEGIN_SRC elisp :eval no ;; Set multiple variables after a hook (setq-hook! 'markdown-mode-hook @@ -512,7 +506,7 @@ These are side-by-side comparisons, showing how to bind keys with and without hscroll-margin 0) #+END_SRC -*** unsetq-hook! +** unsetq-hook! #+BEGIN_SRC elisp :eval no (unsetq-hook! 'markdown-mode-hook line-spacing) @@ -526,7 +520,7 @@ These are side-by-side comparisons, showing how to bind keys with and without (unsetq-hook! (one-mode second-mode) enable-something) #+END_SRC -*** use-package! +** use-package! #+BEGIN_SRC elisp :eval no ;; Use after-call to load package before hook (use-package! projectile @@ -541,79 +535,3 @@ These are side-by-side comparisons, showing how to bind keys with and without (use-package! abc :defer-incrementally t) #+END_SRC -* Interesting snippets -** Center Emacs' initial frame with a fixed size -#+BEGIN_SRC elisp -(let ((width 500) - (height 250) - (display-height (display-pixel-height)) - (display-width (display-pixel-width))) - (pushnew! initial-frame-alist - `(left . ,(- (/ display-width 2) (/ width 2))) - `(top . ,(- (/ display-height 2) (/ height 2))) - `(width text-pixels ,width) - `(height text-pixels ,height))) -#+END_SRC - -** Persist Emacs' initial frame position, dimensions and/or full-screen state across sessions -#+BEGIN_SRC elisp -;; add to ~/.doom.d/config.el -(when-let (dims (doom-store-get 'last-frame-size)) - (cl-destructuring-bind ((left . top) width height fullscreen) dims - (setq initial-frame-alist - (append initial-frame-alist - `((left . ,left) - (top . ,top) - (width . ,width) - (height . ,height) - (fullscreen . ,fullscreen)))))) - -(defun save-frame-dimensions () - (doom-store-put 'last-frame-size - (list (frame-position) - (frame-width) - (frame-height) - (frame-parameter nil 'fullscreen)))) - -(add-hook 'kill-emacs-hook #'save-frame-dimensions) -#+END_SRC - -** Update cursor shape under terminal Emacs -Install [[https://github.com/7696122/evil-terminal-cursor-changer][evil-terminal-cursor-changer]]. The package isn't included in Doom because -it is not maintained, unreasonably buggy, and lacks support for a number of -terminals. Where it fails, it inserts unexpected characters into the buffer. To -uphold the principle of least surprise, an unchanging cursor is less surprising -than unwarranted characters. - -#+BEGIN_SRC elisp -;; ~/.doom.d/packages.el -(package! evil-terminal-cursor-changer) - -;; ~/.doom.d/config.el -(use-package! evil-terminal-cursor-changer - :hook (tty-setup . evil-terminal-cursor-changer-activate)) -#+END_SRC - -Alternatively, an updated version exists at -[[https://github.com/amosbird/evil-terminal-cursor-changer][amosbird/evil-terminal-cursor-changer]], with support for urxvt and tmux. - -** Create a paste-transient-state to cycle through kill ring on paste -Replaces the default evil-paste binding to paste then let you cycle through entries in your kill ring. Gives you more flexibility when copying to your clipboard, making edits, then deciding to paste after. - -You will need to enable the `hydra` module first. - -#+BEGIN_SRC elisp -(defhydra hydra-paste (:color red - :hint nil) - "\n[%s(length kill-ring-yank-pointer)/%s(length kill-ring)] \ - [_C-j_/_C-k_] cycles through yanked text, [_p_/_P_] pastes the same text \ - above or below. Anything else exits." - ("C-j" evil-paste-pop) - ("C-k" evil-paste-pop-next) - ("p" evil-paste-after) - ("P" evil-paste-before)) - -(map! :nv "p" #'hydra-paste/evil-paste-after - :nv "P" #'hydra-paste/evil-paste-before) -#+END_SRC - From 63929a240c4979402a418f624f6713eb89df0e21 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 18 Jan 2021 17:43:57 -0500 Subject: [PATCH 132/183] Fix doom-lookup-key + Scanning wrong variable for minor mode keymaps (minor-mode-alist -> minor-mode-map-alist). + Accommodate possibility that emulation-mode-map-alists may contain nested alists (#4538). Closes #4538 --- core/core-lib.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index cc330d903..2f042a5ef 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -100,11 +100,13 @@ at the values with which this function was called." (lookup-key keymap keys) (cl-loop for keymap in (append (cl-loop for alist in emulation-mode-map-alists - if (boundp alist) - append (mapcar #'cdr (symbol-value alist))) + append (mapcar #'cdr + (if (symbolp alist) + (if (boundp alist) (symbol-value alist)) + alist))) (list (current-local-map)) (mapcar #'cdr minor-mode-overriding-map-alist) - (mapcar #'cdr minor-mode-alist) + (mapcar #'cdr minor-mode-map-alist) (list (current-global-map))) if (keymapp keymap) if (lookup-key keymap keys) From 75ac7be289254d1278542519e4ce40107f0bbee0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 18 Jan 2021 17:53:37 -0500 Subject: [PATCH 133/183] Fix package-lint warnings in elisp package template --- .../file-templates/templates/emacs-lisp-mode/__package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/editor/file-templates/templates/emacs-lisp-mode/__package b/modules/editor/file-templates/templates/emacs-lisp-mode/__package index b040adbb6..ba2439cc4 100644 --- a/modules/editor/file-templates/templates/emacs-lisp-mode/__package +++ b/modules/editor/file-templates/templates/emacs-lisp-mode/__package @@ -1,4 +1,4 @@ -;;; `(file-name-nondirectory buffer-file-name)`${1: --- ${2:description}} -*- lexical-binding: t; -*- +;;; `(file-name-nondirectory buffer-file-name)`${1: --- ${2:Description}} -*- lexical-binding: t; -*- ;; ;; Copyright (C) `(format-time-string "%Y")` `user-full-name` ;; @@ -7,9 +7,9 @@ ;; Created: `(format-time-string "%B %d, %Y")` ;; Modified: `(format-time-string "%B %d, %Y")` ;; Version: 0.0.1 -;; Keywords: +;; Keywords: `(mapconcat #'symbol-name (mapcar #'car finder-known-keywords) " ")` ;; Homepage: https://github.com/`user-login-name`/`(file-name-base buffer-file-name)` -;; Package-Requires: ((emacs `emacs-version`) (cl-lib "0.5")) +;; Package-Requires: ((emacs "24.3")) ;; ;; This file is not part of GNU Emacs. ;; From b6d8a98402df55f63fd2d52e8e7de3733b9ae33e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 18 Jan 2021 19:52:46 -0500 Subject: [PATCH 134/183] Fix +ivy--set-jump-point-maybe-h: wrong-type-argument markerp --- modules/completion/ivy/config.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 364a8bb2d..0a8588a07 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -85,12 +85,12 @@ results buffer.") (add-hook! 'minibuffer-exit-hook (defun +ivy--set-jump-point-maybe-h () - (and (markerp (bound-and-true-p +ivy--origin)) - (not (equal (ignore-errors (with-ivy-window (point-marker))) - +ivy--origin)) - (with-current-buffer (marker-buffer +ivy--origin) - (better-jumper-set-jump +ivy--origin))) - (set-marker +ivy--origin nil) + (when (markerp (bound-and-true-p +ivy--origin)) + (unless (equal (ignore-errors (with-ivy-window (point-marker))) + +ivy--origin) + (with-current-buffer (marker-buffer +ivy--origin) + (better-jumper-set-jump +ivy--origin))) + (set-marker +ivy--origin nil)) (setq +ivy--origin nil))) (after! yasnippet From 2ad1eab6eebbae554ebcd931c03b7f906a77f3ec Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 18 Jan 2021 19:55:04 -0500 Subject: [PATCH 135/183] Bump evil-collection emacs-evil/evil-collection@e7be9f5 -> emacs-evil/evil-collection@ffbf149 Adds racket-describe keybinds --- modules/editor/evil/init.el | 1 + modules/editor/evil/packages.el | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/editor/evil/init.el b/modules/editor/evil/init.el index 4bf17bee4..99e05cfaa 100644 --- a/modules/editor/evil/init.el +++ b/modules/editor/evil/init.el @@ -188,6 +188,7 @@ variable for an explanation of the defaults (in comments). See python quickrun racer + racket-describe realgud reftex restclient diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index 272e51954..c3176bd60 100644 --- a/modules/editor/evil/packages.el +++ b/modules/editor/evil/packages.el @@ -33,4 +33,4 @@ (package! neotree) (autoload 'neotree-make-executor "neotree" nil nil 'macro)) - (package! evil-collection :pin "e7be9f53a05c81ef9e89c2f053ba62048e6afd69")) + (package! evil-collection :pin "ffbf149f0e09d8c2068f9f5098255555d7983696")) From b4fbafe451d113012d1cf2c6633c0a3b14ad25d2 Mon Sep 17 00:00:00 2001 From: JerryChu Date: Thu, 21 Jan 2021 14:10:14 +0800 Subject: [PATCH 136/183] Fix path separator in msys2 --- core/core-projects.el | 8 ++++---- modules/completion/ivy/config.el | 11 +---------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/core/core-projects.el b/core/core-projects.el index 7693d4dd4..2bfa7a533 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -145,10 +145,10 @@ c) are not valid projectile projects." projectile-project-root-files) projectile-project-root-files-bottom-up nil))) - ;; Some utilities have issues with windows-style paths in MSYS, so emit - ;; unix-style paths instead. + ;; Some MSYS utilities auto expanded the `/' path separator, so we need to prevent it. (when IS-WINDOWS - (setenv "MSYS_NO_PATHCONV" "1")) + (setenv "MSYS_NO_PATHCONV" "1") ; Fix path in Git Bash + (setenv "MSYS2_ARG_CONV_EXCL" "--path-separator")) ; Fix path in MSYS2 ;; HACK Don't rely on VCS-specific commands to generate our file lists. That's ;; 7 commands to maintain, versus the more generic, reliable and @@ -185,7 +185,7 @@ And if it's a function, evaluate it." ;; Otherwise, resort to ripgrep, which is also faster than find ((executable-find "rg" t) (concat "rg -0 --files --follow --color=never --hidden -g!.git" - (if IS-WINDOWS " --path-separator /"))) + (if IS-WINDOWS " --path-separator=/"))) ("find . -type f -print0")))) (defadvice! doom--projectile-default-generic-command-a (orig-fn &rest args) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 0a8588a07..5fc261de7 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -222,15 +222,6 @@ results buffer.") (when (stringp counsel-rg-base-command) (setq counsel-rg-base-command (split-string counsel-rg-base-command))) - ;; REVIEW Fix #3215: prevents mingw on Windows throwing an error trying to - ;; expand / to an absolute path. Remove this when it is fixed upstream - ;; in counsel. - (when (and (memq system-type '(windows-nt ms-dos)) - (listp counsel-rg-base-command) - (member "--path-separator" counsel-rg-base-command)) - (setf (cadr (member "--path-separator" counsel-rg-base-command)) - "/")) - ;; Integrate with `helpful' (setq counsel-describe-function-function #'helpful-callable counsel-describe-variable-function #'helpful-variable) @@ -299,7 +290,7 @@ results buffer.") (cl-loop for dir in projectile-globally-ignored-directories collect "--glob" collect (concat "!" dir)) - (if IS-WINDOWS (list "--path-separator" "/")))) + (if IS-WINDOWS '("--path-separator=/")))) ((cons find-program args))) (unless (listp args) (user-error "`counsel-file-jump-args' is a list now, please customize accordingly.")) From cb09f1778b62d4c4b49ce1afda8a0347fd4ca9e1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 20 Jan 2021 20:50:27 -0500 Subject: [PATCH 137/183] Bump core bbatsov/projectile@c31bd41 -> bbatsov/projectile@0e2620a domtronn/all-the-icons.el@9aa16ae -> domtronn/all-the-icons.el@050d4c5 gilbertw1/better-jumper@5ef53fc -> gilbertw1/better-jumper@411ecdf raxod502/straight.el@a32c97c -> raxod502/straight.el@47dd03d --- core/core-packages.el | 4 ++-- core/packages.el | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index 3f984c601..00bd0a05d 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -196,7 +196,7 @@ processed." (if disable (cl-pushnew name doom-disabled-packages) (when shadow - (straight-override-recipe (cons shadow '(:local-repo nil))) + (straight-override-recipe (cons shadow `(:local-repo nil :package included :build nil :included-by ,name))) (let ((site-load-path (copy-sequence doom--initial-load-path)) lib) (while (setq @@ -493,7 +493,7 @@ elsewhere." (when-let (recipe (plist-get plist :recipe)) (cl-destructuring-bind (&key local-repo _files _flavor - _build _pre-build _post-build _no-byte-compile + _build _pre-build _post-build _no-byte-compile _includes _no-native-compile _no-autoloads _type _repo _host _branch _remote _nonrecursive _fork _depth) recipe diff --git a/core/packages.el b/core/packages.el index e0e1d51a6..35280980c 100644 --- a/core/packages.el +++ b/core/packages.el @@ -17,7 +17,7 @@ :branch ,straight-repository-branch :local-repo "straight.el" :files ("straight*.el")) - :pin "a32c97cb427b7f14dfd066f36a58d1740e20ed69") + :pin "47dd03dc81207da598f007e0218e12a7cede0007") ;; core-modules.el (package! use-package @@ -25,14 +25,14 @@ :pin "365c73d2618dd0040a32c2601c5456ab5495b812") ;; core-ui.el -(package! all-the-icons :pin "9aa16ae198073fe839a0abfa9a7d3a9dc85ef5f9") +(package! all-the-icons :pin "050d4c5a20f686c67ec1fc5eda30481d5a23383e") (package! hide-mode-line :pin "88888825b5b27b300683e662fa3be88d954b1cea") (package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307") (package! rainbow-delimiters :pin "f43d48a24602be3ec899345a3326ed0247b960c6") (package! restart-emacs :pin "1607da2bc657fe05ae01f7fdf26f716eafead02c") ;; core-editor.el -(package! better-jumper :pin "5ef53fcee4e74f397c8d275679e5596b52582b57") +(package! better-jumper :pin "411ecdf6e7a3e1b4ced7605070d2309e5fc46556") (package! dtrt-indent :pin "854b9a1ce93d9926018a0eb18e6e552769c5407d") (package! helpful :pin "584ecc887bb92133119f93a6716cdf7af0b51dca") (package! pcre2el :pin "0b5b2a2c173aab3fd14aac6cf5e90ad3bf58fa7d") @@ -51,7 +51,7 @@ :pin "2bb49d3ee7d2cba133bc7e9cdac416cd1c5e4fe0") ;; core-projects.el -(package! projectile :pin "c31bd41c0b9d6fba8837ebfd3a31dec0b3cd73c6") +(package! projectile :pin "0e2620ad5cb236a64a2b4faa4c44a76a08a1cf08") ;; core-keybinds.el (package! general :pin "a0b17d207badf462311b2eef7c065b884462cb7c") From eacbc5e36f4ba8d8c2b92836842a18fddc5b965e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 20 Jan 2021 22:10:31 -0500 Subject: [PATCH 138/183] Inject load-path when compiling straight packages --- core/core-cli.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/core-cli.el b/core/core-cli.el index a0fcba9d8..431c03d63 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -424,6 +424,17 @@ everywhere we use it (and internally)." cause) interactive))) +(defadvice! doom--straight-inject-load-path-a (orig-fn &rest args) + "Straight builds packages in an isolated Emacs child process, which " + :override #'straight--build-compile + (let* ((package (plist-get recipe :package)) + (dir (straight--build-dir package))) + (call-process (concat invocation-directory invocation-name) + nil straight-byte-compilation-buffer nil + "-Q" "--batch" + "--eval" (prin1-to-string `(setq load-path (cons ,dir ',load-path))) + "--eval" (format "(byte-recompile-directory %S 0 'force)" dir)))) + ;; ;;; Entry point From 2e088e7945a1f58648debcd3ce75243e4dfa8abd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Jan 2021 01:48:06 -0500 Subject: [PATCH 139/183] More feedback from +default/discover-projects Log successes and failures to the echo area/*Messages* so we know the command worked (or didn't). --- modules/config/default/autoload/files.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/config/default/autoload/files.el b/modules/config/default/autoload/files.el index 33d6dc126..67a754803 100644 --- a/modules/config/default/autoload/files.el +++ b/modules/config/default/autoload/files.el @@ -45,9 +45,16 @@ If prefix ARG is non-nil, prompt for the search path." (interactive "P") (if arg (call-interactively #'projectile-discover-projects-in-directory) - (if projectile-project-search-path - (mapc #'projectile-discover-projects-in-directory projectile-project-search-path) - (user-error "`projectile-project-search-path' is empty; don't know where to search")))) + (if (not projectile-project-search-path) + (user-error "`projectile-project-search-path' is empty; don't know where to search") + (letf! (defun projectile-add-known-project (project-root) + (unless (projectile-ignored-project-p project-root) + (funcall projectile-add-known-project project-root) + (message "Added %S to known project roots"))) + (dolist (dir projectile-project-search-path) + (if (not (file-accessible-directory-p dir)) + (message "%S was inaccessible and couldn't searched") + (projectile-discover-projects-in-directory projectile-project-search-path))))))) ;;;###autoload (defun +default/dired (arg) From 4aed841c325513a847595e858e488b163981f6ca Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 23 Jan 2021 18:45:32 -0500 Subject: [PATCH 140/183] Bump :lang python cython/cython@21b4e53 -> cython/cython@17e03b8 emacs-lsp/lsp-pyright@d9e7d3c -> emacs-lsp/lsp-pyright@71ff088 emacs-lsp/lsp-python-ms@c4ebc7a -> emacs-lsp/lsp-python-ms@5470ada jorgenschaefer/pyvenv@0bf4b87 -> jorgenschaefer/pyvenv@9b3678b necaris/conda.el@9f7eea1 -> necaris/conda.el@dce431b pwalsh/pipenv.el@b730bb5 -> pwalsh/pipenv.el@f516a1a pythonic-emacs/anaconda-mode@39b1cf8 -> pythonic-emacs/anaconda-mode@b1875a5 wbolster/emacs-python-pytest@4a1c4c8 -> wbolster/emacs-python-pytest@3fadf1f Fix #4496: "__init__() takes from 1 to 2 positional arguments but 5 positional arguments (and 1 keyword-only argument" error from old version of anaconda. --- modules/lang/python/packages.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/lang/python/packages.el b/modules/lang/python/packages.el index ef4b29aa9..081a2b26b 100644 --- a/modules/lang/python/packages.el +++ b/modules/lang/python/packages.el @@ -4,7 +4,7 @@ ;; Major modes (package! pip-requirements :pin "216cd1690f80cc965d4ae47b8753fc185f778ff6") (when (featurep! +cython) - (package! cython-mode :pin "21b4e533747507c4dad5e6908df1f157dff4de89") + (package! cython-mode :pin "17e03b8658a07b6d6da49300b39b57ed9c59ddb1") (when (featurep! :checkers syntax) (package! flycheck-cython :pin "ecc4454d35ab5317ab66a04406f36f0c1dbc0b76"))) @@ -12,21 +12,21 @@ (when (featurep! +lsp) (unless (featurep! :tools lsp +eglot) (if (featurep! +pyright) - (package! lsp-pyright :pin "d9e7d3cf1bdc8ee0395c8df4408b05ee3ba9c22a") - (package! lsp-python-ms :pin "c4ebc7a11398733055a1dc07f9cffacd04d1c2dc")))) + (package! lsp-pyright :pin "71ff088ac4c93b0edd012f305a3dfd1602c5d21e") + (package! lsp-python-ms :pin "5470ada6cde6e68fe6ce13ff1146c89c3bae0cc8")))) ;; Programming environment -(package! anaconda-mode :pin "39b1cf88c8c459901630d248d6135d8644075648") +(package! anaconda-mode :pin "b1875a5d0ec9885c1c42558c126b93ee6bcedaa6") (when (featurep! :completion company) (package! company-anaconda :pin "da1566db41a68809ef7f91ebf2de28118067c89b")) ;; Environment management -(package! pipenv :pin "b730bb509e8b60af9f5ab1f1e6c3458d1d95d789") -(package! pyvenv :pin "0bf4b87068e9040fc99afa85af1992247dd7aacd") +(package! pipenv :pin "f516a1a8677a6a1ce9683056e9f77b1e785e8431") +(package! pyvenv :pin "9b3678bc29192d2dba64df90fbdb17393ef8d877") (when (featurep! +pyenv) (package! pyenv-mode :pin "b818901b8eac0e260ced66a6a5acabdbf6f5ba99")) (when (featurep! +conda) - (package! conda :pin "9f7eea16e9ad3eb34fe3d1cbd9d6162b8046c2f8")) + (package! conda :pin "dce431b25f5a13af58cc7cacfa7968b5a888609c")) (when (featurep! +poetry) (package! poetry :pin "d5163fe065239bb7b46ed8b3ff3b85b1f3229af3")) @@ -35,7 +35,7 @@ ;; REVIEW Remove this when emacsmirror/epkgs updates its emacsattic index :recipe (:host github :repo "emacsattic/nose") :pin "f8528297519eba911696c4e68fa88892de9a7b72") -(package! python-pytest :pin "4a1c4c8915c12e540d41aae1d4e326a2362da541") +(package! python-pytest :pin "3fadf1f8bc363d57c54eedd1bf98e6d9db9f0a62") ;; Import managements (package! pyimport :pin "a6f63cf7ed93f0c0f7c207e6595813966f8852b9") From fd7073240c5f71ba64b9b990f840edc4d7c52138 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 23 Jan 2021 22:35:40 -0500 Subject: [PATCH 141/183] Complete docstring for doom--straight-inject-load-path-a Whoops. I pushed before finishing the --- core/core-cli.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core-cli.el b/core/core-cli.el index 431c03d63..9b3f9a5ff 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -425,7 +425,8 @@ everywhere we use it (and internally)." interactive))) (defadvice! doom--straight-inject-load-path-a (orig-fn &rest args) - "Straight builds packages in an isolated Emacs child process, which " + "Straight builds packages in an isolated Emacs child process, which means +needed packages may not be accessible when a package is compiled." :override #'straight--build-compile (let* ((package (plist-get recipe :package)) (dir (straight--build-dir package))) From c29bbbc17171b3ed7b2a172de2961fc4c5734698 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 26 Jan 2021 18:30:16 -0500 Subject: [PATCH 142/183] Fix doom-package-depending-on --- core/core-packages.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index 00bd0a05d..8e8020271 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -278,12 +278,15 @@ processed." (copy-sequence deps)))) (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) + "Return a list of packages that depend on PACKAGE. + +If PACKAGE (a symbol) isn't installed, throw an error, unless NOERROR is +non-nil." + (cl-check-type package symbol) ;; can't get dependencies for built-in packages - (unless (or (doom-package-build-recipe name) + (unless (or (doom-package-build-recipe package) noerror) - (error "Couldn't find %s, is it installed?" name)) + (error "Couldn't find %s, is it installed?" package)) (cl-loop for pkg in (hash-table-keys straight--build-cache) for deps = (doom-package-dependencies pkg) if (memq package deps) From 2c4b5b2f9362a56183b607d47a6a7e974af06e8c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 26 Jan 2021 22:38:07 -0500 Subject: [PATCH 143/183] Fix type error when printing straight errors --- 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 9b3f9a5ff..c186117e8 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -260,8 +260,9 @@ BODY will be run when this dispatcher is called." (string-match-p (regexp-quote straight-process-buffer) data)) (print! (error "There was an unexpected package error")) - (print-group! - (print! "%s" (string-trim-right (straight--process-get-output))))) + (when-let (output (straight--process-get-output)) + (print-group! + (print! "%s" (string-trim-right output))))) ((print! (error "There was an unexpected error")) (print-group! (print! "%s %s" (bold "Message:") (get type 'error-message)) From 181379c0068e810e8da7a5b82cb8f8c19d6e3eb2 Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Wed, 27 Jan 2021 01:08:47 -0600 Subject: [PATCH 144/183] Fix typo --- 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 bccd3f07a..fee2ed2dd 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -356,7 +356,7 @@ declaration) or dependency thereof that hasn't already been." if (or (if want-byte-compile (doom--elc-file-outdated-p file)) (if want-native-compile (doom--eln-file-outdated-p file))) do (setq outdated t) - (when want-native + (when want-native-compile (push file doom--eln-output-expected)) finally return outdated)) (puthash package t straight--packages-to-rebuild)))) From 6d2b9ff100aa658b4ce1d56847dd27f776199aa8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 24 Jan 2021 15:48:37 -0500 Subject: [PATCH 145/183] Enable hl-line-mode in org-agenda-mode Closes #4567 --- 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 4748cffbf..aa6171759 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -392,7 +392,9 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original ;; Highlights the current line :hook (doom-first-buffer . global-hl-line-mode) :init - (defvar global-hl-line-modes '(prog-mode text-mode conf-mode special-mode) + (defvar global-hl-line-modes + '(prog-mode text-mode conf-mode special-mode + org-agenda-mode) "What modes to enable `hl-line-mode' in.") :config ;; HACK I reimplement `global-hl-line-mode' so we can white/blacklist modes in From 454c4132d4e4ca55fdc58f08bef3a9d80f540490 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 26 Jan 2021 23:44:40 -0500 Subject: [PATCH 146/183] Slower mouse-wheel and re-enable acceleration This improves the illusion of faster scrolling. --- core/core-ui.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index aa6171759..078c048c1 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -194,8 +194,7 @@ or if the current buffer is read-only or not file-visiting." ;; for tall lines. auto-window-vscroll nil ;; mouse - mouse-wheel-scroll-amount '(5 ((shift) . 2)) - mouse-wheel-progressive-speed nil) ; don't accelerate scrolling + mouse-wheel-scroll-amount '(2 ((shift) . hscroll))) ;; Remove hscroll-margin in shells, otherwise it causes jumpiness (setq-hook! '(eshell-mode-hook term-mode-hook) hscroll-margin 0) From 614dc93569f4af8450c56f9f417615bc0dc2268d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 26 Jan 2021 23:46:15 -0500 Subject: [PATCH 147/183] mouse-wheel-scroll-amount-horizontal = 2 Make hscrolling a little faster. Our windows and displays are large. Scrolling one character at a time is too slow. --- 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 078c048c1..b52adae8e 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -194,7 +194,8 @@ or if the current buffer is read-only or not file-visiting." ;; for tall lines. auto-window-vscroll nil ;; mouse - mouse-wheel-scroll-amount '(2 ((shift) . hscroll))) + mouse-wheel-scroll-amount '(2 ((shift) . hscroll)) + mouse-wheel-scroll-amount-horizontal 2) ;; Remove hscroll-margin in shells, otherwise it causes jumpiness (setq-hook! '(eshell-mode-hook term-mode-hook) hscroll-margin 0) From 47f222a61fbab2a07dd3d1561f2e96a117a6fda2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 27 Jan 2021 02:59:36 -0500 Subject: [PATCH 148/183] Fix #4558: void-variable comp-native-version-dir Occurs for non-gccemacs users due to aggressive negation if (car build) == :not --- 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 fee2ed2dd..eabbc0d10 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -342,12 +342,13 @@ declaration) or dependency thereof that hasn't already been." (or (eq build t) (memq 'compile build))) (want-native-compile - (and (or (eq build t) - (memq 'native-compile build)) - (require 'comp nil t)))) + (or (eq build t) + (memq 'native-compile build)))) (when (eq (car build) :not) (setq want-byte-compile (not want-byte-compile) want-native-compile (not want-native-compile))) + (unless (require 'comp nil t) + (setq want-native-compile nil)) (and (or want-byte-compile want-native-compile) (or (file-newer-than-file-p repo-dir build-dir) (file-exists-p (straight--modified-dir (or local-repo package))) From 4d7640b4c2d96374631e31f7917ae53eeec2239c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 27 Jan 2021 03:30:19 -0500 Subject: [PATCH 149/183] Don't auto-create directory when opening files It'll ask when you want to save, so this is redundant and imposing. --- core/core-editor.el | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index b120f62e5..909829556 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -72,19 +72,6 @@ possible." ;; warning as it will redirect you to the existing buffer anyway. (setq find-file-suppress-same-file-warnings t) -;; Create missing directories when we open a file that doesn't exist under a -;; directory tree that may not exist. -(add-hook! 'find-file-not-found-functions - (defun doom-create-missing-directories-h () - "Automatically create missing directories when creating new files." - (unless (file-remote-p buffer-file-name) - (let ((parent-directory (file-name-directory buffer-file-name))) - (and (not (file-directory-p parent-directory)) - (y-or-n-p (format "Directory `%s' does not exist! Create it?" - parent-directory)) - (progn (make-directory parent-directory 'parents) - t)))))) - ;; Don't generate backups or lockfiles. While auto-save maintains a copy so long ;; as a buffer is unsaved, backups create copies once, when the file is first ;; written, and never again until it is killed and reopened. This is better From 589e5a37afac137cbaa5f7c65475f4919c9cbd2c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 27 Jan 2021 03:35:47 -0500 Subject: [PATCH 150/183] Associate flake.lock with json-mode/js-mode --- modules/lang/nix/config.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/lang/nix/config.el b/modules/lang/nix/config.el index 3f132ee56..b65f732ad 100644 --- a/modules/lang/nix/config.el +++ b/modules/lang/nix/config.el @@ -10,6 +10,14 @@ (use-package! nix-mode :interpreter ("\\(?:cached-\\)?nix-shell" . +nix-shell-init-mode) :mode "\\.nix\\'" + :init + ;; Treat flake.lock files as json. Fall back to js-mode because it's faster + ;; than js2-mode, and its extra features aren't needed there. + (add-to-list 'auto-mode-alist + (cons "/flake\\.lock\\'" + (if (featurep! :lang json) + 'json-mode + 'js-mode))) :config (set-repl-handler! 'nix-mode #'+nix/open-repl) (set-company-backend! 'nix-mode 'company-nixos-options) From 3a4f182a3cff79c60209d7fc41bee17719cd70a7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 27 Jan 2021 03:36:53 -0500 Subject: [PATCH 151/183] Revise core docstrings & comments --- core/core-editor.el | 7 +++++-- core/core-ui.el | 10 +++++++--- core/core.el | 6 +++--- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 909829556..724a32802 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -106,7 +106,10 @@ possible." (add-hook! 'after-save-hook (defun doom-guess-mode-h () - "Guess major mode when saving a file in `fundamental-mode'." + "Guess major mode when saving a file in `fundamental-mode'. + +Likely, something has changed since the buffer was opened. e.g. A shebang line +or file path may exist now." (when (eq major-mode 'fundamental-mode) (let ((buffer (or (buffer-base-buffer) (current-buffer)))) (and (buffer-file-name buffer) @@ -155,7 +158,7 @@ possible." ;; The POSIX standard defines a line is "a sequence of zero or more non-newline ;; characters followed by a terminating newline", so files should end in a ;; newline. Windows doesn't respect this (because it's Windows), but we should, -;; since programmers' tools tend to be POSIX compliant. +;; since programmers' tools tend to be POSIX compliant (and no big deal if not). (setq require-final-newline t) ;; Default to soft line-wrapping in text modes. It is more sensibile for text diff --git a/core/core-ui.el b/core/core-ui.el index b52adae8e..417349677 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -504,6 +504,8 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original all-the-icons-wicon all-the-icons-alltheicon) "")))) +;; Hide the mode line in completion popups and MAN pages because they serve +;; little purpose there, and is better hidden. ;;;###package hide-mode-line-mode (add-hook! '(completion-list-mode-hook Man-mode-hook) #'hide-mode-line-mode) @@ -518,17 +520,19 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original ;;;###package rainbow-delimiters ;; Helps us distinguish stacked delimiter pairs, especially in parentheses-drunk -;; languages like Lisp. +;; languages like Lisp. I reduce it from it's default of 9 to reduce the +;; complexity of the font-lock keyword and hopefully buy us a few ms of +;; performance. (setq rainbow-delimiters-max-face-count 3) ;; ;;; Line numbers -;; Explicitly define a width to reduce computation +;; Explicitly define a width to reduce the cost of on-the-fly computation (setq-default display-line-numbers-width 3) -;; Show absolute line numbers for narrowed regions makes it easier to tell the +;; Show absolute line numbers for narrowed regions to make it easier to tell the ;; buffer is narrowed, and where you are, exactly. (setq-default display-line-numbers-widen t) diff --git a/core/core.el b/core/core.el index 2359235ce..a954358ef 100644 --- a/core/core.el +++ b/core/core.el @@ -208,7 +208,8 @@ users).") inhibit-default-init t ;; Shave seconds off startup time by starting the scratch buffer in ;; `fundamental-mode', rather than, say, `org-mode' or `text-mode', which - ;; pull in a ton of packages. + ;; pull in a ton of packages. `doom/open-scratch-buffer' provides a better + ;; scratch buffer anyway. initial-major-mode 'fundamental-mode initial-scratch-message nil) @@ -246,8 +247,7 @@ config.el instead." ;;; Optimizations ;; A second, case-insensitive pass over `auto-mode-alist' is time wasted, and -;; indicates misconfiguration (or that the user needs to stop relying on case -;; insensitivity). +;; indicates misconfiguration (don't rely on case insensitivity for file names). (setq auto-mode-case-fold nil) ;; Disable bidirectional text rendering for a modest performance boost. I've set From 2d718cc86f6a980059cc7d3f7f7dca499723e61c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 27 Jan 2021 03:37:55 -0500 Subject: [PATCH 152/183] Remove eager native compilation of subr-trampolines This was fixed upstream. --- core/cli/packages.el | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index eabbc0d10..a872a4916 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -232,46 +232,11 @@ list remains lean." (doom-log "Compiling %s" file) (native-compile-async file)))) -(defun doom--bootstrap-trampolines () - "Build the trampolines we need to prevent hanging." - (when (featurep 'comp) - ;; HACK The following list was obtained by running 'doom build', waiting for - ;; it to hang, then checking the eln-cache for trampolines. We - ;; simulate running 'doom build' twice by compiling the trampolines - ;; then restarting. - (let (restart) - (dolist (f '(abort-recursive-edit - describe-buffer-bindings - execute-kbd-macro - handle-switch-frame - load - make-indirect-buffer - make-process - message - read-char - read-key-sequence - select-window - set-window-buffer - top-level - use-global-map - use-local-map - write-region)) - (unless (doom--find-eln-file - (concat comp-native-version-dir "/" - (comp-trampoline-filename f))) - (print! (info "Compiling trampoline for %s") f) - (comp-trampoline-compile f) - (setq restart t))) - (when restart - (throw 'exit :restart))))) - - (defun doom-cli-packages-install () "Installs missing packages. This function will install any primary package (i.e. a package with a `package!' declaration) or dependency thereof that hasn't already been." - (doom--bootstrap-trampolines) (doom-initialize-packages) (print! (start "Installing packages...")) (let ((pinned (doom-package-pinned-list))) @@ -311,7 +276,6 @@ declaration) or dependency thereof that hasn't already been." (defun doom-cli-packages-build (&optional force-p) "(Re)build all packages." - (doom--bootstrap-trampolines) (doom-initialize-packages) (print! (start "(Re)building %spackages...") (if force-p "all " "")) (print-group! From a5f39d75a5d8dd3211c3064199873630a27e7ad1 Mon Sep 17 00:00:00 2001 From: Yuri Pieters Date: Thu, 28 Jan 2021 21:09:36 +0000 Subject: [PATCH 153/183] Fix 'readme' button doom/help-packages The button was trying to open `path/to/README.org/README.org`. --- core/autoload/help.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 3218e10af..909898d60 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -576,9 +576,7 @@ If prefix arg is present, refresh the cache." (if (file-exists-p readme-path) (doom--help-insert-button "readme" - (expand-file-name - "README.org" - readme-path)) + readme-path) (insert "no readme")) (insert ")\n")))) From c7029731d119bfde11d35d7e763eb7ddb2db4058 Mon Sep 17 00:00:00 2001 From: Shane Mook Date: Thu, 28 Jan 2021 18:27:44 -0600 Subject: [PATCH 154/183] Updated projectile-project-search-path to use the correct arguments when calling message and projectile-discover-projects-in-directory. --- modules/config/default/autoload/files.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/config/default/autoload/files.el b/modules/config/default/autoload/files.el index 67a754803..21bdef833 100644 --- a/modules/config/default/autoload/files.el +++ b/modules/config/default/autoload/files.el @@ -50,11 +50,11 @@ If prefix ARG is non-nil, prompt for the search path." (letf! (defun projectile-add-known-project (project-root) (unless (projectile-ignored-project-p project-root) (funcall projectile-add-known-project project-root) - (message "Added %S to known project roots"))) + (message "Added %S to known project roots" project-root))) (dolist (dir projectile-project-search-path) (if (not (file-accessible-directory-p dir)) - (message "%S was inaccessible and couldn't searched") - (projectile-discover-projects-in-directory projectile-project-search-path))))))) + (message "%S was inaccessible and couldn't searched" dir) + (projectile-discover-projects-in-directory dir))))))) ;;;###autoload (defun +default/dired (arg) From 334e054ab0863f7a295ca0db0bb5fa4ed7bcfd2a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 27 Jan 2021 22:08:46 -0500 Subject: [PATCH 155/183] Read username from git config github.user Falls back to user-login-name otherwise. --- .../editor/file-templates/templates/emacs-lisp-mode/__package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/file-templates/templates/emacs-lisp-mode/__package b/modules/editor/file-templates/templates/emacs-lisp-mode/__package index 9d2034b8b..8d500bc72 100644 --- a/modules/editor/file-templates/templates/emacs-lisp-mode/__package +++ b/modules/editor/file-templates/templates/emacs-lisp-mode/__package @@ -2,7 +2,7 @@ ;; ;; Copyright (C) `(format-time-string "%Y")` `user-full-name` ;; -;; Author: `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")` From 56e9d273e1d798df90257aa00f4e1a7b83f4c173 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 28 Jan 2021 18:36:15 -0500 Subject: [PATCH 156/183] Simplify doom/window-enlargen & doom/window-maximize-buffer + No longer toggle window conf on consecutive presses. It's redundant with winner-undo and only adds a degree of uncertainty to the command. + `doom/window-maximize-buffer` now works with popup windows (before it'd spout an unhelp error about running +popup/raise). --- core/autoload/ui.el | 73 +++++++++++++-------------------------------- 1 file changed, 20 insertions(+), 53 deletions(-) diff --git a/core/autoload/ui.el b/core/autoload/ui.el index 1f993d929..a133354c6 100644 --- a/core/autoload/ui.el +++ b/core/autoload/ui.el @@ -127,65 +127,32 @@ Activate again to undo this. If prefix ARG is non-nil, don't restore the last window configuration and re-maximize the current window. Alternatively, use `doom/window-enlargen'." (interactive "P") - (let ((param 'doom--maximize-last-wconf)) - (cl-destructuring-bind (window . wconf) - (or (frame-parameter nil param) - (cons nil nil)) - (set-frame-parameter - nil param - (if (and (equal window (selected-window)) - (not arg) - (null (cdr (cl-remove-if #'window-dedicated-p (window-list)))) - wconf) - (ignore - (let ((source-window (selected-window))) - (set-window-configuration wconf) - (when (window-live-p source-window) - (select-window source-window)))) - (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 (cons (selected-window) (or wconf (current-window-configuration))) - (delete-other-windows) - (add-hook 'doom-switch-window-hook #'doom--enlargened-forget-last-wconf-h))))))) + (when (and (bound-and-true-p +popup-mode) + (+popup-window-p)) + (+popup/raise (selected-window))) + (delete-other-windows)) ;;;###autoload (defun doom/window-enlargen (&optional arg) "Enlargen the current window to focus on this one. Does not close other windows (unlike `doom/window-maximize-buffer'). Activate again to undo." (interactive "P") - (let ((param 'doom--enlargen-last-wconf)) - (cl-destructuring-bind (window . wconf) - (or (frame-parameter nil param) - (cons nil nil)) - (set-frame-parameter - nil param - (if (and (equal window (selected-window)) - (not arg) - wconf) - (ignore - (let ((source-window (selected-window))) - (set-window-configuration wconf) - (when (window-live-p source-window) - (select-window source-window)))) - (prog1 (cons (selected-window) (or wconf (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) - (window-resize-pixelwise nil) - (frame-resize-pixelwise nil)) - (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)) - (add-hook 'doom-switch-window-hook #'doom--enlargened-forget-last-wconf-h))))))))) + (let* ((window (selected-window)) + (dedicated-p (window-dedicated-p window)) + (preserved-p (window-parameter window 'window-preserved-size)) + (ignore-window-parameters t) + (window-resize-pixelwise nil) + (frame-resize-pixelwise nil)) + (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 faefc9991c4861cb175a59ce7c496893e0a2ca07 Mon Sep 17 00:00:00 2001 From: Janfel <33464477+Janfel@users.noreply.github.com> Date: Fri, 29 Jan 2021 23:07:03 +0100 Subject: [PATCH 157/183] Fix :unless in (doom!) --- 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 bee9f3b65..8e7e7cc2e 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -279,8 +279,8 @@ those directories. The first returned path is always `doom-private-dir'." (:if (if (eval (cadr m) t) (push (caddr m) mplist) (prependq! mplist (cdddr m)))) - (test (if (or (eval (cadr m) t) - (eq test :unless)) + (test (if (xor (eval (cadr m) t) + (eq test :unless)) (prependq! mplist (cddr m)))))) ((catch 'doom-modules (let* ((module (if (listp m) (car m) m)) From b3ba98cfd6505bdc9cd3b0c0db8b44ac12b65cc1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 29 Jan 2021 00:10:49 -0500 Subject: [PATCH 158/183] Auto-lock closed issues after 180d of inactivity --- .github/workflows/lock.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/lock.yml diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml new file mode 100644 index 000000000..56f83340a --- /dev/null +++ b/.github/workflows/lock.yml @@ -0,0 +1,14 @@ +name: 'Lock Threads' + +on: + schedule: + - cron: '0 0 * * *' + +jobs: + lock: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v2 + with: + github-token: ${{ github.token }} + issue-lock-inactive-days: '180' From 1ed6f8c1f5f1a6fd8007c1432856e66d4bf9f3d5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 29 Jan 2021 18:46:14 -0500 Subject: [PATCH 159/183] Disable CI tests Until they are fixed. --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9567b875b..222b276ca 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,20 +3,20 @@ name: CI on: push: branches: - - master - develop pull_request: branches: - - master - develop jobs: build: + if: false runs-on: ubuntu-latest strategy: matrix: emacs_version: - 26.3 + - 27.1 include: - emacs_version: 26.3 lint_ignore: 1 From 20c6246313726089e0864f65dbb540564fcd4ad9 Mon Sep 17 00:00:00 2001 From: datool <32123754+datool@users.noreply.github.com> Date: Sun, 31 Jan 2021 06:24:25 +0700 Subject: [PATCH 160/183] Remap `describe-symbol` to `counsel-describe-symbol` . (#4593) * Remap `describe-symbol` to `counsel-describe-symbol` . "SPC h o" now uses `counsel-describe-symbol` instead of plain `helpful-symbol` (maybe with completion) to get input. * Remove counsel-describe-symbol-function change Co-authored-by: Henrik Lissner --- 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 5fc261de7..6877ed766 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -184,6 +184,7 @@ results buffer.") [remap describe-face] #'counsel-faces [remap describe-function] #'counsel-describe-function [remap describe-variable] #'counsel-describe-variable + [remap describe-symbol] #'counsel-describe-symbol [remap evil-ex-registers] #'counsel-evil-registers [remap evil-show-marks] #'counsel-mark-ring [remap execute-extended-command] #'counsel-M-x From 8566cfac7b6fce13daedf63ac609a01999783267 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 30 Jan 2021 17:57:45 -0500 Subject: [PATCH 161/183] Bump evil-collection, vterm emacs-evil/evil-collection@ffbf149 -> emacs-evil/evil-collection@e6824e2 akermu/emacs-libvterm@101ff86 -> akermu/emacs-libvterm@fb12d7f Closes #4591 Co-authored-by: Michael Lingelbach --- modules/editor/evil/packages.el | 2 +- modules/term/vterm/autoload.el | 15 --------------- modules/term/vterm/config.el | 9 +-------- modules/term/vterm/packages.el | 2 +- 4 files changed, 3 insertions(+), 25 deletions(-) diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index c3176bd60..3e1f17374 100644 --- a/modules/editor/evil/packages.el +++ b/modules/editor/evil/packages.el @@ -33,4 +33,4 @@ (package! neotree) (autoload 'neotree-make-executor "neotree" nil nil 'macro)) - (package! evil-collection :pin "ffbf149f0e09d8c2068f9f5098255555d7983696")) + (package! evil-collection :pin "e6824e2ad2f2ee7ddccf6f54db655a4cd37a13dc")) diff --git a/modules/term/vterm/autoload.el b/modules/term/vterm/autoload.el index 8932b8c68..0ffcbe675 100644 --- a/modules/term/vterm/autoload.el +++ b/modules/term/vterm/autoload.el @@ -75,18 +75,3 @@ method to prepare vterm at the corresponding remote directory." (vterm-send-string (concat "cd " path-localname)) (vterm-send-return))))) - - -(defvar +vterm--insert-point nil) - -;;;###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 9f29dc5bb..d82706cc1 100644 --- a/modules/term/vterm/config.el +++ b/modules/term/vterm/config.el @@ -19,11 +19,4 @@ ;; Don't prompt about dying processes when killing vterm confirm-kill-processes nil ;; Prevent premature horizontal scrolling - hscroll-margin 0) - - ;; Restore the point's location when leaving and re-entering insert mode. - (when (featurep! :editor evil) - (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))))) + hscroll-margin 0)) diff --git a/modules/term/vterm/packages.el b/modules/term/vterm/packages.el index b674ee25d..5cd91f5f8 100644 --- a/modules/term/vterm/packages.el +++ b/modules/term/vterm/packages.el @@ -3,4 +3,4 @@ (package! vterm :built-in 'prefer - :pin "101ff86d4d1c7ff8ca954ba59f666fd36f789aae") + :pin "fb12d7f49e2da121d9b17ed583d269166e0da087") From 75549f5743f310f4407edea6b6c6e670f7d1bc32 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 31 Jan 2021 00:23:36 -0500 Subject: [PATCH 162/183] Fix doom build skipping some packages --- core/cli/packages.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index a872a4916..4c3f617e1 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -301,7 +301,9 @@ declaration) or dependency thereof that hasn't already been." ;; Ensure packages with outdated files/bytecode are rebuilt (let* ((build-dir (straight--build-dir package)) (repo-dir (straight--repos-dir local-repo)) - (build (plist-get recipe :build)) + (build (if (plist-member recipe :build) + (plist-get recipe :build) + straight--build-default-steps)) (want-byte-compile (or (eq build t) (memq 'compile build))) From 1650e25794c8b7a6f1c66e64bf83987f5a950829 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 31 Jan 2021 01:03:01 -0500 Subject: [PATCH 163/183] doom doctor: warn about insertOf rules in gitconfig Closes #2679 --- core/cli/doctor.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/cli/doctor.el b/core/cli/doctor.el index ae121a175..61fa44a86 100644 --- a/core/cli/doctor.el +++ b/core/cli/doctor.el @@ -92,6 +92,19 @@ in." (print! (start "Checking for stale elc files...")) (elc-check-dir user-emacs-directory) + (print! (start "Checking for problematic git global settings...")) + (if (executable-find "git") + (unless (zerop (car (doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.https://github.com"))) + (warn! "Detected insteadOf rules in your global gitconfig.") + (explain! "Doom's package manager heavily relies on git. In particular, many of its packages " + "are hosted on github. Rewrite rules like these will break it:\n\n" + " [url \"git://github.com\"]\n" + " insteadOf = https://github.com\n\n" + "Please remove them from your gitconfig or use a conditional includeIf rule to " + "only apply your rewrites to specific repositories. See " + "'https://git-scm.com/docs/git-config#_includes' for more information.")) + (error! "Couldn't find the `git' binary; this a hard dependecy for Doom!")) + (print! (start "Checking Doom Emacs...")) (condition-case-unless-debug ex (print-group! From 49150c40456492b3dc0b9b03ad36da5409115895 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 31 Jan 2021 02:42:43 -0500 Subject: [PATCH 164/183] Autolock threads more frequently It's rate limited to 50 threads a day. It'll take a long time to go through all our issues. --- .github/workflows/lock.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 56f83340a..d3c7fdc44 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -2,7 +2,7 @@ name: 'Lock Threads' on: schedule: - - cron: '0 0 * * *' + - cron: '0 * * * *' jobs: lock: From b91f1607d8940d67d70e4ec7b7c27aba9128f89a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 31 Jan 2021 03:44:56 -0500 Subject: [PATCH 165/183] Fix #4532: wrong-number-of-args errors on emacs HEAD This is a temporary fix. These should be removed once packages have updated to accommodate the changes to the define-obsolete-{variable,function,face}-alias macros. --- core/core-lib.el | 108 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 1 deletion(-) diff --git a/core/core-lib.el b/core/core-lib.el index ab9dfc34f..581a7d93e 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -671,7 +671,7 @@ REMOTE is non-nil, search on the remote host indicated by (file-name-quote default-directory)))) (locate-file command exec-path exec-suffixes 1))))) -(unless (fboundp 'exec-path) +(eval-when! (not (fboundp 'exec-path)) ;; DEPRECATED Backported from Emacs 27.1 (defun exec-path () "Return list of directories to search programs to run in remote subprocesses. @@ -684,5 +684,111 @@ the value of the variable `exec-path'." (funcall handler 'exec-path) exec-path)))) +(eval-when! EMACS28+ + (defmacro define-obsolete-variable-alias (obsolete-name current-name &optional when docstring) + "Make OBSOLETE-NAME a variable alias for CURRENT-NAME and mark it obsolete. + +WHEN should be a string indicating when the variable was first +made obsolete, for example a date or a release number. + +This macro evaluates all its parameters, and both OBSOLETE-NAME +and CURRENT-NAME should be symbols, so a typical usage would look like: + + (define-obsolete-variable-alias 'foo-thing 'bar-thing \"27.1\") + +This macro uses `defvaralias' and `make-obsolete-variable' (which see). +See the Info node `(elisp)Variable Aliases' for more details. + +If CURRENT-NAME is a defcustom or a defvar (more generally, any variable +where OBSOLETE-NAME may be set, e.g. in an init file, before the +alias is defined), then the define-obsolete-variable-alias +statement should be evaluated before the defcustom, if user +customizations are to be respected. The simplest way to achieve +this is to place the alias statement before the defcustom (this +is not necessary for aliases that are autoloaded, or in files +dumped with Emacs). This is so that any user customizations are +applied before the defcustom tries to initialize the +variable (this is due to the way `defvaralias' works). + +For the benefit of Customize, if OBSOLETE-NAME has +any of the following properties, they are copied to +CURRENT-NAME, if it does not already have them: +`saved-value', `saved-variable-comment'." + (declare (doc-string 4) + (advertised-calling-convention + (obsolete-name current-name when &optional docstring) "23.1")) + `(progn + (defvaralias ,obsolete-name ,current-name ,docstring) + (dolist (prop '(saved-value saved-variable-comment)) + (and (get ,obsolete-name prop) + (null (get ,current-name prop)) + (put ,current-name prop (get ,obsolete-name prop)))) + (make-obsolete-variable ,obsolete-name ,current-name ,when))) + + (defmacro define-obsolete-face-alias (obsolete-face current-face &optional when) + "Make OBSOLETE-FACE a face alias for CURRENT-FACE and mark it obsolete. +WHEN should be a string indicating when the face was first made +obsolete, for example a date or a release number." + `(progn (put ,obsolete-face 'face-alias ,current-face) + (put ,obsolete-face 'obsolete-face (or (purecopy ,when) t)))) + + (defmacro define-obsolete-function-alias (obsolete-name current-name &optional when docstring) + "Set OBSOLETE-NAME's function definition to CURRENT-NAME and mark it obsolete. + +\(define-obsolete-function-alias \\='old-fun \\='new-fun \"22.1\" \"old-fun's doc.\") + +is equivalent to the following two lines of code: + +\(defalias \\='old-fun \\='new-fun \"old-fun's doc.\") +\(make-obsolete \\='old-fun \\='new-fun \"22.1\") + +WHEN should be a string indicating when the function was first +made obsolete, for example a date or a release number. + +See the docstrings of `defalias' and `make-obsolete' for more details." + (declare (doc-string 4)) + `(progn (defalias ,obsolete-name ,current-name ,docstring) + (make-obsolete ,obsolete-name ,current-name ,when))) + + (defadvice! doom--fix-wrong-number-of-args-during-byte-compile (recipe) + :override #'straight--build-compile + (let* ((package (plist-get recipe :package)) + (dir (straight--build-dir package)) + (program (concat invocation-directory invocation-name)) + (args + `("-Q" "-L" ,dir + ,@(apply #'append + (mapcar (lambda (d) + (let ((d (straight--build-dir d))) + (when (file-exists-p d) (list "-L" d)))) + (straight--get-dependencies package))) + "--batch" + "--eval" + ,(prin1-to-string + '(progn + (defmacro define-obsolete-face-alias (obsolete-face current-face &optional when) + `(progn (put ,obsolete-face 'face-alias ,current-face) + (put ,obsolete-face 'obsolete-face (or (purecopy ,when) t)))) + (defmacro define-obsolete-function-alias (obsolete-name current-name &optional when docstring) + `(progn (defalias ,obsolete-name ,current-name ,docstring) + (make-obsolete ,obsolete-name ,current-name ,when))) + (defmacro define-obsolete-variable-alias (obsolete-name current-name &optional when docstring) + `(progn (defvaralias ,obsolete-name ,current-name ,docstring) + (dolist (prop '(saved-value saved-variable-comment)) + (and (get ,obsolete-name prop) + (null (get ,current-name prop)) + (put ,current-name prop (get ,obsolete-name prop)))) + (make-obsolete-variable ,obsolete-name ,current-name ,when))))) + "--eval" + ,(format "(byte-recompile-directory %S 0 'force)" dir)))) + (when straight-byte-compilation-buffer + (with-current-buffer (get-buffer-create straight-byte-compilation-buffer) + (insert "\n$ " (replace-regexp-in-string + "\\(-L [^z-a]*? \\)" + "\\1\\\\ \n " + (string-join `(,program ,@args) " ")) + "\n"))) + (apply #'call-process program nil straight-byte-compilation-buffer nil args)))) + (provide 'core-lib) ;;; core-lib.el ends here From f5a9dc11ee17906df745dceae02d69f5995f561b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 31 Jan 2021 03:47:16 -0500 Subject: [PATCH 166/183] Update deprecated notices on back (+forward) ports --- core/core-lib.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index 581a7d93e..35651ec6a 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -650,7 +650,7 @@ set earlier in the ‘setq-local’. The return value of the (macroexp-progn (nreverse expr))))) (eval-when! (version< emacs-version "27.1") - ;; DEPRECATED Backported from Emacs 27; earlier versions don't have REMOTE arg + ;; DEPRECATED Backported from Emacs 27. Remove when 26.x support is dropped. (defun executable-find (command &optional remote) "Search for COMMAND in `exec-path' and return the absolute file name. Return nil if COMMAND is not found anywhere in `exec-path'. If @@ -672,7 +672,7 @@ REMOTE is non-nil, search on the remote host indicated by (locate-file command exec-path exec-suffixes 1))))) (eval-when! (not (fboundp 'exec-path)) - ;; DEPRECATED Backported from Emacs 27.1 + ;; DEPRECATED Backported from Emacs 27.1. Remove when 26.x support is dropped. (defun exec-path () "Return list of directories to search programs to run in remote subprocesses. The remote host is identified by `default-directory'. For remote @@ -684,6 +684,7 @@ the value of the variable `exec-path'." (funcall handler 'exec-path) exec-path)))) +;; DEPRECATED Remove once enough packages have adapted to these breaking changes. (eval-when! EMACS28+ (defmacro define-obsolete-variable-alias (obsolete-name current-name &optional when docstring) "Make OBSOLETE-NAME a variable alias for CURRENT-NAME and mark it obsolete. From 07f134b10ecc374b58ead2afbf702a2a8b2ceeb8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 31 Jan 2021 04:27:41 -0500 Subject: [PATCH 167/183] doom purge: delete old ELN directories --- core/cli/packages.el | 29 ++++++++++++++++++++++++++--- core/cli/sync.el | 2 +- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 4c3f617e1..53258ed06 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -24,6 +24,7 @@ Emacs (as byte-code is generally not forward-compatible)." ((nobuilds-p ["-b" "--no-builds"] "Don't purge unneeded (built) packages") (noelpa-p ["-p" "--no-elpa"] "Don't purge ELPA packages") (norepos-p ["-r" "--no-repos"] "Don't purge unused straight repos") + (noeln-p ["-e" "--no-eln"] "Don't purge old ELN bytecode") (regraft-p ["-g" "--regraft"] "Regraft git repos (ie. compact them)")) "Deletes orphaned packages & repos, and compacts them. @@ -39,7 +40,8 @@ list remains lean." (not noelpa-p) (not norepos-p) (not nobuilds-p) - regraft-p) + regraft-p + (not noeln-p)) (doom-autoloads-reload)) t) @@ -532,7 +534,23 @@ declaration) or dependency thereof that hasn't already been." (filename path) e))))))) -(defun doom-cli-packages-purge (&optional elpa-p builds-p repos-p regraft-repos-p) +(defun doom--cli-packages-purge-eln () + (if-let (dirs + (cl-delete (expand-file-name comp-native-version-dir doom--eln-output-path) + (directory-files doom--eln-output-path t "^[^.]" t) + :test #'file-equal-p)) + (progn + (print! (start "Purging old native bytecode...")) + (print-group! + (dolist (dir dirs) + (print! (info "Deleting %S") (relpath dir doom--eln-output-path)) + (delete-directory dir 'recursive)) + (print! (success "Purged %d directory(ies)" (length dirs)))) + (length dirs)) + (print! (info "No ELN directories to purge")) + 0)) + +(defun doom-cli-packages-purge (&optional elpa-p builds-p repos-p regraft-repos-p eln-p) "Auto-removes orphaned packages and repos. An orphaned package is a package that isn't a primary package (i.e. doesn't have @@ -574,4 +592,9 @@ If ELPA-P, include packages installed with package.el (M-x package-install)." (/= 0 (doom--cli-packages-purge-repos repos-to-purge))) (if (not regraft-repos-p) (ignore (print! (info "Skipping regrafting"))) - (doom--cli-packages-regraft-repos repos-to-regraft))))))) + (doom--cli-packages-regraft-repos repos-to-regraft)) + (when (require 'comp nil t) + (if (not eln-p) + (ignore (print! (info "Skipping native bytecode"))) + (doom--cli-packages-purge-eln))))) + (print! (success "Finished purging"))))) diff --git a/core/cli/sync.el b/core/cli/sync.el index efc6055c2..8af3ca4c2 100644 --- a/core/cli/sync.el +++ b/core/cli/sync.el @@ -31,7 +31,7 @@ stale." (doom-cli-packages-build) (when update-p (doom-cli-packages-update)) - (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p) + (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p purge-p) (run-hooks 'doom-sync-post-hook) (when (doom-autoloads-reload) (print! (info "Restart Emacs or use 'M-x doom/reload' for changes to take effect"))) From 05aa13ea19c810e9a17514b8c15ef5f784f12cc6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 31 Jan 2021 04:29:54 -0500 Subject: [PATCH 168/183] doom purge: make repo regrafting opt-out Was originally opt-in. --- core/cli/packages.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 53258ed06..7ff377126 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -21,11 +21,11 @@ Emacs (as byte-code is generally not forward-compatible)." t) (defcli! (purge p) - ((nobuilds-p ["-b" "--no-builds"] "Don't purge unneeded (built) packages") - (noelpa-p ["-p" "--no-elpa"] "Don't purge ELPA packages") - (norepos-p ["-r" "--no-repos"] "Don't purge unused straight repos") - (noeln-p ["-e" "--no-eln"] "Don't purge old ELN bytecode") - (regraft-p ["-g" "--regraft"] "Regraft git repos (ie. compact them)")) + ((nobuilds-p ["-b" "--no-builds"] "Don't purge unneeded (built) packages") + (noelpa-p ["-p" "--no-elpa"] "Don't purge ELPA packages") + (norepos-p ["-r" "--no-repos"] "Don't purge unused straight repos") + (noeln-p ["-e" "--no-eln"] "Don't purge old ELN bytecode") + (noregraft-p ["-g" "--no-regraft"] "Regraft git repos (ie. compact them)")) "Deletes orphaned packages & repos, and compacts them. Purges all installed ELPA packages (as they are considered temporary). Purges @@ -40,7 +40,7 @@ list remains lean." (not noelpa-p) (not norepos-p) (not nobuilds-p) - regraft-p + (not noregraft-p) (not noeln-p)) (doom-autoloads-reload)) t) From 026d96198569974f4432a6b3afed91e17507b64a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 31 Jan 2021 04:34:46 -0500 Subject: [PATCH 169/183] doom doctor: fix insteadOf check #2679 I got the source and destination urls mixed up. --- 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 61fa44a86..312179499 100644 --- a/core/cli/doctor.el +++ b/core/cli/doctor.el @@ -94,7 +94,7 @@ in." (print! (start "Checking for problematic git global settings...")) (if (executable-find "git") - (unless (zerop (car (doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.https://github.com"))) + (unless (zerop (car (doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.git://github\\.com"))) (warn! "Detected insteadOf rules in your global gitconfig.") (explain! "Doom's package manager heavily relies on git. In particular, many of its packages " "are hosted on github. Rewrite rules like these will break it:\n\n" From d3112b5dfc88ea6d2af5c865c1b68a758a7c271a Mon Sep 17 00:00:00 2001 From: MithicSpirit Date: Sun, 31 Jan 2021 13:14:19 -0500 Subject: [PATCH 170/183] Doom Doctor: Fix insteadOf check Always triggers when it's correct and never triggers when it's incorrect. --- 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 312179499..c8fc1d996 100644 --- a/core/cli/doctor.el +++ b/core/cli/doctor.el @@ -94,7 +94,7 @@ in." (print! (start "Checking for problematic git global settings...")) (if (executable-find "git") - (unless (zerop (car (doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.git://github\\.com"))) + (when (zerop (car (doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.git://github\\.com"))) (warn! "Detected insteadOf rules in your global gitconfig.") (explain! "Doom's package manager heavily relies on git. In particular, many of its packages " "are hosted on github. Rewrite rules like these will break it:\n\n" From 7fcf2c20254c5fa64908c6bd279ee442ad0fccbc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 31 Jan 2021 05:14:45 -0500 Subject: [PATCH 171/183] doom {build,purge}: reduce unnecessarily loud output These lines don't add anything, and shouldn't be highlighted as "success" messages. --- core/cli/packages.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 7ff377126..bf580381a 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -335,7 +335,7 @@ declaration) or dependency thereof that hasn't already been." (doom--wait-for-compile-jobs) (doom--write-missing-eln-errors) (print! (success "\033[KRebuilt %d package(s)") (length built))) - (print! (success "No packages need rebuilding")) + (print! (info "No packages need rebuilding")) nil)))) @@ -596,5 +596,4 @@ If ELPA-P, include packages installed with package.el (M-x package-install)." (when (require 'comp nil t) (if (not eln-p) (ignore (print! (info "Skipping native bytecode"))) - (doom--cli-packages-purge-eln))))) - (print! (success "Finished purging"))))) + (doom--cli-packages-purge-eln)))))))) From 48273faa82cc5057125c9f8e5bd23a5633722a50 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 31 Jan 2021 05:42:13 -0500 Subject: [PATCH 172/183] lang/php: expand on dependencies in README And mention @prettier/plugin-php, as a dependency of php-cs-fixer. Fixes #3081 --- modules/lang/php/README.org | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/modules/lang/php/README.org b/modules/lang/php/README.org index e4a183229..e945cacaf 100644 --- a/modules/lang/php/README.org +++ b/modules/lang/php/README.org @@ -100,29 +100,41 @@ sudo zypper install nodejs npm #+END_SRC ** Dependencies -The features in this module optionally depend on the following php packages: +This module has no required dependencies, but it has a couple optional ones. + ~boris~ (REPL) + ~phpctags~ (better code completion) + ~phpunit~ (unit test commands) -+ ~php-cs-fixer~ (for code formatting) ++ ~php-cs-fixer~ and ~@prettier/plugin-php~ (for code formatting) #+BEGIN_SRC sh composer global require \ d11wtq/boris \ phpunit/phpunit \ - techlivezheng/phpctags + techlivezheng/phpctags \ + friendsofphp/php-cs-fixer + +# Needed by php-cs-fixer, otherwise you'll get "Couldn't resolve parser +# 'php'" errors +npm install -g @prettier/plugin-php #+END_SRC -Ensure that ~\~/.composer/vendor/bin~ is in ~PATH~: +You must ensure that ~\~/.composer/vendor/bin~ is in ~PATH~, so these +executables are visible to Emacs: #+BEGIN_SRC sh # place this in your profile file, like ~/.bash_profile or ~/.zshenv export PATH="~/.composer/vendor/bin:$PATH" #+END_SRC -By the way, if you use intelephense, running =M-x lsp-install-server= and -choose ~iph~ to install lsp-intelephense. +You may also need to regenerate your envvar file by running ~doom env~ on the +command line. + +#+begin_quote +To use intelephense instead of , run =M-x lsp-install-server= and choose ~iph~ to +install lsp-intelephense. +#+end_quote + * TODO Features # An in-depth list of features, how to use them, and their dependencies. From b78206d0028108ca97aedbc812ed1ad9b5854b36 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 31 Jan 2021 18:58:13 -0500 Subject: [PATCH 173/183] Bump :core raxod502/straight.el@47dd03d -> raxod502/straight.el@ac4df5c domtronn/all-the-icons.el@050d4c5 -> domtronn/all-the-icons.el@c795d0f bbatsov/projectile@0e2620a -> bbatsov/projectile@793abfe justbur/emacs-which-key@428aedf -> justbur/emacs-which-key@c0608e8 Fixes regression caused by 75549f5743 --- core/packages.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/packages.el b/core/packages.el index 35280980c..26e9fe30e 100644 --- a/core/packages.el +++ b/core/packages.el @@ -17,7 +17,7 @@ :branch ,straight-repository-branch :local-repo "straight.el" :files ("straight*.el")) - :pin "47dd03dc81207da598f007e0218e12a7cede0007") + :pin "ac4df5c689557f5434d6fc9f713e907e7b37a6bd") ;; core-modules.el (package! use-package @@ -25,7 +25,7 @@ :pin "365c73d2618dd0040a32c2601c5456ab5495b812") ;; core-ui.el -(package! all-the-icons :pin "050d4c5a20f686c67ec1fc5eda30481d5a23383e") +(package! all-the-icons :pin "c795d0f0a49b1823d167a252319ac32c59152d72") (package! hide-mode-line :pin "88888825b5b27b300683e662fa3be88d954b1cea") (package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307") (package! rainbow-delimiters :pin "f43d48a24602be3ec899345a3326ed0247b960c6") @@ -51,8 +51,8 @@ :pin "2bb49d3ee7d2cba133bc7e9cdac416cd1c5e4fe0") ;; core-projects.el -(package! projectile :pin "0e2620ad5cb236a64a2b4faa4c44a76a08a1cf08") +(package! projectile :pin "793abfead25a7ef92ad3a443ad3067a82f4a2fb9") ;; core-keybinds.el (package! general :pin "a0b17d207badf462311b2eef7c065b884462cb7c") -(package! which-key :pin "428aedfce0157920814fbb2ae5d00b4aea89df88") +(package! which-key :pin "c0608e812a8d1bc7aefeacdfaeb56a7272eabf44") From a61758523df148761241c3260f287ed95cce9b57 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 1 Feb 2021 02:31:22 -0500 Subject: [PATCH 174/183] Fix #4602: void-variable straight--build-default-steps --- 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 bf580381a..7fb74d35f 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -305,7 +305,7 @@ declaration) or dependency thereof that hasn't already been." (repo-dir (straight--repos-dir local-repo)) (build (if (plist-member recipe :build) (plist-get recipe :build) - straight--build-default-steps)) + t)) (want-byte-compile (or (eq build t) (memq 'compile build))) From 3a7be7bb4f0d8dc162597f0bbfa377a9d5f3f967 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 1 Feb 2021 02:45:45 -0500 Subject: [PATCH 175/183] Fix #4602, part 2! --- 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 7fb74d35f..a2a1fb850 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -312,7 +312,7 @@ declaration) or dependency thereof that hasn't already been." (want-native-compile (or (eq build t) (memq 'native-compile build)))) - (when (eq (car build) :not) + (when (eq (car-safe build) :not) (setq want-byte-compile (not want-byte-compile) want-native-compile (not want-native-compile))) (unless (require 'comp nil t) From 6c163d77d9721c44b5577aae2bba8af2a24e6798 Mon Sep 17 00:00:00 2001 From: Janfel <33464477+Janfel@users.noreply.github.com> Date: Tue, 2 Feb 2021 02:38:12 +0100 Subject: [PATCH 176/183] Fix +evil:retab --- modules/editor/evil/autoload/evil.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/autoload/evil.el b/modules/editor/evil/autoload/evil.el index c8c0223c3..b923ad1b2 100644 --- a/modules/editor/evil/autoload/evil.el +++ b/modules/editor/evil/autoload/evil.el @@ -123,7 +123,7 @@ the only window, use evil-window-move-* (e.g. `evil-window-move-far-left')." "Wrapper around `doom/retab'." :motion nil :move-point nil :type line (interactive "") - (doom/retab beg end)) + (doom/retab nil beg end)) ;;;###autoload (autoload '+evil:narrow-buffer "editor/evil/autoload/evil" nil t) (evil-define-operator +evil:narrow-buffer (beg end &optional bang) From 8331f4f896fb5c5697429d9c06699926898fff58 Mon Sep 17 00:00:00 2001 From: Janfel <33464477+Janfel@users.noreply.github.com> Date: Tue, 2 Feb 2021 02:41:45 +0100 Subject: [PATCH 177/183] Fix interactive spec of doom/retab --- core/autoload/text.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/autoload/text.el b/core/autoload/text.el index f3f7f6ad0..73f56d40a 100644 --- a/core/autoload/text.el +++ b/core/autoload/text.el @@ -251,7 +251,7 @@ the value of `indent-tab-mode'. If ARG (universal argument) is non-nil, retab the current buffer using the opposite indentation style." - (interactive "Pr") + (interactive "P\nr") (unless (and beg end) (setq beg (point-min) end (point-max))) From f978913e4069270e7a13c74aa9ed381d26733b58 Mon Sep 17 00:00:00 2001 From: Markus Klink Date: Tue, 2 Feb 2021 15:03:54 +0100 Subject: [PATCH 178/183] Extract program name from inferior-lisp-program Many users of sly also use roswell and set the inferior-lisp-program to values like "ros run" or "ros -Q run". This is not detected correctly by executable-find. Hence we try to extract the first part of the program name. --- modules/lang/common-lisp/doctor.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/lang/common-lisp/doctor.el b/modules/lang/common-lisp/doctor.el index 891f5ae8e..3c1842726 100644 --- a/modules/lang/common-lisp/doctor.el +++ b/modules/lang/common-lisp/doctor.el @@ -1,6 +1,7 @@ ;;; lang/common-lisp/doctor.el -*- lexical-binding: t; -*- (when (require 'sly nil t) - (unless (executable-find inferior-lisp-program) - (warn! "Couldn't find your `inferior-lisp-program' (%s). Is it installed?" - inferior-lisp-program))) + (let ((prog-name (car (split-string inferior-lisp-program)))) + (unless (executable-find prog-name) + (warn! "Couldn't find your `inferior-lisp-program' (%s). Is it installed?" + inferior-lisp-program)))) From 5a98fa27481c3508365ebdc4634f5aab5d949d37 Mon Sep 17 00:00:00 2001 From: Bror Winther Date: Thu, 4 Feb 2021 05:02:55 +0100 Subject: [PATCH 179/183] Fixes typo in modules/lang/rust/README.org --- modules/lang/rust/README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/rust/README.org b/modules/lang/rust/README.org index fa5a5ed47..63a0bec2c 100644 --- a/modules/lang/rust/README.org +++ b/modules/lang/rust/README.org @@ -97,7 +97,7 @@ selected by default. Modify ~rustic-lsp-server~ to change the default: (setq rustic-lsp-server 'rls)) #+END_SRC -** Enabling elgot support for Rust +** Enabling eglot support for Rust Doom's =:tools lsp= module has an =+eglot= flag. Enable it and this module will use eglot instead. From 5dedf008118933573822b823e26a8375ec17a1db Mon Sep 17 00:00:00 2001 From: Misaka Date: Thu, 4 Feb 2021 15:55:58 +0800 Subject: [PATCH 180/183] Fix find file in private config for emacs bindings --- 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 e1a864449..7e59de95f 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -72,7 +72,7 @@ :desc "Find file from here" "F" #'+default/find-file-under-here :desc "Locate file" "l" #'locate :desc "Rename/move this file" "m" #'doom/move-this-file - :desc "Find file in private config" "p" #'doom/open-private-config + :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 From 15d85a5c74d1261dba1148a9483d313de0d2f35b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 2 Feb 2021 04:48:03 -0500 Subject: [PATCH 181/183] Fix nix-mode for nix-shell shell scripts Wasn't correctly detecting the interpreter argument for nix-shell shebangs. It must be done in two parts in case cached-nix-shell is used (which means the shebang will span 2+ lines). --- modules/lang/nix/autoload.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/lang/nix/autoload.el b/modules/lang/nix/autoload.el index cf345407e..d28319f12 100644 --- a/modules/lang/nix/autoload.el +++ b/modules/lang/nix/autoload.el @@ -53,7 +53,8 @@ (save-excursion (goto-char (point-min)) (save-match-data - (if (not (re-search-forward "#! *\\(?:cached-\\)?nix-shell +-i +\\([^ \n]+\\)" 256 t)) + (if (not (and (re-search-forward "\\_ Date: Tue, 2 Feb 2021 18:48:04 -0500 Subject: [PATCH 182/183] Fix eval commands in nix-shell files --- modules/lang/nix/autoload.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/lang/nix/autoload.el b/modules/lang/nix/autoload.el index d28319f12..08c858a0e 100644 --- a/modules/lang/nix/autoload.el +++ b/modules/lang/nix/autoload.el @@ -68,4 +68,8 @@ (when mode (prog1 (set-auto-mode-0 mode) (when (eq major-mode 'sh-mode) - (sh-set-shell interp))))))))) + (sh-set-shell interp)) + ;; HACK Without this, quickrun tries to evaluate code directly + ;; with (cached)?nix-shell. + ;; TODO Use the nix-shell/cached-nix-shell-given interpreter + (setq-local quickrun-option-shebang nil)))))))) From c3c001ad7ded36216682c8cd6ece90734e89f8a0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 4 Feb 2021 05:47:52 -0500 Subject: [PATCH 183/183] Bump core domtronn/all-the-icons.el@c795d0f -> domtronn/all-the-icons.el@5fa7283 hlissner/emacs-so-long@ed666b0 -> emacs-straight/so-long@a5d445d jwiegley/use-package@365c73d -> jwiegley/use-package@317137b raxod502/straight.el@ac4df5c -> raxod502/straight.el@f2cb888 + Complain if :no-byte-compile, :no-native-compile, or :no-build are used in package!. Straight replaced them with :build (and the old :build was renamed to :pre-build). See raxod502/straight.el@6a273d1 + Update getting_started.org to mention :build + Switch to emacs-straight/so-long so I don't have to maintain my mirror anymore. --- core/core-packages.el | 4 ++-- core/core-ui.el | 4 ++-- core/packages.el | 17 ++++++----------- docs/getting_started.org | 6 +++--- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index 8e8020271..856f269a5 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -496,8 +496,8 @@ elsewhere." (when-let (recipe (plist-get plist :recipe)) (cl-destructuring-bind (&key local-repo _files _flavor - _build _pre-build _post-build _no-byte-compile _includes - _no-native-compile _no-autoloads _type _repo _host _branch + _build _pre-build _post-build _includes + _type _repo _host _branch _remote _nonrecursive _fork _depth) recipe ;; Expand :local-repo from current directory diff --git a/core/core-ui.el b/core/core-ui.el index 417349677..d237942c1 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -637,7 +637,7 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.") ;; `load-theme' doesn't disable previously enabled themes, which seems ;; like what you'd want. You could always use `enable-theme' to activate ;; multiple themes instead. - (mapc #'disable-theme (remq theme (remq 'use-package custom-enabled-themes))) + (mapc #'disable-theme (remq theme custom-enabled-themes)) (run-hooks 'doom-load-theme-hook)) result))) @@ -649,7 +649,7 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.") "Disable other themes when loading a new one." :before #'load-theme (unless no-enable - (mapc #'disable-theme (remq 'use-package custom-enabled-themes)))) + (mapc #'disable-theme custom-enabled-themes))) ;; DEPRECATED Not needed in Emacs 27 (defadvice! doom--prefer-compiled-theme-a (orig-fn &rest args) diff --git a/core/packages.el b/core/packages.el index 26e9fe30e..94be74ba1 100644 --- a/core/packages.el +++ b/core/packages.el @@ -17,15 +17,15 @@ :branch ,straight-repository-branch :local-repo "straight.el" :files ("straight*.el")) - :pin "ac4df5c689557f5434d6fc9f713e907e7b37a6bd") + :pin "f2cb888f088a790bac8731b95eeec3df068cac5f") ;; core-modules.el (package! use-package :type 'core - :pin "365c73d2618dd0040a32c2601c5456ab5495b812") + :pin "317137b07687f16ea97a2493b0a6768c9df381a0") ;; core-ui.el -(package! all-the-icons :pin "c795d0f0a49b1823d167a252319ac32c59152d72") +(package! all-the-icons :pin "5fa728399bd6233a82bbfd4f7cb203a1d7ede708") (package! hide-mode-line :pin "88888825b5b27b300683e662fa3be88d954b1cea") (package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307") (package! rainbow-delimiters :pin "f43d48a24602be3ec899345a3326ed0247b960c6") @@ -37,13 +37,8 @@ (package! helpful :pin "584ecc887bb92133119f93a6716cdf7af0b51dca") (package! pcre2el :pin "0b5b2a2c173aab3fd14aac6cf5e90ad3bf58fa7d") (package! smartparens :pin "63695c64233d215a92bf08e762f643cdb595bdd9") -(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") +;; DEPRECATED Built into Emacs 27+; remove when we drop 26 support +(package! so-long :built-in 'prefer :pin "a5d445de4829b2327bd51dad2fb04291c7a0ec5f") (package! ws-butler ;; Use my fork of ws-butler, which has a few choice improvements and ;; optimizations (the original has been abandoned). @@ -51,7 +46,7 @@ :pin "2bb49d3ee7d2cba133bc7e9cdac416cd1c5e4fe0") ;; core-projects.el -(package! projectile :pin "793abfead25a7ef92ad3a443ad3067a82f4a2fb9") +(package! projectile :pin "fd5994762a90c2311e8aa40c37373f24e1743a55") ;; core-keybinds.el (package! general :pin "a0b17d207badf462311b2eef7c065b884462cb7c") diff --git a/docs/getting_started.org b/docs/getting_started.org index 828ffdb14..61e42b71b 100644 --- a/docs/getting_started.org +++ b/docs/getting_started.org @@ -932,9 +932,9 @@ live testing. To do this specify a ~:local-repo~ in that package's recipe: ;; you want: :files ("*.el" "src/lisp/*.el") - ;; With ':no-byte-compile t' you can avoid having to run 'doom sync' - ;; every time you change the package. - :no-byte-compile t)) + ;; With this you can avoid having to run 'doom sync' every time you + ;; change the package. + :build (:not compile))) #+END_SRC Alternatively, add the package's location to Emacs' ~load-path~. Do this if you