From unknown Thu Aug 14 22:19:58 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#57179 <57179@debbugs.gnu.org> To: bug#57179 <57179@debbugs.gnu.org> Subject: Status: 29.0.50: 'wrong-number-of-arguments' for function of two arguments called from 'window-scroll-functions' Reply-To: bug#57179 <57179@debbugs.gnu.org> Date: Fri, 15 Aug 2025 05:19:58 +0000 retitle 57179 29.0.50: 'wrong-number-of-arguments' for function of two argu= ments called from 'window-scroll-functions' reassign 57179 emacs submitter 57179 Andrea Greselin severity 57179 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 13 12:18:42 2022 Received: (at submit) by debbugs.gnu.org; 13 Aug 2022 16:18:42 +0000 Received: from localhost ([127.0.0.1]:34943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMtqT-0005Mo-EQ for submit@debbugs.gnu.org; Sat, 13 Aug 2022 12:18:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:39448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMtqP-0005Md-3g for submit@debbugs.gnu.org; Sat, 13 Aug 2022 12:18:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMtqN-0007Vw-By for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 12:18:36 -0400 Received: from mail-qv1-xf34.google.com ([2607:f8b0:4864:20::f34]:46840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMtqJ-0003v7-Pz for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 12:18:34 -0400 Received: by mail-qv1-xf34.google.com with SMTP id l18so2650128qvt.13 for ; Sat, 13 Aug 2022 09:18:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc; bh=4/yXNxIxzSpboa3UKWEBXtiZL9bEuhOJdHLA99STO98=; b=fj5HgOX+hGnFlSPI3uiT15QTfe0cyEJdMfFd6+h1gjoaLJLGbaRm4Z/u3jnvHjj/iP HCWa+oNjvAJ/x90Ttt6Q4DcI7ZaPDH+UOXDuqTa5w2r1Aoj5YR4u4ylYUbnIsfneLMyZ Y3nJ0fwyUs8MH9CBKjaxhbC7yp1vi5NXzQMAvTFC7/txH/qn4jMw33alvm/dNqzAetjv oDxMFv1jFicEjeLHjBemlK4q8vyWiOmVK2apoXnUif71XQRxvGAt8CUyOfcnafWpmhmu UAFleuMTo7VmBMfV2M/N+MO/7uoauEbk4JbtLk5UVSxiuSjdkGabGzc5161fMhxP7pMG g8rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc; bh=4/yXNxIxzSpboa3UKWEBXtiZL9bEuhOJdHLA99STO98=; b=F7oGa6etpcAor3rF9e52PoGaX2LzvUlnABq/iGPEuCFZP5ofaLSiKa1HmaTZb5DDav gBoNqLzP9FLkpFQ03Cba+mXvxOj+AbA8NqhRDuQSxqJ/tyh1hc0H/waZXpSa1iWz/4Qw jhptPPtUHuN0GkpiyFL0JZgipEM5h4FHYN8KLFhbcwpokFYO8zrLOt1K+kDEF/PxdNjS YERYydJnobLEw5JcbtHXBmHUZFMLo+tkLivQtFtYcBcublWFjiZUg3VHpaREos+9cVND FGKLKMbvlcloedxkfw35mweccvPwXQcqmKkTycY28aPQNABWUVbQLOkOzuVttm9OFvhj 3rJA== X-Gm-Message-State: ACgBeo0d3aj0gytGQiT2Fhe7a3qSqZYoXZ7GKPZrlSo1plWUqZKkr81O hxkmIEJ6MJ8Dt3Jwrc/jWXnkWxHhBCb51v680ndOS2sulB8= X-Google-Smtp-Source: AA6agR6TzlFfk1zBawTk31sq7KK09Iq6g85YnpCzpcF8CtVA+KS39x2+eUrqlYcFOegs41C14bnbLZt0NShFReYxUlM= X-Received: by 2002:ad4:5be2:0:b0:476:7e0d:815f with SMTP id k2-20020ad45be2000000b004767e0d815fmr7438054qvc.57.1660407510393; Sat, 13 Aug 2022 09:18:30 -0700 (PDT) MIME-Version: 1.0 From: Andrea Greselin Date: Sat, 13 Aug 2022 18:17:54 +0200 Message-ID: Subject: 29.0.50: 'wrong-number-of-arguments' for function of two arguments called from 'window-scroll-functions' To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000d6e7d605e621bf03" Received-SPF: pass client-ip=2607:f8b0:4864:20::f34; envelope-from=greselin.andrea@gmail.com; helo=mail-qv1-xf34.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, HTML_MESSAGE=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-Spam-Score: -1.3 (-) 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: -2.3 (--) --000000000000d6e7d605e621bf03 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi all, I have this function (the part at issue here should be the first line): (defun my-recenter-after-jump (window _window-start-after) "Recenter the point after a non-scroll command brings it out of view. This function is meant to be called from the hook =E2=80=98window-scroll-functions=E2=80=99." (with-selected-window window (unless (or (> 0.001 (float-time (time-subtract (current-time) buffer-display-time))) ; Don=E2=80=99t run this function after a change of = buffer. Non-nil here means the selected window displayed the current buffer less than a thousandth of a second ago, so it was most likely a change of buffer that triggered =E2=80=98window-scroll-functions=E2=80=99, not a scroll. See= also https://emacs.stackexchange.com/questions/63558/how-to-distinguish-a-scroll= -from-a-change-of-buffer-in-a-function-called-from-w ;; Don=E2=80=99t recenter for these ;; - major modes (memq major-mode '(help-mode ; =E2=80=98my-recenter-after-jump=E2=80=99 breaks scrolling with S= PC/ in Help mode and Info mode because they don=E2=80=99t obey =E2=80=98scroll-preserve-screen-position=E2=80=99 and =E2=80=98scroll-error= -top-bottom=E2=80=99. Info-mode)) ;; - minor modes isearch-mode ; For Isearch, change the value of =E2=80=98scroll-conservatively= =E2=80=99 and =E2=80=98hscroll-step=E2=80=99 in =E2=80=98isearch-update-post-hook=E2=80= =99 and =E2=80=98isearch-mode-end-hook=E2=80=99. Doing so allows recentering the point even after a purely horizontal scroll= . (bound-and-true-p view-mode) ; =E2=80=98my-recenter-after-jump=E2=80=99 breaks scrolling with S= PC/ in View mode because View mode doesn=E2=80=99t obey =E2=80=98scroll-preserve-screen-position=E2=80=99 and =E2=80=98scroll-error= -top-bottom=E2=80=99. (bound-and-true-p follow-mode) ;; - commands (and (symbolp last-command) (get last-command 'scroll-command)) ; Don=E2=80=99t check the value of the =E2=80=98scroll-co= mmand=E2=80=99 property for anonymous commands (it can=E2=80=99t be t anyway). (memq last-command '(recenter-top-bottom query-replace query-replace-regexp ; Query replacement is taken care of by the =E2=80=98recentering-on= -jump=E2=80=99 advice to =E2=80=98perform-replace=E2=80=99, which allows recentering the p= oint after a purely horizontal scroll. previous-line next-line ; Don=E2=80=99t let these commands trigger =E2=80=98my-recenter-af= ter-jump=E2=80=99. It happens when Emacs has a moment of lag during which the point slips beyond the scroll margin. previous-logical-line next-logical-line))) (let* ((bottom-line-before (line-number-at-pos (window-end))) (bottom-line-after (line-number-at-pos (window-end nil 'update))) ; NB: =E2=80=98window-start=E2=80=99 doesn=E2=80=99t take the = =E2=80=98update=E2=80=99 argument. (vertical-displacement (- bottom-line-after bottom-line-before))) (unless (> 2 (abs vertical-displacement)) ; The purpose of having the first =E2=80=98unless=E2=80=99 separate from this one is to call =E2=80=98line-number-at-pos=E2=80=99 only when it=E2=80=99s needed, because= it can be slow. See (2 links) https://emacs.stackexchange.com/questions/51648/how-to-detect-the-number-of= -lines-scrolled-from-scroll-up-down/51664#51664, https://emacs.stackexchange.com/questions/3821/a-faster-method-to-obtain-li= ne-number-at-pos-in-large-buffers (recenter) (when truncate-lines (my-horizontal-recenter))))))) ; REVIEW: Isn=E2=80=99t ther= e a built-in function for recentering the point horizontally? which I call from `window-scroll-functions` like this (add-hook 'window-scroll-functions #'my-recenter-after-jump) It's worked until I upgraded from v. 28.1 (from Fedora=E2=80=99s repos) to 29.0.50 (commit 6de88b6b02). Now I get Error in window-scroll-functions (my-recenter-after-jump): (wrong-number-of-arguments (lambda (window _window-start-after) "Recenter the point after a non-scroll command brings it out of view. This function is meant to be called from the hook =E2=80=98window-scroll-functions=E2=80=99." (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 (> 0.001 (float-time (time-subtract (current-time) buffer-display-time))) (memq major-mode '(help-mode Info-mode)) isearch-mode (and (boundp 'view-mode) view-mode) (and (boundp 'follow-mode) follow-mode) (and (symbolp last-command) (get last-command 'scroll-command)) (memq last-command '(recenter-top-bottom query-replace query-replace-regexp previous-line next-line previous-logical-line next-logical-line))) nil (let* ((bottom-line-before (line-number-at-pos (window-end))) (bottom-line-after (line-number-at-pos (window-end nil 'update))) (vertical-displacement (- bottom-line-after bottom-line-before))) (if (> 2 (abs vertical-displacement)) nil (recenter) (if truncate-lines (progn (my-horizontal-recenter))))))) (internal--after-with-selected-window save-selected-window--state))))) 0) All the best, Andrea --000000000000d6e7d605e621bf03 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi all,
I have this function (the part at issue here sh= ould be the first
line):

