emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master f7fc3ad 11/57: Work around grep-read-files


From: Oleh Krehel
Subject: [elpa] master f7fc3ad 11/57: Work around grep-read-files
Date: Tue, 19 May 2015 14:21:23 +0000

branch: master
commit f7fc3ad48bebd70bcac121de57c5ea1e01a7644a
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Work around grep-read-files
    
    * ivy.el (ivy--done): If history is `grep-files-history', the caller is
      `grep-read-files'. Don't expand the file name, since it's probably a
      glob, and `find' doesn't work with expanded globs.
    
    It should now be possible to simply "M-x" rgrep "RET" "RET" "RET".
    
    Fixes #72
---
 ivy.el |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ivy.el b/ivy.el
index 0f3a56d..0bf8f04 100644
--- a/ivy.el
+++ b/ivy.el
@@ -187,11 +187,11 @@ When non-nil, it should contain one %d.")
 
 (defun ivy--done (text)
   "Insert TEXT and exit minibuffer."
-  (insert
-   (if ivy--directory
-       (expand-file-name
-        text ivy--directory)
-     text))
+  (if (and ivy--directory
+           (not (eq (ivy-state-history ivy-last) 'grep-files-history)))
+      (insert (expand-file-name
+                 text ivy--directory))
+    (insert text))
   (setq ivy-exit 'done)
   (exit-minibuffer))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]