[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Some testing issues
From: |
Stephen Berman |
Subject: |
Re: Some testing issues |
Date: |
Fri, 14 Jul 2017 11:56:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
On Mon, 10 Jul 2017 13:33:15 -0400 Stefan Monnier <address@hidden> wrote:
>> Is there a less brittle way to test the visibility of point?
>
> Of course, but you first have to use a less brittle question:
> which "point"? If you just use "point" it normally refer to a location
> in the current buffer regardless of any window and hence "visibility"
> is ill-defined. So to make it less brittle, you first have to
> explicitly select the window that interests you (i.e. look for a window
> which displays the current buffer).
Well, as I noted, when pos-visible-in-window-p is called in
todo-toggle-view-done-items, the selected window is displaying the
current buffer and AFAICT that can't go wrong when using todo-mode as
intended (i.e., not invoking todo-toggle-view-done-items outside of
todo-mode). So I don't see any need to explicitly select the window
here. In the test environment, however, that seems not to be an
invariant, so calling set-window-buffer is apparently needed.
Steve Berman
Re: Some testing issues, martin rudalics, 2017/07/08