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, 20 Jun 2016 18:30:51 +0200 Message-ID: <87k2hjn7pg.fsf@fimbulvetr.bsc.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1466443939 10589 80.91.229.3 (20 Jun 2016 17:32:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2016 17:32:19 +0000 (UTC) To: 23809@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 20 19:32:03 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 1bF33G-0001bl-Na for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Jun 2016 19:31:58 +0200 Original-Received: from localhost ([::1]:45267 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF33F-0002vQ-Ml for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Jun 2016 13:31:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF27L-0008Gs-At for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 12:32:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bF27G-0005TT-UZ for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 12:32:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF27G-0005TP-QX for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 12:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bF27G-0005Qg-K3 for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 12:32: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, 20 Jun 2016 16:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23809 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146644027720813 (code B ref -1); Mon, 20 Jun 2016 16:32:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Jun 2016 16:31:17 +0000 Original-Received: from localhost ([127.0.0.1]:47949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF26W-0005Pd-Gv for submit@debbugs.gnu.org; Mon, 20 Jun 2016 12:31:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44071) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF26S-0005PP-NS for submit@debbugs.gnu.org; Mon, 20 Jun 2016 12:31:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bF26K-0005LW-BJ for submit@debbugs.gnu.org; Mon, 20 Jun 2016 12:31:07 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:38034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF26K-0005LG-8r for submit@debbugs.gnu.org; Mon, 20 Jun 2016 12:31:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF26G-0007Oo-73 for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 12:31:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bF26B-0005KF-OK for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 12:30:59 -0400 Original-Received: from roura.ac.upc.es ([147.83.33.10]:40505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF26B-0005JH-2L for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 12:30:55 -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 u5KGUpfA007034 for ; Mon, 20 Jun 2016 18:30:51 +0200 Original-Received: from localhost (unknown [84.88.51.85]) by gw-2.ac.upc.es (Postfix) with ESMTPSA id 5687A326 for ; Mon, 20 Jun 2016 18:30:51 +0200 (CEST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:119845 Archived-At: 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. With these steps, I get this backtrace: Debugger entered--Lisp error: (wrong-type-argument wholenump -14) posn-at-point(619194 #) (nth 2 (posn-at-point (window-point window) window)) (let ((posn-cons (nth 2 (posn-at-point (window-point window) window))))= (if hor (+ (or (cdr posn-cons) 1) (window-pixel-top window)) (+ (or (car p= osn-cons) 1) (window-pixel-left window)))) (cond ((and (numberp sign) (< sign 0)) (if hor (1- (+ (window-pixel-top= window) (window-pixel-height window))) (1- (+ (window-pixel-left window) (= window-pixel-width window))))) ((and (numberp sign) (> sign 0)) (if hor (wi= ndow-pixel-top window) (window-pixel-left window))) ((let ((posn-cons (nth = 2 (posn-at-point (window-point window) window)))) (if hor (+ (or (cdr posn-= cons) 1) (window-pixel-top window)) (+ (or (car posn-cons) 1) (window-pixel= -left window)))))) (let* ((frame (window-frame window)) (hor (memq direction (quote (left = right)))) (first (if hor (window-pixel-left window) (window-pixel-top windo= w))) (last (+ first (window-size window hor t))) (posn (cond ((and (numberp= sign) (< sign 0)) (if hor (1- (+ ... ...)) (1- (+ ... ...)))) ((and (numbe= rp sign) (> sign 0)) (if hor (window-pixel-top window) (window-pixel-left w= indow))) ((let ((posn-cons ...)) (if hor (+ ... ...) (+ ... ...)))))) (best= -edge (cond ((eq direction (quote below)) (frame-pixel-height frame)) ((eq = direction (quote right)) (frame-pixel-width frame)) (t -1))) (best-edge-2 b= est-edge) (best-diff-2 (if hor (frame-pixel-height frame) (frame-pixel-widt= h frame))) best best-2 best-diff-2-new) (walk-window-tree (function (lambda= (w) (let* ((w-top (window-pixel-top w)) (w-left (window-pixel-left w))) (c= ond ((or ... ...)) (hor (cond ... ...)) ((and ... ...) (if ... ...)) ((and = ... ... ...) (setq best-edge-2 w-top) (setq best-diff-2 best-diff-2-new) (s= etq best-2 w)))))) frame nil (and mini t)) (or best best-2)) window-in-direction(left nil nil nil nil t) windmove-find-other-window(left nil nil) windmove-do-window-select(left nil) windmove-left(nil) #(windmove-left nil nil) ad-Advice-call-interactively(# windmove-left nil nil) apply(ad-Advice-call-interactively # (windmove-left nil nil)) call-interactively(windmove-left nil nil) command-execute(windmove-left) Note how the argument to posn-at-point (returned by window-point) is actual= ly positive (619194), but the error raised by Emacs complains about the number being negative (-14). Thanks, Lluis Auto-gathered information: In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-08 on binet, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11803000 System Description: Debian GNU/Linux testing (stretch) Configured using: `configure --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/va= r/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/= info --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24= .5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-li= sp:/usr/share/emacs/site-lisp --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/= info --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24= .5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-li= sp:/usr/share/emacs/site-lisp --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars 'CFLAGS= =3D-g -O2 -fstack-protector-strong -Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE=3D2' LDFLAGS=3D-Wl,-z,relro' Important settings: value of $LANG: ca_ES.UTF-8 locale-coding-system: utf-8 Major mode: Debugger Minor modes in effect: pdf-occur-global-minor-mode: t TeX-PDF-mode: 1 diff-auto-refine-mode: t magit-auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t recentf-mode: t ogc:--org-gnome-calendar-mode: t global-org-gnome-calendar-mode: t change-cursor-mode: t which-key-mode: t global-flycheck-mode: t global-semantic-idle-breadcrumbs-mode: t global-ede-mode: t shell-dirtrack-mode: t savehist-mode: t desktop-save-mode: t icomplete-mode: t flx-ido-mode: t ido-ubiquitous-mode: t global-undo-tree-mode: t undo-tree-mode: t global-hungry-delete-mode: t hungry-delete-mode: t global-auto-revert-mode: t global-anzu-mode: t anzu-mode: t show-smartparens-global-mode: t smartparens-global-mode: t cua-mode: t delete-selection-mode: t winner-mode: t ido-everywhere: t display-time-mode: t override-global-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t global-prettify-symbols-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Guessed variable 'css-indent-offset' (2) Ispell process killed Starting new Ispell process aspell with default dictionary... Winner undo (1 / 7) 1238378 (#o4562552, #x12e56a) Type "q" in help window to restore its previous buffer. Mark set [2 times] Quit (# 1 (0 . 0) 0 nil 1 (0 . 0) nil (0 . 0) (8 . 14= )) nil [3 times] Load-path shadows: /home/lluis/.cache/emacs/elpa/dash-20160510.1127/dash hides /home/lluis/.ca= che/emacs/el-get/dash/dash /home/lluis/.cache/emacs/elpa/s-20160508.2357/s hides /home/lluis/.cache/em= acs/el-get/s/s /home/lluis/.cache/emacs/elpa/avy-20160512.2252/avy hides /home/lluis/.cach= e/emacs/el-get/avy/avy /home/lluis/.cache/emacs/el-get/hydra/lv hides /home/lluis/.cache/emacs/el-= get/lv/lv /home/lluis/.cache/emacs/elpa/diminish-20151215.915/diminish hides /usr/sha= re/emacs24/site-lisp/emacs-goodies-el/diminish /home/lluis/.cache/emacs/elpa/dedicated-20090428.1231/dedicated hides /usr/= share/emacs24/site-lisp/emacs-goodies-el/dedicated /usr/share/emacs/24.5/site-lisp/debian-startup hides /usr/share/emacs/site-= lisp/debian-startup /home/lluis/.config/emacs/loaddefs hides /usr/share/emacs/24.5/lisp/loaddefs /home/lluis/.config/emacs/custom hides /usr/share/emacs/24.5/lisp/custom /usr/share/emacs24/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emac= s/24.5/lisp/language/thai-word Features: (shadow emacsbug pdf-sync pdf-annot pdf-outline pdf-links pdf-history pdf-o= ccur tablist tablist-filter semantic/wisent/comp pdf-isearch pdf-misc pdf-tools pdf-view bookmark pdf-cache pdf-info tq pdf-util doc-view image-mode texmat= hp preview prv-emacs tex-buf font-latex latex tex-style tex smartparens-latex tex-mode latexenc tabify imenu man debug asm-mode eww mm-url log-view cua-r= ect pylint semantic/wisent/python semantic/wisent/python-wy semantic/wisent semantic/wisent/wisent smartparens-python python gnus-dup vc-bzr vc-sccs vc= -svn vc-cvs vc-rcs god-mode xterm supercite regi tramp-cache sh-script smie executable dedicated wgrep find-dired grep ede/project-am ede/autoconf-edit autoconf autoconf-mode ede/makefile-edit make-mode flow-fill dired-filter f= s ucs-normalize dired-hacks-utils dired-aux ede/dired dired-x gnutls url-queue two-column iso-transl ibuf-ext semantic/db-file data-debug cedet-files ede/locate semantic/tag-file semantic/edit narrow-or-widen-dwim fancy-narrow iedit help-macro iedit-lib multiple-cursors-core rect aggressive-indent elisp-slime-nav etags tar-mode url-handlers misearch multi-isearch highlight-symbol auto-dictionary em-smart em-unix em-term em-script em-prom= pt em-ls em-hist em-pred em-glob em-dirs em-cmpl em-basic em-banner em-alias esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg eldoc esh-groups es= hell esh-module esh-mode esh-util ffap copyright magit-stgit linum magit-blame magit-stash magit-bisect magit-remote magit-commit magit-sequence magit magit-apply magit-wip magit-log magit-diff smerge-mode diff-mode magit-core magit-autorevert magit-process magit-popup magit-mode magit-git crm magit-section magit-utils git-commit log-edit pcvs-util add-log with-editor async-bytecomp async tramp-sh vc vc-dispatcher semantic/bovine/c semantic/decorate/include hideif semantic/bovine/c-by semantic/lex-spp semantic/bovine/gcc semantic/dep semantic/bovine semantic/analyze/refs semantic/analyze semantic/scope semantic/analyze/fcn macrostep-c cmacexp macrostep fic-ext-mode cpp disaster doc-mode xcscope outshine outshine-org-= cmds outorg highlight-parentheses guess-style filladapt cc-langs recentf tree-wi= dget windmove shr-color bbdb-hooks sort url-http url-gw url-auth gnus-cite smiley gnus-gravatar gravatar url-cache url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse url-vars s= hr browse-url mm-archive gnus-bcklg qp gnus-async gnus-ml ede/linux ede/make ede/cpp-root ede/emacs vc-git gnus-topic gnus-mlspl nndraft nnmh utf-7 network-stream starttls nnimap parse-time tls utf7 netrc nnfolder bbdb-gnus bbdb-snarf mail-extr bbdb-com warnings nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-cache gnus-demon nntp nnir gnus-notifica= tions gnus-fun gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap gnus-sum nnoo gnus-group gnus-undo nnmail mail-source notifications gnus-start gnus-= spec gnus-int gnus-range message sendmail rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win org-gnome-calendar dbus hl-line+ hl-line ace-link avy x= ml cursor-chg smart-mode-line-powerline-theme powerline powerline-separators c= olor powerline-themes smart-mode-line rich-minority which-key server flycheck de= rived json rx subr-x seq seq-24 pcase jka-compr compile let-alist info tex-site my-personal my-bindings hydra lv my-mail bbdb timezone my-org ob-screen ob-R ob-python ob-perl ob-octave ob-latex ob-gnuplot ob-dot ob-ditaa ob-C cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-= defs my-programming ede/generic ede/shell eieio-opt semantic/sb semantic/sort inversion semantic/db-global semantic/symref/global semantic/symref semantic/db-find semantic/db-ref cedet-global semantic/mru-bookmark semantic/db-mode semantic/db semantic/idle semantic/format semantic/ctxt semantic/decorate/mode semantic/tag-ls semantic/find semantic/decorate pulse semantic/util-modes semantic/util semantic semantic/tag semantic/lex semant= ic/fw mode-local my-writing my-writing-latex flyspell ispell my-ide ede/speedbar ede/files ede ede/base ede/auto ede/source eieio-base eieio-speedbar speedb= ar sb-image ezimage dframe eieio-custom cedet my-behaviour ediff-merg ediff-wi= nd ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff fuzzy cssh tra= mp tramp-compat auth-source eieio eieio-core password-cache tramp-loaddefs tra= mpver shell term disp-table ehelp ibuffer savehist desktop frameset time-stamp browse-kill-ring icomplete flx-ido flx ido-ubiquitous ido-completing-read+ cus-edit cus-start cus-load key-chord gnus gnus-ems nnheader gnus-util mail-utils mm-util mail-prsvr wid-edit org org-macro org-footnote org-pcomp= lete pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint comint ansi-color ob-core ob-eval org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs undo-tree diff hungry-delete autorevert filenotify whitespace anzu mule-util saveplace smartparens-config smartparens thingatpt dash cua-base delsel winner ring s= mex ido byte-opt my-appearance time time-date my-theme my-cmdline my-misc edmac= ro kmacro cl-macs my-package use-package diminish bind-key finder-inf .loaddefs advice el-get el-get-autoloading el-get-list-packages el-get-dependencies el-get-build el-get-status pp el-get-methods el-get-fossil el-get-svn el-get-pacman el-get-github-zip el-get-github-tar el-get-http-zip el-get-http-tar el-get-hg el-get-go el-get-git-svn el-get-fink el-get-emacs= wiki el-get-http el-get-notify help-mode easymenu el-get-emacsmirror el-get-gith= ub el-get-git el-get-elpa package epg-config el-get-darcs el-get-cvs el-get-bzr el-get-brew el-get-builtin el-get-apt-get el-get-recipes el-get-byte-compile el-get-custom el-get-core autoload help-fns lisp-mnt bytecomp byte-compile cl-extra cconv cl gv cl-loaddefs cl-lib dired debian-el debian-el-loaddefs emacs-goodies-el emacs-goodies-custom emacs-goodies-loaddefs easy-mmode dpkg-dev-el dpkg-dev-el-loaddefs bbdb-autoloads tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode regis= ter page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietname= se tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook= help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp fi= les text-properties overlay sha1 md5 base64 format env code-pages mule custom w= idget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 2406107 245774) (symbols 48 81875 64) (miscs 40 30275 9176) (strings 32 289550 44816) (string-bytes 1 17523205) (vectors 16 229225) (vector-slots 8 6260146 165024) (floats 8 41178 7977) (intervals 56 93999 1175) (buffers 960 489) (heap 1024 198499 22150))