From c99e9b8654e1ec2ddaae405c6e58654dfb41ffe9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 28 Aug 2024 04:55:17 -0400 Subject: [PATCH 01/17] fix(dired): initial pop-in for vc-state Ref: hlissner/dirvish#1 --- modules/emacs/dired/config.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index f700e2e2f..bf833709f 100644 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -99,6 +99,14 @@ Fixes #3939: unsortable dired entries on Windows." dirvish-header-line-height height))))) (when (modulep! :ui vc-gutter) + ;; HACK: Dirvish sets up the fringes for vc-state late in the startup + ;; process, causing this jarring pop-in effect. This advice sets them up + ;; sooner to avoid this. + ;; REVIEW: Upstream this later. + (defadvice! +dired--init-fringes-a (_dir _buffer setup) + :before #'dirvish-data-for-dir + (when (and setup (memq 'vc-state dirvish-attributes)) + (set-window-fringes nil 5 1))) (push 'vc-state dirvish-attributes)) (when (modulep! +icons) From c352bd0dcdd628b266a90a59beb1b669f3ec5c72 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 28 Aug 2024 04:56:48 -0400 Subject: [PATCH 02/17] refactor: remove redundant doom-bin{,-dir} decls Amend: a8ba8feecb1e Amend: a5039c4333aa --- lisp/lib/config.el | 3 --- 1 file changed, 3 deletions(-) diff --git a/lisp/lib/config.el b/lisp/lib/config.el index 22f511b22..c92d4a791 100644 --- a/lisp/lib/config.el +++ b/lisp/lib/config.el @@ -1,8 +1,5 @@ ;;; lisp/lib/config.el -*- lexical-binding: t; -*- -(defvar doom-bin-dir (expand-file-name "bin/" doom-emacs-dir)) -(defvar doom-bin (expand-file-name "doom" doom-bin-dir)) - ;;;###autoload (defvar doom-after-reload-hook nil "A list of hooks to run after `doom/reload' has reloaded Doom.") From 5e3c794d313a5821aaae913e1942697cd7cddf1d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 28 Aug 2024 14:49:14 -0400 Subject: [PATCH 03/17] tweak(org): remap imenu to consult-imenu Ref: #7716 Co-authored-by: aisamu --- 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 f8404075f..30971f1c3 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -870,7 +870,7 @@ between the two." [remap doom/forward-to-last-non-comment-or-eol] #'org-end-of-line (:when (modulep! :completion vertico) - [remap imenu] #'consult-outline) + [remap imenu] #'consult-imenu) :localleader "#" #'org-update-statistics-cookies From 35dd2bb33ced07983e30c03cc7f4b3061089a563 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 28 Aug 2024 15:32:42 -0400 Subject: [PATCH 04/17] bump: :lang rust emacs-rustic/rustic@39423d1cf4fa -> emacs-rustic/rustic@d76568037323 rust-lang/rust-mode@d00d83d3a207 -> rust-lang/rust-mode@a529a4518120 Fix: #8029 Ref: emacs-rustic/rustic#3 --- modules/lang/rust/packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/rust/packages.el b/modules/lang/rust/packages.el index 5fdb9e14b..fdd53aa19 100644 --- a/modules/lang/rust/packages.el +++ b/modules/lang/rust/packages.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/rust/packages.el -(package! rust-mode :pin "d00d83d3a207a5b7c2994392b2781f627e3159ce") -(package! rustic :pin "39423d1cf4fa054c36bf9577356451f4c06ee148") +(package! rust-mode :pin "a529a4518120bd1c662edc31b82062f41bbfb990") +(package! rustic :pin "d765680373234a6c231acf20c76b07422afcfdf9") From c53f63b96edfae1b064c44c225b12872891a62e1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 28 Aug 2024 17:46:45 -0400 Subject: [PATCH 05/17] fix: trigger doom-first-{file,buffer}-hook at startup Should fix issues where modes/hooks weren't triggered for files/directories opened early (e.g. from the command-line or programmatically from the user's config). --- lisp/doom-start.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lisp/doom-start.el b/lisp/doom-start.el index c38a7ebfb..35a4f2e9e 100644 --- a/lisp/doom-start.el +++ b/lisp/doom-start.el @@ -322,6 +322,15 @@ If RETURN-P, return the message as a string instead of displaying it." (doom-run-hook-on 'doom-first-buffer-hook '(find-file-hook doom-switch-buffer-hook)) (doom-run-hook-on 'doom-first-file-hook '(find-file-hook dired-initial-position-hook)) (doom-run-hook-on 'doom-first-input-hook '(pre-command-hook)) + +;; If the user's already opened something (e.g. with command-line arguments), +;; then we should assume nothing about the user's intentions and simply treat +;; this session as fully initialized. +(add-hook! 'doom-after-init-hook :depth 100 + (defun doom-run-first-hooks-if-files-open-h () + (when file-name-history + (doom-run-hooks 'doom-first-file-hook 'doom-first-buffer-hook)))) + ;; PERF: Activate these later, otherwise they'll fire for every buffer created ;; between now and the end of startup. (add-hook! 'after-init-hook From 14478064af0fc36603ce16fa7dd6c93044816ef9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 28 Aug 2024 15:08:46 -0400 Subject: [PATCH 06/17] refactor(dired,vc-gutter): setup for tty frames A recent commit (c53f63b) allows me to simplify this a bit. Ref: c53f63b96edf Ref: #8001 --- modules/emacs/dired/config.el | 6 +++++- modules/ui/vc-gutter/config.el | 34 ++++++++++++++++++---------------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index bf833709f..ea2f76900 100644 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -107,7 +107,11 @@ Fixes #3939: unsortable dired entries on Windows." :before #'dirvish-data-for-dir (when (and setup (memq 'vc-state dirvish-attributes)) (set-window-fringes nil 5 1))) - (push 'vc-state dirvish-attributes)) + ;; The vc-gutter module uses `diff-hl-dired-mode' + `diff-hl-margin-mode' + ;; for diffs in dirvish buffers. `vc-state' uses overlays, so they won't be + ;; visible in the terminal. + (when (or (daemonp) (display-graphic-p)) + (push 'vc-state dirvish-attributes))) (when (modulep! +icons) (setq dirvish-subtree-always-show-state t) diff --git a/modules/ui/vc-gutter/config.el b/modules/ui/vc-gutter/config.el index dc1e053c9..4225dfa2d 100644 --- a/modules/ui/vc-gutter/config.el +++ b/modules/ui/vc-gutter/config.el @@ -74,6 +74,23 @@ Respects `diff-hl-disable-on-remote'." (file-remote-p default-directory)) (diff-hl-dired-mode +1)))) + ;; 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. + (if (not (daemonp)) + (unless (display-graphic-p) + (add-hook 'global-diff-hl-mode-hook #'diff-hl-margin-mode)) + (when (modulep! :os tty) + (put 'diff-hl-mode 'last t) + (add-hook! 'doom-switch-window-hook + (defun +vc-gutter-use-margins-in-tty-h () + (when (bound-and-true-p global-diff-hl-mode) + (let ((graphic? (display-graphic-p))) + (unless (eq (get 'diff-hl-mode 'last) graphic?) + (diff-hl-margin-mode (if graphic? -1 +1)) + (put 'diff-hl-mode 'last graphic?)))))))) + :config (set-popup-rule! "^\\*diff-hl" :select nil :size '+popup-shrink-to-fit) @@ -194,19 +211,4 @@ Respects `diff-hl-disable-on-remote'." :before #'kill-buffer (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* - ;; 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?))))))) + (+vc-gutter--kill-thread t))))) From cea17bbea336f4e48eeb9b6f554cd1810ed75b2b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 28 Aug 2024 19:32:24 -0400 Subject: [PATCH 07/17] refactor(org): remove redundant key remapping This is already remapped in the vertico module. Plus, `consult-org-heading` and `consult-org-agenda` are already on " ." and " /". Amend: 5e3c794d313a Ref: #7716 --- modules/lang/org/config.el | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 30971f1c3..65eb023cc 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -869,9 +869,6 @@ between the two." [remap doom/backward-to-bol-or-indent] #'org-beginning-of-line [remap doom/forward-to-last-non-comment-or-eol] #'org-end-of-line - (:when (modulep! :completion vertico) - [remap imenu] #'consult-imenu) - :localleader "#" #'org-update-statistics-cookies "'" #'org-edit-special From 4a4a9a1ada52c3f79c9fb1b79f5e74204821afd5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 28 Aug 2024 22:26:47 -0400 Subject: [PATCH 08/17] feat(corfu): add +corfu/toggle-auto-complete command --- modules/completion/corfu/autoload.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/completion/corfu/autoload.el b/modules/completion/corfu/autoload.el index d3c63d5d2..7f01018b2 100644 --- a/modules/completion/corfu/autoload.el +++ b/modules/completion/corfu/autoload.el @@ -46,4 +46,18 @@ (let ((cape-dabbrev-check-other-buffers nil)) (cape-dabbrev t))) +;;;###autoload +(defun +corfu/toggle-auto-complete (&optional interactive) + "Toggle as-you-type completion in Corfu." + (interactive (list 'interactive)) + (dolist (buf (buffer-list)) + (with-current-buffer buf + (when corfu-mode + (if corfu-auto + (remove-hook 'post-command-hook #'corfu--auto-post-command 'local) + (add-hook 'post-command-hook #'corfu--auto-post-command nil 'local))))) + (when interactive + (message "Corfu auto-complete %s" (if corfu-auto "disabled" "enabled"))) + (setq corfu-auto (not corfu-auto))) + ;;; end of autoload.el From 08f8f57e2f78bd832ad8ee961174cd15c38085cc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 28 Aug 2024 22:43:05 -0400 Subject: [PATCH 09/17] feat(corfu): vim-like C-n/C-p keybinds In vim/evil, C-n/C-p invokes dabbrev, so we're doing the same, but powered by cape-dabbrev, falling back to corfu-next/corfu-prev is a corfu popup is already open. Close: #7748 Co-authored-by: 45mg <45mg@users.noreply.github.com> Co-authored-by: LemonBreezes --- modules/completion/corfu/autoload.el | 28 ++++++++++++++++++++++++ modules/config/default/+evil-bindings.el | 2 ++ 2 files changed, 30 insertions(+) diff --git a/modules/completion/corfu/autoload.el b/modules/completion/corfu/autoload.el index 7f01018b2..00852e48c 100644 --- a/modules/completion/corfu/autoload.el +++ b/modules/completion/corfu/autoload.el @@ -60,4 +60,32 @@ (message "Corfu auto-complete %s" (if corfu-auto "disabled" "enabled"))) (setq corfu-auto (not corfu-auto))) +;;;###autoload +(defun +corfu/dabbrev-or-next (&optional arg) + "Trigger corfu popup and select the first candidate. + +Intended to mimic `evil-complete-next', unless the popup is already open." + (interactive "p") + (if corfu--candidates + (corfu-next arg) + (require 'cape) + (let ((cape-dabbrev-check-other-buffers (not evil-complete-all-buffers))) + (cape-dabbrev t) + (when (> corfu--total 0) + (corfu--goto (or arg 0)))))) + +;;;###autoload +(defun +corfu/dabbrev-or-last (&optional arg) + "Trigger corfu popup and select the first candidate. + +Intended to mimic `evil-complete-previous', unless the popup is already open." + (interactive "p") + (if corfu--candidates + (corfu-previous arg) + (require 'cape) + (let ((cape-dabbrev-check-other-buffers (not evil-complete-all-buffers))) + (cape-dabbrev t) + (when (> corfu--total 0) + (corfu--goto (- corfu--total (or arg 1))))))) + ;;; end of autoload.el diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 4e3fa545a..01a9e196d 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -192,6 +192,8 @@ (:after corfu (:map corfu-mode-map :i "C-SPC" #'completion-at-point + :i "C-n" #'+corfu/dabbrev-or-next + :i "C-p" #'+corfu/dabbrev-or-last :n "C-SPC" (cmd! (call-interactively #'evil-insert-state) (call-interactively #'completion-at-point)) :v "C-SPC" (cmd! (call-interactively #'evil-change) From 3c4921cc57cdf25c8de6a556a0df6f9bc170859b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 28 Aug 2024 23:04:21 -0400 Subject: [PATCH 10/17] fix(popup): only remap quit-window in popup buffers --- modules/ui/popup/+hacks.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index f2c35ab9b..05dd44983 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -38,18 +38,17 @@ grows larger." ;; Don't try to resize popup windows (advice-add #'balance-windows :around #'+popup-save-a) -(defun +popup/quit-window () +(defun +popup/quit-window (&optional arg) "The regular `quit-window' sometimes kills the popup buffer and switches to a buffer that shouldn't be in a popup. We prevent that by remapping `quit-window' to this commmand." - (interactive) + (interactive "P") (let ((orig-buffer (current-buffer))) - (quit-window) + (quit-window arg) (when (and (eq orig-buffer (current-buffer)) (+popup-buffer-p)) (+popup/close nil 'force)))) -(global-set-key [remap quit-window] #'+popup/quit-window) - +(define-key +popup-buffer-mode-map [remap quit-window] #'+popup/quit-window) ;; From 786dae5a5d95d7d9f137bd2f86eb71c856b7a5ba Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 29 Aug 2024 00:47:29 -0400 Subject: [PATCH 11/17] fix(lsp): don't warn about npm without +eglot This is only a concern for lsp-mode, which tries to auto-install servers if `lsp-enable-suggest-server-download` is non-nil (which it is, by default). Amend: #7346 --- modules/tools/lsp/doctor.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/tools/lsp/doctor.el b/modules/tools/lsp/doctor.el index a438973e5..60b3aa793 100644 --- a/modules/tools/lsp/doctor.el +++ b/modules/tools/lsp/doctor.el @@ -4,7 +4,6 @@ (modulep! +peek))) "+eglot and +peek flags are not compatible. Peek uses lsp-mode, while Eglot is another package altogether for LSP.") -(when (modulep! +eglot) +(unless (modulep! +eglot) (unless (executable-find "npm") - (warn! "Couldn't find npm, most server installers won't work and will have to be installed manually. -For more information, see https://emacs-lsp.github.io/lsp-mode/page/languages/."))) + (warn! "Couldn't find npm. `lsp-mode' needs npm to auto-install some LSP servers. For more information, see https://emacs-lsp.github.io/lsp-mode/page/languages/."))) From d6a2e24a3ec37bf9819460b3d9c3d21b85c63b84 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 29 Aug 2024 01:12:29 -0400 Subject: [PATCH 12/17] fix(dired,vc-gutter): don't inhibit diff-hl-dired-mode Dirvish uses the fringe for its vc-state diff, which isn't available in TTY Emacs, so we still need `diff-hl-dired-mode` there. Revert: a8ed6c9f7d83 Ref: #6760 --- 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 4225dfa2d..e3c061a55 100644 --- a/modules/ui/vc-gutter/config.el +++ b/modules/ui/vc-gutter/config.el @@ -69,8 +69,9 @@ (defun +vc-gutter-enable-maybe-h () "Conditionally enable `diff-hl-dired-mode' in dired buffers. Respects `diff-hl-disable-on-remote'." - (unless (and (bound-and-true-p dirvish-override-dired-mode) - (bound-and-true-p diff-hl-disable-on-remote) + ;; Neither `diff-hl-dired-mode' or `diff-hl-dired-mode-unless-remote' + ;; respect `diff-hl-disable-on-remote', so... + (unless (and (bound-and-true-p diff-hl-disable-on-remote) (file-remote-p default-directory)) (diff-hl-dired-mode +1)))) From 5311214f9097e1a8336e5b2a22d8a778cfa23053 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 29 Aug 2024 01:17:43 -0400 Subject: [PATCH 13/17] tweak(corfu): don't invert evil-complete-all-buffers And avoid void-variable errors for non-evil users (not that they're bound for them, but just in case). Ref: #7748 --- modules/completion/corfu/autoload.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/completion/corfu/autoload.el b/modules/completion/corfu/autoload.el index 00852e48c..e8a8aa73c 100644 --- a/modules/completion/corfu/autoload.el +++ b/modules/completion/corfu/autoload.el @@ -69,7 +69,8 @@ Intended to mimic `evil-complete-next', unless the popup is already open." (if corfu--candidates (corfu-next arg) (require 'cape) - (let ((cape-dabbrev-check-other-buffers (not evil-complete-all-buffers))) + (let ((cape-dabbrev-check-other-buffers + (bound-and-true-p evil-complete-all-buffers))) (cape-dabbrev t) (when (> corfu--total 0) (corfu--goto (or arg 0)))))) @@ -83,7 +84,8 @@ Intended to mimic `evil-complete-previous', unless the popup is already open." (if corfu--candidates (corfu-previous arg) (require 'cape) - (let ((cape-dabbrev-check-other-buffers (not evil-complete-all-buffers))) + (let ((cape-dabbrev-check-other-buffers + (bound-and-true-p evil-complete-all-buffers))) (cape-dabbrev t) (when (> corfu--total 0) (corfu--goto (- corfu--total (or arg 1))))))) From 1c16b84691adc9d8bff31a25eb28ae070f5913ce Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 29 Aug 2024 01:40:03 -0400 Subject: [PATCH 14/17] refactor: remove unneeded/magic in add-hook! calls --- modules/app/calendar/config.el | 2 +- modules/email/wanderlust/config.el | 2 +- modules/tools/lsp/+lsp.el | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/app/calendar/config.el b/modules/app/calendar/config.el index 75720240f..71e9e0232 100644 --- a/modules/app/calendar/config.el +++ b/modules/app/calendar/config.el @@ -27,7 +27,7 @@ (define-key cfw:calendar-mode-map "q" #'+calendar/quit) (when (modulep! :editor evil +everywhere) (set-evil-initial-state! '(cfw:calendar-mode cfw:details-mode) 'motion) - (add-hook! (cfw:calendar-mode cfw:details-mode) #'evil-normalize-keymaps) + (add-hook! '(cfw:calendar-mode-hook cfw:details-mode-hook) #'evil-normalize-keymaps) (map! (:map cfw:calendar-mode-map :m "q" #'+calendar/quit :m "SPC" #'cfw:show-details-command diff --git a/modules/email/wanderlust/config.el b/modules/email/wanderlust/config.el index 22350066e..436a7126f 100644 --- a/modules/email/wanderlust/config.el +++ b/modules/email/wanderlust/config.el @@ -108,7 +108,7 @@ ;; In addition, `wl-folder-mode' won't start in `evil-emacs-state' through ;; `evil-emacs-state-modes', and `wl-summary-mode' won't start in ;; `evil-emacs-state' through `wl-summary-mode-hook'. - (add-hook! 'wl-folder-mode-hook #'evil-emacs-state) + (add-hook 'wl-folder-mode-hook #'evil-emacs-state) (pushnew! evil-emacs-state-modes 'wl-summary-mode)) (add-hook 'mime-edit-mode-hook #'auto-fill-mode)) diff --git a/modules/tools/lsp/+lsp.el b/modules/tools/lsp/+lsp.el index e3f3988a2..ae8ef434a 100644 --- a/modules/tools/lsp/+lsp.el +++ b/modules/tools/lsp/+lsp.el @@ -97,7 +97,7 @@ Can be a list of backends; accepts any value `company-backends' accepts.") (setq-local flycheck-checker old-checker)) (apply fn args))) - (add-hook! 'lsp-mode-hook #'+lsp-optimization-mode) + (add-hook 'lsp-mode-hook #'+lsp-optimization-mode) (when (modulep! :completion company) (add-hook! 'lsp-completion-mode-hook From d1c2c8c35bc9143d3ffd073a3acde1b0e95300f3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 29 Aug 2024 02:46:21 -0400 Subject: [PATCH 15/17] fix(popup): don't disable hide-mode-line if enabled globally Ref: hlissner/emacs-hide-mode-line#11 --- modules/ui/popup/autoload/popup.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ui/popup/autoload/popup.el b/modules/ui/popup/autoload/popup.el index 3a8a9e61e..5bd44a299 100644 --- a/modules/ui/popup/autoload/popup.el +++ b/modules/ui/popup/autoload/popup.el @@ -297,7 +297,8 @@ Any non-nil value besides the above will be used as the raw value for (defun +popup-unset-modeline-on-disable-h () "Restore the modeline when `+popup-buffer-mode' is deactivated." (when (and (not (bound-and-true-p +popup-buffer-mode)) - (bound-and-true-p hide-mode-line-mode)) + (bound-and-true-p hide-mode-line-mode) + (not (bound-and-true-p global-hide-mode-line-mode))) (hide-mode-line-mode -1))) ;;;###autoload From c1b5f48f07e41604024bdcbe030ed0fc9abedcb7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 29 Aug 2024 02:47:21 -0400 Subject: [PATCH 16/17] bump: :core Fuco1/smartparens@ab475c78916d -> Fuco1/smartparens@c7519a1b69f1 bbatsov/projectile@0163b335a18a -> bbatsov/projectile@8cc2ee8937b8 emacs-compat/compat@09dce8a193c5 -> emacs-compat/compat@e9203e164903 emacs-straight/project@093f42a1b612 -> emacs-straight/project@5c77d7893636 hlissner/emacs-hide-mode-line@bc5d293576c5 -> hlissner/emacs-hide-mode-line@ddd154f1e04d jscheid/dtrt-indent@339755e4fb52 -> jscheid/dtrt-indent@a8aa35668480 rainstormstudio/nerd-icons.el@4322290303f2 -> rainstormstudio/nerd-icons.el@c3d641d8e14b --- lisp/packages.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/packages.el b/lisp/packages.el index 571c86984..402df59df 100644 --- a/lisp/packages.el +++ b/lisp/packages.el @@ -6,7 +6,7 @@ :pin "17cfa1b54800fdef2975c0c0531dad34846a5065") (package! compat :recipe (:host github :repo "emacs-compat/compat") - :pin "09dce8a193c5a70277512263782b82fa1cba84c0") + :pin "e9203e164903a6bb7de3e58aa0d653bbcff9d3d1") (package! gcmh :pin "0089f9c3a6d4e9a310d0791cf6fa8f35642ecfd9") @@ -21,22 +21,22 @@ :pin "88e574ae75344e39b436f863ef0344135c7b6517") ;; doom-ui.el -(package! nerd-icons :pin "4322290303f2e12efd5685a0d22d76ed76ec7349") -(package! hide-mode-line :pin "bc5d293576c5e08c29e694078b96a5ed85631942") +(package! nerd-icons :pin "c3d641d8e14bd11b5f98372da34ee5313636e363") +(package! hide-mode-line :pin "ddd154f1e04d666cd004bf8212ead8684429350d") (package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307") (package! rainbow-delimiters :pin "f40ece58df8b2f0fb6c8576b527755a552a5e763") (package! restart-emacs :pin "1607da2bc657fe05ae01f7fdf26f716eafead02c") ;; doom-editor.el (package! better-jumper :pin "47622213783ece37d5337dc28d33b530540fc319") -(package! dtrt-indent :pin "339755e4fb5245862737babf7f2c1e3bae1c129c") +(package! dtrt-indent :pin "a8aa356684804c52f26602d4e315f1306c6f3e59") (package! helpful :pin "4ba24cac9fb14d5fdc32582cd947572040e82b2c") -(package! smartparens :pin "ab475c78916d7b1666a495e3fe9c54b250195637") +(package! smartparens :pin "c7519a1b69f196050a13e2230b7532893b077086") (package! ws-butler :pin "e3a38d93e01014cd47bf5af4924459bd145fd7c4") ;; doom-projects.el -(package! projectile :pin "0163b335a18af0f077a474d4dc6b36e22b5e3274") -(package! project :pin "093f42a1b612eaae0d2bdd475663c14973fe0325") +(package! projectile :pin "8cc2ee8937b89f1639304cbd2526e85b17135372") +(package! project :pin "5c77d78936364e2e6e9641af2091fde0bee729ce") ;; doom-keybinds.el (package! general :pin "826bf2b97a0fb4a34c5eb96ec2b172d682fd548f") From 83fedf1fffcf8d1cceec59029f6531a57248c47d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 29 Aug 2024 06:46:16 -0400 Subject: [PATCH 17/17] fix: recursive load errors on lib/projects.el A change upstream was causing recursive load errors. I'm not too clear how it happens, as I can't reproduce it, but bbatsov/projectile@3c92d28c056c is the common thread (bumped in c1b5f48). Rather than revert the bump, I've just undone the hook and used a saner hook for the same task. It is a stopgap solution until I eventually replace projectile with project.el. Ref: bbatsov/projectile@3c92d28c056c Amend: c1b5f48f07e4 --- lisp/doom-projects.el | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lisp/doom-projects.el b/lisp/doom-projects.el index aa1d22987..51736a196 100644 --- a/lisp/doom-projects.el +++ b/lisp/doom-projects.el @@ -68,13 +68,6 @@ Is nil if no executable is found in your PATH during startup.") (global-set-key [remap find-tag] #'projectile-find-tag) :config - ;; HACK: Projectile cleans up the known projects list at startup. If this list - ;; contains tramp paths, the `file-remote-p' calls will pull in tramp via - ;; its `file-name-handler-alist' entry, which is expensive. Since Doom - ;; already cleans up the project list on kill-emacs-hook, it's simplest to - ;; inhibit this cleanup process at startup (see bbatsov/projectile#1649). - (letf! ((#'projectile--cleanup-known-projects #'ignore)) - (projectile-mode +1)) ;; HACK: Auto-discovery and cleanup on `projectile-mode' is slow and ;; premature. Let's try to defer it until it's needed. (add-transient-hook! 'projectile-relevant-known-projects @@ -246,7 +239,18 @@ when using many of projectile's command, e.g. `projectile-compile-command', This suppresses the error so these commands will still run, but prompt you for the command instead." :around #'projectile-default-generic-command - (ignore-errors (apply fn args)))) + (ignore-errors (apply fn args))) + + ;; HACK: Projectile cleans up the known projects list at startup. If this list + ;; contains tramp paths, the `file-remote-p' calls will pull in tramp via + ;; its `file-name-handler-alist' entry, which is expensive. Since Doom + ;; already cleans up the project list on kill-emacs-hook, it's simplest to + ;; inhibit this cleanup process at startup (see bbatsov/projectile#1649). + (letf! ((#'projectile--cleanup-known-projects #'ignore)) + (projectile-mode +1) + ;; HACK: See bbatsov/projectile@3c92d28c056c + (remove-hook 'buffer-list-update-hook #'projectile-track-known-projects-find-file-hook) + (add-hook 'doom-switch-buffer-hook #'projectile-track-known-projects-find-file-hook t))) ;;