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.

Drew
  • 77,472
  • 10
  • 114
  • 243
american-ninja-warrior
  • 3,903
  • 2
  • 24
  • 44
  • 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 03 '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 03 '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 03 '18 at 16:24

1 Answers1

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.)

Drew
  • 77,472
  • 10
  • 114
  • 243