>>> In both cases the insertion is done at the right spot, but in case >>> 1 point in buffer "FOO" is restored after the code is executed.
>>> Is that intended behavior? >>> I expected point to be moved permanently in both cases. >> Which point? > The point in buffer "FOO", of course. If foo is displayed in a window, it has 2 points: its own and the one of the window. > I expected the point to stay at point max after `with-current-buffer' exits. It does stay there. Try (progn (with-current-buffer "FOO" (goto-char (point-max)) (insert "bar")) (with-current-buffer "FOO" (point))) > In the case 1 explained in the original message the code behaves as if it > were wrapped with `save-excursion'. No, it's just that the window's point gets copied to the buffer's point, probably during redisplay. > Can you reproduce it? Of course, Stefan _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel