1

Like every emacs user I am constantly switching between buffers, and it's pretty important that the point (cursor) stays where I last edited the file. However, every now and then emacs enters a state where switching between buffers jumps the point to a different location. That is, I'm editing buffer A at line 3043, I switch to buffer B (C-x b), switch back to A, point is now at line 200 (or whatever).

The only solution I have found is to restart emacs (Aquamacs), which is obviously less than ideal. Any ideas on how to fix this, or even where the point position information is stored by emacs?

fairidox
  • 3,358
  • 2
  • 28
  • 29
  • 1
    Are you using any minor modes or any other add-on packages that might interfere with normal Emacs usage? Does the same occur when you use standard Emacs (as opposed to Aquamacs)? – Lindydancer Sep 11 '13 at 09:04
  • 1
    Is it possible that you have the same buffer open in more than one window/frame? Then Emacs would reuse the point position of the window that is already open. – legoscia Sep 11 '13 at 09:58
  • @Lindydancer good point I've been using latex major mode and some related minor modes ill try toggling those – fairidox Sep 11 '13 at 17:16

1 Answers1

1

My first guess would be what @legoscia mentioned: multiple windows for the same buffer, with different window points. Experiment to see if this isn't what is happening. See the

Other than that, yes, @Lindydancer is right in recommending that you narrow this down to something reproducible starting with emacs -Q (no init file). There might well be an Emacs bug or an Aquamacs bug, but you first have to rule out something else coming from your init file (~/.emacs).

Narrow it down (e.g., by bisecting your init file recursively, if you cannot repro the problem without the init file). Then, if it is an Emacs problem, report it to Emacs Dev: M-x report-emacs-bug. If it is an Aquamacs but then report it to the Aquamacs maintainers.

As it stands now, your question is too broad for people here to help much. But please do follow up, not only to solve your problem but, if there is a bug, to report it and get it fixed at the source.

FWIW, I've filed an Emacs doc bug report about this, asking that the Emacs manual be more clear about the notion of window-point.

Drew
  • 29,895
  • 7
  • 74
  • 104
  • I isolated this problem, it happens only when I'm in LaTeX mode, although I have not yet addressed the issue – fairidox Sep 13 '13 at 22:21
  • Good. Try to narrow it down more, if you can. Even if you cannot, since LaTeX mode is standard code, if you can provide a recipe that reproduces the problem, starting from `emacs -Q`, then use `M-x report-emacs-bug` if you have convinced yourself the problem is not misunderstanding. (But be sure you read again about `window-point`, before deciding.) – Drew Sep 13 '13 at 22:25