3

I'm doing an Isearch on a large file. I'm on line 30, starting the isearch.

Is it possible to tell Emacs to do the Isearch but consider line 343000 as the end of the file.

The file has 1,000,000 lines.

  • IMHO casting down-votes without comment is bad habit. How should the OP learn to write better questions from down-votes without reasoning? Therefore, I compensate that down-vote now. On the other hand I will accept a down-vote with a sensible justification in a comment here even if I myself see absolutely no reason for a down-vote. – Tobias Mar 3 '18 at 12:32
  • I am occasionally working with automatically generated log files that are huge (in the order of Giga bytes). Depending on the size of one line and the system (e.g. windows 32-bit) that may also be the case for the OP. @Drew In such cases it may even be better to use something like View Very Large Files (or the improved version). Furthermore, depending on the file type it may be good to avoid the activation of font-lock-mode for such files. – Tobias Mar 3 '18 at 12:40
  • @Tobias: I too don't agree with the downvote, and have upvoted. The question is a good one. I also second what you say in your other comment. – Drew Mar 3 '18 at 16:24
3

Narrow the buffer to whatever portion you want to search: C-x n n. See the Emacs manual, node Narrowing.

See also @Tobias's comment about using Emacs with very large files. (Perhaps he will post that as an answer.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.