From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: Some testing issues Date: Fri, 14 Jul 2017 11:56:20 +0200 Message-ID: <87mv87gx4r.fsf@rosalinde> References: <8737a8j61r.fsf@rosalinde> <87wp7jnfpz.fsf@rosalinde> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1500026513 5975 195.159.176.226 (14 Jul 2017 10:01:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Jul 2017 10:01:53 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 14 12:01:47 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVxPv-0001Cs-2C for ged-emacs-devel@m.gmane.org; Fri, 14 Jul 2017 12:01:47 +0200 Original-Received: from localhost ([::1]:36647 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVxQ0-0007Rb-Ik for ged-emacs-devel@m.gmane.org; Fri, 14 Jul 2017 06:01:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVxKp-0003Cd-7p for emacs-devel@gnu.org; Fri, 14 Jul 2017 05:56:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVxKm-0007R5-7N for emacs-devel@gnu.org; Fri, 14 Jul 2017 05:56:31 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:61131) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVxKl-0007Ql-SQ for emacs-devel@gnu.org; Fri, 14 Jul 2017 05:56:28 -0400 Original-Received: from rosalinde ([83.135.15.98]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M4nM5-1dr2zb00zN-00yzHA; Fri, 14 Jul 2017 11:56:22 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 10 Jul 2017 13:33:15 -0400") X-Provags-ID: V03:K0:+w953/d4M7q9OxKfIIX67nvN7IjfyfbNx8AVCWezssVmUAkBGN9 QAqtOYsm3ng9fXXkMqgg/oWZ8TA/QaSns4yvzCLMrmBX/WzazJgSL7IQKzp+3YqC9fiFWW2 8gCPbD3D0kOnZH8yNKaRPFtHdNkOnVs4lp9RFaNupR8XWM7HnnOca1L41kzR1RFjUEmaD6z dcvqTlTxtX+L5h8rzomqQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:ZEuWpo55F+A=:U/jSwb741Xs2ySqhsNtlOA 86gYx5xxp8PfkqHx/cFiuo6bcV1FMgY2AH5L3wXSv1ZnxFwZnQSR5hBJVVx6Q80naQPxeGUT2 PrOFZ9K3Xy7hw9DXDXp403gguPwd0zVt1GVGcYozKSeVVWOYddopH2mz9aELq7cMxRupopXS2 G+x6+PQWHeBpDxPXF40uxKPBxP41YgXVodZu2ZuakBgWvrCqO91zCLsO3j31vcILpVACN2Ti7 I2J8n/J35zFNmQW5cxPBqKs0seiBOB4SP+/cW6MfTlb58REKaPROIKcpgkXQ8i9mwCNjKSbAM olWFStz5AUsQHS9+gQqmtKX5ny2GJdWklmvpKuSgoUqDRGdf5axUyBwKHSxPpoH8mrrv5G1tZ I9pWaYHSAZ7Q2POfzzQTTRy0vFrzoFWSdqIbqxZwt+h4N9BwUdRko0gJJA91MXn+EK1o0llrF hL1CGsDUAraOa6ZHKFrkTflodlaemE7SPfJkgdm3xVbDzr97hQpsE9zza4iuyU4OiPFDjG1cX UaM3NTZiMcoDWF1yz+4YV5oEjhxxyD4Nuizhch6dFYqoxFL1pp2aYcSCVCRaiNW0Z0RAiISzP 5qG6YOwBjRoNLPC/YMm4eZSHFupNzosY3dj7herM1y2JRhiCVPejgbsgxepV9g3s92QUh2uDJ orZ02UJLYCLTa2KxSu/hblTOKMkf4Tym39fRzouw994rUyrrI9p4kwBZjugVbYHfPoInln0aY g53WX5vVLNfHjhvZmLlrMdqpvDX5DDPg0KSfhgbbc4KrZKz9EvqaF/tOCvRZ+aGWthzh3LRG X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:216644 Archived-At: On Mon, 10 Jul 2017 13:33:15 -0400 Stefan Monnier 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