[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra c5517fc 228/395: ivy.el: Trim grep line numbe
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra c5517fc 228/395: ivy.el: Trim grep line numbers for "M-o w" and "M-o i" |
Date: |
Thu, 25 Feb 2021 08:32:08 -0500 (EST) |
branch: externals/ivy-hydra
commit c5517fc3592bcd89e9e1dd3fa203a4e3418640df
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
ivy.el: Trim grep line numbers for "M-o w" and "M-o i"
Fixes #1472
---
ivy.el | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/ivy.el b/ivy.el
index 1ad379b..3c844cc 100644
--- a/ivy.el
+++ b/ivy.el
@@ -4532,8 +4532,25 @@ Otherwise, forward to `ivy-kill-line'."
(ivy-set-actions
t
- `(("i" ,(lambda (x) (insert (if (stringp x) x (car x)))) "insert")
- ("w" ,(lambda (x) (kill-new (if (stringp x) x (car x)))) "copy")))
+ '(("i" ivy--action-insert "insert")
+ ("w" ivy--action-copy "copy")))
+
+(defun ivy--trim-grep-line-number (x)
+ (if (string-match ":[0-9]+:" x)
+ (substring x (match-end 0))
+ x))
+
+(defun ivy--action-insert (x)
+ (insert
+ (if (stringp x)
+ (ivy--trim-grep-line-number x)
+ x (car x))))
+
+(defun ivy--action-copy (x)
+ (kill-new
+ (if (stringp x)
+ (ivy--trim-grep-line-number x)
+ (car x))))
(defun ivy--switch-buffer-matcher (regexp candidates)
"Return REGEXP matching CANDIDATES.
- [elpa] externals/ivy-hydra c782b48 161/395: ivy.el (ivy-read-action-by-key): Fix for Emacs27, (continued)
- [elpa] externals/ivy-hydra c782b48 161/395: ivy.el (ivy-read-action-by-key): Fix for Emacs27, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1933f6d 178/395: ivy.el (ivy-resume): Don't re-calculate for :dynamic-collection, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 5f1d9ce 179/395: counsel.el (counsel--grep-smart-case-flag): Extract, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 73c9773 180/395: Fix ripgrep pcre2 feature detection, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 640b83d 182/395: counsel.el (counsel-rg-base-command): Fix missing space, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d5225a1 187/395: swiper.el (swiper--isearch-unwind): Extract, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 93be68a 183/395: swiper.el (swiper-isearch-format-function): Fix for ivy-resume, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 25b6321 208/395: Fix recent counsel-recentf-candidates thinko, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 47ec37b 203/395: ivy.el: Fix some string predicates, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1883499 217/395: ivy.el (ivy-auto-shrink-minibuffer-alist): Extend from ivy-auto-shrink-minibuffer, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra c5517fc 228/395: ivy.el: Trim grep line numbers for "M-o w" and "M-o i",
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra f2852fc 207/395: Clean up compatibility code, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1d25cdd 209/395: Revert ".dir-locals.el: Simplify outline-regexp", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra dc60eac 201/395: ivy.el (ivy-read-action-by-key): Fix keys to quit action selection, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 251c219 193/395: Enable setting the display function with ivy-configure, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ee2a537 204/395: * counsel.el (counsel-mark--get-evil-candidates): Fix typo, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra eeb14b1 213/395: ivy-test.el (ivy-read-history): Add a test, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1bf5b98 234/395: ivy.el: Fix next-error randomly jumping to previous match, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra bd9945b 243/395: Fix recent regression in ivy--preselect-index, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 0ecc41c 240/395: * ivy.el (ivy-occur-next-error): Use dolist., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ec16352 253/395: ivy.el (ivy-resume): Check that :action is not identity, Basil L. Contovounesios, 2021/02/25