all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#54472: 29.0.50; mouse-wheel-scroll-amount inconsistency
       [not found] <8735jcalip.fsf.ref@aol.com>
@ 2022-03-20 11:52 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-20 13:06   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 10+ messages in thread
From: Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-20 11:52 UTC (permalink / raw)
  To: 54472



Hi:

I have this config:

(setq-default mouse-wheel-scroll-amount '(3             ;; No modifier
					((control) . 6)
					((meta) . hscroll)
                                        ;; Either Shift+mouse not text-scale work in terminal,
                                        ;; so put them together
					((shift) . text-scale))
	    mouse-wheel-progressive-speed nil
	    mouse-scroll-delay 0)

And I have noticed that the scroll speed on xterm doubles the one in
gui: with 1 mouse wheel tick 

on gui: the buffer scrolls 3 lines (seems correct with the config).
in xterm: (emacs -nw) it scrolls 6 lines.

Is this a known issue? I have a workaround for it, but maybe there is a
real issue to solve?



In GNU Emacs 29.0.50 (build 133, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.4)
 of 2022-03-18 built on Ergus
Repository revision: 9bcf58d27c7c9ebe3bdd4d0564808767420bd44c
Repository branch: feature/completions-customs
System Description: Arch Linux

Configured using:
 'configure --prefix=/home/ergo/.local/ --with-mailutils --with-json
 --with-x-toolkit=gtk3 --with-xft --with-wide-int --with-modules
 --with-cairo --with-harfbuzz --with-native-compilation --with-pgtk'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
WEBP XIM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  global-auto-revert-mode: t
  xclip-mode: t
  diff-hl-margin-mode: t
  vertico-mouse-mode: t
  vertico-mode: t
  composable-mark-mode: t
  composable-mode: t
  repeat-mode: t
  xterm-mouse-mode: t
  my/consult-mode: t
  minibuffer-depth-indicate-mode: t
  winner-mode: t
  save-place-mode: t
  delete-selection-mode: t
  savehist-mode: t
  global-display-fill-column-indicator-mode: t
  display-fill-column-indicator-mode: t
  global-display-line-numbers-mode: t
  display-line-numbers-mode: t
  which-key-mode: t
  override-global-mode: t
  show-paren-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
~/gits/emacs_clones/composable/composable-mark hides /home/ergo/.config/emacs/elpa/composable-20201024.1458/composable-mark
~/gits/emacs_clones/composable/composable hides /home/ergo/.config/emacs/elpa/composable-20201024.1458/composable
/home/ergo/.config/emacs/elpa/transient-20220314.1605/transient hides /home/ergo/.local/share/emacs/29.0.50/lisp/transient

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media rmc puny
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util
text-property-search 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 vertico-directory
vertico-repeat autorevert filenotify ffap thingatpt url-parse
auth-source password-cache url-vars xclip yasnippet elec-pair
flyspell-correct flyspell ispell company-semantic company-template
company-capf company flycheck ansi-color json map find-func dash pcase
diff-hl-margin diff-hl-dired advice dired-x dired dired-loaddefs diff-hl
log-view pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode orderless
vertico-mouse vertico cape term/tmux term/xterm xterm init composable
composable-mark repeat xt-mouse simple-16-theme edmacro kmacro mb-depth
winner ring saveplace delsel savehist display-fill-column-indicator
display-line-numbers diminish which-key cl-extra help-mode use-package
use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core disp-table
info ede/auto eieio-base cl-seq eieio seq subr-x byte-opt bytecomp
byte-compile cconv eieio-core cl-macs gv eieio-loaddefs cl-loaddefs
cl-lib tex-site rx slime-autoloads early-init iso-transl tooltip eldoc
paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode
mwheel term/pgtk-win pgtk-win 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 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 simple abbrev obarray cl-preloaded nadvice
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 inotify
dynamic-setting system-font-setting font-render-setting cairo gtk pgtk
lcms2 multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 204829 16070)
 (symbols 48 16046 0)
 (strings 32 57186 5992)
 (string-bytes 1 1954139)
 (vectors 16 24278)
 (vector-slots 8 449503 9025)
 (floats 8 101 1077)
 (intervals 56 839 0)
 (buffers 992 11))





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

