From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#24804: 25.1; posn-at-point erroneously signals an error Date: Thu, 27 Oct 2016 19:35:55 +0200 Message-ID: <58123AFB.201@gmx.at> References: <87k2cudhgg.fsf@hochschule-trier.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1477591014 30469 195.159.176.226 (27 Oct 2016 17:56:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 27 Oct 2016 17:56:54 +0000 (UTC) To: Andreas Politz , 24804@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 27 19:56:50 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1bzouz-00072S-2s for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Oct 2016 19:56:45 +0200 Original-Received: from localhost ([::1]:43489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzov1-0006N7-L8 for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Oct 2016 13:56:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzobx-0008CC-9i for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2016 13:37:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzobu-0003qz-6Z for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2016 13:37:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45615) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bzobu-0003qv-2S for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2016 13:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bzobt-0001Xn-TM for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2016 13:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Oct 2016 17:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24804-submit@debbugs.gnu.org id=B24804.14775897675872 (code B ref 24804); Thu, 27 Oct 2016 17:37:01 +0000 Original-Received: (at 24804) by debbugs.gnu.org; 27 Oct 2016 17:36:07 +0000 Original-Received: from localhost ([127.0.0.1]:32781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzob1-0001We-Cj for submit@debbugs.gnu.org; Thu, 27 Oct 2016 13:36:07 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:54826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzoaz-0001W4-Px for 24804@debbugs.gnu.org; Thu, 27 Oct 2016 13:36:06 -0400 Original-Received: from [192.168.1.100] ([212.95.7.14]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LlHsg-1cZhZi2MHW-00b4TA; Thu, 27 Oct 2016 19:35:56 +0200 In-Reply-To: <87k2cudhgg.fsf@hochschule-trier.de> X-Provags-ID: V03:K0:omwSmEKCdsTAtaPbsXgxzmUBN8sYp5lkur9GYCRcPVv01VQzK/i omtxBgKeh0WRfpIy3GOW5cXVov7G7q3jH7fe6/kKxo/vGPmSUHGCNig8X1zGHCvydoryLfF JqCp8YdwADRl5jeXrQ6//I4GbQiuhODlDVOeY0C9zpyj6RfkGBijcbpqoonB6PoiCCqnhDl tQb/dIHxTSTaORPasVBuQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:9jnLupNcHaw=:tlQguerN7/UFnhcXtw/Trt ff9jYE67C2EcPlIzBfvIm8R1M+J9CgzGymYTTccJaptG6gpbydHJVVHThoDUMK6exVN/sbb7m EW8Clrgk2EsLxL7PAZ1c44H4nP+/6lB1cX+F9GtKJXZeVzL9ogsPtV2ZwLJB1R5pQkVVVolwN y+naANK6ufbxRPhucNCrLdzLzAmmgGwp3YktNTrFSd/AqQKWOiNpUgHDCSojxOsW8EgKBcwmN /oPDZMbp9rHr4ZlhCKuAdihRlWnVX1WiDkJ0Pi19HfTNldpmBaXYnCDXaFnYRA9V27rVYvPxE MUmlKCersAZuS4/RbnQ7EEiW63HtR4UE2gLgD2uDiRtk0TPV2eBaQBCjxPN3N5JTkWByT4fsz C4GSNdzANFaV5/zBDYLFsnKdGIG3l/QpdhR2lq7XdEJN2704gOipQJhW6QHpDzhGnRCyDvQBm COwLePohHRveLT21gK7ZOjKmkrK9+kvYLILJApYd6L55Pby6BJvcCvMcnApoRp7rbw/zYGicK lrnMl1g65/wb2thqb4stWkdA6I2xsJx8FvXlahpTanGoKLPIeee17WVruPupAxswl5fE6fnvq +CrqKJflJfOUK0V05T171pqBtVVVoVhcwzxMwThee8txtB4P+FCZOFafiYvaWMhj1ZtImo6PK tobxiO5K52o6VxnyFKxqgNATC0g9ipnrFn26d/6eespQ/kjf1frd4IRwzqKJSn77rfn7lWTpj fb6fM5KIb5CPVNSqC/Lf6Lw5YGnHiC90iy2QD15/PXHhYVWIZPAPmM0c5VWU5fSJtQUZNeN/ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125074 Archived-At: > The documentation of the function posn-at-point states > > "Return nil if position is not visible in window.", > > but it may also signal an error in this case. This happens, if > Fpos_visible_in_window_p returns a list of (X Y RTOP RBOT ROWH VPOS) > and at least Y is negative (which indicates, that pos is not visible > IIUC). The error is then signaled by Fposn_at_x_y, which only accpets > non-negative numbers (neglecting the exceptional case of -1 for X). > > I think this function should include a similar test for y, as is already > in place for x, returning nil if it is negative (see below). Thanks. But according to Eli the problem is in Fpos_visible_in_window_p which should never return a negative y in the first place. > Reproducing this state may be a little bit tricky, anyway evaluate the > following lines, starting with `emacs -Q'. > > (defvar img "foo.png");; The image should be taller then the window > ;; it's displayed in. > (setq debug-on-error t) > (find-file img) > (redisplay t) ;; If in batch mode. > (image-scroll-up 999) > ;; The image should be scrolled to the bottom now, while point equals 1. > (posn-at-point (point-max) (selected-window)) That's a valuable information. I indeed can reproduce the problem with this scenario (but only on another machine where I can display images and the Emacs there must be repaired). Could you try answering the question Eli asked for bug#23809 namely: . Can you show the entire value returned by Fpos_visible_in_window_p when its call from Fposn_at_point returns, when this problem is reproduced? Thanks again, martin