all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Andreas Politz <politza@hochschule-trier.de>, 24804@debbugs.gnu.org
Subject: bug#24804: 25.1; posn-at-point erroneously signals an error
Date: Thu, 27 Oct 2016 19:35:55 +0200	[thread overview]
Message-ID: <58123AFB.201@gmx.at> (raw)
In-Reply-To: <87k2cudhgg.fsf@hochschule-trier.de>

 > 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





  parent reply	other threads:[~2016-10-27 17:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 19:43 bug#24804: 25.1; posn-at-point erroneously signals an error Andreas Politz
     [not found] ` <handler.24804.B.147751104225420.ack@debbugs.gnu.org>
2016-10-26 19:49   ` bug#24804: Acknowledgement (25.1; posn-at-point erroneously signals an error) Andreas Politz
2016-10-27 17:35 ` martin rudalics [this message]
2016-10-27 18:26   ` bug#24804: 25.1; posn-at-point erroneously signals an error Andreas Politz
2016-10-28  8:12   ` Eli Zaretskii
2016-10-29 10:23     ` Eli Zaretskii
2016-10-29 14:26       ` Andreas Politz
2016-10-29 14:36         ` Eli Zaretskii
2016-10-29 14:42           ` Eli Zaretskii
2016-10-29 20:33             ` Andreas Politz
2016-10-29 22:03               ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58123AFB.201@gmx.at \
    --to=rudalics@gmx.at \
    --cc=24804@debbugs.gnu.org \
    --cc=politza@hochschule-trier.de \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.