From b835e7b6ec29f06a7dc0b68b4c539eea4c5bcb1f Mon Sep 17 00:00:00 2001 From: Chenty <78651635+Trap101@users.noreply.github.com> Date: Fri, 23 Aug 2024 00:20:17 +0800 Subject: [PATCH 01/25] fix(workspaces): don't overwrite previously workspaces on save Otherwise, each time `+workspace-save` is called, all prior saved workspaces would be deleted from `+workspaces-data-file` before inserting the new one. --- modules/ui/workspaces/autoload/workspaces.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/workspaces/autoload/workspaces.el b/modules/ui/workspaces/autoload/workspaces.el index 39874bafa..46b5c00af 100644 --- a/modules/ui/workspaces/autoload/workspaces.el +++ b/modules/ui/workspaces/autoload/workspaces.el @@ -118,7 +118,7 @@ Returns t on success, nil otherwise." (unless (+workspace-exists-p name) (error "'%s' is an invalid workspace" name)) (let ((fname (expand-file-name +workspaces-data-file persp-save-dir))) - (persp-save-to-file-by-names fname *persp-hash* (list name)) + (persp-save-to-file-by-names fname *persp-hash* (list name) t) (and (member name (persp-list-persp-names-in-file fname)) t))) From c27387ce762aa76c1fc33a747b8b33f913cc9368 Mon Sep 17 00:00:00 2001 From: Vu Quoc Huy <5112602+vqhuy@users.noreply.github.com> Date: Thu, 22 Aug 2024 18:29:15 +0200 Subject: [PATCH 02/25] fix(latex): enable LSP on LaTeX-mode-local-vars-hook too --- modules/lang/latex/config.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/lang/latex/config.el b/modules/lang/latex/config.el index 65a07f42c..fdcfc5e15 100644 --- a/modules/lang/latex/config.el +++ b/modules/lang/latex/config.el @@ -100,7 +100,8 @@ If no viewer is found, `latex-preview-pane-mode' is used.") ;; Hook LSP, if enabled. (when (modulep! +lsp) (add-hook! '(tex-mode-local-vars-hook - latex-mode-local-vars-hook) + latex-mode-local-vars-hook + LaTeX-mode-local-vars-hook) :append #'lsp!)) ;; Define a function to compile the project. (defun +latex/compile () From 879c0b06a4b65058758d84c694ac6f327c5adc4b Mon Sep 17 00:00:00 2001 From: pancho horrillo Date: Wed, 21 Aug 2024 13:58:26 +0200 Subject: [PATCH 03/25] refactor!(go): remove go-guru BREAKING CHANGE: Removes go-guru from the Go module. It has been deprecated upstream in favor of gopls, the official Go LSP server. Close: #7995 Ref: golang/go/issues/65880 Co-authored-by: Henrik Lissner --- modules/lang/go/README.org | 14 -------------- modules/lang/go/config.el | 14 +------------- modules/lang/go/doctor.el | 3 --- modules/lang/go/packages.el | 1 - 4 files changed, 1 insertion(+), 31 deletions(-) diff --git a/modules/lang/go/README.org b/modules/lang/go/README.org index 761ab8c9b..ae968d6da 100644 --- a/modules/lang/go/README.org +++ b/modules/lang/go/README.org @@ -13,7 +13,6 @@ This module adds [[https://golang.org][Go]] support, with optional (but recommen - REPL (~gore~) - Syntax-checking (~flycheck~) - Auto-formatting on save (~gofmt~) (requires [[doom-module::editor format +onsave]]) -- Code navigation & refactoring (~go-guru~) - [[../../editor/file-templates/templates/go-mode][File templates]] - [[https://github.com/hlissner/doom-snippets/tree/master/go-mode][Snippets]] - Generate testing code (~go-gen-test~) @@ -36,7 +35,6 @@ This module adds [[https://golang.org][Go]] support, with optional (but recommen - [[doom-package:flycheck-golangci-lint]] if [[doom-module::checkers syntax]] - [[doom-package:go-eldoc]] - [[doom-package:go-gen-test]] -- [[doom-package:go-guru]] - [[doom-package:go-mode]] - [[doom-package:gorepl-mode]] - [[doom-package:go-tag]] @@ -64,7 +62,6 @@ below. - ~godoc~ (for documentation lookup) - ~gorename~ (for extra refactoring commands) - ~gore~ (for the REPL) -- ~guru~ (for code navigation & refactoring commands) - ~goimports~ (/optional/: for auto-formatting code on save & fixing imports) - ~gotests~ (for generate test code) - ~gomodifytags~ (for manipulating tags) @@ -77,7 +74,6 @@ go install github.com/stamblerre/gocode@latest go install golang.org/x/tools/cmd/godoc@latest go install golang.org/x/tools/cmd/goimports@latest go install golang.org/x/tools/cmd/gorename@latest -go install golang.org/x/tools/cmd/guru@latest go install github.com/cweill/gotests/gotests@latest go install github.com/fatih/gomodifytags@latest #+end_src @@ -102,16 +98,6 @@ go install github.com/fatih/gomodifytags@latest | [[kbd:][ b b]] | run ~$ go build~ | | [[kbd:][ b r]] | run ~$ go run .~ | | [[kbd:][ h .]] | lookup symbol at point in godoc | -| [[kbd:][ h d]] | describe symbol at point | -| [[kbd:][ h v]] | list free variables | -| [[kbd:][ h i]] | list implements relations for package types | -| [[kbd:][ h p]] | list peers for channel | -| [[kbd:][ h P]] | "what does this point to" | -| [[kbd:][ h r]] | list references to object | -| [[kbd:][ h e]] | which errors | -| [[kbd:][ h w]] | what query | -| [[kbd:][ h c]] | show callers of function at point | -| [[kbd:][ h C]] | show callees of function at point | | [[kbd:][ t t]] | rerun last test | | [[kbd:][ t a]] | run all tests in project | | [[kbd:][ t f]] | run all tests in current file | diff --git a/modules/lang/go/config.el b/modules/lang/go/config.el index 6fc8c7bbe..9dad82d31 100644 --- a/modules/lang/go/config.el +++ b/modules/lang/go/config.el @@ -7,8 +7,6 @@ (set-docsets! 'go-mode "Go") (set-repl-handler! 'go-mode #'gorepl-run) (set-lookup-handlers! 'go-mode - :definition #'go-guru-definition - :references #'go-guru-referrers :documentation #'godoc-at-point) (if (modulep! +lsp) @@ -25,17 +23,7 @@ "e" #'+go/play-buffer-or-region "i" #'go-goto-imports ; Go to imports (:prefix ("h" . "help") - "." #'godoc-at-point ; Lookup in godoc - "d" #'go-guru-describe ; Describe this - "v" #'go-guru-freevars ; List free variables - "i" #'go-guru-implements ; Implements relations for package types - "p" #'go-guru-peers ; List peers for channel - "P" #'go-guru-pointsto ; What does this point to - "r" #'go-guru-referrers ; List references to object - "e" #'go-guru-whicherrs ; Which errors - "w" #'go-guru-what ; What query - "c" #'go-guru-callers ; Show callers of this function - "C" #'go-guru-callees) ; Show callees of this function + "." #'godoc-at-point) ; Lookup in godoc (:prefix ("ri" . "imports") "a" #'go-import-add "r" #'go-remove-unused-imports) diff --git a/modules/lang/go/doctor.el b/modules/lang/go/doctor.el index 5ce6b331e..6bc97f69c 100644 --- a/modules/lang/go/doctor.el +++ b/modules/lang/go/doctor.el @@ -9,9 +9,6 @@ (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") -(unless (executable-find "guru") - (warn! "Couldn't find guru. Refactoring commands (go-guru-*) won't work")) - (unless (executable-find "gore") (warn! "Couldn't find gore. REPL will not work")) diff --git a/modules/lang/go/packages.el b/modules/lang/go/packages.el index 5cbc47159..0bf25637c 100644 --- a/modules/lang/go/packages.el +++ b/modules/lang/go/packages.el @@ -2,7 +2,6 @@ ;;; lang/go/packages.el (package! go-eldoc :pin "cbbd2ea1e94a36004432a9ac61414cb5a95a39bd") -(package! go-guru :pin "636d36e37a0d2b6adb2e12d802ff4794ccbba336") (package! go-mode :pin "636d36e37a0d2b6adb2e12d802ff4794ccbba336") (package! gorepl-mode :pin "6a73bf352e8d893f89cad36c958c4db2b5e35e07") (package! go-tag :pin "33f2059551d5298ca228d90f525b99d1a8d70364") From a0c901cca7607965e771f4d8fe50604d80a34bb6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 21 Aug 2024 18:47:14 -0400 Subject: [PATCH 04/25] fix(format): lsp-mode/eglot formatters There seems to be context that eglot needs that isn't available in Apheleia's scratch buffer. Fix: #7962 --- modules/editor/format/autoload/format.el | 34 +++++++------- modules/editor/format/autoload/lsp.el | 56 ++++++++++++------------ 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/modules/editor/format/autoload/format.el b/modules/editor/format/autoload/format.el index fe78af107..aeed07770 100644 --- a/modules/editor/format/autoload/format.el +++ b/modules/editor/format/autoload/format.el @@ -8,6 +8,9 @@ ;;;###autoload (autoload 'apheleia--get-formatters "apheleia-formatters") +;;;###autoload +(defvar +format--region-p nil) + ;;;###autoload (defun +format-region (start end &optional callback) "Format from START to END with `apheleia'." @@ -41,22 +44,21 @@ (when (> indent 0) (indent-rigidly (point-min) (point-max) (- indent))) ;; - (apheleia-format-buffer - command - (lambda () - (with-current-buffer formatted-buffer - (when (> indent 0) - ;; restore indentation without affecting new indentation - (indent-rigidly (point-min) (point-max) - (max 0 (- indent (+format--current-indentation))))) - (set-buffer-modified-p nil)) - (with-current-buffer cur-buffer - (delete-region start end) - (goto-char start) - (save-excursion - (insert-buffer-substring-no-properties formatted-buffer) - (when callback (funcall callback))) - (kill-buffer formatted-buffer))))) + (let ((+format--region-p (cons start end))) + (apheleia-format-buffer + command + (lambda () + (with-current-buffer formatted-buffer + (when (> indent 0) + ;; restore indentation without affecting new indentation + (indent-rigidly (point-min) (point-max) + (max 0 (- indent (+format--current-indentation))))) + (set-buffer-modified-p nil)) + (with-current-buffer cur-buffer + (with-silent-modifications + (replace-region-contents start end (lambda () formatted-buffer) 5)) + (when callback (funcall callback)) + (kill-buffer formatted-buffer)))))) (when (doom-region-active-p) (setq deactivate-mark t))))) diff --git a/modules/editor/format/autoload/lsp.el b/modules/editor/format/autoload/lsp.el index ac8daeb76..c9cc5540c 100644 --- a/modules/editor/format/autoload/lsp.el +++ b/modules/editor/format/autoload/lsp.el @@ -46,40 +46,38 @@ mode unconditionally, call `+format-with-lsp-mode' instead." (cl-defun +format-lsp-buffer (&rest plist &key buffer callback &allow-other-keys) "Format the current buffer with any available lsp-mode or eglot formatter." (if-let* ((fn (with-current-buffer buffer (+format--lsp-fn))) - ((apply fn plist))) + ((apply fn (car +format--region-p) (cdr +format--region-p) + plist))) (funcall callback) (funcall callback "LSP server doesn't support formatting"))) -(cl-defun +format--with-lsp-mode (&key buffer scratch &allow-other-keys) - "Format the current buffer with any available lsp-mode formatter." +(cl-defun +format--with-lsp-mode (beg end &key buffer &allow-other-keys) + "Format the current buffer or region with any available lsp-mode formatter. + +Won't forward the buffer to chained formatters if successful." (with-current-buffer buffer (let ((edits - (cond - ((lsp-feature? "textDocument/formatting") - (lsp-request "textDocument/formatting" - (lsp--make-document-formatting-params))) - ((lsp-feature? "textDocument/rangeFormatting") - (lsp-request "textDocument/rangeFormatting" - (lsp--make-document-range-formatting-params - (point-min) (point-max)))) - (:err)))) - (unless (eq edits :err) - (unless (seq-empty-p edits) - (with-current-buffer scratch - (lsp--apply-text-edits edits 'format))) - t)))) - -(cl-defun +format--with-eglot (&key buffer scratch &allow-other-keys) - "Format the current buffer with any available eglot formatter." - (with-current-buffer scratch - (when (setq-local - eglot--cached-server - (with-current-buffer buffer - (when (or (eglot-server-capable :documentFormattingProvider) - (eglot-server-capable :documentRangeFormattingProvider)) - (eglot-current-server)))) - (let ((buffer-file-name (buffer-file-name buffer))) - (eglot-format-buffer)) + (cond ((and (null beg) (lsp-feature? "textDocument/formatting")) + (lsp-request "textDocument/formatting" + (lsp--make-document-formatting-params))) + ((lsp-feature? "textDocument/rangeFormatting") + (lsp-request "textDocument/rangeFormatting" + (lsp--make-document-range-formatting-params + (or beg (point-min)) (or end (point-max))))) + ;; try next chained formatter(s) + ((cl-return (ignore (funcall callback))))))) + (unless (seq-empty-p edits) + (lsp--apply-text-edits edits 'format)) t))) +(cl-defun +format--with-eglot (beg end &key buffer callback &allow-other-keys) + "Format the current buffer or region with any available eglot formatter. + +Won't forward the buffer to chained formatters if successful." + (with-current-buffer buffer + (or (with-demoted-errors "%s" + (always (eglot-format beg end))) + ;; try next chained formatter(s) + (ignore (funcall callback))))) + ;;; lsp.el ends here From d941078e666fc86ca99c0d0b548347c80a50d5fa Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 00:55:41 -0400 Subject: [PATCH 05/25] tweak(ligatures): +ligatures-extra-alist: affect derived modes Close: #7808 Co-authored-by: Dev380 --- modules/ui/ligatures/config.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ui/ligatures/config.el b/modules/ui/ligatures/config.el index d2bcdcec7..61cce4823 100644 --- a/modules/ui/ligatures/config.el +++ b/modules/ui/ligatures/config.el @@ -138,7 +138,10 @@ and cannot run in." (setq +ligatures--init-font-hook nil))) (when in-mode-extras-p (prependq! prettify-symbols-alist - (alist-get major-mode +ligatures-extra-alist))) + (or (alist-get major-mode +ligatures-extra-alist) + (cl-loop for (mode . symbols) in +ligatures-extra-alist + if (derived-mode-p mode) + return symbols)))) (when (and (or in-mode-p in-mode-extras-p) prettify-symbols-alist) (when prettify-symbols-mode From 1b336d05491e1559de3e27e88b23c49f78ae0eec Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 11:29:46 -0400 Subject: [PATCH 06/25] bump: forge magit/forge@1e7ee99c7f76 -> magit/forge@30f181f78552 - Same issue with forge as with magit (see 5e70fe1). Fix: #8007 Amend: 5e70fe169764 --- modules/tools/magit/packages.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/tools/magit/packages.el b/modules/tools/magit/packages.el index ea1a2db1b..2d33c0142 100644 --- a/modules/tools/magit/packages.el +++ b/modules/tools/magit/packages.el @@ -1,12 +1,12 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/magit/packages.el -;; NOTE: Always bump this to HEAD~1, not HEAD, because the latest commit on -;; magit's melpa branch is auto-generated and moved to HEAD every time there's -;; a commit to its main branch. +;; NOTE: Always bump magit and forge to HEAD~1, not HEAD, because the latest +;; commit on their melpa branches are auto-generated and moved to HEAD every +;; time there's a commit to its main branch. (package! magit :pin "2da34f1317c619ec2dfb9e0d969449261ca7f31f") (when (modulep! +forge) - (package! forge :pin "1e7ee99c7f76034e40210a6fd6007015b1998f6d") + (package! forge :pin "30f181f785522f2debf60945d6b589a65bc415f6") (package! code-review :recipe (:host github :repo "doomelpa/code-review" From 1e73754dad967f83fa015a73ae18a4d7d22c2921 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 11:59:45 -0400 Subject: [PATCH 07/25] refactor(dired): dirvish-hide-cursor Give the same treatment I give dirvish-hide-details to dirvish-hide-cursor (see ddfb0cc). Ref: ddfb0cc3cc43 Ref: #6760 --- modules/emacs/dired/config.el | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index c303ec911..9f751f7ba 100644 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -105,27 +105,29 @@ Fixes #3939: unsortable dired entries on Windows." (setq dirvish-subtree-always-show-state t) (appendq! dirvish-attributes '(nerd-icons subtree-state))) - ;; HACK: Makes `dirvish-hide-details' accept a list of symbols to instruct - ;; Dirvish in what contexts `dirvish-hide-details' should be enabled. The - ;; accepted values are: + ;; HACK: Makes `dirvish-hide-details' and `dirvish-hide-cursor' accept a list + ;; of symbols to instruct Dirvish in what contexts they should be enabled. + ;; The accepted values are: ;; - `dired': when opening a directory directly or w/o Dirvish's full UI. ;; - `dirvish': when opening full-frame Dirvish. ;; - `dirvish-side': when opening Dirvish in the sidebar. - ;; REVIEW: Upstream this behavior later. (Maybe with similar treatment for - ;; `dirvish-hide-cursor'?) - (setq dirvish-hide-details '(dirvish dirvish-side)) + ;; REVIEW: Upstream this behavior later. + (setq dirvish-hide-details '(dirvish dirvish-side) + dirvish-hide-cursor '(dirvish dirvish-side)) (defadvice! +dired--hide-details-maybe-a (fn &rest args) :around #'dirvish-init-dired-buffer - (let ((dirvish-hide-details - (if (listp dirvish-hide-details) - (cond ((if dirvish--this (memq 'side (dv-type dirvish--this))) - (memq 'dirvish-side dirvish-hide-details)) - ((or (null dirvish--this) - (null (car (dv-layout dirvish--this)))) - (memq 'dired dirvish-hide-details)) - ((memq 'dirvish dirvish-hide-details))) - dirvish-hide-details))) - (apply fn args))) + (letf! (defun enabled? (val) + (if (listp val) + (cond ((if dirvish--this (memq 'side (dv-type dirvish--this))) + (memq 'dirvish-side val)) + ((or (null dirvish--this) + (null (car (dv-layout dirvish--this)))) + (memq 'dired val)) + ((memq 'dirvish val))) + val)) + (let ((dirvish-hide-details (enabled? dirvish-hide-details))) + (setq-local dirvish-hide-cursor (and (enabled? dirvish-hide-cursor) t)) + (apply fn args)))) (when (modulep! :ui tabs) (after! centaur-tabs From 804da58540401f2ffc5467efff8bf444bc330592 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 12:24:24 -0400 Subject: [PATCH 08/25] fix(format): disable on-save for LaTeX-mode Since latex-mode != LaTeX-mode. --- modules/editor/format/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/editor/format/config.el b/modules/editor/format/config.el index 3b011cbee..4ea019010 100644 --- a/modules/editor/format/config.el +++ b/modules/editor/format/config.el @@ -4,6 +4,7 @@ '(sql-mode ; sqlformat is currently broken tex-mode ; latexindent is broken latex-mode + LaTeX-mode org-msg-edit-mode) ; doesn't need a formatter "A list of major modes in which to not reformat the buffer upon saving. From 0d363045c58081cc4efe3d1665d2faaceecaeb1f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 12:27:13 -0400 Subject: [PATCH 09/25] tweak(dart): open flutter output in popup Close: #8015 Co-authored-by: AlessandroW --- modules/lang/dart/config.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/lang/dart/config.el b/modules/lang/dart/config.el index b60e8d330..19f8c9f63 100644 --- a/modules/lang/dart/config.el +++ b/modules/lang/dart/config.el @@ -37,7 +37,10 @@ "f" #'flutter-run "q" #'flutter-quit "r" #'flutter-hot-reload - "R" #'flutter-hot-restart))) + "R" #'flutter-hot-restart)) + :config + (set-popup-rule! (concat "^" (regexp-quote flutter-buffer-name)) + :ttl 0 :quit t)) (use-package! lsp-dart From 9ebd9cb734fa9d610bfd7112ce17764d64e6e5f9 Mon Sep 17 00:00:00 2001 From: pancho horrillo Date: Thu, 22 Aug 2024 08:57:28 +0200 Subject: [PATCH 10/25] fix(go): remove bind to deprecated function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ‘go-remove-unused-imports’ is an obsolete command (as of 1.7.0); set ‘gofmt-command’ to goimports instead, or use LSP and gopls’s "Organize Imports" code action. Ref: dominikh/go-mode.el@166dfb1e0902 --- modules/lang/go/config.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/lang/go/config.el b/modules/lang/go/config.el index 9dad82d31..861fdafd5 100644 --- a/modules/lang/go/config.el +++ b/modules/lang/go/config.el @@ -25,8 +25,7 @@ (:prefix ("h" . "help") "." #'godoc-at-point) ; Lookup in godoc (:prefix ("ri" . "imports") - "a" #'go-import-add - "r" #'go-remove-unused-imports) + "a" #'go-import-add) (:prefix ("b" . "build") :desc "go run ." "r" (cmd! (compile "go run .")) :desc "go build" "b" (cmd! (compile "go build")) From d309dcad27aaaed0d7b81a4a90abf4cf535b8907 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 14:47:37 -0400 Subject: [PATCH 11/25] fix(plantuml): {org-,}plantuml-jar-path resolution - Ensures `org-plantuml-jar-path` is less likely to be overwritten if the user changes it. - Sets `org-plantuml-jar-path` and `plantuml-default-exec-mode` after calling `plantuml-download-jar`, so things Just Work:tm: without needing the user to know to update these variables. Close: #7992 --- modules/lang/plantuml/config.el | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/modules/lang/plantuml/config.el b/modules/lang/plantuml/config.el index 64ff4ed13..0d76e7887 100644 --- a/modules/lang/plantuml/config.el +++ b/modules/lang/plantuml/config.el @@ -3,15 +3,24 @@ (use-package! plantuml-mode :commands plantuml-download-jar :init - (setq plantuml-jar-path (concat doom-data-dir "plantuml.jar") - org-plantuml-jar-path plantuml-jar-path) + (setq plantuml-jar-path (concat doom-data-dir "plantuml.jar")) :config (set-popup-rule! "^\\*PLANTUML" :size 0.4 :select nil :ttl 0) - (setq plantuml-default-exec-mode (cond ((file-exists-p plantuml-jar-path) 'jar) - ((executable-find "plantuml") 'executable) - (plantuml-default-exec-mode)))) + ((executable-find plantuml-executable-path) 'executable) + (plantuml-default-exec-mode))) + ;; HACK: If plantuml-jar-path is missing at startup, then plantuml-mode will + ;; operate in another `plantuml-default-exec-mode'. After using + ;; plantuml-download-jar, we change it to `jar' just for this session. + (defadvice! +plantuml--use-downloaded-jar-a (fn &rest args) + "Configure plantuml-mode to use the downloaded jar for this session." + :around #'plantuml-download-jar + (let ((downloaded? (not (file-exists-p plantuml-jar-path)))) + (prog1 (apply fn args) + (when (and downloaded? (file-exists-p plantuml-jar-path)) + (setq org-plantuml-jar-path plantuml-jar-path + plantuml-default-exec-mode 'jar)))))) (use-package! flycheck-plantuml @@ -25,8 +34,14 @@ (after! ob-plantuml - ;; HACK Force ob-plantuml to use `plantuml-mode''s building mechanism, which - ;; is more sophisticated. + ;; The nested `after!' is needed to ensure `org-plantuml-jar-path's new + ;; default without overwriting any user config. + (after! plantuml-mode + (when (equal org-plantuml-jar-path "") + (setq org-plantuml-jar-path plantuml-jar-path))) + + ;; HACK: Force ob-plantuml to use `plantuml-mode''s building mechanism, which + ;; is more sophisticated. (advice-add #'org-babel-execute:plantuml :override #'+plantuml-org-babel-execute:plantuml-a) (add-to-list 'org-babel-default-header-args:plantuml From e59023b843cace269ad3aab0948673deae500d77 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 15:14:36 -0400 Subject: [PATCH 12/25] fix(vc-gutter): toggle diff-hl-margin-mode in tty frames Fix: #8001 --- modules/ui/vc-gutter/config.el | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/modules/ui/vc-gutter/config.el b/modules/ui/vc-gutter/config.el index d54f44a50..4c9eac6c7 100644 --- a/modules/ui/vc-gutter/config.el +++ b/modules/ui/vc-gutter/config.el @@ -193,4 +193,19 @@ Respects `diff-hl-disable-on-remote'." (defadvice! +vc-gutter--kill-diff-hl-thread-a (&optional buf) :before #'kill-buffer (with-current-buffer (or buf (current-buffer)) - (+vc-gutter--kill-thread t)))) + (+vc-gutter--kill-thread t))) + + ;; HACK: diff-hl won't be visible in TTY frames, but there's no simple way to + ;; use the fringe in GUI Emacs and use the margin in the terminal *AND* + ;; support daemon users, so we need more than a static `display-graphic-p' + ;; check at startup. + (when (modulep! :os tty) + (put 'diff-hl-mode 'last (display-graphic-p)) + (add-hook! 'doom-switch-window-hook + (defun +vc-gutter-use-margins-in-tty-h () + (let ((graphic? (display-graphic-p))) + (unless (and global-diff-hl-mode (eq (get 'diff-hl-mode 'last) graphic?)) + (global-diff-hl-mode -1) + (diff-hl-margin-mode (if graphic? -1 +1)) + (global-diff-hl-mode +1) + (put 'diff-hl-mode 'last graphic?))))))) From 32d9369091d59cb83fd2f9b74b77d565ae1ee3b1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 15:14:54 -0400 Subject: [PATCH 13/25] fix(lsp): disable lsp-terraform This issue seems to come up a lot, and I've been unable to reproduce it, but at the very least I can disable the lsp-terraform client for folks that don't need it. Fix: #7713 Ref: emacs-lsp/lsp-mode#3577 --- modules/tools/lsp/+lsp.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/tools/lsp/+lsp.el b/modules/tools/lsp/+lsp.el index c82805ff4..6deef2c4e 100644 --- a/modules/tools/lsp/+lsp.el +++ b/modules/tools/lsp/+lsp.el @@ -43,6 +43,10 @@ Can be a list of backends; accepts any value `company-backends' accepts.") (when (modulep! :config default +bindings) (setq lsp-keymap-prefix nil)) + ;; HACK: See emacs-lsp/lsp-mode#3577 + (unless (modulep! :lang terraform) + (setq lsp-client-packages (delete 'lsp-terraform lsp-client-packages))) + (unless (featurep :system 'windows) ;; HACK: Frustratingly enough, the value of `lsp-zig-download-url-format' is ;; used immediately while the lsp-zig package is loading, so changing it From b521492bf445887181860b626ee94be45a8b227e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 15:43:58 -0400 Subject: [PATCH 14/25] fix(default): feature-gate deft keybinds Close: #7935 Co-authored-by: edmundmiller --- modules/config/default/+emacs-bindings.el | 5 +++-- modules/config/default/+evil-bindings.el | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index d076cff2e..b40c0d3e0 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -170,9 +170,10 @@ :desc "Toggle last org-clock" "c" #'+org/toggle-last-clock :desc "Cancel current org-clock" "C" #'org-clock-cancel - :desc "Open deft" "d" #'deft + (:when (modulep! :ui deft) + :desc "Open deft" "d" #'deft) (:when (modulep! :lang org +noter) - :desc "Org noter" "e" #'org-noter) + :desc "Org noter" "e" #'org-noter) :desc "Find file in notes" "f" #'+default/find-in-notes :desc "Browse notes" "F" #'+default/browse-notes diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index cca095634..4e3fa545a 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -609,9 +609,10 @@ :desc "Toggle last org-clock" "c" #'+org/toggle-last-clock :desc "Cancel current org-clock" "C" #'org-clock-cancel - :desc "Open deft" "d" #'deft + (:when (modulep! :ui deft) + :desc "Open deft" "d" #'deft) (:when (modulep! :lang org +noter) - :desc "Org noter" "e" #'org-noter) + :desc "Org noter" "e" #'org-noter) :desc "Find file in notes" "f" #'+default/find-in-notes :desc "Browse notes" "F" #'+default/browse-notes From 93c5f98ee28de5d24c66274fc92773f245b00b4c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 16:04:22 -0400 Subject: [PATCH 15/25] fix(vc-gutter): resist errors in kill-buffer advice A regression introduced in aa8c31c. Fix: #8018 Ref: #8009 Amend: aa8c31cf0806 --- modules/ui/vc-gutter/config.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/ui/vc-gutter/config.el b/modules/ui/vc-gutter/config.el index 4c9eac6c7..dc1e053c9 100644 --- a/modules/ui/vc-gutter/config.el +++ b/modules/ui/vc-gutter/config.el @@ -192,8 +192,9 @@ Respects `diff-hl-disable-on-remote'." ;; triggered from Elisp's buffer API (from what I can tell). (defadvice! +vc-gutter--kill-diff-hl-thread-a (&optional buf) :before #'kill-buffer - (with-current-buffer (or buf (current-buffer)) - (+vc-gutter--kill-thread t))) + (when-let ((buf (ignore-errors (window-normalize-buffer buf)))) + (with-current-buffer buf + (+vc-gutter--kill-thread t)))) ;; HACK: diff-hl won't be visible in TTY frames, but there's no simple way to ;; use the fringe in GUI Emacs and use the margin in the terminal *AND* From d4357c173a33ee1d9dc449c7ea892956aa6adea2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 16:08:45 -0400 Subject: [PATCH 16/25] fix(lsp): void-variable lsp-client-packages error Regression introduced in 32d9369, due to evaluating this snippet too early (before lsp-mode was loaded). Amend: 32d9369091d5 Fix: #7713 --- modules/tools/lsp/+lsp.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/tools/lsp/+lsp.el b/modules/tools/lsp/+lsp.el index 6deef2c4e..e3f3988a2 100644 --- a/modules/tools/lsp/+lsp.el +++ b/modules/tools/lsp/+lsp.el @@ -43,10 +43,6 @@ Can be a list of backends; accepts any value `company-backends' accepts.") (when (modulep! :config default +bindings) (setq lsp-keymap-prefix nil)) - ;; HACK: See emacs-lsp/lsp-mode#3577 - (unless (modulep! :lang terraform) - (setq lsp-client-packages (delete 'lsp-terraform lsp-client-packages))) - (unless (featurep :system 'windows) ;; HACK: Frustratingly enough, the value of `lsp-zig-download-url-format' is ;; used immediately while the lsp-zig package is loading, so changing it @@ -88,6 +84,9 @@ Can be a list of backends; accepts any value `company-backends' accepts.") :implementations '(lsp-find-implementation :async t) :type-definition #'lsp-find-type-definition) + ;; HACK: See emacs-lsp/lsp-mode#3577 + (unless (modulep! :lang terraform) + (setq lsp-client-packages (delete 'lsp-terraform lsp-client-packages))) (defadvice! +lsp--respect-user-defined-checkers-a (fn &rest args) "Ensure user-defined `flycheck-checker' isn't overwritten by `lsp'." From bc634eaca0ae57870e92678a4aa59e64abf092ca Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 20:04:26 -0400 Subject: [PATCH 17/25] fix: straight-built-in-pseudo-packages: add seq Avoid installing a newer (or older) and possibly incompatible copy of seq. Also, seq would get installed along with its unit tests, and Emacs will hang trying to natively compile them, so... --- lisp/doom-packages.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/doom-packages.el b/lisp/doom-packages.el index 5a6cb7e4e..6b199232e 100644 --- a/lisp/doom-packages.el +++ b/lisp/doom-packages.el @@ -111,7 +111,10 @@ uses a straight or package.el command directly).") ;; changed afterwards. (setq straight--native-comp-available nil) ;; `let-alist' is built into Emacs 26 and onwards - (add-to-list 'straight-built-in-pseudo-packages 'let-alist)) + (add-to-list 'straight-built-in-pseudo-packages 'let-alist) + ;; `seq' is built into all Emacs versions Doom supports, so avoid installing + ;; newer (and possibly incompatible) versions of seq. + (add-to-list 'straight-built-in-pseudo-packages 'seq)) (defadvice! doom--read-pinned-packages-a (fn &rest args) "Read `:pin's in `doom-packages' on top of straight's lockfiles." From 1e358caea1793c51dffde5eeb8e98034ce47621b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 20:16:23 -0400 Subject: [PATCH 18/25] bump: ob-clojure-literate https://repo.or.cz/ob-clojure-literate.el.git@18c3ea15b872 -> emacsattic/ob-clojure-literate@18c3ea15b872 Use emacsattic/ob-clojure-literate on Github (a more stable host). Fix: #7586 --- modules/lang/org/packages.el | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index 5fc023410..8cb561e8e 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -116,9 +116,6 @@ (package! ob-async :pin "9aac486073f5c356ada20e716571be33a350a982") (when (modulep! :lang clojure) (package! ob-clojure-literate - :recipe (:type git - :host nil - :repo "https://repo.or.cz/ob-clojure-literate.el.git") :pin "18c3ea15b872a43e67c899a9914182c35b00b7ee")) (when (modulep! :lang crystal) (package! ob-crystal :pin "d84c1adee4b269cdba06a97caedb8071561a09af")) From ad1507ae8d708f06363e74ea46a3b4a60e9cb69d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 20:25:37 -0400 Subject: [PATCH 19/25] docs(org): mention Jupyter packages for Arch Linux Amend: #7502 Amend: ab1d396c2dd3 --- modules/lang/org/README.org | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/lang/org/README.org b/modules/lang/org/README.org index beb9f86e0..9087c4ed4 100644 --- a/modules/lang/org/README.org +++ b/modules/lang/org/README.org @@ -189,6 +189,8 @@ pacman -S texlive-core texlive-bin texlive-science texlive-latexextra pacman -S gnuplot #+end_src +For [[doom-module:+jupyter]], install =jupyterlab= or =jupyter-notebook= ([[https://wiki.archlinux.org/title/Jupyter][source]]). + ** Debian & Ubuntu #+begin_src sh apt-get install texlive dvipng From b69e7d1780b1c9a47a30cd36b05d4fe5c9417bef Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 21:45:23 -0400 Subject: [PATCH 20/25] tweak(dired): bind gl, h, l, & arrows to directory nav --- modules/emacs/dired/config.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index 9f751f7ba..27ec10311 100644 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -145,6 +145,11 @@ Fixes #3939: unsortable dired entries on Windows." :n "F" #'dirvish-layout-toggle :n "z" #'dirvish-history-jump :n "gh" #'dirvish-subtree-up + :n "gl" #'dirvish-subtree-toggle + :n "h" #'dired-up-directory + :n "l" #'dired-find-file + :gm [left] #'dired-up-directory + :gm [right] #'dired-find-file :m "[h" #'dirvish-history-go-backward :m "]h" #'dirvish-history-go-forward :m "[e" #'dirvish-emerge-next-group From fbfed2416706f811d519dfdd1350efb9b4be45f9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 22:27:26 -0400 Subject: [PATCH 21/25] refactor!(php): remove phpactor.el BREAKING CHANGE: This removes the phpactor.el package in favor of LSP support via lsp-mode/eglot. Use `+lsp` with the `:lang php` module instead (with one of the supported LSP servers). This was done because phpactor.el is on the way out of maintainership, is redundant with pre-existing phpactor support in lsp-mode/eglot (or the other, possibly superior LSP servers), and to simplify modules for whom LSP/Eglot is *the* way to get these features. --- modules/lang/php/README.org | 8 +++----- modules/lang/php/config.el | 25 +++---------------------- modules/lang/php/packages.el | 5 ----- 3 files changed, 6 insertions(+), 32 deletions(-) diff --git a/modules/lang/php/README.org b/modules/lang/php/README.org index d2ea8b398..321ce8177 100644 --- a/modules/lang/php/README.org +++ b/modules/lang/php/README.org @@ -12,6 +12,7 @@ This module adds support for PHP 5.3+ (including PHP8) to Doom Emacs. - Code refactoring commands (~php-refactor-mode~) - Unit-test commands (~phpunit~) - Support for ~laravel~ and ~composer~ projects (with project-specific snippets) +- LSP support (via the [[doom-module:+lsp]] flag) - [[../../editor/file-templates/templates/php-mode][File templates]] - [[https://github.com/hlissner/doom-snippets/tree/master/php-mode][Snippets]] @@ -31,8 +32,8 @@ This module adds support for PHP 5.3+ (including PHP8) to Doom Emacs. - +hack :: Add support for the [[https://hacklang.org/][Hack dialect of PHP]] by Facebook. - +lsp :: - Enable LSP support for ~php-mode~. Requires [[doom-module::tools lsp]] and a langserver - (supports [[https://phpactor.readthedocs.io/en/develop/usage/standalone.html][phpactor]] and intelephense). + Enable LSP support for ~php-mode~. Requires [[doom-module::tools lsp]] and a + langserver (supports [[https://emacs-lsp.github.io/lsp-mode/page/lsp-phpactor/][phpactor]], [[https://emacs-lsp.github.io/lsp-mode/page/lsp-intelephense/][intelephense]], [[https://emacs-lsp.github.io/lsp-mode/page/lsp-serenata/][serenata]], [[https://emacs-lsp.github.io/lsp-mode/page/lsp-php/][php-language-server]]). - +tree-sitter :: Leverages tree-sitter for better syntax highlighting and structural text editing. Requires [[doom-module::tools tree-sitter]]. @@ -45,9 +46,6 @@ This module adds support for PHP 5.3+ (including PHP8) to Doom Emacs. - [[doom-package:php-mode]] - [[doom-package:php-refactor-mode]] - [[doom-package:phpunit]] -- if [[doom-module:+lsp]] - - [[doom-package:phpactor]] - - [[doom-package:company-phpactor]] ** Hacks /No hacks documented for this module./ diff --git a/modules/lang/php/config.el b/modules/lang/php/config.el index eb3a2512f..6cdda8ded 100644 --- a/modules/lang/php/config.el +++ b/modules/lang/php/config.el @@ -50,7 +50,7 @@ :yield "use") (if (not (modulep! +lsp)) - ;; `+php-company-backend' uses `company-phpactor', `php-extras-company' or + ;; `+php-company-backend' uses `php-extras-company' or ;; `company-dabbrev-code', in that order. (when +php--company-backends (set-company-backend! 'php-mode @@ -78,24 +78,6 @@ "s" #'phpunit-current-test)) -(use-package! phpactor - :unless (modulep! +lsp) - :after php-mode - :init - (add-to-list '+php--company-backends #'company-phpactor nil 'eq) - :config - (set-lookup-handlers! 'php-mode - :definition #'phpactor-goto-definition) - (map! :localleader - :map php-mode-map - :prefix ("r" . "refactor") - "cc" #'phpactor-copy-class - "mc" #'phpactor-move-class - "oi" #'phpactor-offset-info - "t" #'phpactor-transform - "ic" #'phpactor-import-class)) - - (use-package! php-refactor-mode :hook php-mode :config @@ -111,13 +93,12 @@ (use-package! php-extras :after php-mode :preface + (setq php-extras-eldoc-functions-file + (concat doom-profile-cache-dir "php-extras-eldoc-functions")) ;; We'll set up company support ourselves (advice-add #'php-extras-company-setup :override #'ignore) - :init (add-to-list '+php--company-backends #'php-extras-company) :config - (setq php-extras-eldoc-functions-file - (concat doom-data-dir "php-extras-eldoc-functions")) ;; Silence warning if `php-extras-eldoc-functions-file' hasn't finished ;; generating yet. (defun php-extras-load-eldoc () diff --git a/modules/lang/php/packages.el b/modules/lang/php/packages.el index 2b3f312fe..ce2dcb830 100644 --- a/modules/lang/php/packages.el +++ b/modules/lang/php/packages.el @@ -15,10 +15,5 @@ :recipe (:host github :repo "hhvm/hack-mode") :pin "ccf20511f0f2ed45d00d423c703bb91ab6a8b80c")) -(unless (modulep! +lsp) - (package! phpactor :pin "6b5269ff82785a9bd1e648b2f91e5128353d5a67") - (when (modulep! :completion company) - (package! company-phpactor :pin "6b5269ff82785a9bd1e648b2f91e5128353d5a67"))) - ;; For building php-extras (package! async :pin "cff2bd0be3c78a2eb76717eed60302972fe9b8c5") From ad26fcdbddeb2f5c9d9090adf1745a5b1b58bd68 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 22 Aug 2024 22:30:46 -0400 Subject: [PATCH 22/25] perf(emacs-lisp): elisp-demos: inhibit local-vars hooks --- modules/lang/emacs-lisp/config.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/lang/emacs-lisp/config.el b/modules/lang/emacs-lisp/config.el index 4a7b532f8..8627d2e01 100644 --- a/modules/lang/emacs-lisp/config.el +++ b/modules/lang/emacs-lisp/config.el @@ -234,6 +234,7 @@ See `+emacs-lisp-non-package-mode' for details.") :around #'elisp-demos--symbols :around #'elisp-demos--syntax-highlight (let ((org-inhibit-startup t) + (doom-inhibit-local-var-hooks t) enable-dir-local-variables org-mode-hook) (apply fn args)))) From ba01418652ac434345f4075c6daa15412e1edfed Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 23 Aug 2024 01:27:54 -0400 Subject: [PATCH 23/25] revert: fix: straight-built-in-pseudo-packages: add seq Magit requires a newer version of seq than what's available on 28.x or older or it spews out warnings. Revert: bc634eaca0ae --- lisp/doom-packages.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lisp/doom-packages.el b/lisp/doom-packages.el index 6b199232e..22f73aef6 100644 --- a/lisp/doom-packages.el +++ b/lisp/doom-packages.el @@ -111,10 +111,7 @@ uses a straight or package.el command directly).") ;; changed afterwards. (setq straight--native-comp-available nil) ;; `let-alist' is built into Emacs 26 and onwards - (add-to-list 'straight-built-in-pseudo-packages 'let-alist) - ;; `seq' is built into all Emacs versions Doom supports, so avoid installing - ;; newer (and possibly incompatible) versions of seq. - (add-to-list 'straight-built-in-pseudo-packages 'seq)) + (add-to-list 'straight-built-in-pseudo-packages 'let-alist)) (defadvice! doom--read-pinned-packages-a (fn &rest args) "Read `:pin's in `doom-packages' on top of straight's lockfiles." @@ -143,7 +140,8 @@ uses a straight or package.el command directly).") (after! comp ;; HACK Disable native-compilation for some troublesome packages (mapc (doom-partial #'add-to-list 'native-comp-deferred-compilation-deny-list) - (list "/emacs-jupyter.*\\.el\\'" + (list "/seq-tests\\.el\\'" + "/emacs-jupyter.*\\.el\\'" "/evil-collection-vterm\\.el\\'" "/vterm\\.el\\'" "/with-editor\\.el\\'")))) From c901f5806e4b5d28ca7f93a5dfd4daffa6771593 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 23 Aug 2024 01:30:44 -0400 Subject: [PATCH 24/25] fix(cli): straight ignoring native-comp-jit-compilation-deny-list Turns out native-comp doesn't respect `native-comp-jit-compilation-deny-list` if called explicitly (instead of from deferred compilation). Fix: #5592 Fix: #6283 Fix: #3655 --- lisp/cli/packages.el | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lisp/cli/packages.el b/lisp/cli/packages.el index 09f72dc32..c1a515fbe 100644 --- a/lisp/cli/packages.el +++ b/lisp/cli/packages.el @@ -704,6 +704,31 @@ original state.") ;; noninteractive sessions. (advice-add #'straight-vc-git--popup-raw :override #'straight--popup-raw) +;; HACK: `native-comp' only respects `native-comp-jit-compilation-deny-list' +;; when native-compiling packages in interactive sessions. It ignores the +;; variable when, say, straight is building packages. This advice forces it to +;; obey it, even when used by straight (but only in the CLI). +(defadvice! doom-cli--native--compile-async-skip-p (fn files &optional recursively load selector) + :around #'native-compile-async + (let (file-list) + (dolist (file-or-dir (ensure-list files)) + (cond ((file-directory-p file-or-dir) + (dolist (file (if recursively + (directory-files-recursively + file-or-dir comp-valid-source-re) + (directory-files file-or-dir + t comp-valid-source-re))) + (push file file-list))) + ((file-exists-p file-or-dir) + (push file-or-dir file-list)) + ((signal 'native-compiler-error + (list "Not a file nor directory" file-or-dir))))) + (funcall fn (seq-remove (lambda (file) + (seq-some (lambda (re) (string-match-p re file)) + native-comp-deferred-compilation-deny-list)) + file-list) + recursively load selector))) + ;; HACK Replace GUI popup prompts (which hang indefinitely in tty Emacs) with ;; simple prompts. (defadvice! doom-cli--straight-fallback-to-y-or-n-prompt-a (fn &optional prompt noprompt?) From e21e01d4c27e357ce3588d46c5bb681277b320c1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 23 Aug 2024 02:30:25 -0400 Subject: [PATCH 25/25] fix(cli): doom env: blacklist $WAYLAND_DISPLAY --- lisp/cli/env.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/cli/env.el b/lisp/cli/env.el index 808878985..6d06f9136 100644 --- a/lisp/cli/env.el +++ b/lisp/cli/env.el @@ -21,7 +21,7 @@ "^HOME$" "^\\(OLD\\)?PWD$" "^SHLVL$" "^PS1$" "^R?PROMPT$" "^TERM\\(CAP\\)?$" "^USER$" "^GIT_CONFIG" "^INSIDE_EMACS$" ;; X server, Wayland, or services' env that shouldn't be persisted - "^DISPLAY$" "^WAYLAND_DISPLAY" "^DBUS_SESSION_BUS_ADDRESS$" "^XAUTHORITY$" + "^\\(WAYLAND_\\)?DISPLAY$" "^DBUS_SESSION_BUS_ADDRESS$" "^XAUTHORITY$" ;; Windows+WSL envvars that shouldn't be persisted "^WSL_INTEROP$" ;; XDG variables that are best not persisted.