When Emacs reports error it always show code with a buffer position, with which it is quite unconvenient to find out where the exact words locate.
It there any way to know the exact line number of the buffer position?
C-x = Bound to what-cursor-position
; shows the current position.
C-x l Bound to count-lines-page
; shows how many lines are before and after point on page, and total number of lines on page (where "page" spans lines between two page-break symbols ^L
).
M-x Bound to what-line
; shows line number of current line (and narrowed line number of point, if applicable).
But I think what you want is
M-x goto-char
RET <pos>
which lets you go to position <pos>
in the current buffer.
(line-number-at-pos <pos>)
.
It seems you need Goto line: M-g g
The exact line number of the buffer position is shown in the status line of your Emacs buffer.
L
and before the major mode name. 'M-g g' is available only since emacs 22.1.
Jun 2, 2009 at 13:55