GNU bug report logs - #55299
29.0.50; Bug with the mode-line and pixel-scroll-precision-mode

Previous Next

Package: emacs;

Reported by: Konrad Podczeck <konrad.podczeck <at> univie.ac.at>

Date: Sat, 7 May 2022 09:55:02 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55299 in the body.
You can then email your comments to 55299 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Sat, 07 May 2022 09:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Konrad Podczeck <konrad.podczeck <at> univie.ac.at>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 07 May 2022 09:55:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Konrad Podczeck <konrad.podczeck <at> univie.ac.at>
To: bug-gnu-emacs <at> gnu.org
Cc: Po Lu <luangruo <at> yahoo.com>
Subject: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
Date: Sat, 7 May 2022 11:54:16 +0200
Make an init file just containing the lines:

(pixel-scroll-precision-mode)
(setq-default mode-line-format nil)
 
Open the app, and any file. Do C-x 2. If I scroll upwards in the inactive pane, using the mouse wheel, then pixel-scroll-precision-mode does not work. 

Konrad






In GNU Emacs 29.0.50 (build 1, aarch64-apple-darwin21.4.0, NS appkit-2113.40 Version 12.3.1 (Build 21E258))
 of 2022-05-07 built on iMac-von-Konrad
Repository revision: 2fe4523518db061067b62b004e619e91653bb36a
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2113
System Description:  macOS 12.3.1

Configured using:
 'configure --with-webp=no'

Configured features:
ACL DBUS GLIB GNUTLS JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER
PNG RSVG SQLITE3 THREADS TOOLKIT_SCROLL_BARS XIM ZLIB

Important settings:
  locale-coding-system: utf-8-unix

Major mode: LaTeX/PS

Minor modes in effect:
  TeX-PDF-mode: t
  TeX-source-correlate-mode: t
  shell-dirtrack-mode: t
  save-place-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message yank-media rmc puny rfc822 mml
mml-sec epa derived epg rfc6068 epg-config gnus-util time-date mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
tex-bar toolbar-x flyspell ispell noutline outline dbus xml font-latex
latex easy-mmode edmacro kmacro latex-flymake flymake-proc flymake
project warnings thingatpt tex-ispell tex-style tex crm texmathp
tex-mode shell pcomplete latexenc
/Users/konradpodczeck/Library/emacs28-nc/sizes1 pdf-tools compile comint
ansi-color ring cus-edit cus-load wid-edit pdf-view bookmark
text-property-search pp jka-compr pdf-cache pdf-info tq pdf-util
format-spec pdf-macs image-mode dired dired-loaddefs exif saveplace
tex-site info package browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util mailcap
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map url-vars seq gv subr-x byte-opt
bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc
paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice
simple cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese composite
emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help
abbrev obarray oclosure cl-preloaded button loaddefs faces cus-face
macroexp files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind kqueue cocoa ns lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 153597 9153)
 (symbols 48 15493 1)
 (strings 32 50461 2518)
 (string-bytes 1 1496324)
 (vectors 16 28504)
 (vector-slots 8 357197 11889)
 (floats 8 106 73)
 (intervals 56 435 0)
 (buffers 992 12))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Sat, 07 May 2022 10:28:01 GMT) Full text and rfc822 format available.

Message #8 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Konrad Podczeck <konrad.podczeck <at> univie.ac.at>
Cc: 55299 <at> debbugs.gnu.org
Subject: Re: bug#55299: 29.0.50; Bug with the mode-line and
 pixel-scroll-precision-mode
Date: Sat, 07 May 2022 18:26:56 +0800
[Please use X-Debbugs-CC when copying people into bug reports.]

Konrad Podczeck <konrad.podczeck <at> univie.ac.at> writes:

> Make an init file just containing the lines:
>
> (pixel-scroll-precision-mode)
> (setq-default mode-line-format nil)
>  
> Open the app, and any file. Do C-x 2. If I scroll upwards in the
> inactive pane, using the mouse wheel, then pixel-scroll-precision-mode
> does not work.


I cannot reproduce this on GNU/Linux, but it sounds similar to a problem
others have reported on macOS that I could never reproduce.

