emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: point when modifying other buffers


From: Stefan Monnier
Subject: Re: point when modifying other buffers
Date: Wed, 06 Jan 2010 10:06:59 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)

> (with-current-buffer my-other-buffer
>   (insert "abc\n"))

> this keeps a temporary cursor while the elisp program runs but doesn't
> move the buffer "real" position.
> How can I make it change the buffer position?

There is no such thing as the buffer's "real" position.

> I could use something like
> (set-window-point window position)
> but only if there is a window displaying the buffer!

But what you think as "the real position" is indeed the window-point.
If there's no window showing this buffer, you'll see that point moves
along with your text without having to do anything extra.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]