From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#57349: 29.0.50; pixel-scroll-precision-mode. error integer-or-marker-p nil Date: Tue, 23 Aug 2022 08:12:54 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40877"; mail-complaints-to="usenet@ciao.gmane.io" To: 57349@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 23 08:25:59 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQNMM-000AOV-Rj for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Aug 2022 08:25:58 +0200 Original-Received: from localhost ([::1]:34118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQNML-0006ur-Cn for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Aug 2022 02:25:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQNAo-0000Yw-Nj for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 02:14:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQNAo-0000qr-F8 for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 02:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oQNAo-0003nZ-6i for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 02:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Aug 2022 06:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57349 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166123518714524 (code B ref -1); Tue, 23 Aug 2022 06:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Aug 2022 06:13:07 +0000 Original-Received: from localhost ([127.0.0.1]:42325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQN9u-0003mB-TX for submit@debbugs.gnu.org; Tue, 23 Aug 2022 02:13:07 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:56682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQN9s-0003m3-EW for submit@debbugs.gnu.org; Tue, 23 Aug 2022 02:13:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQN9p-0008Hx-NB for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 02:13:04 -0400 Original-Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:38691) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQN9m-0000mI-PE for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 02:13:01 -0400 Original-Received: by mail-ed1-x532.google.com with SMTP id a22so16666727edj.5 for ; Mon, 22 Aug 2022 23:12:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc; bh=WfRE7MxPQBtMKgCT5nhsnOw5hybw4GYvKTlGC8ILA4A=; b=RNahu8zIcDrCfLxCpgnF8YOUBxZ+kkHGjc5IeqVyGlsgd8dFl3cSyZ4fIiNBlwg7Lw vS8AufxfEiuhE4mj0nPXoWVBA2LKT4Ik9yiwnnAaenE9CB8AjyPzc3wjkqY8s0E0Dg8O WM11kUrdXckEjhc4ZpdziGy7BWWNMpzSG7sYo9ath+LzB+NXTWXeekqlORpMmHESZw/q dTG34LTviZw6gu+4fkwOvHgw04v2JImkdSs8kr0s0RNE/RggG7DNzxh8lSK1/6Y/mh3T mhxRaDNqtBeahJAxLCOgVLIGxDDVfgmjLbrYUPVPTEqiOnTHVUR2TOVUtWO1M49O067w 7YUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc; bh=WfRE7MxPQBtMKgCT5nhsnOw5hybw4GYvKTlGC8ILA4A=; b=SkRCguFpIOmZ6jTzPlGLBa6oC2dms+u6Bh1oAWQcI+g8V3ekMN0QX/JB27one+bcMo Aq4ok6HWOghm/erKy72UNi/7hs5BEvY8OQGKHG9yXU+fQ2zRwYjyK/lAilewyHCbGWuY K2UR8ePp2BakYJQ+PahDOHg+3xzS5RDCQcn3FmWp9fEPGDo9NP26OCuifQjmKe4YTFEP kvN+x2q1sC3+23SO6LugGmypAYS7xyWbE/3TatFGSGfymSAxP/08gggrnJ3cFcYJDZ3C 3wpDxeEHj2+sRcD6sXQrjcpxKDskvr/t1DUbKeqS7WMgvN8BUaqhhmExXTVoP25Tc/1O uC+w== X-Gm-Message-State: ACgBeo0Cv++wfttOTBIZGhGmZptAUBIA/9NglWLKzclvp8Mf1abDOyFq Nj67KSLLeLpqPk05GnWtQ5Ulb9+mY9s= X-Google-Smtp-Source: AA6agR4hQx44mxkjw+R5gT860VPntITZn709qX/Y1E7k9YPKWXe0/4YtY1CyHqDoV/S8TAK2Pg9Nwg== X-Received: by 2002:aa7:c7da:0:b0:440:d482:36b5 with SMTP id o26-20020aa7c7da000000b00440d48236b5mr2324181eds.21.1661235176133; Mon, 22 Aug 2022 23:12:56 -0700 (PDT) Original-Received: from Mini.fritz.box (pd9e36133.dip0.t-ipconnect.de. [217.227.97.51]) by smtp.gmail.com with ESMTPSA id kz10-20020a17090777ca00b0073d753759fasm3239127ejc.172.2022.08.22.23.12.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Aug 2022 23:12:55 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x532.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:240498 Archived-At: In GNU Emacs 29.0.50 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.5.1 (Build 21G83)) of 2022-08-22 built on Mini.fritz.box Repository revision: 0c410206aa91b9bc9a0922d63ec34de765eb86a6 Repository branch: master Windowing system distributor 'Apple', version 10.3.2113 System Description: macOS 12.5.1 emacs -Q M-x pixel-scroll-precision-mode RET Move the mouse to the lower right corner of the Emacs frame. On macOS, the mouse cursor changes shape to a double-arrow pointing 45 degrees in the direction of the upper-left and lower-right corner of the screen. Scroll the mouse wheel. This either prints messages like this is undefined is undefined is undefined [45 times] is undefined or sometimes errors 'Wrong type argument: integer-or-marker-p, nil'. Not sure what to make of this. Looks like posn-at-x-y returns a posn with a nil point? Or maybe posn-point returns nil? Backtrace of the error: goto-char(nil) (save-excursion (goto-char point) (vertical-motion (- (1+ scroll-margin))= ) (point)) (let* ((edges (window-edges nil t nil t)) (max-y (- (nth 3 edges) (nth 1 = edges))) (usable-height max-y) (posn (posn-at-x-y 0 (+ (window-tab-line-hei= ght) (window-header-line-height) (- max-y delta)))) (point (posn-point posn= )) (up-point (save-excursion (goto-char point) (vertical-motion (- (1+ scro= ll-margin))) (point)))) (if (> (point) up-point) (progn (if (let ((pos-visi= ble (pos-visible-in-window-p up-point nil t))) (or (eq (length pos-visible)= 2) (let* (... ... ...) (if usable-height ...)))) (progn (goto-char up-poin= t))))) (let ((current-vscroll (window-vscroll nil t))) (setq delta (- delta= current-vscroll)) (set-window-vscroll nil 0 t t) (if (> delta 0) (progn (l= et* ((start (window-start)) (dims (window-text-pixel-size nil ... start nil= nil nil t)) (height (nth 1 dims)) (position (nth 2 dims))) (set-window-sta= rt nil position t) (if (> height usable-height) (progn (goto-char position)= )) (if (or (not position) (eq position start)) (progn (signal ... nil))) (s= etq delta (- delta height))))) (if (< delta 0) (progn (set-window-vscroll n= il (- delta) t t))))) pixel-scroll-precision-scroll-up-page(0) (while (> delta max-height) (pixel-scroll-precision-scroll-up-page max-he= ight) (setq delta (- delta max-height))) (let ((max-height (- (window-text-height nil t) (frame-char-height)))) (w= hile (> delta max-height) (pixel-scroll-precision-scroll-up-page max-height= ) (setq delta (- delta max-height))) (pixel-scroll-precision-scroll-up-page= delta)) pixel-scroll-precision-scroll-up(1) (if (< delta 0) (pixel-scroll-precision-scroll-down (- delta)) (pixel-scr= oll-precision-scroll-up delta)) (progn (if (< delta 0) (pixel-scroll-precision-scroll-down (- delta)) (pi= xel-scroll-precision-scroll-up delta)) (pixel-scroll-accumulate-velocity de= lta)) (condition-case nil (progn (if (< delta 0) (pixel-scroll-precision-scroll= -down (- delta)) (pixel-scroll-precision-scroll-up delta)) (pixel-scroll-ac= cumulate-velocity delta)) (beginning-of-buffer (message (error-message-stri= ng '(beginning-of-buffer)))) (end-of-buffer (message (error-message-string = '(end-of-buffer))))) (if (or (and pixel-scroll-precision-interpolate-mice (eq (device-class la= st-event-frame last-event-device) 'mouse)) (and pixel-scroll-precision-larg= e-scroll-height (> (abs delta) pixel-scroll-precision-large-scroll-height) = (let* ((kin-state (pixel-scroll-kinetic-state)) (ring (aref kin-state 0)) (= time (aref kin-state 1))) (or (null time) (> (- (float-time) time) 1.0) (an= d (consp ring) (ring-empty-p ring)))))) (progn (let ((kin-state (pixel-scro= ll-kinetic-state))) (aset kin-state 0 (make-ring 30)) (aset kin-state 1 nil= )) (pixel-scroll-precision-interpolate delta current-window)) (condition-ca= se nil (progn (if (< delta 0) (pixel-scroll-precision-scroll-down (- delta)= ) (pixel-scroll-precision-scroll-up delta)) (pixel-scroll-accumulate-veloci= ty delta)) (beginning-of-buffer (message (error-message-string '(beginning-= of-buffer)))) (end-of-buffer (message (error-message-string '(end-of-buffer= )))))) (progn (select-window (car save-selected-window--state) 'norecord) (if (o= r (and pixel-scroll-precision-interpolate-mice (eq (device-class last-event= -frame last-event-device) 'mouse)) (and pixel-scroll-precision-large-scroll= -height (> (abs delta) pixel-scroll-precision-large-scroll-height) (let* ((= kin-state (pixel-scroll-kinetic-state)) (ring (aref kin-state 0)) (time (ar= ef kin-state 1))) (or (null time) (> (- ... time) 1.0) (and (consp ring) (r= ing-empty-p ring)))))) (progn (let ((kin-state (pixel-scroll-kinetic-state)= )) (aset kin-state 0 (make-ring 30)) (aset kin-state 1 nil)) (pixel-scroll-= precision-interpolate delta current-window)) (condition-case nil (progn (if= (< delta 0) (pixel-scroll-precision-scroll-down (- delta)) (pixel-scroll-p= recision-scroll-up delta)) (pixel-scroll-accumulate-velocity delta)) (begin= ning-of-buffer (message (error-message-string '(beginning-of-buffer)))) (en= d-of-buffer (message (error-message-string '(end-of-buffer))))))) (unwind-protect (progn (select-window (car save-selected-window--state) '= norecord) (if (or (and pixel-scroll-precision-interpolate-mice (eq (device-= class last-event-frame last-event-device) 'mouse)) (and pixel-scroll-precis= ion-large-scroll-height (> (abs delta) pixel-scroll-precision-large-scroll-= height) (let* ((kin-state ...) (ring ...) (time ...)) (or (null time) (> ..= . 1.0) (and ... ...))))) (progn (let ((kin-state (pixel-scroll-kinetic-stat= e))) (aset kin-state 0 (make-ring 30)) (aset kin-state 1 nil)) (pixel-scrol= l-precision-interpolate delta current-window)) (condition-case nil (progn (= if (< delta 0) (pixel-scroll-precision-scroll-down (- delta)) (pixel-scroll= -precision-scroll-up delta)) (pixel-scroll-accumulate-velocity delta)) (beg= inning-of-buffer (message (error-message-string '...))) (end-of-buffer (mes= sage (error-message-string '...)))))) (internal--after-with-selected-window= save-selected-window--state)) (save-current-buffer (unwind-protect (progn (select-window (car save-sele= cted-window--state) 'norecord) (if (or (and pixel-scroll-precision-interpol= ate-mice (eq (device-class last-event-frame last-event-device) 'mouse)) (an= d pixel-scroll-precision-large-scroll-height (> (abs delta) pixel-scroll-pr= ecision-large-scroll-height) (let* (... ... ...) (or ... ... ...)))) (progn= (let ((kin-state ...)) (aset kin-state 0 (make-ring 30)) (aset kin-state 1= nil)) (pixel-scroll-precision-interpolate delta current-window)) (conditio= n-case nil (progn (if (< delta 0) (pixel-scroll-precision-scroll-down ...) = (pixel-scroll-precision-scroll-up delta)) (pixel-scroll-accumulate-velocity= delta)) (beginning-of-buffer (message (error-message-string ...))) (end-of= -buffer (message (error-message-string ...)))))) (internal--after-with-sele= cted-window save-selected-window--state))) (let ((save-selected-window--state (internal--before-with-selected-window= window))) (save-current-buffer (unwind-protect (progn (select-window (car = save-selected-window--state) 'norecord) (if (or (and pixel-scroll-precision= -interpolate-mice (eq ... ...)) (and pixel-scroll-precision-large-scroll-he= ight (> ... pixel-scroll-precision-large-scroll-height) (let* ... ...))) (p= rogn (let (...) (aset kin-state 0 ...) (aset kin-state 1 nil)) (pixel-scrol= l-precision-interpolate delta current-window)) (condition-case nil (progn (= if ... ... ...) (pixel-scroll-accumulate-velocity delta)) (beginning-of-buf= fer (message ...)) (end-of-buffer (message ...))))) (internal--after-with-s= elected-window save-selected-window--state)))) (if (> (abs delta) (window-text-height window t)) (mwheel-scroll event ni= l) (let ((save-selected-window--state (internal--before-with-selected-windo= w window))) (save-current-buffer (unwind-protect (progn (select-window (car= save-selected-window--state) 'norecord) (if (or (and pixel-scroll-precisio= n-interpolate-mice ...) (and pixel-scroll-precision-large-scroll-height ...= ...)) (progn (let ... ... ...) (pixel-scroll-precision-interpolate delta c= urrent-window)) (condition-case nil (progn ... ...) (beginning-of-buffer ..= .) (end-of-buffer ...)))) (internal--after-with-selected-window save-select= ed-window--state))))) (if (=3D 0 delta) nil (if (> (abs delta) (window-text-height window t)) (= mwheel-scroll event nil) (let ((save-selected-window--state (internal--befo= re-with-selected-window window))) (save-current-buffer (unwind-protect (pro= gn (select-window (car save-selected-window--state) 'norecord) (if (or ... = ...) (progn ... ...) (condition-case nil ... ... ...))) (internal--after-wi= th-selected-window save-selected-window--state)))))) (let ((delta (round (cdr (nth 4 event))))) (if (=3D 0 delta) nil (if (> (= abs delta) (window-text-height window t)) (mwheel-scroll event nil) (let ((= save-selected-window--state (internal--before-with-selected-window window))= ) (save-current-buffer (unwind-protect (progn (select-window ... ...) (if .= .. ... ...)) (internal--after-with-selected-window save-selected-window--st= ate))))))) (if (and (nth 4 event)) (let ((delta (round (cdr (nth 4 event))))) (if (= =3D 0 delta) nil (if (> (abs delta) (window-text-height window t)) (mwheel-= scroll event nil) (let ((save-selected-window--state (internal--before-with= -selected-window window))) (save-current-buffer (unwind-protect (progn ... = ...) (internal--after-with-selected-window save-selected-window--state)))))= )) (mwheel-scroll event nil)) (let ((window (mwheel-event-window event)) (current-window (selected-wind= ow))) (if (framep window) (progn (setq window (frame-selected-window window= )))) (if (and (nth 4 event)) (let ((delta (round (cdr (nth 4 event))))) (if= (=3D 0 delta) nil (if (> (abs delta) (window-text-height window t)) (mwhee= l-scroll event nil) (let ((save-selected-window--state ...)) (save-current-= buffer (unwind-protect ... ...)))))) (mwheel-scroll event nil))) pixel-scroll-precision((wheel-up (# right-fring= e (865 . 6) 129226600 nil 1 (0 . 0) nil (11 . 6) (0 . 14)) 1 0 (0.0 . 1.0))) funcall-interactively(pixel-scroll-precision (wheel-up (# right-fringe (865 . 6) 129226600 nil 1 (0 . 0) nil (11 . 6) (0 .= 14)) 1 0 (0.0 . 1.0))) command-execute(pixel-scroll-precision)