M-x narrow-to-region - Narrow down to between point and mark
But I need to narrow from cursor position to end of buffer. Is it possible?
M-x narrow-to-region - Narrow down to between point and mark
But I need to narrow from cursor position to end of buffer. Is it possible?
The doc-string of narrow-to-region
tells us that the mandatory arguments are START
and END
: "When calling from a program, pass two arguments; positions (integers
or markers) bounding the text that should remain visible."
The programmatic location of cursor in the active buffer is point
, and the end of the buffer (or end of narrowed region) is point-max
. Try typing M-x eval-expression RET (narrow-to-region (point) (point-max)) RET
and see the result. A shortcut for eval-expression
is M-:
.
Another idea would be to hold the shift key down and move the cursor to the end of the buffer and then M-x narrow-to-region
aka C-x n n
.
C-SPC M-> C-x n n
, which would beset-mark-command
,end-of-buffer
,narrow-to-region
. – glucas Jan 12 '19 at 19:12