all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: "Eli Zaretskii" <eliz@gnu.org>, "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: Tue, 21 Jun 2016 15:07:57 +0200	[thread overview]
Message-ID: <57693C2D.60000@gmx.at> (raw)
In-Reply-To: <83shw77h79.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

 > 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 #)

Without further forensics we could "fix" both bugs using the attached
patch.  WDYT?

martin

[-- Attachment #2: window.diff --]
[-- Type: text/plain, Size: 631 bytes --]

diff --git a/lisp/window.el b/lisp/window.el
index f7a547b..a06f334 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2068,7 +2068,9 @@ window-in-direction
 	    (if hor
 		(window-pixel-top window)
 	      (window-pixel-left window)))
-	   ((let ((posn-cons (nth 2 (posn-at-point (window-point window) window))))
+	   ((let ((posn-cons (condition-case nil
+                                 (nth 2 (posn-at-point (window-point window) window))
+                               (error nil))))
 	      (if hor
 		  (+ (or (cdr posn-cons) 1) (window-pixel-top window))
 		(+ (or (car posn-cons) 1) (window-pixel-left window)))))))


  reply	other threads:[~2016-06-21 13:07 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
2016-06-21 13:07   ` martin rudalics [this message]
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

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

  git send-email \
    --in-reply-to=57693C2D.60000@gmx.at \
    --to=rudalics@gmx.at \
    --cc=23809@debbugs.gnu.org \
    --cc=eliz@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 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.