From unknown Sun Jun 22 20:55:57 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#23809 <23809@debbugs.gnu.org> To: bug#23809 <23809@debbugs.gnu.org> Subject: Status: 24.5; Positive argument to 'posn-at-point' throws erros as being negative Reply-To: bug#23809 <23809@debbugs.gnu.org> Date: Mon, 23 Jun 2025 03:55:57 +0000 retitle 23809 24.5; Positive argument to 'posn-at-point' throws erros as be= ing negative reassign 23809 emacs submitter 23809 Llu=C3=ADs Vilanova severity 23809 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 20 12:31:17 2016 Received: (at submit) by debbugs.gnu.org; 20 Jun 2016 16:31:17 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 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 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 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 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 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 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) From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= To: bug-gnu-emacs@gnu.org Subject: 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> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) 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)) From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 20 16:13:48 2016 Received: (at 23809) by debbugs.gnu.org; 20 Jun 2016 20:13:48 +0000 Received: from localhost ([127.0.0.1]:48065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF5Zr-00028D-Q5 for submit@debbugs.gnu.org; Mon, 20 Jun 2016 16:13:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52299) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF5Zp-00027z-Db for 23809@debbugs.gnu.org; Mon, 20 Jun 2016 16:13:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bF5Zf-0003AG-CY for 23809@debbugs.gnu.org; Mon, 20 Jun 2016 16:13:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF5Zf-0003A2-9Y; Mon, 20 Jun 2016 16:13:35 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3834 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bF5Zb-00012e-Cy; Mon, 20 Jun 2016 16:13:33 -0400 Date: Mon, 20 Jun 2016 23:12:26 +0300 Message-Id: <83shw77h79.fsf@gnu.org> From: Eli Zaretskii To: =?iso-8859-1?Q?Llu=EDs?= Vilanova In-reply-to: <87k2hjn7pg.fsf@fimbulvetr.bsc.es> (message from =?iso-8859-1?Q?Llu=EDs?= Vilanova on Mon, 20 Jun 2016 18:30:51 +0200) Subject: Re: bug#23809: 24.5; Positive argument to 'posn-at-point' throws erros as being negative References: <87k2hjn7pg.fsf@fimbulvetr.bsc.es> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23809 Cc: 23809@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Lluís Vilanova > 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 21 09:08:18 2016 Received: (at 23809) by debbugs.gnu.org; 21 Jun 2016 13:08:18 +0000 Received: from localhost ([127.0.0.1]:48767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFLPe-00031W-0k for submit@debbugs.gnu.org; Tue, 21 Jun 2016 09:08:18 -0400 Received: from mout.gmx.net ([212.227.15.15]:53887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFLPc-00031G-AE for 23809@debbugs.gnu.org; Tue, 21 Jun 2016 09:08:16 -0400 Received: from [192.168.1.100] ([212.95.7.94]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LyEJp-1bTWKZ0H6z-015XzZ; Tue, 21 Jun 2016 15:08:06 +0200 Message-ID: <57693C2D.60000@gmx.at> Date: Tue, 21 Jun 2016 15:07:57 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii , =?UTF-8?B?TGx1w61zIFZpbGFub3Zh?= Subject: Re: bug#23809: 24.5; Positive argument to 'posn-at-point' throws erros as being negative References: <87k2hjn7pg.fsf@fimbulvetr.bsc.es> <83shw77h79.fsf@gnu.org> In-Reply-To: <83shw77h79.fsf@gnu.org> Content-Type: multipart/mixed; boundary="------------090606030701010002080503" X-Provags-ID: V03:K0:rIFDKzjhooEFVY5j9VbId0TizN5dweEQZNsBi/Xn8SAc6SyMjbp 5t9tvbXkaInGUHlLSWUEHWTbqY3ZhP7Gg4WpDpmHCi+sUafhZB1FUBsNvRLOcI0nlaL+FAc m+hYfwiGNZVYc0bq+5/EI+qAbid4Zt6BmLPzy/rICCPn1Nb2eT7e+f8dQwCKPARgBNdT2AT ehwN0poV8qMUJf32uCDrg== X-UI-Out-Filterresults: notjunk:1;V01:K0:3dnJCUc6e1I=:YExAqrMA6ihhqCDop0kXoa Hf504ienRh+vmczbeAATHWvMt7NOPryUhNNYGGOE+G+jwfZHwTlDe54YgzdTgWwgzti6F8Yeq Uh4xaA17AHWBKbI4W7ESc1wwN2THOl5JLOZqMgNsXC0m8kXhkJ/GpW9cfWAHlJaeIyDlhGW43 THlq1Z75+fuB/KQdSFQZfVoKsFGMkA1sfbflb6zMEUpU3n8wjSV+6xWdpE6ana4J+a1qBIDWk F/VuMltrh5vrGF28wmEw1OPcZietMh0tvEAHPMUygfoi4gbT77pfvcEtBbO8EnYJ6eS4gz3Ex e25G+955xwnzOE848Hikikzqa3sI6KiKouygn4I+0/r13s/bOtiG2LuOe67K77AeU2+MfNNNn bK+V6ZwMAm6ayADS6ZrHvAIUGwGm+VdFVN90SMZTJqryb7ION/S3SYP2Eki66eLtSmfYFRiL/ XEAvTVczoFaMN35mO+ogNxXKgVSZayk8HL2AhKA53kWhDQilHg82ctOVNJ2vDnFTkj8oXCpSC uoeuiHor97Nb0B21k7PDnFL+uI+9nv1RdzHEvEYawb0A3lTQKqworbgHX6eWFOkSUOGO5mXxX lObj1OL/YjWiEwpvUMb87HN4KVZb/y8ks7lSoj3pLa1EUGIdA/zoMHrH7gwFUZ5IcivB/oKtr 8+unbOmyD3iiGnZbAtjzbn/7dxlHdm2GRn9ibyPv229BE7TYS1VHFT+4LOlJAsvaxHfv0tmE4 l1lODdi3c39FRlTBfed7XFp+exDNdgOl59OGlXOh3kJh6JknNE0ABCsTtfIZ8oHoezAgA0z3i 7iygIkz X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23809 Cc: 23809@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) This is a multi-part message in MIME format. --------------090606030701010002080503 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > 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 --------------090606030701010002080503 Content-Type: text/plain; charset=windows-1252; name="window.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="window.diff" ZGlmZiAtLWdpdCBhL2xpc3Avd2luZG93LmVsIGIvbGlzcC93aW5kb3cuZWwKaW5kZXggZjdh NTQ3Yi4uYTA2ZjMzNCAxMDA2NDQKLS0tIGEvbGlzcC93aW5kb3cuZWwKKysrIGIvbGlzcC93 aW5kb3cuZWwKQEAgLTIwNjgsNyArMjA2OCw5IEBAIHdpbmRvdy1pbi1kaXJlY3Rpb24KIAkg ICAgKGlmIGhvcgogCQkod2luZG93LXBpeGVsLXRvcCB3aW5kb3cpCiAJICAgICAgKHdpbmRv dy1waXhlbC1sZWZ0IHdpbmRvdykpKQotCSAgICgobGV0ICgocG9zbi1jb25zIChudGggMiAo cG9zbi1hdC1wb2ludCAod2luZG93LXBvaW50IHdpbmRvdykgd2luZG93KSkpKQorCSAgICgo bGV0ICgocG9zbi1jb25zIChjb25kaXRpb24tY2FzZSBuaWwKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChudGggMiAocG9zbi1hdC1wb2ludCAod2luZG93LXBvaW50IHdp bmRvdykgd2luZG93KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZXJyb3Ig bmlsKSkpKQogCSAgICAgIChpZiBob3IKIAkJICAoKyAob3IgKGNkciBwb3NuLWNvbnMpIDEp ICh3aW5kb3ctcGl4ZWwtdG9wIHdpbmRvdykpCiAJCSgrIChvciAoY2FyIHBvc24tY29ucykg MSkgKHdpbmRvdy1waXhlbC1sZWZ0IHdpbmRvdykpKSkpKSkKCg== --------------090606030701010002080503-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 21 09:18:02 2016 Received: (at 23809) by debbugs.gnu.org; 21 Jun 2016 13:18:02 +0000 Received: from localhost ([127.0.0.1]:48785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFLZ0-0003Js-LD for submit@debbugs.gnu.org; Tue, 21 Jun 2016 09:18:02 -0400 Received: from roura.ac.upc.edu ([147.83.33.10]:43284 helo=roura.ac.upc.es) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFLYv-0003Ja-Al for 23809@debbugs.gnu.org; Tue, 21 Jun 2016 09:17:57 -0400 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 u5LDHkNR018836; Tue, 21 Jun 2016 15:17:46 +0200 Received: from localhost (unknown [84.88.51.85]) by gw-2.ac.upc.es (Postfix) with ESMTPSA id 20549758; Tue, 21 Jun 2016 15:17:46 +0200 (CEST) From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= To: Eli Zaretskii Subject: Re: bug#23809: 24.5; Positive argument to 'posn-at-point' throws erros as being negative References: <87k2hjn7pg.fsf@fimbulvetr.bsc.es> <83shw77h79.fsf@gnu.org> Date: Tue, 21 Jun 2016 15:17:46 +0200 In-Reply-To: <83shw77h79.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 20 Jun 2016 23:12:26 +0300") Message-ID: <87oa6uk7et.fsf@fimbulvetr.bsc.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.7 (---) X-Debbugs-Envelope-To: 23809 Cc: 23809@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.7 (---) Eli Zaretskii writes: >> From: Llu=C3=ADs Vilanova >> Date: Mon, 20 Jun 2016 18:30:51 +0200 >>=20 >> To reproduce: >>=20 >> * 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: >>=20 >> 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? If I evaluate it after the error (when in the Backtrace buffer), I get nil (pos-visible-in-window-p (window-point window) window). Using gdb it's a different value (see below). >> Note how the argument to posn-at-point (returned by window-point) is act= ually >> positive (619194), but the error raised by Emacs complains about the num= ber >> 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.) I have zero knowledge on Emacs' source code, but here's the little informat= ion I could gather: Fposn_at_point(...) Fvisible_in_window_p(...) -> (824 . -98) pos_visible_p(...) -> line 1713 : *x =3D it2.current_x; value 824 line 1714 : *y =3D 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 sc= roll 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 ea= sy to reproduce. But remember I have zero knowledge on emacs' sources, some I'm p= retty blind here. [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D21732#8 Thanks, Lluis From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 21 11:16:19 2016 Received: (at 23809) by debbugs.gnu.org; 21 Jun 2016 15:16:19 +0000 Received: from localhost ([127.0.0.1]:49905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFNPX-0006T0-4R for submit@debbugs.gnu.org; Tue, 21 Jun 2016 11:16:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFNPV-0006Sl-Je for 23809@debbugs.gnu.org; Tue, 21 Jun 2016 11:16:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFNPN-0004iQ-6H for 23809@debbugs.gnu.org; Tue, 21 Jun 2016 11:16:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46390) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFNPN-0004iF-3R; Tue, 21 Jun 2016 11:16:09 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4923 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bFNPL-0005kx-7S; Tue, 21 Jun 2016 11:16:07 -0400 Date: Tue, 21 Jun 2016 18:15:16 +0300 Message-Id: <838txy7euz.fsf@gnu.org> From: Eli Zaretskii To: martin rudalics In-reply-to: <57693C2D.60000@gmx.at> (message from martin rudalics on Tue, 21 Jun 2016 15:07:57 +0200) Subject: Re: bug#23809: 24.5; Positive argument to 'posn-at-point' throws erros as being negative References: <87k2hjn7pg.fsf@fimbulvetr.bsc.es> <83shw77h79.fsf@gnu.org> <57693C2D.60000@gmx.at> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23809 Cc: 23809@debbugs.gnu.org, vilanova@ac.upc.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > Date: Tue, 21 Jun 2016 15:07:57 +0200 > From: martin rudalics > CC: 23809@debbugs.gnu.org > > > 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? I don't like sweeping problems under the carpet. We should understand how come we get negative pixel coordinates in these cases, it's most likely some bug in pos_visible_p or somesuch. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 22 02:11:05 2016 Received: (at 23809) by debbugs.gnu.org; 22 Jun 2016 06:11:05 +0000 Received: from localhost ([127.0.0.1]:50292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFbNR-0004Bp-NB for submit@debbugs.gnu.org; Wed, 22 Jun 2016 02:11:05 -0400 Received: from mout.gmx.net ([212.227.17.22]:56151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFbNP-0004BF-97 for 23809@debbugs.gnu.org; Wed, 22 Jun 2016 02:11:03 -0400 Received: from [192.168.1.100] ([212.95.7.11]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MZOan-1axF0U0c2v-00LGRm; Wed, 22 Jun 2016 08:10:55 +0200 Message-ID: <576A2BE4.4070504@gmx.at> Date: Wed, 22 Jun 2016 08:10:44 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#23809: 24.5; Positive argument to 'posn-at-point' throws erros as being negative References: <87k2hjn7pg.fsf@fimbulvetr.bsc.es> <83shw77h79.fsf@gnu.org> <57693C2D.60000@gmx.at> <838txy7euz.fsf@gnu.org> In-Reply-To: <838txy7euz.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:hmJ7IqnSSxeEi46ztSJwQ5M1RktAgW0LG1Z/Wvp9Nv6aNTw1c5r f7U5UEYVTaPTRoAtFdMzrlcZgZhN1yVbX7NQy18h1jYOuYr3bjo+UNV36bitDuFvGk2CFBa y7oVIEl2YEhSny7b2gqrMaqZJkcgPvMtqjn10mMDvgbJ51PQiL7tlDF4vP6XENBxk1BvzJ8 CB4HkISZwu/5maRuiJYaA== X-UI-Out-Filterresults: notjunk:1;V01:K0:v57YN/E68LQ=:UFvBxlOA23aiP6dYjTNZOf sSAISJ+DhhiTqYpjR3WHVQc2e0ZosRCfgj9VqdZgSpaR87klHjyJWCjgWlrqejeVFcXxNZwwg XRNfF3KSBJCAQnxqQXDKtkyS5cyqwR+yK7TWuDQdGYBiBoWqmSpof7IqwqRPGKvKjNnBZcT+l uzmL8Hpw8+o5LFSo9zrgVYmQ/pZaSRAhxwhSfCIJuqzb8h7+23ew/HvGj5Q9Ss7Ele+oQnldz l9NVXBzkhr1RX1RpoJrGH5yMX/139zzRH0UTA5sQmquqFWWAgrm7Fqeao0GuFY5Us04DdylYo 1V4xed8nd7jJaTMuNdN5aERpl4Pa2vcZ0zNO5IhhERH9kE2/s4pT4I4qGZYFI/Rjl0IiQSaPi M+4j7s9B7JqILwq4pr7zLpqCRyRc5B85ijyVHjOnDkSBJXetMim127U6aOYLpxQmgGHSw85Ao DxgtaxuS4nwwOT/uKr5jiy1B2Mlsd5+/0B09H4SDVcW4N0ft7WAkcNRF/1I8c58lvMQBGSFcN uhYaxpS8XcR8I7ZILg+Baq5U0YimfuuZylsZjUhHds5CZN1/ZPCj1StqRQJi1MAAGl5RHDkyS UCAWbMmjXs3ihFaSY+gODU7NXpDjxw0uJYT0hhBeyYOnoX+3OYN6xyfXAnFiyhYVvihz/4+31 EZntQb1xrEK83E7eeJ9FEYWK+Z/pacyUxw6wtXGJvwhO+gZGQCr88WXyEXsTWmKUhuYibWMln y2lscVIDYH2y5dbkCq5JO29nJLLf1rYUUDF0BAnI+FujJOt7Olsoo25L1xHIVOlTpIjiebtLm rQQurHiUr1ceyLoalQupCSBLf7HIQ== X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 23809 Cc: 23809@debbugs.gnu.org, vilanova@ac.upc.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) > I don't like sweeping problems under the carpet. We should understand= > how come we get negative pixel coordinates in these cases, it's most > likely some bug in pos_visible_p or somesuch. A =E2=80=98condition-case=E2=80=99 would fix the problem on the release b= ranch and give you all the time to find the real cause. Also, unless we guard against =E2=80=98posn-at-point=E2=80=99 ever returning a negative y-value, there'= s no guarantee that finding the cause of the present problem will fix this issue once and for all. martin From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 22 11:08:00 2016 Received: (at 23809) by debbugs.gnu.org; 22 Jun 2016 15:08:00 +0000 Received: from localhost ([127.0.0.1]:51297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFjl1-00054m-Jo for submit@debbugs.gnu.org; Wed, 22 Jun 2016 11:08:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFjl0-00054a-Cl for 23809@debbugs.gnu.org; Wed, 22 Jun 2016 11:07:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFjkr-0006VR-7G for 23809@debbugs.gnu.org; Wed, 22 Jun 2016 11:07:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFjkr-0006VL-3p; Wed, 22 Jun 2016 11:07:49 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1863 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bFjkn-0001c9-3F; Wed, 22 Jun 2016 11:07:46 -0400 Date: Wed, 22 Jun 2016 18:06:56 +0300 Message-Id: <8360t15kkv.fsf@gnu.org> From: Eli Zaretskii To: martin rudalics In-reply-to: <576A2BE4.4070504@gmx.at> (message from martin rudalics on Wed, 22 Jun 2016 08:10:44 +0200) Subject: Re: bug#23809: 24.5; Positive argument to 'posn-at-point' throws erros as being negative References: <87k2hjn7pg.fsf@fimbulvetr.bsc.es> <83shw77h79.fsf@gnu.org> <57693C2D.60000@gmx.at> <838txy7euz.fsf@gnu.org> <576A2BE4.4070504@gmx.at> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 23809 Cc: 23809@debbugs.gnu.org, vilanova@ac.upc.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.5 (------) > Date: Wed, 22 Jun 2016 08:10:44 +0200 > From: martin rudalics > CC: vilanova@ac.upc.edu, 23809@debbugs.gnu.org > > > I don't like sweeping problems under the carpet. We should understand > > how come we get negative pixel coordinates in these cases, it's most > > likely some bug in pos_visible_p or somesuch. > > A ‘condition-case’ would fix the problem on the release branch and give > you all the time to find the real cause. the problem doesn't seem grave enough to rush with a solution. > Also, unless we guard against ‘posn-at-point’ ever returning a > negative y-value, there's no guarantee that finding the cause of the > present problem will fix this issue once and for all. We will cross that bridge when we get to it. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 09 07:44:39 2016 Received: (at 23809) by debbugs.gnu.org; 9 Jul 2016 11:44:39 +0000 Received: from localhost ([127.0.0.1]:43282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLqgZ-0005P9-13 for submit@debbugs.gnu.org; Sat, 09 Jul 2016 07:44:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57681) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLqgX-0005Ox-RC for 23809@debbugs.gnu.org; Sat, 09 Jul 2016 07:44:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLqgP-0007vf-ER for 23809@debbugs.gnu.org; Sat, 09 Jul 2016 07:44:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLqgP-0007ur-BD; Sat, 09 Jul 2016 07:44:29 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1579 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bLqgN-0005Ot-EZ; Sat, 09 Jul 2016 07:44:27 -0400 Date: Sat, 09 Jul 2016 14:44:19 +0300 Message-Id: <83bn27ghnw.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?Llu=C3=ADs?= Vilanova In-reply-to: <87oa6uk7et.fsf@fimbulvetr.bsc.es> (message from =?utf-8?Q?Ll?= =?utf-8?Q?u=C3=ADs?= Vilanova on Tue, 21 Jun 2016 15:17:46 +0200) Subject: Re: bug#23809: 24.5; Positive argument to 'posn-at-point' throws erros as being negative References: <87k2hjn7pg.fsf@fimbulvetr.bsc.es> <83shw77h79.fsf@gnu.org> <87oa6uk7et.fsf@fimbulvetr.bsc.es> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 23809 Cc: 23809@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.3 (------) > From: Lluís Vilanova > Cc: 23809@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. . 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? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 11 06:23:25 2016 Received: (at 23809) by debbugs.gnu.org; 11 Jul 2016 10:23:25 +0000 Received: from localhost ([127.0.0.1]:46079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMYN2-0004DW-Sc for submit@debbugs.gnu.org; Mon, 11 Jul 2016 06:23:25 -0400 Received: from roura.ac.upc.es ([147.83.33.10]:37812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMYN0-0004DE-Cr for 23809@debbugs.gnu.org; Mon, 11 Jul 2016 06:23:23 -0400 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 u6BANFL1022917; Mon, 11 Jul 2016 12:23:15 +0200 Received: from localhost (unknown [84.88.51.85]) by gw-2.ac.upc.es (Postfix) with ESMTPSA id 1FDD375B; Mon, 11 Jul 2016 12:23:15 +0200 (CEST) From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= To: Eli Zaretskii Subject: Re: bug#23809: 24.5; Positive argument to 'posn-at-point' throws erros as being negative References: <87k2hjn7pg.fsf@fimbulvetr.bsc.es> <83shw77h79.fsf@gnu.org> <87oa6uk7et.fsf@fimbulvetr.bsc.es> <83bn27ghnw.fsf@gnu.org> Date: Mon, 11 Jul 2016 12:23:15 +0200 In-Reply-To: <83bn27ghnw.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Jul 2016 14:44:19 +0300") Message-ID: <87h9bwscbw.fsf@fimbulvetr.bsc.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 23809 Cc: 23809@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Eli Zaretskii writes: >> From: Llu=C3=ADs Vilanova >> Cc: 23809@debbugs.gnu.org >> Date: Tue, 21 Jun 2016 15:17:46 +0200 >>=20 >> > 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.) >>=20 >> I have zero knowledge on Emacs' source code, but here's the little infor= mation I >> could gather: >>=20 >> Fposn_at_point(...) >> Fvisible_in_window_p(...) -> (824 . -98) >> pos_visible_p(...) -> >> line 1713 : *x =3D it2.current_x; >> value 824 >> line 1714 : *y =3D it2.current_y + it2.max_ascent - it2.ascent; >> value -98 533 533 >> Fposn_at_x_y(824, -98, window, nil) >>=20 >> 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 negati= ve >> position AFAIU. >>=20 >> 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 th= at the keys used to move point actually scroll the window, and there is no vis= ible point in it. Thanks, Lluis From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 11 10:51:34 2016 Received: (at 23809) by debbugs.gnu.org; 11 Jul 2016 14:51:34 +0000 Received: from localhost ([127.0.0.1]:46976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMcYY-0003zk-Hv for submit@debbugs.gnu.org; Mon, 11 Jul 2016 10:51:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMcYX-0003zY-0f for 23809@debbugs.gnu.org; Mon, 11 Jul 2016 10:51:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMcYQ-0002JD-SM for 23809@debbugs.gnu.org; Mon, 11 Jul 2016 10:51:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMcYQ-0002J3-Os; Mon, 11 Jul 2016 10:51:26 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3822 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bMcYO-0006vL-Jm; Mon, 11 Jul 2016 10:51:25 -0400 Date: Mon, 11 Jul 2016 17:51:06 +0300 Message-Id: <83poqkcjol.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?Llu=C3=ADs?= Vilanova In-reply-to: <87h9bwscbw.fsf@fimbulvetr.bsc.es> (message from =?utf-8?Q?Ll?= =?utf-8?Q?u=C3=ADs?= Vilanova on Mon, 11 Jul 2016 12:23:15 +0200) Subject: Re: bug#23809: 24.5; Positive argument to 'posn-at-point' throws erros as being negative References: <87k2hjn7pg.fsf@fimbulvetr.bsc.es> <83shw77h79.fsf@gnu.org> <87oa6uk7et.fsf@fimbulvetr.bsc.es> <83bn27ghnw.fsf@gnu.org> <87h9bwscbw.fsf@fimbulvetr.bsc.es> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 23809 Cc: 23809@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.3 (------) > From: Lluís Vilanova > Cc: 23809@debbugs.gnu.org > Date: Mon, 11 Jul 2016 12:23:15 +0200 > > > . 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. Strange indeed. Thanks in advance. > > . 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. That sounds like the normal image scrolling feature of Emacs. The reason I asked is that I tried to reproduce the problem by scrolling through a very large image, but couldn't. So there's some other factor at work here that I cannot grasp. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 26 18:12:06 2016 Received: (at control) by debbugs.gnu.org; 26 Oct 2016 22:12:06 +0000 Received: from localhost ([127.0.0.1]:57958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzWQY-0001W2-Ct for submit@debbugs.gnu.org; Wed, 26 Oct 2016 18:12:06 -0400 Received: from mail-oi0-f49.google.com ([209.85.218.49]:32909) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzWQV-0001VY-M0 for control@debbugs.gnu.org; Wed, 26 Oct 2016 18:12:04 -0400 Received: by mail-oi0-f49.google.com with SMTP id y2so14906592oie.0 for ; Wed, 26 Oct 2016 15:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=jl4hR9ExhtDdwocEv5FzfmV2EXIGmTC5owbtPGwrUj0=; b=dtA3i1bP5Dshj+C+Hb8v+zlW2vYPBa5RevJ2G5rx+1g6oI0df+yHUOFnxywfkYsEuM wKI+/a+iBuGVXwMs3Ou56gXOcGryG7Nhmt3NxfPmBBXJ8N4p3Xu5Di1tYFuYBhTiLcYp LXURr06+QEFTjrbOWz7k2Hjefh0FxvQRx3ZhLiVrh3ChHLIRQ9LJyp5a45BK0pbMMyXO y9TxZPYEQCdirLarUTLa0fOJdJJvpLuoy2nt22BL+Pc0t/fNy2pQzPqrtfBo28FtnCZX lfyBP6AuUQZ5saW07MZhQ2JwzF9d7eGUsPyKnrg3lXmR4OgkzZEzpZ+LbidOqvQkOtPQ GdfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=jl4hR9ExhtDdwocEv5FzfmV2EXIGmTC5owbtPGwrUj0=; b=AU4P86GqixgDSjH495k5JB44R4H0zZU3Zjt0+ff6mjfplc3AAA0Qxh1NrRl2QAVGvh mbqzytxXnhI9209oRWqRov7vTmWo4eQGxq8mZsMNmDMS/hikWpGBPg+CKPdLEIV7VCJO rjOc4e4rP5wspuEiemtyHVDHj3jnPcES1BH2jpl+BDoagXOQBVn8rfOcVSM+QipvGSer PdxetxsGN9cmNCrKCKIhZG9sSb0OHgDqJhetSUz394gFJ0VgUEtPgInatyetTtuhdI8C IpGn+oDGCFCWtR1XH3xzChblRaT2zzACKKX7q6nzsIt55dMCSLC85A1Bbd/9pZj7Z9ZW 0tEw== X-Gm-Message-State: ABUngvca2EViuOYowyNnHjCIUuPa3/vNbfvhEfWBWgvRDIteFrggKqqkzJvpcZTUeT2TjV000NZoAxneZcyawg== X-Received: by 10.157.54.5 with SMTP id w5mr3295639otb.211.1477519917841; Wed, 26 Oct 2016 15:11:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.29.239 with HTTP; Wed, 26 Oct 2016 15:11:57 -0700 (PDT) In-Reply-To: <87funidh61.fsf@hochschule-trier.de> References: <87k2cudhgg.fsf@hochschule-trier.de> <87funidh61.fsf@hochschule-trier.de> From: Noam Postavsky Date: Wed, 26 Oct 2016 18:11:57 -0400 X-Google-Sender-Auth: 8R3VBaG7Pj_ndOVOWAS5rYSfu-U Message-ID: Subject: Re: bug#24804: Acknowledgement (25.1; posn-at-point erroneously signals an error) To: GNU bug tracker automated control server Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) merge 24804 23809 21732 quit On Wed, Oct 26, 2016 at 3:49 PM, Andreas Politz wrote: > > Duplicate of #23809 and #21732 -- should have checked first. > > -ap > > > From unknown Sun Jun 22 20:55:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 27 Nov 2016 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator