[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 4ba0944 064/395: counsel.el (counsel-set-vari
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 4ba0944 064/395: counsel.el (counsel-set-variable): Save expr to the kill ring |
Date: |
Thu, 25 Feb 2021 08:31:32 -0500 (EST) |
branch: externals/ivy-hydra
commit 4ba0944bec05c22d695fd5b89527160603649d62
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
counsel.el (counsel-set-variable): Save expr to the kill ring
---
counsel.el | 10 +++++++---
targets/plain.el | 1 +
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/counsel.el b/counsel.el
index 7547aba..c5cbc9b 100644
--- a/counsel.el
+++ b/counsel.el
@@ -627,13 +627,14 @@ to `ivy-highlight-face'."
(insert (format "%S " sym)))
(read-from-minibuffer "Eval: "
(format
- (if (and sym-value (consp sym-value))
+ (if (and sym-value (or (consp
sym-value)
+ (symbolp
sym-value)))
"(setq '%S)"
"(setq %S)")
sym-value)
read-expression-map t
'read-expression-history))))
- (eval-expression expr)))
+ expr))
(defun counsel--setq-doconst (x)
"Return a cons of description and value for X.
@@ -710,12 +711,15 @@ With a prefix arg, restrict list to variables defined
using
(if (assoc res cands)
(cdr (assoc res cands))
(read res)))
+ (kill-new (format "(setq %S %S)" sym res))
(set sym (if (and (listp res) (eq (car res) 'quote))
(cadr res)
res))))
(unless (boundp sym)
(set sym nil))
- (counsel-read-setq-expression sym)))
+ (let ((expr (counsel-read-setq-expression sym)))
+ (kill-new (prin1-char expr))
+ (eval-expression expr))))
(when doc
(lv-delete-window)))))
diff --git a/targets/plain.el b/targets/plain.el
index 140db3e..7b3a27b 100644
--- a/targets/plain.el
+++ b/targets/plain.el
@@ -6,4 +6,5 @@
(global-set-key (kbd "C-s") 'swiper)
(global-set-key (kbd "C-c j") 'counsel-git-grep)
(global-set-key (kbd "C-c k") 'counsel-rg)
+(global-set-key (kbd "<f2> j") 'counsel-set-variable)
(global-set-key (kbd "C-c s") 'isearch-forward-regexp)
- [elpa] externals/ivy-hydra 06886f1 055/395: ivy.el (ivy--tramp-prefix-p): Extract, (continued)
- [elpa] externals/ivy-hydra 06886f1 055/395: ivy.el (ivy--tramp-prefix-p): Extract, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d2052ba 017/395: counsel.el (counsel--company-display-transformer): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1020a77 026/395: swiper.el (swiper-query-replace): Show matched groups in preview, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra c0b61ea 028/395: swiper.el (swiper--query-replace-setup): Highlight at eobp, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 412266f 038/395: swiper.el (swiper--line-at-point): Don't error on empty string, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e598b04 042/395: ivy.el (ivy--regex): Improve handling of capture groups, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f42723e 046/395: ivy.el (ivy-done): Let it go through the rest of conditions if confirmation is not required., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 6abc3de 050/395: .travis.yml: Use 2 xenial recipes, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ecb098d 049/395: counsel.el (counsel-imenu): Add counsel-imenu-history., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 657e6b4 062/395: ivy-test.el (ivy-inhibit-action): Better behavior with an alist collection, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 4ba0944 064/395: counsel.el (counsel-set-variable): Save expr to the kill ring,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra 40978ec 063/395: counsel.el (counsel-ag-base-command): Set default to --vimgrep, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e7146dc 066/395: counsel.el (counsel--compilation-errors-buffer): Simplify, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 148f84e 074/395: counsel.el (counsel-git): Work with utf-8 characters, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra bfefd69 075/395: counsel.el (counsel-git-occur): Fixup, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra b4d9286 080/395: ivy-test.el (ivy-read-sort-def): Add test, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 41bd988 082/395: ivy.el (ivy-alt-done): In an empty directory with no input return this directory, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 0f57db8 079/395: ivy.el (ivy--reset-state): Ensure default values are prepended, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f8eb450 077/395: counsel.el (counsel-register): Fix for file registers in Emacs 27, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7d94e67 087/395: Use the current prompt for shell history initial input, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ce70661 095/395: counsel.el (counsel-grep-function): Simplfy and extend, Basil L. Contovounesios, 2021/02/25