diff --git a/config-min.org b/config-min.org index 94353b5..4c1d274 100644 --- a/config-min.org +++ b/config-min.org @@ -502,10 +502,8 @@ '(display-buffer-in-side-window (side . left) (dedicated . t) - (select . t) (inhibit-same-window . t) - (window-parameters - (no-other-window . t)))) + (window-parameters (no-other-window . t)))) (global-set-key (kbd "C-x g") 'magit-status) (global-set-key (kbd "C-x M-g") 'magit-dispatch) @@ -545,6 +543,14 @@ (transient-append-suffix 'magit-worktree "c" '("C" "[async] branch and worktree" my/magit-worktree-branch)) + ;; This is fixed in 5478d4e of magit/transient (committed ) + ;; (require 'transient-bug) + ;; (with-eval-after-load 'vertico-multiform + ;; (add-to-list 'vertico-multiform-commands + ;; '(magit:--author flat (vertico-cycle . t))) + ;; (add-to-list 'vertico-multiform-commands + ;; '(magit:-- flat (vertico-cycle . t)))) + ;; Update all submodules (defun magit-submodule-update-recursive () (interactive) diff --git a/elpa b/elpa index 8630c7f..7524036 160000 --- a/elpa +++ b/elpa @@ -1 +1 @@ -Subproject commit 8630c7ffbcda65b62b36062577432815b4c7420f +Subproject commit 75240362e072965c8638aa382716b4eb00102c08 diff --git a/lisp/cmake-transient.el b/lisp/cmake-transient.el index adef927..a846b92 100644 --- a/lisp/cmake-transient.el +++ b/lisp/cmake-transient.el @@ -38,8 +38,9 @@ "Unix Makefiles") nil nil initial-input history))) -(add-to-list 'vertico-multiform-commands - '(cmake:-G flat (vertico-cycle . t))) +;; (with-eval-after-load 'vertico-multiform +;; (add-to-list 'vertico-multiform-commands +;; '(cmake:-G flat (vertico-cycle . t)))) (transient-define-argument cmake:-G () :description "Generator" diff --git a/lisp/transient-bug.el b/lisp/transient-bug.el new file mode 100644 index 0000000..30e5fd1 --- /dev/null +++ b/lisp/transient-bug.el @@ -0,0 +1,81 @@ +;;; transient-bug.el --- -*- lexical-binding: t -*- + +;; Copyright (C) 2024 Benson Chu + +;; Author: Benson Chu +;; Created: [2024-11-17 13:32] + +;; This file is not part of GNU Emacs + +;; This program is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;;; Code: +(require 'transient) + +(defun my/transient--show () + (transient--timer-cancel) + (setq transient--showp t) + (let ((transient--shadowed-buffer (current-buffer)) + (focus nil)) + (setq transient--buffer (get-buffer-create transient--buffer-name)) + (with-current-buffer transient--buffer + (when transient-enable-popup-navigation + (setq focus (or (button-get (point) 'command) + (and (not (bobp)) + (button-get (1- (point)) 'command)) + (transient--heading-at-point)))) + (erase-buffer) + (run-hooks 'transient-setup-buffer-hook) + (when transient-force-fixed-pitch + (transient--force-fixed-pitch)) + (setq window-size-fixed (if (window-full-height-p) 'width t)) + (when (bound-and-true-p tab-line-format) + (setq tab-line-format nil)) + (setq header-line-format nil) + (setq mode-line-format + (if (or (natnump transient-mode-line-format) + (eq transient-mode-line-format 'line)) + nil + transient-mode-line-format)) + (setq mode-line-buffer-identification + (symbol-name (oref transient--prefix command))) + (if transient-enable-popup-navigation + (setq-local cursor-in-non-selected-windows 'box) + (setq cursor-type nil)) + (setq display-line-numbers nil) + (setq show-trailing-whitespace nil) + (transient--insert-groups) + (when (or transient--helpp transient--editp) + (transient--insert-help)) + (when-let ((line (transient--separator-line))) + (insert line))) + (unless (window-live-p transient--window) + (setq transient--window + (display-buffer transient--buffer + transient-display-buffer-action))) + (when (window-live-p transient--window) + (with-selected-window transient--window + (goto-char (point-min)) + (when transient-enable-popup-navigation + (transient--goto-button focus)) + (transient--fit-window-to-buffer transient--window))))) + +(advice-add #'transient--show + :override + #'my/transient--show) + +(provide 'transient-bug) +;;; transient-bug.el ends here