GNU bug report logs - #23809
24.5; Positive argument to 'posn-at-point' throws erros as being negative

Previous Next

Package: emacs;

Reported by: Lluís Vilanova <vilanova <at> ac.upc.edu>

Date: Mon, 20 Jun 2016 16:32:02 UTC

Severity: normal

Merged with 21732, 24804

Found in versions 24.5, 25.0.50, 25.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 23809 <at> debbugs.gnu.org (full text, mbox):

From: Lluís Vilanova <vilanova <at> ac.upc.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 23809 <at> debbugs.gnu.org
Subject: Re: bug#23809: 24.5;
 Positive argument to 'posn-at-point' throws erros as being negative
Date: Mon, 11 Jul 2016 12:23:15 +0200
Eli Zaretskii writes:

>> From: Lluís Vilanova <vilanova <at> ac.upc.edu>
>> Cc: 23809 <at> debbugs.gnu.org
>> Date: Tue, 21 Jun 2016 15:17:46 +0200
>> 
>> > 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.)
>> 
>> I have zero knowledge on Emacs' source code, but here's the little information I
>> could gather:
>> 
>> Fposn_at_point(...)
>> Fvisible_in_window_p(...) -> (824 . -98)
>> pos_visible_p(...) ->
>> line 1713 : *x = it2.current_x;
>> value            824
>> line 1714 : *y = it2.current_y + it2.max_ascent - it2.ascent;
>> value            -98             533              533
>> Fposn_at_x_y(824, -98, window, nil)
>> 
>> 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 negative
>> position AFAIU.
>> 
>> 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 that
the keys used to move point actually scroll the window, and there is no visible
point in it.


Thanks,
  Lluis




This bug report was last modified 8 years and 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.