* bug#54472: 29.0.50; mouse-wheel-scroll-amount inconsistency
  2022-03-20 11:52 ` bug#54472: 29.0.50; mouse-wheel-scroll-amount inconsistency Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-20 13:06   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-20 16:45     ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 10+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-20 13:06 UTC (permalink / raw)
  To: Ergus; +Cc: 54472

Ergus <spacibba@aol.com> writes:

> (setq-default mouse-wheel-scroll-amount '(3             ;; No modifier
> 					((control) . 6)
> 					((meta) . hscroll)
>                                         ;; Either Shift+mouse not text-scale work in terminal,
>                                         ;; so put them together
> 					((shift) . text-scale))
> 	    mouse-wheel-progressive-speed nil
> 	    mouse-scroll-delay 0)
>
> And I have noticed that the scroll speed on xterm doubles the one in
> gui: with 1 mouse wheel tick 
>
> on gui: the buffer scrolls 3 lines (seems correct with the config).
> in xterm: (emacs -nw) it scrolls 6 lines.
>
> Is this a known issue? I have a workaround for it, but maybe there is a
> real issue to solve?

> Configured using:
>  'configure --prefix=/home/ergo/.local/ --with-mailutils --with-json
>  --with-x-toolkit=gtk3 --with-xft --with-wide-int --with-modules
>  --with-cairo --with-harfbuzz --with-native-compilation --with-pgtk'
>
> Configured features:
> ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
> JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
> PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
> WEBP XIM GTK3 ZLIB

You seem to be using a PGTK build.  Please see if you get different
behavior differently on a build with the regular X Windows support.

Thanks.

If you're using X, don't use PGTK.  It lacks certain features, such as
drag and drop support, which will require a rewrite of the selection
handling code to use GDK selections instead of the GTK clipboard,
working `yank-media', and is known to cause many problems related to
input.

BTW, some of your configuration options are redundant or make no sense:
--with-wide-int does nothing on a 64-bit system, and --with-xft,
--with-cairo and --with-x-toolkit=gtk3 are ignored when PGTK is enabled.

You might want to correct them.





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

* bug#54472: 29.0.50; mouse-wheel-scroll-amount inconsistency
  2022-03-20 13:06   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-20 16:45     ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-21  1:11       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 10+ messages in thread
From: Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-20 16:45 UTC (permalink / raw)
  To: Po Lu; +Cc: 54472

On Sun, Mar 20, 2022 at 09:06:20PM +0800, Po Lu wrote:
>Ergus <spacibba@aol.com> writes:
>
>
>You seem to be using a PGTK build.  Please see if you get different
>behavior differently on a build with the regular X Windows support.
>
I get the same behaviors with this options:

Configured using:
  'configure --prefix=/home/ergo/.local/ --with-mailutils --with-json
  --with-x-toolkit=gtk3 --with-xft --with-modules --with-cairo
  --with-harfbuzz --with-native-compilation'

Actually the behavior seems to be fine in gui (scroll by 3), what
actually seems a bit inexact is the terminal behavior (scroll by 6).

>Thanks.
>
Thanks to you.





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

* bug#54472: 29.0.50; mouse-wheel-scroll-amount inconsistency
  2022-03-20 16:45     ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-21  1:11       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-21  6:07         ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 10+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-21  1:11 UTC (permalink / raw)
  To: Ergus; +Cc: 54472

Ergus <spacibba@aol.com> writes:

> Configured using:
>  'configure --prefix=/home/ergo/.local/ --with-mailutils --with-json
>  --with-x-toolkit=gtk3 --with-xft --with-modules --with-cairo
>  --with-harfbuzz --with-native-compilation'

(--with-xft does nothing when Cairo is enabled, I think)

> Actually the behavior seems to be fine in gui (scroll by 3), what
> actually seems a bit inexact is the terminal behavior (scroll by 6).

Did you try turning on xterm-mouse-mode?





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

* bug#54472: 29.0.50; mouse-wheel-scroll-amount inconsistency
  2022-03-21  1:11       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-21  6:07         ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-21  6:33           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 10+ messages in thread
From: Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-21  6:07 UTC (permalink / raw)
  To: Po Lu; +Cc: 54472



On March 21, 2022 2:11:18 AM GMT+01:00, Po Lu <luangruo@yahoo.com> wrote:
>Ergus <spacibba@aol.com> writes:
>
>> Configured using:
>>  'configure --prefix=/home/ergo/.local/ --with-mailutils --with-json
>>  --with-x-toolkit=gtk3 --with-xft --with-modules --with-cairo
>>  --with-harfbuzz --with-native-compilation'
>
>(--with-xft does nothing when Cairo is enabled, I think)
>
>> Actually the behavior seems to be fine in gui (scroll by 3), what
>> actually seems a bit inexact is the terminal behavior (scroll by 6).
>
>Did you try turning on xterm-mouse-mode?

What do you mean? This is with xterm mouse mode on...


-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.





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

* bug#54472: 29.0.50; mouse-wheel-scroll-amount inconsistency
  2022-03-21  6:07         ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-21  6:33           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-21  7:37             ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 10+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-21  6:33 UTC (permalink / raw)
  To: Ergus; +Cc: 54472

Ergus <spacibba@aol.com> writes:

> What do you mean? This is with xterm mouse mode on...

I didn't notice that, sorry.

Unfortunately, that means that I don't really know what might be going
on.





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

* bug#54472: 29.0.50; mouse-wheel-scroll-amount inconsistency
  2022-03-21  6:33           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-21  7:37             ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-21  8:50               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 10+ messages in thread
From: Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-21  7:37 UTC (permalink / raw)
  To: Po Lu; +Cc: 54472

On Mon, Mar 21, 2022 at 02:33:54PM +0800, Po Lu wrote:
>Ergus <spacibba@aol.com> writes:
>
>> What do you mean? This is with xterm mouse mode on...
>
>I didn't notice that, sorry.
>
>Unfortunately, that means that I don't really know what might be going
>on.

I'm pretty sure now that this is related with the events...

With `emacs -nw` when I scroll 1 tick and `C-h l` I see:

```
  ESC [ < 6 5		; 8 0 ; 1 9 M <mouse-5> ;; mwheel-scroll
  ESC [ < 6 5		; 8 0 ; 1 9 M <mouse-5> ;; mwheel-scroll
  C-h l			;; view-lossage
```

While for the same scroll on `emacs`

```
  <down-mouse-5> <mouse-5> ;; mwheel-scroll
  C-h l			  ;; view-lossage
```

This is not really a very accurate measurement... but maybe could help
someone with more knowledge to clarify?

After a while checking I found that the issue only happens for `emacs
-nw` on xterm. On alacrity, rxvt and gnome-terminal it seems to scroll
the correct amount (3).

So I can report the issue to xterm developer?





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

* bug#54472: 29.0.50; mouse-wheel-scroll-amount inconsistency
  2022-03-21  7:37             ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-21  8:50               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-21  9:37                 ` Andreas Schwab
  2022-03-22  9:49                 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 10+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-21  8:50 UTC (permalink / raw)
  To: Ergus; +Cc: 54472

Ergus <spacibba@aol.com> writes:

> I'm pretty sure now that this is related with the events...
>
> With `emacs -nw` when I scroll 1 tick and `C-h l` I see:
>
> ```
>  ESC [ < 6 5		; 8 0 ; 1 9 M <mouse-5> ;; mwheel-scroll
>  ESC [ < 6 5		; 8 0 ; 1 9 M <mouse-5> ;; mwheel-scroll
>  C-h l			;; view-lossage
> ```

I think this is a bug in xterm-mouse-mode: IIRC (though this may be very
inaccurate) xterm sends an escape sequence both for a mouse button being
pressed and for one being released.

On X Windows, moving the scroll wheel will result in both a ButtonPress
and a ButtonRelease event for the appropriate scroll wheel button.

But I'm by no means an xterm expert, so this may very well be wrong.





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

* bug#54472: 29.0.50; mouse-wheel-scroll-amount inconsistency
  2022-03-21  8:50               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-21  9:37                 ` Andreas Schwab
  2022-03-22  9:49                 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 0 replies; 10+ messages in thread
From: Andreas Schwab @ 2022-03-21  9:37 UTC (permalink / raw)
  To: 54472; +Cc: luangruo, spacibba

On Mär 21 2022, Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> I think this is a bug in xterm-mouse-mode: IIRC (though this may be very
> inaccurate) xterm sends an escape sequence both for a mouse button being
> pressed and for one being released.

I don't see that here, xterm always reports only one <mouse-4>/<mouse-5>
event per wheel step.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





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

* bug#54472: 29.0.50; mouse-wheel-scroll-amount inconsistency
  2022-03-21  8:50               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-21  9:37                 ` Andreas Schwab
@ 2022-03-22  9:49                 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 0 replies; 10+ messages in thread
From: Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-22  9:49 UTC (permalink / raw)
  To: Po Lu; +Cc: 54472

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

Hi:

I just confirmed with the developer that this is an issue/feature/limitation with xterm omit translation mouse wheel... So in spite of the problem is there, it is not in emacs side, so you may want to close this issue.

Best,
Ergus



On March 21, 2022 9:50:20 AM GMT+01:00, Po Lu <luangruo@yahoo.com> wrote:
>Ergus <spacibba@aol.com> writes:
>
>> I'm pretty sure now that this is related with the events...
>>
>> With `emacs -nw` when I scroll 1 tick and `C-h l` I see:
>>
>> ```
>>  ESC [ < 6 5		; 8 0 ; 1 9 M <mouse-5> ;; mwheel-scroll
>>  ESC [ < 6 5		; 8 0 ; 1 9 M <mouse-5> ;; mwheel-scroll
>>  C-h l			;; view-lossage
>> ```
>
>I think this is a bug in xterm-mouse-mode: IIRC (though this may be very
>inaccurate) xterm sends an escape sequence both for a mouse button being
>pressed and for one being released.
>
>On X Windows, moving the scroll wheel will result in both a ButtonPress
>and a ButtonRelease event for the appropriate scroll wheel button.
>
>But I'm by no means an xterm expert, so this may very well be wrong.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

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

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

end of thread, other threads:[~2022-03-22  9:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <8735jcalip.fsf.ref@aol.com>
2022-03-20 11:52 ` bug#54472: 29.0.50; mouse-wheel-scroll-amount inconsistency Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-20 13:06   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-20 16:45     ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-21  1:11       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-21  6:07         ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-21  6:33           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-21  7:37             ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-21  8:50               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-21  9:37                 ` Andreas Schwab
2022-03-22  9:49                 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.