Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to locate buffer position in .emacs

Tags:

For example, with emacs --debug-init, I got this:

Debugger entered--Lisp error:(invalid-read-syntax ")")   eval-buffer(#<buffer *load*> nil "/home/wilbeibi/.emacs" nil t);   Reading at buffer position 9220 

The question is: How to solve the problem each time I got the error explanation like "Reading at buffer position XXXX". How to jump to that position?

BTW,To this specific problem, the things I did:
1. use 'C-M-e' to check each function.
2. Replace any Chinese with )

like image 584
wilbeibi Avatar asked Jan 17 '13 04:01

wilbeibi


People also ask

How many buffer can be open at a time in Emacs?

The number of buffers you can have really has no limit. Most of the time, only one or two buffers are displayed, but even if you can't see them, all the buffers you create in an Emacs session are still active. You can think of them as a stack of pages, with the one being displayed as the top page.

What is a buffer in Emacs?

Buffers in Emacs editing are objects that have distinct names and hold text that can be edited. Buffers appear to Lisp programs as a special data type. You can think of the contents of a buffer as a string that you can extend; insertions and deletions may occur in any part of the buffer.

What is point Emacs?

In Emacs, the current position of the cursor is called point. The expression (point) returns a number that tells you where the cursor is located as a count of the number of characters from the beginning of the buffer up to point.


1 Answers

M-x goto-char  

Help:

goto-char is an interactive built-in function in `C source code'.

It is bound to <menu-bar> <edit> <goto> <go-to-pos>.

(goto-char POSITION)

Set point to POSITION, a number or marker. Beginning of buffer is position (point-min), end is (point-max).

The return value is POSITION.

like image 192
freestyler Avatar answered Sep 19 '22 21:09

freestyler