Browse files

fix permissions

  • Loading branch information...
1 parent 1a913b7 commit 55da972856821948f3d51fff0a21659904e6e813 Le Wang committed Dec 2, 2011
Showing with 7 additions and 4 deletions.
  1. 0 README.org
  2. +7 −4 xargs-grep.el
View
0 README.org 100755 → 100644
File mode changed.
View
11 xargs-grep.el 100755 → 100644
@@ -91,11 +91,14 @@ FILES is a list of files to grep through."
)
(setq out-buf (compilation-start (concat "xargs -0 grep -EnHe "
grep-regexp) 'xargs-grep-mode))
- (setq xargs-proc (get-buffer-process out-buf))
(dolist (f files)
- (process-send-string xargs-proc (concat f "\0")))
- (process-send-eof xargs-proc)
+ (process-send-string out-buf (concat f "\0")))
+ (process-send-eof out-buf)
+ ;; on mac os X, need to send eof twice to actually close input pipe.
+ ;; first one prints EOF.
+ (when (get-buffer-process out-buf)
+ (process-send-eof out-buf))
))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; xargs-grep.el ends here
+;; xargs-grep.el ends here

0 comments on commit 55da972

Please sign in to comment.