From 713ff50d07c6389bf26760f0d3e8b7aade1e798c Mon Sep 17 00:00:00 2001 From: MitchMarq42 Date: Fri, 22 Jul 2022 16:24:12 -0800 Subject: [PATCH] Embark actually works (gnome key binding issue) --- lisp/mitch-packages.el | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lisp/mitch-packages.el b/lisp/mitch-packages.el index 9c60708..42c3e8a 100644 --- a/lisp/mitch-packages.el +++ b/lisp/mitch-packages.el @@ -191,25 +191,29 @@ be built with `xwidget' support." ;; weird multi-path thing (use-package embark + :general + (general-define-key + :keymap minibuffer-mode-map + "C-." 'embark-act + "C-;" 'embark-dwim) :init - ;; which-key integration. Verbose and long and maybe broken. - ;; taken from https://github.com/oantolin/embark/wiki/Additional-Configuration (defun embark-which-key-indicator () "An embark indicator that displays keymaps using which-key. The which-key help message will show the type and value of the current target followed by an ellipsis if there are further targets." - (lambda (&optional keymap targets prefix) (if (null keymap) - (which-key--hide-popup-ignore-command) + (lambda (&optional keymap targets prefix) + (if (null keymap) (which-key--hide-popup-ignore-command) (which-key--show-keymap - (if (eq (plist-get (car targets) :type) 'embark-become) "Become" + (if (eq (plist-get (car targets) :type) 'embark-become) + "Become" (format "Act on %s '%s'%s" (plist-get (car targets) :type) (embark--truncate-target (plist-get (car targets) :target)) (if (cdr targets) "…" ""))) (if prefix (pcase (lookup-key keymap prefix 'accept-default) ((and (pred keymapp) km) km) - (_ (key-binding prefix 'accept-default))) keymap) nil nil t - (lambda (binding) + (_ (key-binding prefix 'accept-default))) keymap) + nil nil t (lambda (binding) (not (string-suffix-p "-argument" (cdr binding)))))))) (setq embark-indicators '(embark-which-key-indicator