From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Llu=C3=ADs?= Vilanova Newsgroups: gmane.emacs.bugs Subject: bug#23809: 24.5; Positive argument to 'posn-at-point' throws erros as being negative Date: Mon, 11 Jul 2016 12:23:15 +0200 Message-ID: <87h9bwscbw.fsf@fimbulvetr.bsc.es> References: <87k2hjn7pg.fsf@fimbulvetr.bsc.es> <83shw77h79.fsf@gnu.org> <87oa6uk7et.fsf@fimbulvetr.bsc.es> <83bn27ghnw.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1468232673 15315 80.91.229.3 (11 Jul 2016 10:24:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Jul 2016 10:24:33 +0000 (UTC) Cc: 23809@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 11 12:24:20 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bMYNu-0006Kp-Gm for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Jul 2016 12:24:18 +0200 Original-Received: from localhost ([::1]:60248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMYNt-0006FV-Eq for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Jul 2016 06:24:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMYNl-0006FC-0I for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2016 06:24:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMYNe-0003gC-UG for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2016 06:24:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMYNe-0003fm-QM for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2016 06:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bMYNe-0004ER-HD for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2016 06:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Llu=C3=ADs?= Vilanova Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Jul 2016 10:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23809 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23809-submit@debbugs.gnu.org id=B23809.146823260516218 (code B ref 23809); Mon, 11 Jul 2016 10:24:02 +0000 Original-Received: (at 23809) by debbugs.gnu.org; 11 Jul 2016 10:23:25 +0000 Original-Received: from localhost ([127.0.0.1]:46079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMYN2-0004DW-Sc for submit@debbugs.gnu.org; Mon, 11 Jul 2016 06:23:25 -0400 Original-Received: from roura.ac.upc.es ([147.83.33.10]:37812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMYN0-0004DE-Cr for 23809@debbugs.gnu.org; Mon, 11 Jul 2016 06:23:23 -0400 Original-Received: from gw-2.ac.upc.es (gw-2.ac.upc.es [147.83.30.8]) by roura.ac.upc.es (8.13.8/8.13.8) with ESMTP id u6BANFL1022917; Mon, 11 Jul 2016 12:23:15 +0200 Original-Received: from localhost (unknown [84.88.51.85]) by gw-2.ac.upc.es (Postfix) with ESMTPSA id 1FDD375B; Mon, 11 Jul 2016 12:23:15 +0200 (CEST) In-Reply-To: <83bn27ghnw.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Jul 2016 14:44:19 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) 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:120837 Archived-At: Eli Zaretskii writes: >> From: Llu=C3=ADs Vilanova >> Cc: 23809@debbugs.gnu.org >> Date: Tue, 21 Jun 2016 15:17:46 +0200 >>=20 >> > The question is how that -14 coordinate came into existence. If you >> > can step with a debugger into Fpos_visible_in_window_p, and see what's >> > going on there, that would be helpful. (I cannot try that myself, as >> > my systems don't support pdf-view-mode.) >>=20 >> I have zero knowledge on Emacs' source code, but here's the little infor= mation I >> could gather: >>=20 >> Fposn_at_point(...) >> Fvisible_in_window_p(...) -> (824 . -98) >> pos_visible_p(...) -> >> line 1713 : *x =3D it2.current_x; >> value 824 >> line 1714 : *y =3D it2.current_y + it2.max_ascent - it2.ascent; >> value -98 533 533 >> Fposn_at_x_y(824, -98, window, nil) >>=20 >> After reading [1], it sounds to me that pdf-tools (and doc-view) let you= scroll >> the buffer, but never move point. That could be a reason to get a negati= ve >> position AFAIU. >>=20 >> Tell me if you want something more specific, since the problem is pretty= easy to >> reproduce. But remember I have zero knowledge on emacs' sources, some I'= m pretty >> blind here. > Thanks, the above is already a lot of valuable info. > I have a couple of follow up questions: > . 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? If you load the file .gdbinit that is located in the > Emacs src directory, then displaying the return value is simple: > type "pp tem" at the GDB prompt, after Fpos_visible_in_window_p > returns. Sorry, but strangely enough, I'm unable to reproduce the problem now. And I= 'm not aware of having updated emacs nor the packages it uses. I'll reply with= the information if it happens again. > . You say "pdf-tools (and doc-view) let you scroll the buffer, but > never move point" -- can you point me to code in pdf-tools that > does this? I'm actually not sure about it. It's just an intuition based on the fact th= at the keys used to move point actually scroll the window, and there is no vis= ible point in it. Thanks, Lluis