[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master c960de5 047/348: counsel.el (counsel-grep-or-swiper): Don'
From: |
Oleh Krehel |
Subject: |
[elpa] master c960de5 047/348: counsel.el (counsel-grep-or-swiper): Don't grep on compressed files |
Date: |
Sat, 8 Apr 2017 11:03:22 -0400 (EDT) |
branch: master
commit c960de51ce4e868daedb91e523ff6267a3113c3a
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-grep-or-swiper): Don't grep on compressed files
* counsel.el (counsel-compressed-file-regex): New defvar.
Fixes #536
---
counsel.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/counsel.el b/counsel.el
index d3b24b4..94cc98e 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1523,6 +1523,12 @@ the command."
:type 'integer
:group 'ivy)
+(defvar counsel-compressed-file-regex
+ (progn
+ (require 'jka-compr nil t)
+ (jka-compr-build-file-regexp))
+ "Store the regex for compressed file names.")
+
;;;###autoload
(defun counsel-grep-or-swiper ()
"Call `swiper' for small buffers and `counsel-grep' for large ones."
@@ -1531,6 +1537,9 @@ the command."
(not (buffer-narrowed-p))
(not (ignore-errors
(file-remote-p (buffer-file-name))))
+ (not (string-match
+ counsel-compressed-file-regex
+ (buffer-file-name)))
(> (buffer-size)
(if (eq major-mode 'org-mode)
(/ counsel-grep-swiper-limit 4)
- [elpa] master 12e35d0 037/348: counsel.el (counsel-bookmark): Add with-ivy-window, (continued)
- [elpa] master 12e35d0 037/348: counsel.el (counsel-bookmark): Add with-ivy-window, Oleh Krehel, 2017/04/08
- [elpa] master 85dc501 005/348: doc/Changelog.org: Add CUSTOM_ID to releases 0.6.0 and 0.7.0, Oleh Krehel, 2017/04/08
- [elpa] master 5826c86 035/348: ivy.el (ivy--reset-state): Add workaround for dired-do-copy, Oleh Krehel, 2017/04/08
- [elpa] master f57e2fb 039/348: ivy.el (ivy-immediate-done): Update docstring, Oleh Krehel, 2017/04/08
- [elpa] master 4f57a3a 041/348: Add forth-block-mode, Oleh Krehel, 2017/04/08
- [elpa] master db94a12 043/348: ivy.el (ivy-completion-in-region): Fix double insert bug, Oleh Krehel, 2017/04/08
- [elpa] master de91a77 042/348: swiper.el (swiper-occur): Add require, Oleh Krehel, 2017/04/08
- [elpa] master fabcdc0 004/348: doc/Changelog.org: Add custom ids and whitespace in the end, Oleh Krehel, 2017/04/08
- [elpa] master c30a6e2 046/348: ivy.el (ivy-minibuffer-map): Undo remap, Oleh Krehel, 2017/04/08
- [elpa] master 3e1a940 045/348: counsel.el: Fix byte compile warnings, Oleh Krehel, 2017/04/08
- [elpa] master c960de5 047/348: counsel.el (counsel-grep-or-swiper): Don't grep on compressed files,
Oleh Krehel <=
- [elpa] master 2776358 059/348: Show current value of the variable in the prompt, Oleh Krehel, 2017/04/08
- [elpa] master beee0b7 048/348: counsel.el (counsel-git): Add better error message, Oleh Krehel, 2017/04/08
- [elpa] master 65948fc 053/348: colir.el (colir-parse-color): Fix color parsing in terminal, Oleh Krehel, 2017/04/08
- [elpa] master e987cef 061/348: counsel.el (counsel-read-setq-expression): Fix Eldoc nag, Oleh Krehel, 2017/04/08
- [elpa] master 0091c8a 058/348: ivy.el (ivy-set-prompt-text-properties-function): New devar, Oleh Krehel, 2017/04/08
- [elpa] master 473c595 064/348: Facilitate the sorting of cons cell input to ivy-read, Oleh Krehel, 2017/04/08
- [elpa] master 23bd7a4 075/348: counsel.el (counsel-git): Add :caller, Oleh Krehel, 2017/04/08
- [elpa] master 74358c2 070/348: Purge all dependency on helm-rhythmbox, Oleh Krehel, 2017/04/08
- [elpa] master 56aa605 076/348: ivy.el (ivy-add-prompt-count): Refactor from ivy--reset-state, Oleh Krehel, 2017/04/08
- [elpa] master 9c01abf 003/348: doc/Changelog.org: Add hlines, Oleh Krehel, 2017/04/08