help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Elisp: Search a File Without Visiting?


From: Stefan Monnier
Subject: Re: Elisp: Search a File Without Visiting?
Date: 17 Jun 2003 14:19:07 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> There's just one minor little nit that is bugging me.  After
> formatting the "*Thesaurus Search Results*" buffer, I call
> forward-line to position the cursor on a blank line.  This works fine
> if the "Results" window is buried or non-existant, but if it is still
> visible from a previous search, the cursor is always ends up located
> at the beginning of the buffer after the call to display-buffer.

Think about what happens when a buffer is shown in two windows:
clearly, there must be more than one `point' per buffer.

So you want to select the window that displays the buffer, and
*then* do forward-line, so that you end up moving the `point' that
you care about, rather than some other `point' of the same buffer.


        Stefan


reply via email to

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