[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/popper 2650056e0e 075/102: Dispatch action control with
From: |
ELPA Syncer |
Subject: |
[elpa] externals/popper 2650056e0e 075/102: Dispatch action control with popper-echo |
Date: |
Fri, 8 Sep 2023 15:58:55 -0400 (EDT) |
branch: externals/popper
commit 2650056e0e980a04c984b8d93abf20d35d13edcc
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Dispatch action control with popper-echo
---
popper-echo.el | 70 ++++++++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 56 insertions(+), 14 deletions(-)
diff --git a/popper-echo.el b/popper-echo.el
index 7d0a2be581..873bf8ff3f 100644
--- a/popper-echo.el
+++ b/popper-echo.el
@@ -73,9 +73,25 @@ This has no effect when popper-echo-mode is turned off."
:type 'boolean
:group 'popper)
-(defcustom popper-echo-dispatch-keys '("M-1" "M-2" "M-3" "M-4" "M-5")
+(defcustom popper-echo-dispatch-actions nil
+ "Controls whether `popper-echo' dispatch actions are bound.
+
+When true, you can
+- Kill popup buffers with k
+- Raise popup buffers with ^
+
+when using the dispatch menu by prefixing the dispatch keys with them.
+
+NOTE: This feature is experimental."
+ :type 'boolean
+ :group 'popper)
+
+(defcustom popper-echo-dispatch-keys '("M-0" "M-1" "M-2" "M-3" "M-4"
+ "M-5" "M-6" "M-7" "M-8" "M-9")
"List of keys used for dispatching to popup buffers.
+The first element is bound to the currently open popup.
+
Each entry in the list can be a character or a string suitable
for the kbd macro. These keys are available when using
popper-echo-mode.
@@ -120,9 +136,9 @@ off."
(symbol-name grp-symb)
grp-symb))
(open-popup (buffer-name))
- (dispatch-keys-extended (append popper-echo-dispatch-keys
+ (dispatch-keys-extended (append (cdr popper-echo-dispatch-keys)
(make-list (max 0 (- (length
buried-popups)
- (length
popper-echo-dispatch-keys)))
+ (1- (length
popper-echo-dispatch-keys))))
nil)))
(popup-strings
(cl-reduce #'concat
@@ -166,16 +182,28 @@ off."
(make-vector 1 keybind))
((stringp keybind)
(kbd keybind)))
- (popper-echo--dispatch-toggle i buried-popups))
-
- (define-key map
- (kbd
- (concat "k " (cond
- ((characterp keybind)
- (char-to-string keybind))
- ((stringp keybind)
- keybind))))
- (popper-echo--dispatch-kill i buried-popups))
+ (popper-echo--dispatch-toggle i (cons open-popup
+
buried-popups)))
+ (when popper-echo-dispatch-actions
+ (define-key map
+ (kbd
+ (concat "k " (cond
+ ((characterp keybind)
+ (char-to-string keybind))
+ ((stringp keybind)
+ keybind))))
+ (popper-echo--dispatch-kill i (cons open-popup
+
buried-popups)))
+
+ (define-key map
+ (kbd
+ (concat "^ " (cond
+ ((characterp keybind)
+ (char-to-string keybind))
+ ((stringp keybind)
+ keybind))))
+ (popper-echo--dispatch-raise i (cons open-popup
+
buried-popups))))
(setq i (1+ i)))))))
@@ -200,7 +228,21 @@ quickly."
(kill-buffer buf)
(popper--delete-popup win))
(popper--update-popups)
- (when popper-echo-dispatch-persist (popper-echo))))
+ (when (and popper-echo-dispatch-persist
+ popper-open-popup-alist)
+ (popper-echo))))
+
+(defun popper-echo--dispatch-raise (i buf-list)
+ "Return a function to Kill buffer I in list BUF-LIST."
+ (lambda ()
+ (interactive)
+ (let* ((buf (nth i buf-list))
+ (win (get-buffer-window buf)))
+ (popper-toggle-type buf))
+ (popper--update-popups)
+ (when (and popper-echo-dispatch-persist
+ popper-open-popup-alist)
+ (popper-echo))))
;;;###autoload
(define-minor-mode popper-echo-mode
- [elpa] externals/popper 096078acea 040/102: Add `perspective`-based grouping function (#5), (continued)
- [elpa] externals/popper 096078acea 040/102: Add `perspective`-based grouping function (#5), ELPA Syncer, 2023/09/08
- [elpa] externals/popper 0e16eb9b86 050/102: Tweaks to readme, major-mode identification code, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 0127de7161 052/102: Updated Readme for readability + handle project-current when nil, ELPA Syncer, 2023/09/08
- [elpa] externals/popper a29c603acd 055/102: Merge branch 'feature' of github.com:karthink/popper into feature, ELPA Syncer, 2023/09/08
- [elpa] externals/popper b9673ae612 059/102: Fix popper-window-height usage, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 9b1cff1b57 061/102: Popups are updated correctly now, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 032e75bf08 063/102: Added feature to show popups in echo area when cycling., ELPA Syncer, 2023/09/08
- [elpa] externals/popper 8d2b664465 067/102: Popper-echo will use up to 2 minibuffer lines by default, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 9e368e1d20 072/102: Clarify: Does not support popups in new frames, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 6a2ddcb354 073/102: Added tip to match shell buffers, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 2650056e0e 075/102: Dispatch action control with popper-echo,
ELPA Syncer <=
- [elpa] externals/popper a50edecacf 080/102: Fix popper-mode-line for simple-modeline, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 3212241316 083/102: Fix #29: Error while modifying mode line. (#30), ELPA Syncer, 2023/09/08
- [elpa] externals/popper 50568b8af2 090/102: popper.el: Fix child-frame resetting popups, ELPA Syncer, 2023/09/08
- [elpa] externals/popper cc48e01219 091/102: Sort open popups by display time., ELPA Syncer, 2023/09/08
- [elpa] externals/popper f0038228eb 093/102: Silence compiler warnings on Emacs 29 (#44), ELPA Syncer, 2023/09/08
- [elpa] externals/popper 44752c5121 020/102: Better test for removing from display-buffer-alist, ELPA Syncer, 2023/09/08
- [elpa] externals/popper a507d3d441 022/102: Minor changes, increase version, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 71d77ae775 029/102: Typos in README, ELPA Syncer, 2023/09/08
- [elpa] externals/popper 6ef0a670e5 032/102: Update README with more info, ELPA Syncer, 2023/09/08
- [elpa] externals/popper a85a343c99 027/102: Merge branch 'popup-groups', ELPA Syncer, 2023/09/08