From 2c28c7d219c82214c1a7b88ec906fed4ad60f0d9 Mon Sep 17 00:00:00 2001 From: Aaron Jensen Date: Wed, 26 Dec 2018 17:23:28 -0800 Subject: [PATCH] ivy: Fix counsel search This function was renamed upstream: https://github.com/abo-abo/swiper/commit/58bf1b94c8346491b906aa306f5ed734be67310c --- layers/+completion/ivy/funcs.el | 2 +- layers/+completion/ivy/packages.el | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/layers/+completion/ivy/funcs.el b/layers/+completion/ivy/funcs.el index a39134054ccd..30f21531a95e 100644 --- a/layers/+completion/ivy/funcs.el +++ b/layers/+completion/ivy/funcs.el @@ -79,7 +79,7 @@ (prog1 (pop split) (setq string (mapconcat #'identity split " -- ")))) "")) - (regex (counsel-unquote-regex-parens + (regex (counsel--elisp-to-pcre (setq ivy--old-re (ivy--regex string))))) (setq spacemacs--counsel-search-cmd (format base-cmd args regex)) diff --git a/layers/+completion/ivy/packages.el b/layers/+completion/ivy/packages.el index 65fb5baaffa5..13d6c71bb34f 100644 --- a/layers/+completion/ivy/packages.el +++ b/layers/+completion/ivy/packages.el @@ -119,6 +119,11 @@ "stP" 'spacemacs/search-project-pt-region-or-symbol)) :config (progn + ;; Temporarily handle older versions of ivy + ;; https://github.com/abo-abo/swiper/pull/1863/files + (unless (fboundp 'counsel--elisp-to-pcre) + (defalias 'counsel--elisp-to-pcre 'counsel-unquote-regex-parens)) + ;; set additional ivy actions (ivy-set-actions 'counsel-find-file