[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master dc4a858 060/348: counsel.el (counsel-hydra-heads): New com
From: |
Oleh Krehel |
Subject: |
[elpa] master dc4a858 060/348: counsel.el (counsel-hydra-heads): New command |
Date: |
Sat, 8 Apr 2017 11:03:24 -0400 (EDT) |
branch: master
commit dc4a8582d8d81c49a5e6749a8ff7804ec726dfb7
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-hydra-heads): New command
Re #548
---
counsel.el | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/counsel.el b/counsel.el
index c4a3174..171cd54 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2065,6 +2065,27 @@ And insert it into the minibuffer. Useful during
(require 'comint)
(counsel--browse-history comint-input-ring))
+;;** `counsel-hydra-heads'
+(defun counsel-hydra-heads ()
+ "Call a head of the current/last hydra."
+ (interactive)
+ (let* ((base (substring
+ (prin1-to-string hydra-curr-body-fn)
+ 0 -4))
+ (heads (eval (intern (concat base "heads"))))
+ (keymap (eval (intern (concat base "keymap"))))
+ (head-names
+ (mapcar (lambda (x)
+ (cons
+ (if (nth 2 x)
+ (format "[%s] %S (%s)" (nth 0 x) (nth 1 x) (nth 2 x))
+ (format "[%s] %S" (nth 0 x) (nth 1 x)))
+ (lookup-key keymap (kbd (nth 0 x)))))
+ heads)))
+ (ivy-read "head: " head-names
+ :action #'call-interactively)
+ (hydra-keyboard-quit)))
+
;;* Misc OS
;;** `counsel-rhythmbox'
(defvar helm-rhythmbox-library)
- [elpa] master 37a9629 018/348: ivy.el (ivy--reset-state): Fix ivy-resume for files, (continued)
- [elpa] master 37a9629 018/348: ivy.el (ivy--reset-state): Fix ivy-resume for files, Oleh Krehel, 2017/04/08
- [elpa] master c4775b6 031/348: ivy.el (ivy-action-wrap): New defcustom, Oleh Krehel, 2017/04/08
- [elpa] master ac1dc5b 034/348: counsel.el (counsel-company): New command, Oleh Krehel, 2017/04/08
- [elpa] master cba67e4 038/348: counsel.el (counsel-bookmark): Add require, Oleh Krehel, 2017/04/08
- [elpa] master 3d48093 027/348: counsel.el (counsel--gg-sentinel): Add a work around, Oleh Krehel, 2017/04/08
- [elpa] master ddb4681 025/348: counsel.el (counsel-git-grep-cmd-default): New defvar, Oleh Krehel, 2017/04/08
- [elpa] master cf38ceb 040/348: swiper.el (swiper-font-lock-exclude): Add forth-mode, Oleh Krehel, 2017/04/08
- [elpa] master ab55e03 055/348: counsel.el (counsel-set-variable): Add :preselect, Oleh Krehel, 2017/04/08
- [elpa] master f4ec789 056/348: counsel.el (counsel-set-variable): Fix 2nd preselect, Oleh Krehel, 2017/04/08
- [elpa] master 792b7b7 051/348: counsel.el (counsel-set-variable): New command, Oleh Krehel, 2017/04/08
- [elpa] master dc4a858 060/348: counsel.el (counsel-hydra-heads): New command,
Oleh Krehel <=
- [elpa] master cd8a570 062/348: Escape `%` chars if present in the symbol value, Oleh Krehel, 2017/04/08
- [elpa] master 97cf30d 063/348: Add multiple-cursors support to ivy-completion-in-region-action, Oleh Krehel, 2017/04/08
- [elpa] master 8c7a7fc 028/348: When reading file names, check preselect and initial-input compat, Oleh Krehel, 2017/04/08
- [elpa] master 5d0fec1 032/348: ivy.el: Fix some checkdoc warnings, Oleh Krehel, 2017/04/08
- [elpa] master 2e1cebc 036/348: counsel.el (counsel-bookmark): Add, Oleh Krehel, 2017/04/08
- [elpa] master a566403 044/348: ivy.el (ivy-read): Document all args, Oleh Krehel, 2017/04/08
- [elpa] master baf89c0 054/348: ivy-test.el (colir-color-parse): Add test, Oleh Krehel, 2017/04/08
- [elpa] master be24b57 049/348: Revert "ivy.el (ivy-completion-in-region): Fix double insert bug", Oleh Krehel, 2017/04/08
- [elpa] master 77fb030 052/348: ivy.el (ivy-completion-in-region): Fix common length longer than str, Oleh Krehel, 2017/04/08
- [elpa] master 7280e19 050/348: ivy.el (ivy-completion-common-length): Fix double insert bug, Oleh Krehel, 2017/04/08