[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 93616f7 296/399: ivy.el (ivy--regex): Match initial dot in
From: |
Oleh Krehel |
Subject: |
[elpa] master 93616f7 296/399: ivy.el (ivy--regex): Match initial dot in the input as a literal dot |
Date: |
Sat, 20 Jul 2019 14:57:43 -0400 (EDT) |
branch: master
commit 93616f75b0fcf4d21cc964a018fa2c2d1931f8c0
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy--regex): Match initial dot in the input as a literal dot
This brings much more usability, e.g. enter ".org" to switch between
Org-mode files, ".el" for Elisp etc.
* ivy-test.el (ivy--regex): Add test.
---
ivy-test.el | 5 ++++-
ivy.el | 4 +++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ivy-test.el b/ivy-test.el
index dbde2ec..1c11c1d 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -207,7 +207,10 @@ will bring the behavior in line with the newer Emacsen."
"\\(\\(?:interactive\\|swiper\\)\\).*?\\(\\(?:list\\|symbol\\)\\)"))
(should (equal (ivy--regex
"foo[")
- "foo\\[")))
+ "foo\\["))
+ (should (equal (ivy--regex
+ ".org")
+ "\\.org")))
(ert-deftest ivy--split-negation ()
(should (equal (ivy--split-negation "") ()))
diff --git a/ivy.el b/ivy.el
index 2825a9d..5b13dc3 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2535,7 +2535,9 @@ When GREEDY is non-nil, join words in a greedy way."
(if (= (length subs) 1)
(cons
(setq ivy--subexps 0)
- (car subs))
+ (if (string-match-p "\\`\\.[^.]" (car subs))
+ (concat "\\." (substring (car subs) 1))
+ (car subs)))
(cons
(setq ivy--subexps (length subs))
(mapconcat
- [elpa] master b528f0f 299/399: ivy-overlay.el (ivy-display-function-overlay): Fix org-indent-mode once more, (continued)
- [elpa] master b528f0f 299/399: ivy-overlay.el (ivy-display-function-overlay): Fix org-indent-mode once more, Oleh Krehel, 2019/07/20
- [elpa] master ef1e8d5 294/399: ivy.el (ivy-read): Don't use ivy-display-function, Oleh Krehel, 2019/07/20
- [elpa] master 57a57d1 302/399: swiper.el (swiper--multi-candidates): Simplify, Oleh Krehel, 2019/07/20
- [elpa] master 44b2d7d 300/399: ivy.el (ivy-insert-current-full): Add and bind to "C-M-y", Oleh Krehel, 2019/07/20
- [elpa] master d39f82b 307/399: counsel-yank-pop-height is obselete and doesn't do anything, Oleh Krehel, 2019/07/20
- [elpa] master c11797a 290/399: swiper.el (swiper--line-at-point): Fix swiper-isearch in compilation buffers, Oleh Krehel, 2019/07/20
- [elpa] master 94f107b 304/399: counsel.el (counsel-mark-ring): Add highlight by candidate, Oleh Krehel, 2019/07/20
- [elpa] master 034f3af 306/399: swiper.el (swiper-isearch): Allow char-fold-to-regexp, Oleh Krehel, 2019/07/20
- [elpa] master 5cc1e5c 298/399: swiper.el (swiper-isearch-thing-at-point): Improve, Oleh Krehel, 2019/07/20
- [elpa] master 3b6c898 303/399: counsel.el (counsel-mark-ring): Add preview by candidate, Oleh Krehel, 2019/07/20
- [elpa] master 93616f7 296/399: ivy.el (ivy--regex): Match initial dot in the input as a literal dot,
Oleh Krehel <=
- [elpa] master ac1e07c 305/399: ivy.el (ivy--reset-state): Modify prompt for multi-isearch-buffers, Oleh Krehel, 2019/07/20
- [elpa] master 4078eb9 308/399: counsel.el (counsel-yank-pop-height): Remove, Oleh Krehel, 2019/07/20
- [elpa] master 895906e 309/399: counsel.el (counsel-descbinds-function): Add, Oleh Krehel, 2019/07/20
- [elpa] master 4a37e1e 314/399: swiper.el (swiper-query-replace): Make eval-style replacement more accessible, Oleh Krehel, 2019/07/20
- [elpa] master dd2d495 312/399: swiper.el (swiper-all-thing-at-point): Add, Oleh Krehel, 2019/07/20
- [elpa] master 0576b61 315/399: .github/FUNDING.yml: Add, Oleh Krehel, 2019/07/20
- [elpa] master d060eea 313/399: swiper.el (swiper-query-replace): Add query-replace-compile-replacement, Oleh Krehel, 2019/07/20
- [elpa] master 09b9508 321/399: ivy.el (ivy--find-file-action): Fix for virtual buffers, Oleh Krehel, 2019/07/20
- [elpa] master 7d46450 311/399: Add more information about the collection argument in `ivy-read`., Oleh Krehel, 2019/07/20
- [elpa] master 676a8ee 318/399: swiper.el (swiper-isearch-current-match): Remove unused face, Oleh Krehel, 2019/07/20