This is not the final fix, but please see if the following code fixes
your problem:

diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
index b0fe2f56c0..a7cfda2491 100644
--- a/lisp/pixel-scroll.el
+++ b/lisp/pixel-scroll.el
@@ -685,6 +685,8 @@ pixel-scroll-precision
       (setq window (frame-selected-window window)))
     (if (and (nth 4 event))
         (let ((delta (round (cdr (nth 4 event)))))
+          (when (< delta 1.0)
+            (setq delta 1.0))
           (unless (zerop delta)
             (if (> (abs delta) (window-text-height window t))
                 (mwheel-scroll event nil)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Sat, 07 May 2022 11:15:02 GMT) Full text and rfc822 format available.

Message #11 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Konrad Podczeck <konrad.podczeck <at> univie.ac.at>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 55299 <at> debbugs.gnu.org
Subject: Re: bug#55299: 29.0.50; Bug with the mode-line and
 pixel-scroll-precision-mode
Date: Sat, 7 May 2022 13:14:30 +0200

> Am 07.05.2022 um 12:26 schrieb Po Lu <luangruo <at> yahoo.com>:
> 
> [Please use X-Debbugs-CC when copying people into bug reports.]
> 
> Konrad Podczeck <konrad.podczeck <at> univie.ac.at> writes:
> 
>> Make an init file just containing the lines:
>> 
>> (pixel-scroll-precision-mode)
>> (setq-default mode-line-format nil)
>> 
>> Open the app, and any file. Do C-x 2. If I scroll upwards in the
>> inactive pane, using the mouse wheel, then pixel-scroll-precision-mode
>> does not work.
> 
> 
> I cannot reproduce this on GNU/Linux, but it sounds similar to a problem
> others have reported on macOS that I could never reproduce.
> 
> This is not the final fix, but please see if the following code fixes
> your problem:
> 
> diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
> index b0fe2f56c0..a7cfda2491 100644
> --- a/lisp/pixel-scroll.el
> +++ b/lisp/pixel-scroll.el
> @@ -685,6 +685,8 @@ pixel-scroll-precision
>       (setq window (frame-selected-window window)))
>     (if (and (nth 4 event))
>         (let ((delta (round (cdr (nth 4 event)))))
> +          (when (< delta 1.0)
> +            (setq delta 1.0))
>           (unless (zerop delta)
>             (if (> (abs delta) (window-text-height window t))
>                 (mwheel-scroll event nil)

With this, I get the error message „Wrong type argument: wholenump. 237.0





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Sat, 07 May 2022 11:55:01 GMT) Full text and rfc822 format available.

Message #14 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Konrad Podczeck <konrad.podczeck <at> univie.ac.at>
Cc: 55299 <at> debbugs.gnu.org
Subject: Re: bug#55299: 29.0.50; Bug with the mode-line and
 pixel-scroll-precision-mode
Date: Sat, 07 May 2022 19:54:01 +0800
Konrad Podczeck <konrad.podczeck <at> univie.ac.at> writes:

>> diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
>> index b0fe2f56c0..a7cfda2491 100644
>> --- a/lisp/pixel-scroll.el
>> +++ b/lisp/pixel-scroll.el
>> @@ -685,6 +685,8 @@ pixel-scroll-precision
>>       (setq window (frame-selected-window window)))
>>     (if (and (nth 4 event))
>>         (let ((delta (round (cdr (nth 4 event)))))
>> +          (when (< delta 1.0)
>> +            (setq delta 1.0))
>>           (unless (zerop delta)
>>             (if (> (abs delta) (window-text-height window t))
>>                 (mwheel-scroll event nil)
>
> With this, I get the error message „Wrong type argument: wholenump. 237.0

Please show a full backtrace from that.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Sat, 07 May 2022 13:07:02 GMT) Full text and rfc822 format available.

Message #17 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Konrad Podczeck <konrad.podczeck <at> univie.ac.at>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 55299 <at> debbugs.gnu.org
Subject: Re: bug#55299: 29.0.50; Bug with the mode-line and
 pixel-scroll-precision-mode
Date: Sat, 7 May 2022 15:06:14 +0200
Debugger entered--Lisp error: (wrong-type-argument wholenump 489.0)
  posn-at-x-y(0 489.0)
  pixel-scroll-precision-scroll-up-page(1.0)
  pixel-scroll-precision-scroll-up(1.0)
  pixel-scroll-precision((wheel-down (#<window 3 on *GNU Emacs*> 1011 (259 . 390) 7730978 nil 1011 (37 . 22) nil (259 . 82) (7 . 14)) 1 0 (0.0 . -1.0)))
  funcall-interactively(pixel-scroll-precision (wheel-down (#<window 3 on *GNU Emacs*> 1011 (259 . 390) 7730978 nil 1011 (37 . 22) nil (259 . 82) (7 . 14)) 1 0 (0.0 . -1.0)))
  call-interactively(pixel-scroll-precision nil nil)
  command-execute(pixel-scroll-precision)


> Am 07.05.2022 um 13:54 schrieb Po Lu <luangruo <at> yahoo.com>:
> 
> Konrad Podczeck <konrad.podczeck <at> univie.ac.at> writes:
> 
>>> diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
>>> index b0fe2f56c0..a7cfda2491 100644
>>> --- a/lisp/pixel-scroll.el
>>> +++ b/lisp/pixel-scroll.el
>>> @@ -685,6 +685,8 @@ pixel-scroll-precision
>>>      (setq window (frame-selected-window window)))
>>>    (if (and (nth 4 event))
>>>        (let ((delta (round (cdr (nth 4 event)))))
>>> +          (when (< delta 1.0)
>>> +            (setq delta 1.0))
>>>          (unless (zerop delta)
>>>            (if (> (abs delta) (window-text-height window t))
>>>                (mwheel-scroll event nil)
>> 
>> With this, I get the error message „Wrong type argument: wholenump. 237.0
> 
> Please show a full backtrace from that.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Sat, 07 May 2022 13:22:02 GMT) Full text and rfc822 format available.

Message #20 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Konrad Podczeck <konrad.podczeck <at> univie.ac.at>
Cc: 55299 <at> debbugs.gnu.org
Subject: Re: bug#55299: 29.0.50; Bug with the mode-line and
 pixel-scroll-precision-mode
Date: Sat, 07 May 2022 21:21:07 +0800
Konrad Podczeck <konrad.podczeck <at> univie.ac.at> writes:

> Debugger entered--Lisp error: (wrong-type-argument wholenump 489.0)
>   posn-at-x-y(0 489.0)
>   pixel-scroll-precision-scroll-up-page(1.0)
>   pixel-scroll-precision-scroll-up(1.0)
>   pixel-scroll-precision((wheel-down (#<window 3 on *GNU Emacs*> 1011 (259 . 390) 7730978 nil 1011 (37 . 22) nil (259 . 82) (7 . 14)) 1 0 (0.0 . -1.0)))
>   funcall-interactively(pixel-scroll-precision (wheel-down (#<window 3 on *GNU Emacs*> 1011 (259 . 390) 7730978 nil 1011 (37 . 22) nil (259 . 82) (7 . 14)) 1 0 (0.0 . -1.0)))
>   call-interactively(pixel-scroll-precision nil nil)
>   command-execute(pixel-scroll-precision)

Sorry, please try this patch instead:

diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
index b0fe2f56c0..a7cfda2491 100644
--- a/lisp/pixel-scroll.el
+++ b/lisp/pixel-scroll.el
@@ -685,6 +685,8 @@ pixel-scroll-precision
       (setq window (frame-selected-window window)))
     (if (and (nth 4 event))
         (let ((delta (round (cdr (nth 4 event)))))
+          (when (< delta 1.0)
+            (setq delta 1))
           (unless (zerop delta)
             (if (> (abs delta) (window-text-height window t))
                 (mwheel-scroll event nil)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Sat, 07 May 2022 14:41:02 GMT) Full text and rfc822 format available.

Message #23 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Konrad Podczeck <konrad.podczeck <at> univie.ac.at>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 55299 <at> debbugs.gnu.org
Subject: Re: bug#55299: 29.0.50; Bug with the mode-line and
 pixel-scroll-precision-mode
Date: Sat, 7 May 2022 16:40:23 +0200
With this patch, I don’t get any error message, but If a frame has only one window, I cannot scroll (using the mouse wheel) downwards anymore, and after doing C-x 2, the same is true if I scroll in the active pane, while when I scroll in the inactive pane, I always get scrolling upwards, regardless of which direction I rotate the wheel.

> Am 07.05.2022 um 15:21 schrieb Po Lu <luangruo <at> yahoo.com>:
> 
> Konrad Podczeck <konrad.podczeck <at> univie.ac.at> writes:
> 
>> Debugger entered--Lisp error: (wrong-type-argument wholenump 489.0)
>>  posn-at-x-y(0 489.0)
>>  pixel-scroll-precision-scroll-up-page(1.0)
>>  pixel-scroll-precision-scroll-up(1.0)
>>  pixel-scroll-precision((wheel-down (#<window 3 on *GNU Emacs*> 1011 (259 . 390) 7730978 nil 1011 (37 . 22) nil (259 . 82) (7 . 14)) 1 0 (0.0 . -1.0)))
>>  funcall-interactively(pixel-scroll-precision (wheel-down (#<window 3 on *GNU Emacs*> 1011 (259 . 390) 7730978 nil 1011 (37 . 22) nil (259 . 82) (7 . 14)) 1 0 (0.0 . -1.0)))
>>  call-interactively(pixel-scroll-precision nil nil)
>>  command-execute(pixel-scroll-precision)
> 
> Sorry, please try this patch instead:
> 
> diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
> index b0fe2f56c0..a7cfda2491 100644
> --- a/lisp/pixel-scroll.el
> +++ b/lisp/pixel-scroll.el
> @@ -685,6 +685,8 @@ pixel-scroll-precision
>       (setq window (frame-selected-window window)))
>     (if (and (nth 4 event))
>         (let ((delta (round (cdr (nth 4 event)))))
> +          (when (< delta 1.0)
> +            (setq delta 1))
>           (unless (zerop delta)
>             (if (> (abs delta) (window-text-height window t))
>                 (mwheel-scroll event nil)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Sun, 08 May 2022 00:41:02 GMT) Full text and rfc822 format available.

Message #26 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Konrad Podczeck <konrad.podczeck <at> univie.ac.at>
Cc: 55299 <at> debbugs.gnu.org
Subject: Re: bug#55299: 29.0.50; Bug with the mode-line and
 pixel-scroll-precision-mode
Date: Sun, 08 May 2022 08:40:36 +0800
Konrad Podczeck <konrad.podczeck <at> univie.ac.at> writes:

> With this patch, I don’t get any error message, but If a frame has
> only one window, I cannot scroll (using the mouse wheel) downwards
> anymore, and after doing C-x 2, the same is true if I scroll in the
> active pane, while when I scroll in the inactive pane, I always get
> scrolling upwards, regardless of which direction I rotate the wheel.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Sun, 08 May 2022 01:02:02 GMT) Full text and rfc822 format available.

Message #29 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Konrad Podczeck <konrad.podczeck <at> univie.ac.at>
Cc: 55299 <at> debbugs.gnu.org
Subject: Re: bug#55299: 29.0.50; Bug with the mode-line and
 pixel-scroll-precision-mode
Date: Sun, 08 May 2022 09:01:32 +0800
Konrad Podczeck <konrad.podczeck <at> univie.ac.at> writes:

> With this patch, I don’t get any error message, but If a frame has
> only one window, I cannot scroll (using the mouse wheel) downwards
> anymore, and after doing C-x 2, the same is true if I scroll in the
> active pane, while when I scroll in the inactive pane, I always get
> scrolling upwards, regardless of which direction I rotate the wheel.

Does this fix your problem?

diff --git a/src/window.c b/src/window.c
index 15d6cf94b0..1e719c2598 100644
--- a/src/window.c
+++ b/src/window.c
@@ -7980,6 +7980,8 @@ DEFUN ("set-window-vscroll", Fset_window_vscroll, Sset_window_vscroll,
 
 	  /* Prevent redisplay shortcuts.  */
 	  XBUFFER (w->contents)->prevent_redisplay_optimizations_p = true;
+
+	  windows_or_buffers_changed = 1013;
 	}
     }
 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Sun, 08 May 2022 05:35:02 GMT) Full text and rfc822 format available.

Message #32 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 55299 <at> debbugs.gnu.org, konrad.podczeck <at> univie.ac.at
Subject: Re: bug#55299: 29.0.50;
 Bug with the mode-line and pixel-scroll-precision-mode
Date: Sun, 08 May 2022 08:34:12 +0300
> Cc: 55299 <at> debbugs.gnu.org
> Date: Sun, 08 May 2022 09:01:32 +0800
> From:  Po Lu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> Konrad Podczeck <konrad.podczeck <at> univie.ac.at> writes:
> 
> > With this patch, I don’t get any error message, but If a frame has
> > only one window, I cannot scroll (using the mouse wheel) downwards
> > anymore, and after doing C-x 2, the same is true if I scroll in the
> > active pane, while when I scroll in the inactive pane, I always get
> > scrolling upwards, regardless of which direction I rotate the wheel.
> 
> Does this fix your problem?
> 
> diff --git a/src/window.c b/src/window.c
> index 15d6cf94b0..1e719c2598 100644
> --- a/src/window.c
> +++ b/src/window.c
> @@ -7980,6 +7980,8 @@ DEFUN ("set-window-vscroll", Fset_window_vscroll, Sset_window_vscroll,
>  
>  	  /* Prevent redisplay shortcuts.  */
>  	  XBUFFER (w->contents)->prevent_redisplay_optimizations_p = true;
> +
> +	  windows_or_buffers_changed = 1013;

I'm not surer we want this.  It will slow down redisplay, so we need a
good understanding why this is required.  And the problem happens only
on macOS, isn't that so?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Sun, 08 May 2022 05:56:02 GMT) Full text and rfc822 format available.

Message #35 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 55299 <at> debbugs.gnu.org, konrad.podczeck <at> univie.ac.at
Subject: Re: bug#55299: 29.0.50; Bug with the mode-line and
 pixel-scroll-precision-mode
Date: Sun, 08 May 2022 13:55:28 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> I'm not surer we want this.  It will slow down redisplay, so we need a
> good understanding why this is required.  And the problem happens only
> on macOS, isn't that so?

No, I found I could reproduce it on GNU/Linux as well (with some
coaxing).

The problem is windows are not marked for redisplay after their vscroll
changes, so redisplay only happens to the selected window after just
setting the vscroll.

I suppose `wset_redisplay' would work too.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Sun, 08 May 2022 06:14:02 GMT) Full text and rfc822 format available.

Message #38 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 55299 <at> debbugs.gnu.org, konrad.podczeck <at> univie.ac.at
Subject: Re: bug#55299: 29.0.50; Bug with the mode-line and
 pixel-scroll-precision-mode
Date: Sun, 08 May 2022 09:13:27 +0300
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: konrad.podczeck <at> univie.ac.at,  55299 <at> debbugs.gnu.org
> Date: Sun, 08 May 2022 13:55:28 +0800
> 
> The problem is windows are not marked for redisplay after their vscroll
> changes, so redisplay only happens to the selected window after just
> setting the vscroll.
> 
> I suppose `wset_redisplay' would work too.

If the problem is that non-selected windows don't get redisplayed,
then yes, wset_redisplay should do.  And if it doesn't, we need to
understand why.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Sun, 08 May 2022 07:08:02 GMT) Full text and rfc822 format available.

Message #41 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 55299 <at> debbugs.gnu.org, konrad.podczeck <at> univie.ac.at
Subject: Re: bug#55299: 29.0.50; Bug with the mode-line and
 pixel-scroll-precision-mode
Date: Sun, 08 May 2022 15:06:49 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> If the problem is that non-selected windows don't get redisplayed,
> then yes, wset_redisplay should do.  And if it doesn't, we need to
> understand why.

It seems to work for me.

Konrad, please try this instead:

diff --git a/src/window.c b/src/window.c
index 15d6cf94b0..38ee5f4ba7 100644
--- a/src/window.c
+++ b/src/window.c
@@ -7980,6 +7980,8 @@ DEFUN ("set-window-vscroll", Fset_window_vscroll, Sset_window_vscroll,
 
 	  /* Prevent redisplay shortcuts.  */
 	  XBUFFER (w->contents)->prevent_redisplay_optimizations_p = true;
+
+	  wset_redisplay (w);
 	}
     }
 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Sun, 08 May 2022 10:02:01 GMT) Full text and rfc822 format available.

Message #44 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Konrad Podczeck <konrad.podczeck <at> univie.ac.at>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 55299 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#55299: 29.0.50; Bug with the mode-line and
 pixel-scroll-precision-mode
Date: Sun, 8 May 2022 12:01:33 +0200
Both patches (applied separatedly) do the job! 

Thanks for looking into this,

Konrad

> Am 08.05.2022 um 09:06 schrieb Po Lu <luangruo <at> yahoo.com>:
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
>> If the problem is that non-selected windows don't get redisplayed,
>> then yes, wset_redisplay should do.  And if it doesn't, we need to
>> understand why.
> 
> It seems to work for me.
> 
> Konrad, please try this instead:
> 
> diff --git a/src/window.c b/src/window.c
> index 15d6cf94b0..38ee5f4ba7 100644
> --- a/src/window.c
> +++ b/src/window.c
> @@ -7980,6 +7980,8 @@ DEFUN ("set-window-vscroll", Fset_window_vscroll, Sset_window_vscroll,
> 
> 	  /* Prevent redisplay shortcuts.  */
> 	  XBUFFER (w->contents)->prevent_redisplay_optimizations_p = true;
> +
> +	  wset_redisplay (w);
> 	}
>     }
> 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Sun, 08 May 2022 11:03:02 GMT) Full text and rfc822 format available.

Message #47 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Konrad Podczeck <konrad.podczeck <at> univie.ac.at>
Cc: 55299 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#55299: 29.0.50; Bug with the mode-line and
 pixel-scroll-precision-mode
Date: Sun, 08 May 2022 19:02:26 +0800
Konrad Podczeck <konrad.podczeck <at> univie.ac.at> writes:

> Both patches (applied separatedly) do the job! 
>
> Thanks for looking into this,

Any time, I installed the second fix and am closing this bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Sun, 08 May 2022 14:36:02 GMT) Full text and rfc822 format available.

Message #50 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Konrad Podczeck <konrad.podczeck <at> univie.ac.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Po Lu <luangruo <at> yahoo.com>, 55299 <at> debbugs.gnu.org
Subject: Re: bug#55264: A problem with display-buffer-alist
Date: Sun, 8 May 2022 16:35:53 +0200
[Message part 1 (text/plain, inline)]
Without reversal of commit 5adc84a27b86cdbd048ee3ebc023549c928f7425, this bog is gone by commit 
461ac0815c153778c41f3074e8d7748754ff7dd9 <https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=461ac0815c153778c41f3074e8d7748754ff7dd9>.

This bug can therefore also be closed.

Konrad

> Am 06.05.2022 um 02:56 schrieb Konrad Podczeck <konrad.podczeck <at> univie.ac.at>:
> 
> Reversing commit (by Po Lu) 5adc84a27b86cdbd048ee3ebc023549c928f7425 (both in nsmenu.m and in tooltip.el) solved the problem.
> 
> Konread
> 
>> Am 05.05.2022 um 08:05 schrieb Eli Zaretskii <eliz <at> gnu.org <mailto:eliz <at> gnu.org>>:
>> 
>>> From: Konrad Podczeck <konrad.podczeck <at> univie.ac.at <mailto:konrad.podczeck <at> univie.ac.at>>
>>> Date: Thu, 5 May 2022 01:25:44 +0200
>>> 
>>> With a fresh build, I have the following problem:
>>> 
>>> Make an init file just containing the lines:
>>> 
>>> (setq
>>> display-buffer-base-action
>>> '((display-buffer-reuse-window display-buffer-pop-up-frame)
>>> (reusable-frames . t))
>>> display-buffer-alist
>>> '(("[.]"
>>> (display-buffer-reuse-window display-buffer-pop-up-frame)
>>> (pop-up-frame-parameters
>>> (left . 100)
>>> ))))
>>> 
>>> 
>>> Start the app. Open any file, say foo.tex, and do "M-x
>>> context-menu-mode". In the frame showing foo.tex, scroll a bit. Then,
>>> using the mouse, select some text and use the right mouse button to open
>>> the context menu. If I try to choose any item in the context menu, the
>>> app quits unexpectedly. This quitting is not registered as a crash by
>>> the OS.
>> 
>> Seems to be specific to macOS? I cannot reproduce here.
> 

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Mon, 09 May 2022 09:53:01 GMT) Full text and rfc822 format available.

Message #53 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Konrad Podczeck <konrad.podczeck <at> univie.ac.at>
Cc: Po Lu <luangruo <at> yahoo.com>, 55299 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#55299: bug#55264: A problem with display-buffer-alist
Date: Mon, 09 May 2022 11:52:16 +0200
Konrad Podczeck <konrad.podczeck <at> univie.ac.at> writes:

> Without reversal of commit 5adc84a27b86cdbd048ee3ebc023549c928f7425, this
> bog is gone by commit 
>
> 461ac0815c153778c41f3074e8d7748754ff7dd9. 
>
> This bug can therefore also be closed.

OK; closing.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 55299 <at> debbugs.gnu.org and Konrad Podczeck <konrad.podczeck <at> univie.ac.at> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 09 May 2022 09:53:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55299; Package emacs. (Thu, 19 May 2022 12:51:02 GMT) Full text and rfc822 format available.

Message #58 received at 55299 <at> debbugs.gnu.org (full text, mbox):

From: Konrad Podczeck <konrad.podczeck <at> univie.ac.at>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 55299 <at> debbugs.gnu.org
Subject: Re: bug#55299: 29.0.50;
 Bug with the mode-line and pixel-scroll-precision-mode
Date: Thu, 19 May 2022 14:50:27 +0200
[Message part 1 (text/plain, inline)]

With this patch, if a frame is sel

> Am 07.05.2022 um 15:21 schrieb Po Lu <luangruo <at> yahoo.com>:
> 
> Konrad Podczeck <konrad.podczeck <at> univie.ac.at> writes:
> 
>> Debugger entered--Lisp error: (wrong-type-argument wholenump 489.0)
>>  posn-at-x-y(0 489.0)
>>  pixel-scroll-precision-scroll-up-page(1.0)
>>  pixel-scroll-precision-scroll-up(1.0)
>>  pixel-scroll-precision((wheel-down (#<window 3 on *GNU Emacs*> 1011 (259 . 390) 7730978 nil 1011 (37 . 22) nil (259 . 82) (7 . 14)) 1 0 (0.0 . -1.0)))
>>  funcall-interactively(pixel-scroll-precision (wheel-down (#<window 3 on *GNU Emacs*> 1011 (259 . 390) 7730978 nil 1011 (37 . 22) nil (259 . 82) (7 . 14)) 1 0 (0.0 . -1.0)))
>>  call-interactively(pixel-scroll-precision nil nil)
>>  command-execute(pixel-scroll-precision)
> 
> Sorry, please try this patch instead:
> 
> diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
> index b0fe2f56c0..a7cfda2491 100644
> --- a/lisp/pixel-scroll.el
> +++ b/lisp/pixel-scroll.el
> @@ -685,6 +685,8 @@ pixel-scroll-precision
>       (setq window (frame-selected-window window)))
>     (if (and (nth 4 event))
>         (let ((delta (round (cdr (nth 4 event)))))
> +          (when (< delta 1.0)
> +            (setq delta 1))
>           (unless (zerop delta)
>             (if (> (abs delta) (window-text-height window t))
>                 (mwheel-scroll event nil)

[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 17 Jun 2022 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 307 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.