Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no filenames when process-connection-type is nil #154

Open
YoungFrog opened this issue Jan 29, 2019 · 0 comments
Open

no filenames when process-connection-type is nil #154

YoungFrog opened this issue Jan 29, 2019 · 0 comments

Comments

@YoungFrog
Copy link

Running the following (in a directory where at least one file contains foo):
emacs -Q -f package-initialize --eval '(setq process-connection-type nil)' --eval '(ag "foo" default-directory)'
returns results without the "filename:" part, e.g.

ag --nocolor --literal --line-number --smart-case --nogroup --column --stats -- foo .
2:27:
3:15:
4:15: <!ATTLIST food id CDATA #IMPLIED

whereas when setting p-c-t to t, I get:

ag --nocolor --literal --line-number --smart-case --nogroup --column --stats -- foo .
code-samples/ajax/xml/ex.dtd:2:27:
code-samples/ajax/xml/ex.dtd:3:15:
code-samples/ajax/xml/ex.dtd:4:15: <!ATTLIST food id CDATA #IMPLIED

On my machine, the output of ag --version is:

ag version 0.31.0

Features:
+jit +lzma +zlib

My Emacs version is: GNU Emacs 26.1.90

I'm using: Trisquel GNU/Linux 8.0, Flidas

One workaround is to redirect stdin to /dev/null:

           (concat "</dev/null "
                   (mapconcat #'shell-quote-argument
                              (append (list ag-executable) arguments (list string "."))
                              " "))

inside ag/search, but I'm not sure this is the right fix.

The other obvious workaround is to not set p-c-t to nil, but this consequences as well, see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=15695

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant