unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
@ 2022-05-07  9:54 Konrad Podczeck
  2022-05-07 10:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-05-19 12:50 ` Konrad Podczeck
  0 siblings, 2 replies; 16+ messages in thread
From: Konrad Podczeck @ 2022-05-07  9:54 UTC (permalink / raw)
  To: 55299; +Cc: Po Lu

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))






^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
  2022-05-07  9:54 bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode Konrad Podczeck
@ 2022-05-07 10:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-05-07 11:14   ` Konrad Podczeck
  2022-05-19 12:50 ` Konrad Podczeck
  1 sibling, 1 reply; 16+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-05-07 10:26 UTC (permalink / raw)
  To: Konrad Podczeck; +Cc: 55299

[Please use X-Debbugs-CC when copying people into bug reports.]

Konrad Podczeck <konrad.podczeck@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)





^ permalink raw reply related	[flat|nested] 16+ messages in thread

* bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
  2022-05-07 10:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-05-07 11:14   ` Konrad Podczeck
  2022-05-07 11:54     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 16+ messages in thread
From: Konrad Podczeck @ 2022-05-07 11:14 UTC (permalink / raw)
  To: Po Lu; +Cc: 55299



> Am 07.05.2022 um 12:26 schrieb Po Lu <luangruo@yahoo.com>:
> 
> [Please use X-Debbugs-CC when copying people into bug reports.]
> 
> Konrad Podczeck <konrad.podczeck@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






^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
  2022-05-07 11:14   ` Konrad Podczeck
@ 2022-05-07 11:54     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-05-07 13:06       ` Konrad Podczeck
  0 siblings, 1 reply; 16+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-05-07 11:54 UTC (permalink / raw)
  To: Konrad Podczeck; +Cc: 55299

Konrad Podczeck <konrad.podczeck@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.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
  2022-05-07 11:54     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-05-07 13:06       ` Konrad Podczeck
  2022-05-07 13:21         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 16+ messages in thread
From: Konrad Podczeck @ 2022-05-07 13:06 UTC (permalink / raw)
  To: Po Lu; +Cc: 55299

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@yahoo.com>:
> 
> Konrad Podczeck <konrad.podczeck@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.






^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
  2022-05-07 13:06       ` Konrad Podczeck
@ 2022-05-07 13:21         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-05-07 14:40           ` Konrad Podczeck
  0 siblings, 1 reply; 16+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-05-07 13:21 UTC (permalink / raw)
  To: Konrad Podczeck; +Cc: 55299

Konrad Podczeck <konrad.podczeck@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)





^ permalink raw reply related	[flat|nested] 16+ messages in thread

* bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
  2022-05-07 13:21         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-05-07 14:40           ` Konrad Podczeck
  2022-05-08  0:40             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-05-08  1:01             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 16+ messages in thread
From: Konrad Podczeck @ 2022-05-07 14:40 UTC (permalink / raw)
  To: Po Lu; +Cc: 55299

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@yahoo.com>:
> 
> Konrad Podczeck <konrad.podczeck@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)






^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
  2022-05-07 14:40           ` Konrad Podczeck
@ 2022-05-08  0:40             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-05-08  1:01             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 0 replies; 16+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-05-08  0:40 UTC (permalink / raw)
  To: Konrad Podczeck; +Cc: 55299

Konrad Podczeck <konrad.podczeck@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.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
  2022-05-07 14:40           ` Konrad Podczeck
  2022-05-08  0:40             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-05-08  1:01             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-05-08  5:34               ` Eli Zaretskii
  1 sibling, 1 reply; 16+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-05-08  1:01 UTC (permalink / raw)
  To: Konrad Podczeck; +Cc: 55299

Konrad Podczeck <konrad.podczeck@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;
 	}
     }
 





^ permalink raw reply related	[flat|nested] 16+ messages in thread

* bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
  2022-05-08  1:01             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-05-08  5:34               ` Eli Zaretskii
  2022-05-08  5:55                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2022-05-08  5:34 UTC (permalink / raw)
  To: Po Lu; +Cc: 55299, konrad.podczeck

> Cc: 55299@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@gnu.org>
> 
> Konrad Podczeck <konrad.podczeck@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?





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
  2022-05-08  5:34               ` Eli Zaretskii
@ 2022-05-08  5:55                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-05-08  6:13                   ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-05-08  5:55 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 55299, konrad.podczeck

Eli Zaretskii <eliz@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.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
  2022-05-08  5:55                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-05-08  6:13                   ` Eli Zaretskii
  2022-05-08  7:06                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2022-05-08  6:13 UTC (permalink / raw)
  To: Po Lu; +Cc: 55299, konrad.podczeck

> From: Po Lu <luangruo@yahoo.com>
> Cc: konrad.podczeck@univie.ac.at,  55299@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.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
  2022-05-08  6:13                   ` Eli Zaretskii
@ 2022-05-08  7:06                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-05-08 10:01                       ` Konrad Podczeck
  0 siblings, 1 reply; 16+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-05-08  7:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 55299, konrad.podczeck

Eli Zaretskii <eliz@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);
 	}
     }
 





^ permalink raw reply related	[flat|nested] 16+ messages in thread

* bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
  2022-05-08  7:06                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-05-08 10:01                       ` Konrad Podczeck
  2022-05-08 11:02                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 16+ messages in thread
From: Konrad Podczeck @ 2022-05-08 10:01 UTC (permalink / raw)
  To: Po Lu; +Cc: 55299, Eli Zaretskii

Both patches (applied separatedly) do the job! 

Thanks for looking into this,

Konrad

> Am 08.05.2022 um 09:06 schrieb Po Lu <luangruo@yahoo.com>:
> 
> Eli Zaretskii <eliz@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);
> 	}
>     }
> 






^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
  2022-05-08 10:01                       ` Konrad Podczeck
@ 2022-05-08 11:02                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 16+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-05-08 11:02 UTC (permalink / raw)
  To: Konrad Podczeck; +Cc: 55299, Eli Zaretskii

Konrad Podczeck <konrad.podczeck@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.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode
  2022-05-07  9:54 bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode Konrad Podczeck
  2022-05-07 10:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-05-19 12:50 ` Konrad Podczeck
  1 sibling, 0 replies; 16+ messages in thread
From: Konrad Podczeck @ 2022-05-19 12:50 UTC (permalink / raw)
  To: Po Lu; +Cc: 55299

[-- Attachment #1: Type: text/plain, Size: 1402 bytes --]


With this patch, if a frame is sel

> Am 07.05.2022 um 15:21 schrieb Po Lu <luangruo@yahoo.com>:
> 
> Konrad Podczeck <konrad.podczeck@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)


[-- Attachment #2: Type: text/html, Size: 2989 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-05-19 12:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-07  9:54 bug#55299: 29.0.50; Bug with the mode-line and pixel-scroll-precision-mode Konrad Podczeck
2022-05-07 10:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-07 11:14   ` Konrad Podczeck
2022-05-07 11:54     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-07 13:06       ` Konrad Podczeck
2022-05-07 13:21         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-07 14:40           ` Konrad Podczeck
2022-05-08  0:40             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-08  1:01             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-08  5:34               ` Eli Zaretskii
2022-05-08  5:55                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-08  6:13                   ` Eli Zaretskii
2022-05-08  7:06                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-08 10:01                       ` Konrad Podczeck
2022-05-08 11:02                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-19 12:50 ` Konrad Podczeck

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).