rumcii / emacs-nav

Automatically exported from code.google.com/p/emacs-nav
GNU General Public License v3.0
0 stars 0 forks source link

ack "a" command in nav buffer does not work, it incorrectly goes into filter mode (Windows 7) #91

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install on windows, I used emacs 23.3 on windows 7
2. Install ack
3. Try to use the 'a' command in the nav buffer

What is the expected output? What do you see instead?
I expect to have search results. But, I get this instead:
  ack --nocolor --nogroup  something
  <and it seems to hang and never show results>

So I tested if it was in filter made, and sure enough it was for some reason.
 ack: Can't use -f when acting as a filter

What version of the product are you using? On what operating system?
Windows 7 Enterprise N 64 bit
Emacs 23.3
emacs-nav-20110220

Please provide any additional information below.

I fixed it as described here: 
http://stackoverflow.com/questions/644917/change-the-frame-width-in-emacs-intera
ctively

I added this redefinition of ack in my dot emacs file.

(defvar ack-command "ack --nogroup --nocolor ")
(defvar ack-history nil)
(defvar ack-host-defaults-alist nil)
(defun ack ()
  "Like grep, but using ack-command as the default"
  (interactive)
  ; Make sure grep has been initialized
  (if (>= emacs-major-version 22)
      (require 'grep)
    (require 'compile))
  ; Close STDIN to keep ack from going into filter mode
  (let ((null-device (format "< %s" null-device))
        (grep-command ack-command)
        (grep-history ack-history)
        (grep-host-defaults-alist ack-host-defaults-alist))
    (call-interactively 'grep)
    (setq ack-history             grep-history
          ack-host-defaults-alist grep-host-defaults-alist)))

Original issue reported on code.google.com by jawol...@gmail.com on 26 Mar 2011 at 7:42

GoogleCodeExporter commented 8 years ago
Tested your change on my Mac and it seems ok. Checking it in.

Original comment by issac.tr...@gmail.com on 1 May 2012 at 4:28