[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 3bd1d87 182/184: counsel.el (counsel-locate-cmd-es): Encod
From: |
Oleh Krehel |
Subject: |
[elpa] master 3bd1d87 182/184: counsel.el (counsel-locate-cmd-es): Encode command to local codepage |
Date: |
Wed, 16 Oct 2019 13:15:18 -0400 (EDT) |
branch: master
commit 3bd1d87341dc8a3465cea6acbaff271fd7b9d396
Author: Zhu Zihao <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-locate-cmd-es): Encode command to local codepage
Fixes #2278
---
counsel.el | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/counsel.el b/counsel.el
index 59d411a..109a215 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2446,12 +2446,22 @@ string - the full shell command to run."
(counsel-require-program "mdfind")
(format "mdfind -name '%s'" input))
+(defvar w32-ansi-code-page)
+
(defun counsel-locate-cmd-es (input)
"Return a shell command based on INPUT."
(counsel-require-program "es.exe")
- (format "es.exe -i -r -p %s"
- (counsel--elisp-to-pcre
- (ivy--regex input t))))
+ (let ((raw-string (format "es.exe -i -r -p %s"
+ (counsel--elisp-to-pcre
+ (ivy--regex input t)))))
+ ;; W32 don't use Unicode by default, so we encode search command
+ ;; to local codepage to support searching filename contains non-ASCII
+ ;; characters.
+ (if (and (eq system-type 'windows-nt)
+ (boundp 'w32-ansi-code-page))
+ (encode-coding-string raw-string
+ (intern (format "cp%d" w32-ansi-code-page)))
+ raw-string)))
(defun counsel-locate-function (input)
"Call the \"locate\" shell command with INPUT."
- [elpa] master 9e1b9a0 131/184: counsel.el (counsel-google-function): Add missing require, (continued)
- [elpa] master 9e1b9a0 131/184: counsel.el (counsel-google-function): Add missing require, Oleh Krehel, 2019/10/16
- [elpa] master 5ff8b5e 133/184: ivy.el (ivy-completion-in-region-action): Use declare-function., Oleh Krehel, 2019/10/16
- [elpa] master 78dd554 134/184: ivy.el (ivy--exhibit): Handle ivy--reset-state initial call, Oleh Krehel, 2019/10/16
- [elpa] master c1ea2af 145/184: ivy.el (ivy-read): Fix conflict an existing read-key session, Oleh Krehel, 2019/10/16
- [elpa] master 589e03f 144/184: ivy.el (ivy-configure): Use for ivy-index-functions-alist, Oleh Krehel, 2019/10/16
- [elpa] master 64c0804 163/184: ivy.el (ivy-partial-or-done): Work with completion-cycle-threshold, Oleh Krehel, 2019/10/16
- [elpa] master 6f23c5e 152/184: ivy.el (ivy-occur-press): Re-use ivy-highlight-grep-commands, Oleh Krehel, 2019/10/16
- [elpa] master f46cdad 154/184: counsel.el (counsel-grep): Add :require-match, Oleh Krehel, 2019/10/16
- [elpa] master 2d840b8 157/184: ivy.el (ivy-configure): Add :sort-fn, Oleh Krehel, 2019/10/16
- [elpa] master f0451db 173/184: ivy.el (ivy-occur-revert-buffer): Don't error if the swiper buffer was killed, Oleh Krehel, 2019/10/16
- [elpa] master 3bd1d87 182/184: counsel.el (counsel-locate-cmd-es): Encode command to local codepage,
Oleh Krehel <=
- [elpa] master 8b4693c 169/184: counsel.el (counsel-imenu-action and -get-canditates-from): Revert., Oleh Krehel, 2019/10/16
- [elpa] master 882d6c4 161/184: counsel.el (counsel-imenu): Work with :update-fn 'auto, Oleh Krehel, 2019/10/16
- [elpa] master 1a9002b 168/184: ivy.el: Clean up obsolete aliases, Oleh Krehel, 2019/10/16
- [elpa] master c2d3a4c 184/184: Merge commit 'cd634c6f51458f81898ecf2821ac3169cb65a1eb' from ivy, Oleh Krehel, 2019/10/16
- [elpa] master 12f4771 124/184: ivy.el (ivy-completion-in-region): Add workaround for package-menu-filter, Oleh Krehel, 2019/10/16
- [elpa] master 2b974b4 139/184: ivy.el (ivy-update-fns-alist): New defcustom, Oleh Krehel, 2019/10/16
- [elpa] master 57e0b94 146/184: swiper.el (swiper--action): Set case-fold-search, Oleh Krehel, 2019/10/16
- [elpa] master cdca2fc 141/184: counsel.el (counsel-switch-buffer): Re-use ivy-switch-buffer, Oleh Krehel, 2019/10/16
- [elpa] master a5701a9 159/184: ivy.el (ivy-configure): Add :format-fn, Oleh Krehel, 2019/10/16
- [elpa] master 4d533b2 178/184: counsel.el (counsel-dired): Filter to directories only, Oleh Krehel, 2019/10/16