From: Eli Zaretskii <eliz@gnu.org>
To: "Lluís Vilanova" <vilanova@ac.upc.edu>
Cc: 23809@debbugs.gnu.org
Subject: bug#23809: 24.5; Positive argument to 'posn-at-point' throws erros as being negative
Date: Mon, 20 Jun 2016 23:12:26 +0300 [thread overview]
Message-ID: <83shw77h79.fsf@gnu.org> (raw)
In-Reply-To: <87k2hjn7pg.fsf@fimbulvetr.bsc.es> (message from Lluís Vilanova on Mon, 20 Jun 2016 18:30:51 +0200)
> From: Lluís Vilanova <vilanova@ac.upc.edu>
> Date: Mon, 20 Jun 2016 18:30:51 +0200
>
> To reproduce:
>
> * Open a PDF on a separate window on the same frame using pdf-tools.
> * Select that window.
> * Scroll a bit down the first page of the PDF.
> * Use windmove to move from the pdf-view-mode buffer to the first one.
Sounds like a duplicate of bug #21732.
> With these steps, I get this backtrace:
>
> Debugger entered--Lisp error: (wrong-type-argument wholenump -14)
> posn-at-point(619194 #)
What does pos-visible-in-window-p return for that buffer position?
> Note how the argument to posn-at-point (returned by window-point) is actually
> positive (619194), but the error raised by Emacs complains about the number
> being negative (-14).
That's not relevant: 619194 is a buffer position, whereas -14 is the
y-coordinate (in pixels) passed by posn-at-point to posn-at-x-y. The
latter cannot cope with negative y coordinates, for reasons that
should be obvious.
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.)
Thanks.
next prev parent reply other threads:[~2016-06-20 20:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-20 16:30 bug#23809: 24.5; Positive argument to 'posn-at-point' throws erros as being negative Lluís Vilanova
2016-06-20 20:12 ` Eli Zaretskii [this message]
2016-06-21 13:07 ` martin rudalics
2016-06-21 15:15 ` Eli Zaretskii
2016-06-22 6:10 ` martin rudalics
2016-06-22 15:06 ` Eli Zaretskii
2016-06-21 13:17 ` Lluís Vilanova
2016-07-09 11:44 ` Eli Zaretskii
2016-07-11 10:23 ` Lluís Vilanova
2016-07-11 14:51 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83shw77h79.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=23809@debbugs.gnu.org \
--cc=vilanova@ac.upc.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).