minad / consult

:mag: consult.el - Consulting completing-read
GNU General Public License v3.0
1.12k stars 98 forks source link

consult-grep family integrates badly with literally-visited files #1004

Closed hiecaq closed 3 weeks ago

hiecaq commented 3 weeks ago

step to test:

  1. Visit some file literally with find-file-literally
  2. C-u consult-grep with this file as input and search for some words in the file
  3. When the candidate is picked to perform the jump, A prompt shows up asking "Do you want to revisit the file normally now"
  4. Answering "yes" reverts and revisits the file normally, answering "no" aborts the jump.

I think the cause is https://github.com/minad/consult/blob/d8888bb67f881a3c4855c9ce7224de18a7dc3901/consult.el#L4751 where find-file-noselect is called with the RAWFILE argument always default to nil.

The reason I wish this is fixed is because, visiting a large file (>hundreds of MBs) literally increases the browsing speed significantly, and using consult-ripgrep on this file to jump around the lines is also much faster than consult-line on my machine. It'd be very nice if they can work together.