=C2=A0 =C2=A0 (defun my-recenter-after-j= ump (window _window-start-after)
=C2=A0 =C2=A0 =C2=A0 "Recenter the= point after a non-scroll command brings it out of view.
=C2=A0 =C2=A0 T= his function is meant to be called from the hook
=C2=A0 =C2=A0 =E2=80=98= window-scroll-functions=E2=80=99."
=C2=A0 =C2=A0 =C2=A0 (with-selec= ted-window window
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (unless (or (> 0.001 (f= loat-time (time-subtract (current-time) buffer-display-time))) ; Don=E2=80= =99t run this function after a change of buffer. Non-nil here means the sel= ected window displayed the current buffer less than a thousandth of a secon= d ago, so it was most likely a change of buffer that triggered =E2=80=98win= dow-scroll-functions=E2=80=99, not a scroll. See also https://emacs.stackexchange.com= /questions/63558/how-to-distinguish-a-scroll-from-a-change-of-buffer-in-a-f= unction-called-from-w
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 ;; Don=E2=80=99t recenter for these
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; =C2=A0 - maj= or modes
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 (memq major-mode '(help-mode ; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0=E2=80=98my-recenter-after-jump=E2=80=99 breaks scrolli= ng with SPC/<backspace> in Help mode and Info mode because they don= =E2=80=99t obey =E2=80=98scroll-preserve-screen-position=E2=80=99 and =E2= =80=98scroll-error-top-bottom=E2=80=99.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Info-mode))
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; =C2=A0 - minor modes
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 isear= ch-mode ; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0For Isearch, change the value = of =E2=80=98scroll-conservatively=E2=80=99 and =E2=80=98hscroll-step=E2=80= =99 in =E2=80=98isearch-update-post-hook=E2=80=99 and =E2=80=98isearch-mode= -end-hook=E2=80=99. Doing so allows recentering the point even after a pure= ly horizontal scroll.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 (bound-and-true-p view-mode) ; =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=E2=80=98my-recenter-after-jump=E2=80=99 bre= aks scrolling with SPC/<backspace> in View mode because View mode doe= sn=E2=80=99t obey =E2=80=98scroll-preserve-screen-position=E2=80=99 and =E2= =80=98scroll-error-top-bottom=E2=80=99.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (bound-and-true-p follow-mode)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; = =C2=A0 - commands
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 (and (symbolp last-command) (get last-command 'scroll= -command)) ; Don=E2=80=99t check the value of the =E2=80=98scroll-command= =E2=80=99 property for anonymous commands (it can=E2=80=99t be t anyway).=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (me= mq last-command '(recenter-top-bottom
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0query-replace query-replace-re= gexp ; =C2=A0 =C2=A0 =C2=A0 =C2=A0 Query replacement is taken care of by th= e =E2=80=98recentering-on-jump=E2=80=99 advice to =E2=80=98perform-replace= =E2=80=99, which allows recentering the point after a purely horizontal scr= oll.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0previous-line next-line ; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0Don=E2=80=99t let these commands trigger =E2=80= =98my-recenter-after-jump=E2=80=99. It happens when Emacs has a moment of l= ag during which the point slips beyond the scroll margin.
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0previous-logical= -line next-logical-line)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let* ((bo= ttom-line-before (line-number-at-pos (window-end)))
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(bottom-line-after (line-number-a= t-pos (window-end nil 'update))) ; NB: =E2=80=98window-start=E2=80=99 d= oesn=E2=80=99t take the =E2=80=98update=E2=80=99 argument.
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(vertical-displacement (- = bottom-line-after bottom-line-before)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 (unless (> 2 (abs vertical-displacement)) ; The purpose of ha= ving the first =E2=80=98unless=E2=80=99 separate from this one is to call = =E2=80=98line-number-at-pos=E2=80=99 only when it=E2=80=99s needed, because= it can be slow. See (2 links) https://emacs.stackexchange.com/questions/51648/how-to-dete= ct-the-number-of-lines-scrolled-from-scroll-up-down/51664#51664, https://emacs.stackexchange.com/que= stions/3821/a-faster-method-to-obtain-line-number-at-pos-in-large-buffers
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (recenter)
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (when truncate-lines
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (my-horizontal-recenter)))= )))) ; REVIEW: Isn=E2=80=99t there a built-in function for recentering the = point horizontally?

which I call from `window-scroll-functions` like= this

=C2=A0 =C2=A0 (add-hook 'window-scroll-functions #'my-= recenter-after-jump)


It's worked until I upgraded from v. 28= .1 (from Fedora=E2=80=99s repos) to
29.0.50 (commit 6de88b6b02). Now I g= et

=C2=A0 =C2=A0 Error in window-scroll-functions (my-recenter-after= -jump): (wrong-number-of-arguments (lambda (window _window-start-after) &qu= ot;Recenter the point after a non-scroll command brings it out of view.
= =C2=A0 =C2=A0 This function is meant to be called from the hook
=C2=A0 = =C2=A0 =E2=80=98window-scroll-functions=E2=80=99." (let ((save-selecte= d-window--state (internal--before-with-selected-window window))) (save-curr= ent-buffer (unwind-protect (progn (select-window (car save-selected-window-= -state) 'norecord) (if (or (> 0.001 (float-time (time-subtract (curr= ent-time) buffer-display-time))) (memq major-mode '(help-mode Info-mode= )) isearch-mode (and (boundp 'view-mode) view-mode) (and (boundp 'f= ollow-mode) follow-mode) (and (symbolp last-command) (get last-command '= ;scroll-command)) (memq last-command '(recenter-top-bottom query-replac= e query-replace-regexp previous-line next-line previous-logical-line next-l= ogical-line))) nil (let* ((bottom-line-before (line-number-at-pos (window-e= nd))) (bottom-line-after (line-number-at-pos (window-end nil 'update)))= (vertical-displacement (- bottom-line-after bottom-line-before))) (if (>= ; 2 (abs vertical-displacement)) nil (recenter) (if truncate-lines (progn (= my-horizontal-recenter))))))) (internal--after-with-selected-window save-se= lected-window--state))))) 0)

All the best,
Andrea
--000000000000d6e7d605e621bf03-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 13 13:30:35 2022 Received: (at 57179) by debbugs.gnu.org; 13 Aug 2022 17:30:35 +0000 Received: from localhost ([127.0.0.1]:35030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMuy3-0007DR-JT for submit@debbugs.gnu.org; Sat, 13 Aug 2022 13:30:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMuy1-0007D5-7L for 57179@debbugs.gnu.org; Sat, 13 Aug 2022 13:30:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54342) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMuxw-0006Cv-0v; Sat, 13 Aug 2022 13:30:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ZThNYyfDS8vfKtqgynLxkwTSmU0Oc70nhrB1PEn5H7o=; b=h30UxMTll3Hq7a0Wy0Ux 97FJFl07HnXxgRrAa3G6vy8fERoOMpvarUacAPIv11vysQm297ih/ZUPNKIGpNj/R8tFYhGEYfxGK movWMSBMfQlDaRSlmVZDE19hC4nhKwPxHVUAV6UX64aLBqHe0N0G5JjnhS8SoW5JA6l2aJltYAs6o gjckNfcjz/T5DvHzdEKC+32T4sr9Vq2HOwUpoQQyGN0AK78gem+GpJvmvYCjEwF+25hJ6hWFoAr7H gCHvhUIsjItzFKX7NlOeO4HHoxIP9MpMNU7XmDr0HVT9+6okbG7nTizMHOpPW4bUNX6Q0k56wI7Q8 hh2kzASgz3Iv4Q==; Received: from [87.69.77.57] (port=3785 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMuxs-0006MR-AV; Sat, 13 Aug 2022 13:30:27 -0400 Date: Sat, 13 Aug 2022 20:30:05 +0300 Message-Id: <83y1vskq5e.fsf@gnu.org> From: Eli Zaretskii To: Andrea Greselin In-Reply-To: (message from Andrea Greselin on Sat, 13 Aug 2022 18:17:54 +0200) Subject: Re: bug#57179: 29.0.50: 'wrong-number-of-arguments' for function of two arguments called from 'window-scroll-functions' References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57179 Cc: 57179@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.3 (---) > From: Andrea Greselin > Date: Sat, 13 Aug 2022 18:17:54 +0200 > > It's worked until I upgraded from v. 28.1 (from Fedora’s repos) to > 29.0.50 (commit 6de88b6b02). Now I get > > Error in window-scroll-functions (my-recenter-after-jump): > (wrong-number-of-arguments (lambda (window _window-start-after) "Recenter > the point after a non-scroll command brings it out of view. > This function is meant to be called from the hook > ‘window-scroll-functions’." (let ((save-selected-window--state > (internal--before-with-selected-window window))) (save-current-buffer > (unwind-protect (progn (select-window (car save-selected-window--state) The backtrace seems to show that a function that is called is different from the one you show as your hook function. So I think you should look closer into how you set up window-scroll-functions. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 13 16:51:00 2022 Received: (at 57179) by debbugs.gnu.org; 13 Aug 2022 20:51:01 +0000 Received: from localhost ([127.0.0.1]:35254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMy60-0005tU-La for submit@debbugs.gnu.org; Sat, 13 Aug 2022 16:51:00 -0400 Received: from mout.web.de ([212.227.17.11]:55959) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMy5x-0005tF-BC for 57179@debbugs.gnu.org; Sat, 13 Aug 2022 16:50:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1660423848; bh=n+uYzsdV9kc/UTMhW/W3LSOa8oF540Z1v5Swaknam4Q=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=b1TDUw1f9kaTlihd8Uj64iGwXeqKyJ1DPnqG7TSZVQNCXAnb2xQoEJekSLTiPQ6Hw 14LIyDLP769IQ/gxcfGCdj7XNO1DiLnhDmcDIZqOh08EtVn8UTAHO83rNooZ/Vkbbi 2mbICU80ydquozuSWs+t42wZkzT5gFYk95BH0/V4= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([84.57.248.18]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MnX5T-1ngVvZ0kC5-00jJ1C; Sat, 13 Aug 2022 22:50:48 +0200 From: Michael Heerdegen To: Eli Zaretskii Subject: Re: bug#57179: 29.0.50: 'wrong-number-of-arguments' for function of two arguments called from 'window-scroll-functions' In-Reply-To: <83y1vskq5e.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 13 Aug 2022 20:30:05 +0300") References: <83y1vskq5e.fsf@gnu.org> Date: Sat, 13 Aug 2022 22:50:47 +0200 Message-ID: <87sflzook8.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:4aijbMK6k/4wGSXY8Ggv/T9cYRDzmD3sZd8sk2Cj76qaONea4N4 Z9TOGNPN75G+m/cdSvyvVmd9qDlnJkk/bhoCjCGuxNyG4zIREZGLN/J+j43oluvK+r52Nfy d1GiGs5V6RidKZk3YDvg5bIxYr8MZULqFC96Dg3mrtodmw4KzbbRBl/HgLFTYGCtom6NG6T uhzT5FcfliIzr98nO4/sA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:aPpSnu5L7D4=:jeINzHh7ViVab7E+Q3uzK1 wrjXNSHcIhHTr9aNNo8w+0KIhVt5jIdzxnoNaE8/gu68+KhMRkpGYH0jA4s9rGBdQNlBGxfuz AG21hPezFN1/Mb0ZxZRSEV6luFVlGNN2Df/ZmPr2XXEuiYK4qA+wsdNyTRBcFdPV4WkZaruTK isLdsqGbn/GqZsqrjhIJRO3JYRaICe5wbfBbYTz7WkeGzWdugEbnkZJu5mz4R6waxXrferOO7 RievcMLp0EnfmdimFbbC9IH2cGfbjAkBfAmeBr28JpJWd3XWDoF/1JuPodiJQ0COeIpqD77hf Zd9tWTg8/6Ag9ESbuttwU4APLL38USzWh7Vdzpj7239+xmybz1KH5lSsYx8O1sWQdlX3U5Vzt pH6NNlqeNnZtbURv9XsSWSRTWRlP1chFKAd9Y1mFPfBk45mq6aCvIQNcZknQlGuKCzYVmq1BD 3chBif3iYgYpmE9S1Ni5tNCRv1a0mTybtSmhM5ZnwOiUzFdNeThRIBpO48xDyWsGNXkCcpZwU xdSkWjcW7Ysyusm+4wACPLtDniHKsr3obplzhi75XQHIoAD8wa3j0kYwS10hPUezPQs7sgcIh hjca4+83H7Xnr8NPT0VKH96T3CXeXKRvOYgHKaMRylfDSBWhyjGQr0uxlPuhPJyiJYUK8YEB1 ZHN9+bmONSu8pVkW4r/r+hxt02JV4o0ZbfQA2Wf++vdVBt1Fu901oUMig+WOzMvHmoP4vWYOR csVjri3GiY1sfVS900nEWaSKMi1qZRZBdRPydyHoPHjBuKJmRBNIg5TWJC6Oqisau9oROFgrf o3Z/TzLqJIkdOHhYcJCc/NN3UFp9j2OyC7rNeAk8n2A2nXBDeHLanFXPfX9bfNioYReAJ37e8 PA5eLy1VSpgmswKp0r5Udqm/eq9mw2WoyJmBrj6A96GfHP9BnxwPHAijkjup4q+q2b7LHmHMo zd5Mdcue8AAhj+hlX/fnULpVrv7x7Lge7IFIfF9xfGYEgtza5FKD8b0dqWMM8bxt4YVvIiNOy J66IhB0WtYxe/y8BC/xYm6hF6PNxPz8aKGex9Cjr4gWOb0q+PXUhHgk7xK6IwRv5XBOD5GKdK xxUxeRdpSIhu1UpMMtAfgCmcOkArcCXJBkWxVUxuz0YbRPq8A40jqp4aQ== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 57179 Cc: Andrea Greselin , 57179@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: -1.0 (-) Eli Zaretskii writes: > The backtrace seems to show that a function that is called is > different from the one you show as your hook function. So I think you > should look closer into how you set up window-scroll-functions. I too have seen this problem just yesterday. There must be something going on, it is unlikely that this is a coincidence. In the backtrace I saw that the function had been called by name with zero arguments. But on top of the backtrace the symbol-function had been shown (a closure). I also wondered about that. I verified that the function was only accessible via `window-scroll-functions'. My code did not use the function in any other place. Some entries below in the backtrace was `redisplay' - so... somehow `redisplay' is sometimes calling functions in `window-scroll-functions' with zero arguments. Maybe the buffer local binding of `window-scroll-functions'. Please tell whether this information suffices and you already have some idea or if I should try to create a recipe. I guess this must be related to a recent change from within the last few days. Michael. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 13 19:08:17 2022 Received: (at 57179) by debbugs.gnu.org; 13 Aug 2022 23:08:17 +0000 Received: from localhost ([127.0.0.1]:35352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oN0Eq-0000nR-NW for submit@debbugs.gnu.org; Sat, 13 Aug 2022 19:08:16 -0400 Received: from mail-qv1-f54.google.com ([209.85.219.54]:39913) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oN0Eo-0000nE-M4 for 57179@debbugs.gnu.org; Sat, 13 Aug 2022 19:08:15 -0400 Received: by mail-qv1-f54.google.com with SMTP id h8so3084716qvs.6 for <57179@debbugs.gnu.org>; Sat, 13 Aug 2022 16:08:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=Xn7LG5pp2tl/+LDVMZHOrF+2D0OP/NtX0wmqcAbyA34=; b=XLC3asJerb/w/z9babg9JMoX3CK/wYkCUmF+eJWb4hx3P6O7X3tbbdO5RtRcXCkGIi JNygNkYc8AtA52En6RxcRnxA3KiEBrdytTP2eXqQUzSH74fItkj/EC0sMfrF+0Y25n3A yL5YThq+ZueA5Coty1Yrd4bio5RtDjtrqsDdbsbUjmy2dhN17g7WdU8+P6NV46YjKyEJ nq0WcIRqiAXoZrYnW0N0X4RrtiglIz/N6JnqBMpidNCtuBYpfo9H+N5lfoscVagqFUmO MJq5j8OWTZ8+uLnG2XyW+WOzfJPBdqwuiXI3YXQozUtN+Sb5Ah3zeGB/R64xgRa0+qZ0 Id0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=Xn7LG5pp2tl/+LDVMZHOrF+2D0OP/NtX0wmqcAbyA34=; b=IFe3YIpHYQphWuK9sEpFntK6OJL6DmfCKNDYRiT6x5fo2KEi0ZHLuCpgDBBbeGrkEK IMjKzBf7d5CwuiPErr0hQWncov3esLyXP3K8JMkkFAEHSUj6C97T34bpfWnIXTZf6Lvb sZUlzW07/bqyBTQmS/7C2ajM939vySyfS8AczgvC0M6cNaFcy4nEPH9N6H/ltQXwoC93 NNUse2L74i0GldjU4mjaEc/PJ9PbBB5LQx8mYPWjuZsGgWAEZzPPkR4I0Em4YDA/hdJg 1fFYT47n3wb5GDWL/AOXJvfEuOioiqnFWaCV24H/sZHkZmvsUmZpfy/akAEWSdr5Y0bL NnvA== X-Gm-Message-State: ACgBeo3xvAwP3sbly/wTVRjHZ1Wb58JoMlHQNjtBVUvGXxDG/0eOOREe Sl0ExEp5VBpzB+1ZNOzNSo4TEWybxUAczFp0EzHYiio7hL4= X-Google-Smtp-Source: AA6agR6E9KyPM6MojstLiN4zxiKZh4yW3ANOMJO81OJE8+MLe3X53V7hsgW4hZD4L4dgg211DjLPyaAnCUQBs/cjQDg= X-Received: by 2002:a05:6214:2342:b0:473:e142:f758 with SMTP id hu2-20020a056214234200b00473e142f758mr8695728qvb.83.1660432088869; Sat, 13 Aug 2022 16:08:08 -0700 (PDT) MIME-Version: 1.0 References: <83y1vskq5e.fsf@gnu.org> In-Reply-To: <83y1vskq5e.fsf@gnu.org> From: Andrea Greselin Date: Sun, 14 Aug 2022 01:07:32 +0200 Message-ID: Subject: Re: bug#57179: 29.0.50: 'wrong-number-of-arguments' for function of two arguments called from 'window-scroll-functions' To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000d4b10605e62778ee" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 57179 Cc: 57179@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: -1.0 (-) --000000000000d4b10605e62778ee Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 13 Aug 2022 at 19:30, Eli Zaretskii wrote: > > > The backtrace seems to show that a function that is called is > > different from the one you show as your hook function. So I think you > > should look closer into how you set up window-scroll-functions. > =E2=80=98my-recenter-after-jump=E2=80=99 is the only thing I add to =E2=80=98window-scroll-functions=E2=80=99. Andrea --000000000000d4b10605e62778ee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, 13 Aug 2022 at 19:30, Eli Zaretskii <eliz@gnu.org> wrote:

> The backtrace seems to show that a function that is called is
> = different from the one you show as your hook function.=C2=A0 So I think you=
> should look closer into how you set up window-scroll-functions.

=E2=80=98my-recenter-aft= er-jump=E2=80=99 is the only thing I add to =E2=80=98window-scroll-function= s=E2=80=99.

Andrea
=C2=A0
--000000000000d4b10605e62778ee-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 13 20:19:45 2022 Received: (at 57179) by debbugs.gnu.org; 14 Aug 2022 00:19:45 +0000 Received: from localhost ([127.0.0.1]:35374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oN1M1-0002Td-Ex for submit@debbugs.gnu.org; Sat, 13 Aug 2022 20:19:45 -0400 Received: from mout.web.de ([212.227.17.12]:53429) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oN1Ly-0002TL-6J for 57179@debbugs.gnu.org; Sat, 13 Aug 2022 20:19:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1660436373; bh=Dfw8ONqXBRpQ7+uK5YoTqCjHCWK/vhvSDXZi8/etUjA=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=DLL35UzcYJ4ux9EuP/LJ0cpY8DDxV1zx2/9m0eBCNtnfTOX3ysFmZ7kXu+l1XfofG BlMU4js9g815GnIEKy9UisMdHDNwZjMQnKBtncGgpFXqfj2aGbW5QNN/iiBpdYZDSu HqVUa3aNAMvs/fGUUmJQ/y+XXUEDTUS4deLZnQts= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([84.57.248.18]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Mr7eu-1ncLw30Aty-00oING; Sun, 14 Aug 2022 02:19:33 +0200 From: Michael Heerdegen To: Eli Zaretskii Subject: Re: bug#57179: 29.0.50: 'wrong-number-of-arguments' for function of two arguments called from 'window-scroll-functions' In-Reply-To: <87sflzook8.fsf@web.de> (Michael Heerdegen's message of "Sat, 13 Aug 2022 22:50:47 +0200") References: <83y1vskq5e.fsf@gnu.org> <87sflzook8.fsf@web.de> Date: Sun, 14 Aug 2022 02:19:31 +0200 Message-ID: <87o7wnoewc.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:Trc1Ha95ch5cJr+91NwtJJ4gPjs4iqYzfwrUR2Zc3ELXQGt3W/D lqRL861V5ZRIBUltD5zWgxQgi4tnbeZD9w6GYJZNlY+ZaHrEIl0BVlFrxTnSMNMeYha2Avp j/JQSdnwlo5teLeiNo9O6y9N1xBvizLNHo/mE2G6NOiqQPlEaT1q6SOA8Bc0PXd6FHMpXff 8wfL4g1vnMmT3mqefnyzg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:RMOVseNuWUE=:Y6t0yi5QG9c/7XSDQfvAra oJRsJGlEvT3WGjSHlcuvlylKwEvzRxKk/3FeF9xYePo40cMO+PSsOk/NvsbJuSnJMFbubi/hb v8qtVPooLnfeFkS/i46LorK8gIaVz6T1wI8r4MLdCvgQ7CApr8lRLiRm3f9g9aMWulO2oqOKa aeKPHwi8OjuXoL1ZbEDkd6egrEuYENpY05rNriUrtvpkZQCEK/IQT+p34fLA+Mf1oP81HYTay LMzo6tKsztJZSejujOifAaXqRAFStFAEQ4TKt+tdWa8zlPWqGUwoOS/UETMagPI37xhWULSu6 dyYVYY7G5WUj7Wjvj0pS6wCIogloQghCwjAC8Snl5Tzw3fgLJgiGxKqtClmiE/B5OQQoMR9GO RZtNIshwBvAVa4KS0OA/JFM2LLL9gF4pbhLXfIHwgrC+f4DFDVvTAi/6mT6o2/9bcpTvVn/4j qV+UNG7SbxBQcZnuM81c8mIuAKL94YP5+x5/ZePFsuDuhdQFdG05YCWIOGNonJx72RlF1QA3D FJ0CInVGLUhWwbfBfCELuKIBISRo2z7tVQnQ2AsTg5gvH4ln32nWviABr9VcJgHl4IMe3VWI5 Zu4P1vqdOd8vzo6Z50b0rDLf3CNbfoXVAHJCgWqqHFj9IsI0RCopS+VWJJxw5B4Tj5FZCZ8qV a/t7pP2mXc4aCOwYcsQ+09UyTwePFpVOg6WDBAk/G6CjFGZCYN42+aIJMURj2lpRqiJyDwtCL pT7D6PxeaVTUtgv/n2u7oRvAq4mSYraAGszYidCZRjaNmfJHvJnJ+P7U5sJwl/GpdFFYk2sRN Oti/n7lC8lJap5DxkA5vfP+3nvsTMQ4Xu8KslSBkub6hCPLy84l6OZfoC6iIISLS4osb2wJoZ 42XNRr03rkj5yoxWny7q1/TT6kUZvta7nYYolLaOUPRrcvB/xj33j3RaO3gf1qBkJQEqR1K+1 39w4xU0Z/GHYxCFqQDcmlLpPytfNSgiD8BT0FOBIsB2P1Z+txEcC8gEZgdJqm1MGcdRFgWQ3Y kRY/uVNlW514GBvctCsI1yfiS8o0RN45JVXB8GDQVRWuzCzYC3tLeA3HPEik9le4SRGbVirmf xoJOeDzRi5LTN5kaRwBpp4PTHTuB+pp9jxyKuwuoRRR4wHh9C228yMQ5Q== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 57179 Cc: Alan Mackenzie , Andrea Greselin , 57179@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: -1.0 (-) --=-=-= Content-Type: text/plain Michael Heerdegen writes: > Please tell whether this information suffices and you already have some > idea or if I should try to create a recipe. I guess this must be > related to a recent change from within the last few days. Reverting a part of 48215c41d1 New debugging facility: backtraces from errors in Lisp called from redisplay (Alan Mackenzie 2022-08-11) like this: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Test-for-57179.patch Content-Transfer-Encoding: quoted-printable =46rom ffb7c3d558b599bcc84f1bf4fb4388569892d927 Mon Sep 17 00:00:00 2001 From: Michael Heerdegen Date: Sun, 14 Aug 2022 02:14:58 +0200 Subject: [PATCH] Test for #57179 =2D-- src/xdisp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 719b131baa..47eaddabce 100644 =2D-- a/src/xdisp.c +++ b/src/xdisp.c @@ -18221,8 +18221,8 @@ run_window_scroll_functions (Lisp_Object window, s= truct text_pos startp) { specpdl_ref count =3D SPECPDL_INDEX (); specbind (Qinhibit_quit, Qt); - safe_run_hooks_2 - (Qwindow_scroll_functions, window, make_fixnum (CHARPOS (startp))); + run_hook_with_args_2 (Qwindow_scroll_functions, window, + make_fixnum (CHARPOS (startp))); unbind_to (count, Qnil); SET_TEXT_POS_FROM_MARKER (startp, w->start); /* In case the hook functions switch buffers. */ =2D- 2.30.2 --=-=-= Content-Type: text/plain seems to fix my incarnation of this problem. Can it be that? CC'ing Alan (the author). TIA, Michael. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 14 03:18:34 2022 Received: (at 57179) by debbugs.gnu.org; 14 Aug 2022 07:18:34 +0000 Received: from localhost ([127.0.0.1]:35711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oN7tK-0000m0-61 for submit@debbugs.gnu.org; Sun, 14 Aug 2022 03:18:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oN7tH-0000lo-Rg for 57179@debbugs.gnu.org; Sun, 14 Aug 2022 03:18:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40972) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oN7tB-0008Rv-So; Sun, 14 Aug 2022 03:18:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=JXm+EgtOpdjGFyRqEqC43M9S+o4oSq75y68Q31mraxg=; b=bdtEPXQzUave 6Z+/xvamXHP7bL6ng9y76OsEsekgZmECa1CHK8eLl7oZXXlrG2APjifn7nu8Gx6tdaGvsU0BgDOQP PDLVhy1Yhy/Jo7/XFZEJcJFBTY+xHyQXGzS4ICYEEyis/AhuSQ3q6iHqh0qm7c1VrpD9Hz5oi6y2S PYt6xEv/4WPCoO5/vlUJOTY/1RppHukEkRbYRO67l1EAKbcW/V1jpqNhMKgnE3pdTeH1DuaNtZosQ T4H+XzpM8x+TuPHegd77QqoMYDUoAOJXTDUcqBgveNFKIY7LCK+Nfx0SISR/RtR+7hypIyWJjba7y eOGilTyvxZ88OT4CUFgS3A==; Received: from [87.69.77.57] (port=2444 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oN7tB-0004Uq-8m; Sun, 14 Aug 2022 03:18:25 -0400 Date: Sun, 14 Aug 2022 10:18:06 +0300 Message-Id: <838rnrl2dt.fsf@gnu.org> From: Eli Zaretskii To: Michael Heerdegen In-Reply-To: <87o7wnoewc.fsf@web.de> (message from Michael Heerdegen on Sun, 14 Aug 2022 02:19:31 +0200) Subject: Re: bug#57179: 29.0.50: 'wrong-number-of-arguments' for function of two arguments called from 'window-scroll-functions' References: <83y1vskq5e.fsf@gnu.org> <87sflzook8.fsf@web.de> <87o7wnoewc.fsf@web.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57179 Cc: acm@muc.de, greselin.andrea@gmail.com, 57179@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.3 (---) > From: Michael Heerdegen > Cc: Andrea Greselin , 57179@debbugs.gnu.org, > Alan Mackenzie > Date: Sun, 14 Aug 2022 02:19:31 +0200 > > Michael Heerdegen writes: > > > Please tell whether this information suffices and you already have some > > idea or if I should try to create a recipe. I guess this must be > > related to a recent change from within the last few days. > > Reverting a part of > > 48215c41d1 New debugging facility: backtraces from errors in Lisp called > from redisplay (Alan Mackenzie 2022-08-11) Indeed, the new function safe_run_hooks_2 has a bug. In a build with enable-checking I get an assertion violation in safe_run_hook_funcall, because nargs is not 2 but 4. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 14 09:22:46 2022 Received: (at 57179) by debbugs.gnu.org; 14 Aug 2022 13:22:46 +0000 Received: from localhost ([127.0.0.1]:36219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNDZm-0004AE-9a for submit@debbugs.gnu.org; Sun, 14 Aug 2022 09:22:46 -0400 Received: from colin.muc.de ([193.149.48.1]:55710 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1oNDZj-00049p-VC for 57179@debbugs.gnu.org; Sun, 14 Aug 2022 09:22:44 -0400 Received: (qmail 13078 invoked by uid 3782); 14 Aug 2022 13:22:38 -0000 Received: from acm.muc.de (p4fe15ca3.dip0.t-ipconnect.de [79.225.92.163]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 14 Aug 2022 15:22:37 +0200 Received: (qmail 20239 invoked by uid 1000); 14 Aug 2022 13:22:36 -0000 Date: Sun, 14 Aug 2022 13:22:36 +0000 To: Michael Heerdegen Subject: Re: bug#57179: 29.0.50: 'wrong-number-of-arguments' for function of two arguments called from 'window-scroll-functions' Message-ID: References: <83y1vskq5e.fsf@gnu.org> <87sflzook8.fsf@web.de> <87o7wnoewc.fsf@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87o7wnoewc.fsf@web.de> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 57179 Cc: acm@muc.de, Eli Zaretskii , 57179@debbugs.gnu.org, Andrea Greselin 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: -1.0 (-) Hello, Michael and Andrea. On Sun, Aug 14, 2022 at 02:19:31 +0200, Michael Heerdegen wrote: > Michael Heerdegen writes: > > Please tell whether this information suffices and you already have some > > idea or if I should try to create a recipe. I guess this must be > > related to a recent change from within the last few days. > Reverting a part of > 48215c41d1 New debugging facility: backtraces from errors in Lisp called > from redisplay (Alan Mackenzie 2022-08-11) > like this: > From ffb7c3d558b599bcc84f1bf4fb4388569892d927 Mon Sep 17 00:00:00 2001 > From: Michael Heerdegen > Date: Sun, 14 Aug 2022 02:14:58 +0200 > Subject: [PATCH] Test for #57179 > > --- > src/xdisp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/xdisp.c b/src/xdisp.c > index 719b131baa..47eaddabce 100644 > --- a/src/xdisp.c > +++ b/src/xdisp.c > @@ -18221,8 +18221,8 @@ run_window_scroll_functions (Lisp_Object window, struct text_pos startp) > { > specpdl_ref count = SPECPDL_INDEX (); > specbind (Qinhibit_quit, Qt); > - safe_run_hooks_2 > - (Qwindow_scroll_functions, window, make_fixnum (CHARPOS (startp))); > + run_hook_with_args_2 (Qwindow_scroll_functions, window, > + make_fixnum (CHARPOS (startp))); > unbind_to (count, Qnil); > SET_TEXT_POS_FROM_MARKER (startp, w->start); > /* In case the hook functions switch buffers. */ > -- > 2.30.2 > > seems to fix my incarnation of this problem. Can it be that? CC'ing > Alan (the author). Yes, this was indeed the problem. Can I ask you please, instead of applying your patch (above) to try out the following patch, which works for me. Thanks! diff --git a/src/keyboard.c b/src/keyboard.c index 8a2b7d58c4..1d7125a0a3 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1832,8 +1832,16 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified) static Lisp_Object safe_run_hooks_1 (ptrdiff_t nargs, Lisp_Object *args) { - eassert (nargs == 2); - return call0 (args[1]); + eassert (nargs >= 2 && nargs <= 4); + switch (nargs) + { + case 2: + return call0 (args[1]); + case 3: + return call1 (args[1], args[2]); + default: + return call2 (args[1], args[2], args[3]); + } } /* Subroutine for safe_run_hooks: handle an error by clearing out the function @@ -1878,11 +1886,27 @@ safe_run_hooks_error (Lisp_Object error, ptrdiff_t nargs, Lisp_Object *args) static Lisp_Object safe_run_hook_funcall (ptrdiff_t nargs, Lisp_Object *args) { - eassert (nargs == 2); + eassert (nargs >= 2 && nargs <= 4); /* Yes, run_hook_with_args works with args in the other order. */ - internal_condition_case_n (safe_run_hooks_1, - 2, ((Lisp_Object []) {args[1], args[0]}), - Qt, safe_run_hooks_error); + switch (nargs) + { + case 2: + internal_condition_case_n (safe_run_hooks_1, + 2, ((Lisp_Object []) {args[1], args[0]}), + Qt, safe_run_hooks_error); + break; + case 3: + internal_condition_case_n (safe_run_hooks_1, + 3, ((Lisp_Object []) {args[1], args[0], args[2]}), + Qt, safe_run_hooks_error); + break; + default: + internal_condition_case_n (safe_run_hooks_1, + 4, ((Lisp_Object []) + {args[1], args[0], args[2], args[3]}), + Qt, safe_run_hooks_error); + break; + } return Qnil; } > TIA, > Michael. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 14 19:01:06 2022 Received: (at 57179) by debbugs.gnu.org; 14 Aug 2022 23:01:06 +0000 Received: from localhost ([127.0.0.1]:40041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNMbR-00075T-Sv for submit@debbugs.gnu.org; Sun, 14 Aug 2022 19:01:06 -0400 Received: from mout.web.de ([212.227.15.3]:38433) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNMbQ-00074t-Gk for 57179@debbugs.gnu.org; Sun, 14 Aug 2022 19:01:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1660518056; bh=LjrdPnERmX+yDN9G6qjkVr5TfKVrwVpHHaW+CkBKuJ0=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=W+cwx7FwY/sh1OgSpKEqk0CNieKRFySbVmcJ9P6uCcSa2h0lKV7BZ02UK/H61CEk9 /3gm/OBimaiLgb7eRwIFltK4uos/9nT6xPh38e6pqMsMEFw/EE9hqV6g/m9thqH7h6 xk3idTxPxh8W0Psj6X0D8If7tPuGj/+fbv8/6b6g= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([84.57.248.18]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MgiXQ-1nilzY13N6-00hRXn; Mon, 15 Aug 2022 01:00:56 +0200 From: Michael Heerdegen To: Alan Mackenzie Subject: Re: bug#57179: 29.0.50: 'wrong-number-of-arguments' for function of two arguments called from 'window-scroll-functions' In-Reply-To: (Alan Mackenzie's message of "Sun, 14 Aug 2022 13:22:36 +0000") References: <83y1vskq5e.fsf@gnu.org> <87sflzook8.fsf@web.de> <87o7wnoewc.fsf@web.de> Date: Mon, 15 Aug 2022 01:00:55 +0200 Message-ID: <871qtih1lk.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:KYgj1HlB015E8mz24vSfQ89US6x0UrZ8EBEqau7jniH+6GIuxur kdZrIrQ01iCMYRU7vxU1t+48ol7m1CRUYSB5MZoSqaNDIf9M6GaavxjLsbdetvUFgxGZ8R4 rxJEzpjoct8WYDpMWhDsJMaP0pBDovNTqPYhh5Lav60gRlQOY2LUl4TIobIbg4Sm6F5xq7c bpIBCSFouvlKIcLKYwdtw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Hn9pUcSpKsw=:vnIdhjv1kwEC0m6euwcRhR yQyWc9L5nSCVMEqeaOgcgtHBEMg8mBL5BASg8/WX8y7uOzIYU+lTptbo4z6vmwiKx4ZFR+S47 d3B6eU0QBoOIj4TyeN6aMr3aChwZwTfSsI2wxVnX/wshCm28TL1U2su75qSlzHeF0ZB+AQs/U UBfkRyiOhi8kMbQEzIgL7ZfIPgqvCAAHGSvFSDIAdJHLOflnONiFj4LW665LLqokgtzHMNMYN PhD2Z8roG9fNX6VHxjcVO7iZR4pw1XrsabI0lzCv/Z2KQ6U3OA8gapbkTbi6pjW+yBXOa/Dh6 L/0P7c4FMpXGmLZiPCLTMa1ygJdo8+9U1b3geXKhRO+WDp9MV+P+rcZYPxOELGGVA0Cg1fCcd HtvviNAV0eUwvjy8tCA1ITGz2JYhiZIGaXF16ZPrxvk8udj7W9qwhiGR+3pjWo4pw7JVxLPyz StqmyG0DIK4iU+f1pDUxm9d/2h7/uyTq4cLbZmIE/lvXkRWAyDzG9/EoiEU+W2sRBBB78WNSJ F24oSlHd+zZhBDz1/lvZ13H0er64NKzGltx0Kw08juNxtEGHc5kL6G60FnVskHDiU4j+GV8tH KfmjA3d21AdCWyHo4QQE4P3LyounxChwLXoteSuIif3P1NWD5eP6QvK6jEqQN2oYyLQq7b7IQ YsaxrKnib/TZmO5ZWb5i0WnYqrr+QXwjRSd4YbDFipjCd1bC+U3kOtwdSKCqcYdVdxi3OF9LW oJ+2Mc9bWEefUtSEAWqLhgNuUXYhKB95LSeqYQDcPxRA+aedOoHU9WK/fVENsntWJ63Ru+Auy OlEixm/exozvHj8LACbzAflEYVqgvuMZDPN+bqbXbRDjGyPvdaKpkw/7+OfGOd4LxvYLEwouA 51iuM8RgBXBNCJvmfNoE7DFsiqxHoSSZqPG+Cqn/hiRKB49IR43o1ZldYYK7Y6ce5Hew/0Gje wNOg60y1PQV6zeRNPRfKAte7FcuOh0B120BZI14YSR96lsBv8oIUw6tRmeEdhNxzp4Ihc+gUi KrOrRTe12T3VKKXdGjszCZrfCG4E1GCmT4TCCZHzENPSDl9rYolYKMQLswVbOcnwrosW9PBeR Ih2st3AKVRWUavMehXYJ5Qv5H0yXTF7PgqDFPFMhFgwZgAbpwMcqNigTg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 57179 Cc: Eli Zaretskii , 57179@debbugs.gnu.org, Andrea Greselin 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: -1.7 (-) Alan Mackenzie writes: > Hello, Michael and Andrea. > [patch...] Thanks. Yes, seems my case is fixed, and I didn't see any new problems so far. Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 15 05:43:34 2022 Received: (at 57179) by debbugs.gnu.org; 15 Aug 2022 09:43:34 +0000 Received: from localhost ([127.0.0.1]:40879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNWdC-0007cj-0F for submit@debbugs.gnu.org; Mon, 15 Aug 2022 05:43:34 -0400 Received: from mail-qv1-f48.google.com ([209.85.219.48]:38700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNWd7-0007cT-8M for 57179@debbugs.gnu.org; Mon, 15 Aug 2022 05:43:32 -0400 Received: by mail-qv1-f48.google.com with SMTP id l8so5007480qvr.5 for <57179@debbugs.gnu.org>; Mon, 15 Aug 2022 02:43:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=QMON0Nj/YtfwiMd3OxaninQ7m27JOnh7gtr9Sb9kDX8=; b=UeFboSu5rKa5JMMIdg3LcqKTXL55c38uWihXfqV11pUgG0yv2cj35KWNnBf49NAAIt JVjE5EuNcFDTFj/T/Ata5cOI/wpzJ51iKGLegCoPLdvjnmZ9YdkQtEXZuqyE9M7zABB7 I/jXVokKKvsfDq7tyyrkyxYH675Srqe6UZVX8UODB2HFouXbVVKJ0fsozSUXM4BYzkRY j0Pcw3gOYsOB14D/rlddJr1mPey3jBTrGxgl3Xo7s9iAIm6XtrjyehzMzDdSUzwjspRn dIQ5eTRu0tiLNKZM/kmNR0GXjI/2gUinyvJ0vnzPDz+6P07E/9s2DrKJmlhssyoGi62X 0Sfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=QMON0Nj/YtfwiMd3OxaninQ7m27JOnh7gtr9Sb9kDX8=; b=nUEqwUX/Zd0PvODVEpgAomhu3RFXuPGX1OHJ4YSxjRDLKjA1yBtjcGIWswqXjODQN4 8XG9StOdGdGMzBsPYDdYmn/uP6iNOZO2jn9fD7PUuHyCqwe27c4dzkTyje+1IJa85i0i N8PYcnIdFvxic1BF0GS+yO7jCkS6dhgqAu7956n201N8YDiMFY6Qu3R9PKF9rjtwy5CS fAQlv+8ekc8qnleIbL0/PZ0r09/rmmjWnKeyzNy3WgLYzkvotZo6QDUDvl5TKLA2rmkl dCiOXkZDGRFu91e/fAmVmsTT1ZwVeF8D0hWgmQQ8exUyhH1HlJlT70fkPt8yYpYVLtR0 7ktQ== X-Gm-Message-State: ACgBeo3UmOw/FhLPVHiclwYSJLkABNSH7bXR5XX4FA7bzYJ1pcjp3Ffh ugvRlYJ/R3cguN2jqw1KnY15RpK37a0rP+4G3FA= X-Google-Smtp-Source: AA6agR5tmvL6GAf/F0yVzVH7MQviSD/xv/tRa3ynjsWzKFpJGK7Bvo7ZzWXgkdu+3Kpp752oEQSrE9oCBPZ7BV1WCvY= X-Received: by 2002:a05:6214:21ea:b0:479:6695:5c32 with SMTP id p10-20020a05621421ea00b0047966955c32mr12665790qvj.118.1660556603651; Mon, 15 Aug 2022 02:43:23 -0700 (PDT) MIME-Version: 1.0 References: <83y1vskq5e.fsf@gnu.org> <87sflzook8.fsf@web.de> <87o7wnoewc.fsf@web.de> In-Reply-To: From: Andrea Greselin Date: Mon, 15 Aug 2022 11:42:47 +0200 Message-ID: Subject: Re: bug#57179: 29.0.50: 'wrong-number-of-arguments' for function of two arguments called from 'window-scroll-functions' To: Alan Mackenzie Content-Type: multipart/alternative; boundary="0000000000007d797d05e6447626" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 57179 Cc: Michael Heerdegen , Eli Zaretskii , 57179@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: -1.0 (-) --0000000000007d797d05e6447626 Content-Type: text/plain; charset="UTF-8" On Sun, 14 Aug 2022 at 15:22, Alan Mackenzie wrote: > > Can I ask you please, instead of applying your patch (above) to try > > out the following patch, which works for me. > It fixes my bug too. Andrea --0000000000007d797d05e6447626 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, 14 Aug 2022 at 15:22, Alan Mackenzie = <acm@muc.de> wrote:
> Can I ask you please, inst= ead of applying your patch (above) to try
> out the following patch, = which works for me.

It fixes my bug too= .

Andrea
--0000000000007d797d05e6447626-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 15 08:24:40 2022 Received: (at 57179-done) by debbugs.gnu.org; 15 Aug 2022 12:24:40 +0000 Received: from localhost ([127.0.0.1]:41155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNZ96-0007uS-4x for submit@debbugs.gnu.org; Mon, 15 Aug 2022 08:24:40 -0400 Received: from colin.muc.de ([193.149.48.1]:18416 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1oNZ94-0007uG-JO for 57179-done@debbugs.gnu.org; Mon, 15 Aug 2022 08:24:39 -0400 Received: (qmail 50152 invoked by uid 3782); 15 Aug 2022 12:24:32 -0000 Received: from acm.muc.de (p4fe1586f.dip0.t-ipconnect.de [79.225.88.111]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 15 Aug 2022 14:24:32 +0200 Received: (qmail 12998 invoked by uid 1000); 15 Aug 2022 12:24:31 -0000 Date: Mon, 15 Aug 2022 12:24:31 +0000 To: Michael Heerdegen , Andrea Greselin Subject: Re: bug#57179: 29.0.50: 'wrong-number-of-arguments' for function of two arguments called from 'window-scroll-functions' Message-ID: References: <83y1vskq5e.fsf@gnu.org> <87sflzook8.fsf@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87sflzook8.fsf@web.de> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 57179-done Cc: Eli Zaretskii , 57179-done@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: -1.0 (-) Hello, Michael and Andrea. Thanks for testing my patch. I have just committed the patch to master, and I am closing the bug with this post. On Sat, Aug 13, 2022 at 22:50:47 +0200, Michael Heerdegen wrote: > Eli Zaretskii writes: > > The backtrace seems to show that a function that is called is > > different from the one you show as your hook function. So I think you > > should look closer into how you set up window-scroll-functions. > I too have seen this problem just yesterday. There must be something > going on, it is unlikely that this is a coincidence. > In the backtrace I saw that the function had been called by name with > zero arguments. But on top of the backtrace the symbol-function had > been shown (a closure). I also wondered about that. > I verified that the function was only accessible via > `window-scroll-functions'. My code did not use the function in any > other place. > Some entries below in the backtrace was `redisplay' - so... somehow > `redisplay' is sometimes calling functions in `window-scroll-functions' > with zero arguments. Maybe the buffer local binding of > `window-scroll-functions'. > Please tell whether this information suffices and you already have some > idea or if I should try to create a recipe. I guess this must be > related to a recent change from within the last few days. > Michael. -- Alan Mackenzie (Nuremberg, Germany). From unknown Thu Aug 14 22:19:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 13 Sep 2022 11:24:08 +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