dajva / rg.el

Emacs search tool based on ripgrep
https://rgel.readthedocs.io
GNU General Public License v3.0
474 stars 39 forks source link

When I open one of these options, the bottom window always appears #64

Closed e190 closed 4 years ago

e190 commented 4 years ago

图片 I don't know why the bottom window what's "unknown" always appears when you open one of these options

dajva commented 4 years ago

Looks like this is MS Windows. I can't officially support windows since I don't have a windows system for testing, unfortunately. I am happy to fix this or accept a PR if we can find the source of the problem though.

The main problem seems to be that the file name isn't recognized. The heading should be File: .\path\to\file.el if it was recognized correctly. The file names are detected with the color codes exported by the ripgrep binary so I suspect that your binary outputs non standard color codes. Maybe this is a windows issue or could also be a ripgrep version issue. The matches seems to be higligted correctly so it partly works at least.

  1. Which version of this package are you using?
  2. Can you post the output of command line rg --version invokation?
  3. Can you post me the raw output (including color escape sequences) of this search:
    rg <some-search-with-matches> --heading --color=always
  4. The expected fg color of the filenames is magenta so you could also try to invoke rg with the universal argument (C-u) and add --colors path:fg:magenta to the command line and see if that fixes the problem.
e190 commented 4 years ago

图片 package: rg-20190925.543

dajva commented 4 years ago

Ok, so the file headings are blue instead of magenta. Have you configured this globally or is this a windows thing? Anyway, this can be fixed by letting this package be more explicit about the colors that is needed. I will prepare a fix.

e190 commented 4 years ago

图片 I'm now setting path, which is a problem with Windows 7 and works fine with Linux.

dajva commented 4 years ago

Should be fixed on master now. Please let me know if the issue remains.

e190 commented 4 years ago

awesome.Your patch fixes our problem.So Thanks .