unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* mouse-wheel-scroll
@ 2017-03-28 23:13 Tak Kunihiro
  2017-03-29  2:39 ` mouse-wheel-scroll Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 39+ messages in thread
From: Tak Kunihiro @ 2017-03-28 23:13 UTC (permalink / raw)
  To: emacs-devel; +Cc: Kunihiro Tak

I propose to change default of two parameters related to
mouse-wheel-scroll.

With a modern mouse or/and track-pad equipped with laptop, I found
scrolling works better with following setup

 mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control) . nil))
 mouse-wheel-progressive-speed nil

instead of current default as shown below.

 mouse-wheel-scroll-amount '(5 ((shift) . 1) ((control) . nil))
 mouse-wheel-progressive-speed t

I think mount of scrolling should be rather determined by operating
system, before Emacs.  How I propose to change default is, I (who is
mouse lover) took couple of years to realize this setup and I do not get 
lost in scroll anymore.  Those who are not mouse lover do not care the
default anyway.



diff --git a/mwheel.el b/mwheel.el
index 9e03854..1749ca3 100644
--- a/mwheel.el
+++ b/mwheel.el
@@ -98,7 +98,7 @@ set to the event sent when clicking on the mouse wheel button."
   :group 'mouse
   :type 'number)

-(defcustom mouse-wheel-scroll-amount '(5 ((shift) . 1) ((control) . nil))
+(defcustom mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control) . nil))
   "Amount to scroll windows by when spinning the mouse wheel.
 This is an alist mapping the modifier key to the amount to scroll when
 the wheel is moved with the modifier key depressed.
@@ -134,7 +134,7 @@ less than a full screen."
                     (float :tag "Fraction of window")))))
   :set 'mouse-wheel-change-button)

-(defcustom mouse-wheel-progressive-speed t
+(defcustom mouse-wheel-progressive-speed nil
   "If non-nil, the faster the user moves the wheel, the faster the scrolling.
 Note that this has no effect when `mouse-wheel-scroll-amount' specifies
 a \"near full screen\" scroll or when the mouse wheel sends key instead




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

* Re: mouse-wheel-scroll
  2017-03-28 23:13 mouse-wheel-scroll Tak Kunihiro
@ 2017-03-29  2:39 ` Eli Zaretskii
  2017-03-29  6:06   ` mouse-wheel-scroll Tak Kunihiro
  2017-03-29  7:36 ` mouse-wheel-scroll martin rudalics
  2017-03-29 21:22 ` mouse-wheel-scroll Kaushal Modi
  2 siblings, 1 reply; 39+ messages in thread
From: Eli Zaretskii @ 2017-03-29  2:39 UTC (permalink / raw)
  To: Tak Kunihiro; +Cc: tkk, emacs-devel

> From: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
> Date: Wed, 29 Mar 2017 08:13:02 +0900
> Cc: Kunihiro Tak <tkk@misasa.okayama-u.ac.jp>
> 
> I propose to change default of two parameters related to
> mouse-wheel-scroll.
> 
> With a modern mouse or/and track-pad equipped with laptop, I found
> scrolling works better with following setup
> 
>  mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control) . nil))
>  mouse-wheel-progressive-speed nil
> 
> instead of current default as shown below.
> 
>  mouse-wheel-scroll-amount '(5 ((shift) . 1) ((control) . nil))
>  mouse-wheel-progressive-speed t

Can you explain why you think these defaults are better than the
current ones?

Thanks.



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

* Re: mouse-wheel-scroll
  2017-03-29  2:39 ` mouse-wheel-scroll Eli Zaretskii
@ 2017-03-29  6:06   ` Tak Kunihiro
  0 siblings, 0 replies; 39+ messages in thread
From: Tak Kunihiro @ 2017-03-29  6:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Kunihiro Tak, emacs-devel

I think that current ones scroll too fast than other applications.
With the proposed values, speed is more controlled by operating
system.

When I switch from Firefox to Emacs and spin a wheel quarter to
scroll 10 lines, I see Emacs got <wheel-down> 10 times.  With the
default configuration, Emacs scrolls 50 lines and I will get lost.
I think with the current mouse-wheel-scroll-amount gives scroll too
fast.

Also acceleration of input devices can be controlled by operating
system.  On such system with mouse-wheel-progressive-speed t, scroll
is doubly accelerated.


On Mar 29, 2017, at 11:39 , Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
>> Date: Wed, 29 Mar 2017 08:13:02 +0900
>> Cc: Kunihiro Tak <tkk@misasa.okayama-u.ac.jp>
>> 
>> I propose to change default of two parameters related to
>> mouse-wheel-scroll.
>> 
>> With a modern mouse or/and track-pad equipped with laptop, I found
>> scrolling works better with following setup
>> 
>> mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control) . nil))
>> mouse-wheel-progressive-speed nil
>> 
>> instead of current default as shown below.
>> 
>> mouse-wheel-scroll-amount '(5 ((shift) . 1) ((control) . nil))
>> mouse-wheel-progressive-speed t
> 
> Can you explain why you think these defaults are better than the
> current ones?
> 
> Thanks.




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

* Re: mouse-wheel-scroll
  2017-03-28 23:13 mouse-wheel-scroll Tak Kunihiro
  2017-03-29  2:39 ` mouse-wheel-scroll Eli Zaretskii
@ 2017-03-29  7:36 ` martin rudalics
  2017-03-29  7:44   ` mouse-wheel-scroll Dani Moncayo
  2017-03-29 21:22 ` mouse-wheel-scroll Kaushal Modi
  2 siblings, 1 reply; 39+ messages in thread
From: martin rudalics @ 2017-03-29  7:36 UTC (permalink / raw)
  To: Tak Kunihiro, emacs-devel

 > With a modern mouse or/and track-pad equipped with laptop, I found
 > scrolling works better with following setup
 >
 >   mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control) . nil))
 >   mouse-wheel-progressive-speed nil
 >
 > instead of current default as shown below.
 >
 >   mouse-wheel-scroll-amount '(5 ((shift) . 1) ((control) . nil))
 >   mouse-wheel-progressive-speed t

On my PCs I had to turn off ‘mouse-wheel-progressive-speed’ a couple of
months ago since scrolling became way too fast.  I still don't know
whether this was due to a change in Emacs or my perception.

martin




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

* Re: mouse-wheel-scroll
  2017-03-29  7:36 ` mouse-wheel-scroll martin rudalics
@ 2017-03-29  7:44   ` Dani Moncayo
  2017-03-29 19:09     ` mouse-wheel-scroll Philipp Stephani
  0 siblings, 1 reply; 39+ messages in thread
From: Dani Moncayo @ 2017-03-29  7:44 UTC (permalink / raw)
  To: Emacs development discussions

On Wed, Mar 29, 2017 at 9:36 AM, martin rudalics <rudalics@gmx.at> wrote:
>> With a modern mouse or/and track-pad equipped with laptop, I found
>> scrolling works better with following setup
>>
>>   mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control) . nil))
>>   mouse-wheel-progressive-speed nil
>>
>> instead of current default as shown below.
>>
>>   mouse-wheel-scroll-amount '(5 ((shift) . 1) ((control) . nil))
>>   mouse-wheel-progressive-speed t
>
> On my PCs I had to turn off ‘mouse-wheel-progressive-speed’ a couple of
> months ago since scrolling became way too fast.  I still don't know
> whether this was due to a change in Emacs or my perception.

FWIW --

I find Emacs' default wheel scrolling unusable (way too fast).

I've done a quick test with the settings proposed in the OP, and the
resulting behavior seems ok to me.

-- 
Dani Moncayo



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

* Re: mouse-wheel-scroll
  2017-03-29  7:44   ` mouse-wheel-scroll Dani Moncayo
@ 2017-03-29 19:09     ` Philipp Stephani
  2017-03-29 21:18       ` mouse-wheel-scroll Simen Heggestøyl
  0 siblings, 1 reply; 39+ messages in thread
From: Philipp Stephani @ 2017-03-29 19:09 UTC (permalink / raw)
  To: Dani Moncayo, Emacs development discussions

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

Dani Moncayo <dmoncayo@gmail.com> schrieb am Mi., 29. März 2017 um
09:45 Uhr:

> On Wed, Mar 29, 2017 at 9:36 AM, martin rudalics <rudalics@gmx.at> wrote:
> >> With a modern mouse or/and track-pad equipped with laptop, I found
> >> scrolling works better with following setup
> >>
> >>   mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control) . nil))
> >>   mouse-wheel-progressive-speed nil
> >>
> >> instead of current default as shown below.
> >>
> >>   mouse-wheel-scroll-amount '(5 ((shift) . 1) ((control) . nil))
> >>   mouse-wheel-progressive-speed t
> >
> > On my PCs I had to turn off ‘mouse-wheel-progressive-speed’ a couple of
> > months ago since scrolling became way too fast.  I still don't know
> > whether this was due to a change in Emacs or my perception.
>
> FWIW --
>
> I find Emacs' default wheel scrolling unusable (way too fast).
>
> I've done a quick test with the settings proposed in the OP, and the
> resulting behavior seems ok to me.
>

I agree that the default is too fast, I also had to reduce it (to 3, in my
case).

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

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

* Re: mouse-wheel-scroll
  2017-03-29 19:09     ` mouse-wheel-scroll Philipp Stephani
@ 2017-03-29 21:18       ` Simen Heggestøyl
  0 siblings, 0 replies; 39+ messages in thread
From: Simen Heggestøyl @ 2017-03-29 21:18 UTC (permalink / raw)
  To: Philipp Stephani; +Cc: Emacs development discussions, Dani Moncayo

I also agree that the default is too fast, especially when using a
touchpad. There was a another short discussion about this two years ago:
https://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00529.html.

-- Simen




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

* Re: mouse-wheel-scroll
  2017-03-28 23:13 mouse-wheel-scroll Tak Kunihiro
  2017-03-29  2:39 ` mouse-wheel-scroll Eli Zaretskii
  2017-03-29  7:36 ` mouse-wheel-scroll martin rudalics
@ 2017-03-29 21:22 ` Kaushal Modi
  2017-03-30  2:47   ` mouse-wheel-scroll Eli Zaretskii
  2 siblings, 1 reply; 39+ messages in thread
From: Kaushal Modi @ 2017-03-29 21:22 UTC (permalink / raw)
  To: Tak Kunihiro, emacs-devel

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

On Tue, Mar 28, 2017 at 7:37 PM Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
wrote:

> I propose to change default of two parameters related to
> mouse-wheel-scroll.
>
> With a modern mouse or/and track-pad equipped with laptop, I found
> scrolling works better with following setup
>
>  mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control) . nil))
>  mouse-wheel-progressive-speed nil
>

FWIW, I like the suggested default change too. I anyways had the
progressive speed set to nil in my config.
-- 

Kaushal Modi

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

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

* Re: mouse-wheel-scroll
  2017-03-29 21:22 ` mouse-wheel-scroll Kaushal Modi
@ 2017-03-30  2:47   ` Eli Zaretskii
  2017-03-30  5:07     ` mouse-wheel-scroll Tak Kunihiro
                       ` (3 more replies)
  0 siblings, 4 replies; 39+ messages in thread
From: Eli Zaretskii @ 2017-03-30  2:47 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: tkk, emacs-devel

> From: Kaushal Modi <kaushal.modi@gmail.com>
> Date: Wed, 29 Mar 2017 21:22:36 +0000
> 
>  mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control) . nil))
>  mouse-wheel-progressive-speed nil
> 
> FWIW, I like the suggested default change too. I anyways had the progressive speed set to nil in my config. 

It is strange that you-all say that, while for me the defaults work
quite well.

If you turn the wheel one click, does text scroll by 5 lines or by
more?  I get exactly 5 lines, which looks to me a much better default
than have it scroll by just one line.



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

* Re: mouse-wheel-scroll
  2017-03-30  2:47   ` mouse-wheel-scroll Eli Zaretskii
@ 2017-03-30  5:07     ` Tak Kunihiro
  2017-03-30 18:15       ` mouse-wheel-scroll Eli Zaretskii
  2017-03-30  7:29     ` mouse-wheel-scroll Dani Moncayo
                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 39+ messages in thread
From: Tak Kunihiro @ 2017-03-30  5:07 UTC (permalink / raw)
  To: eliz; +Cc: tkk, emacs-devel, kaushal.modi

>>  mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control) . nil))
>>  mouse-wheel-progressive-speed nil
>> 
>> FWIW, I like the suggested default change too. I anyways had the
>> progressive speed set to nil in my config.
> 
> It is strange that you-all say that, while for me the defaults work
> quite well.
> 
> If you turn the wheel one click, does text scroll by 5 lines or by
> more?  I get exactly 5 lines, which looks to me a much better default
> than have it scroll by just one line.

In my environment with defaults, turning the wheel one click scrolls
75 lines.

One line by one wheel click is a little slow.  I think 75 lines by one
wheel click is too fast.



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

* Re: mouse-wheel-scroll
  2017-03-30  2:47   ` mouse-wheel-scroll Eli Zaretskii
  2017-03-30  5:07     ` mouse-wheel-scroll Tak Kunihiro
@ 2017-03-30  7:29     ` Dani Moncayo
  2017-03-30  7:29     ` mouse-wheel-scroll martin rudalics
  2017-03-30 13:44     ` mouse-wheel-scroll Kaushal Modi
  3 siblings, 0 replies; 39+ messages in thread
From: Dani Moncayo @ 2017-03-30  7:29 UTC (permalink / raw)
  To: Emacs development discussions

On Thu, Mar 30, 2017 at 4:47 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Kaushal Modi <kaushal.modi@gmail.com>
>> Date: Wed, 29 Mar 2017 21:22:36 +0000
>>
>>  mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control) . nil))
>>  mouse-wheel-progressive-speed nil
>>
>> FWIW, I like the suggested default change too. I anyways had the progressive speed set to nil in my config.
>
> It is strange that you-all say that, while for me the defaults work
> quite well.
>
> If you turn the wheel one click, does text scroll by 5 lines or by
> more?
>  I get exactly 5 lines, which looks to me a much better default
> than have it scroll by just one line.

I also get a 5-line scroll with the default settings, which is a bit
faster than what I'm used to.  I've just tested another text editor
(notepad++) which has a 3-line scroll per "wheel step", and it feels
better to me.

Anyway, what makes the default settings unusable for me (and for any
people in my workplace which has tried to scroll one buffer in Emacs)
is the progressive speed.   IMO, that feature should be turned off by
default, definitely.

-- 
Dani Moncayo



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

* Re: mouse-wheel-scroll
  2017-03-30  2:47   ` mouse-wheel-scroll Eli Zaretskii
  2017-03-30  5:07     ` mouse-wheel-scroll Tak Kunihiro
  2017-03-30  7:29     ` mouse-wheel-scroll Dani Moncayo
@ 2017-03-30  7:29     ` martin rudalics
  2017-03-30 13:44     ` mouse-wheel-scroll Kaushal Modi
  3 siblings, 0 replies; 39+ messages in thread
From: martin rudalics @ 2017-03-30  7:29 UTC (permalink / raw)
  To: Eli Zaretskii, Kaushal Modi; +Cc: tkk, emacs-devel

 >>   mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control) . nil))
 >>   mouse-wheel-progressive-speed nil
 >>
 >> FWIW, I like the suggested default change too. I anyways had the progressive speed set to nil in my config.
 >
 > It is strange that you-all say that, while for me the defaults work
 > quite well.
 >
 > If you turn the wheel one click, does text scroll by 5 lines or by
 > more?  I get exactly 5 lines, which looks to me a much better default
 > than have it scroll by just one line.

The problem is that when I turn the wheel more than one click, it soon
starts to scroll much more than 5 lines and it's hardly possible for me
to scroll back to from where I started.

martin



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

* Re: mouse-wheel-scroll
  2017-03-30  2:47   ` mouse-wheel-scroll Eli Zaretskii
                       ` (2 preceding siblings ...)
  2017-03-30  7:29     ` mouse-wheel-scroll martin rudalics
@ 2017-03-30 13:44     ` Kaushal Modi
  3 siblings, 0 replies; 39+ messages in thread
From: Kaushal Modi @ 2017-03-30 13:44 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: tkk, emacs-devel

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

On Wed, Mar 29, 2017 at 10:47 PM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Kaushal Modi <kaushal.modi@gmail.com>
> > Date: Wed, 29 Mar 2017 21:22:36 +0000
> >
> >  mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control) . nil))
> >  mouse-wheel-progressive-speed nil
> >
> > FWIW, I like the suggested default change too. I anyways had the
> progressive speed set to nil in my config.
>
> It is strange that you-all say that, while for me the defaults work
> quite well.
>

This could be a combination of getting used to the default + the type of
mouse.

I use Logitech Performance MX mouse which has a hardware button (button
below the scroll wheel here:
https://images-na.ssl-images-amazon.com/images/I/814dF6jfIoL._SL1500_.jpg )
to toggle the scroll wheel to scroll smoothly vs in clicks. If I happen to
scroll in emacs with the scroll wheel in smooth mode, the default 5-line
scrolling gets very dizzy. OTOH the 1-line scrolling works fine in both
smooth and "clicky" scrolls.

Also I have disabled the progressive scroll in my config for quite some
time now. I don't have the notes with that setting, but I vaguely remember
the default setting to not give a very good scrolling experience.


> If you turn the wheel one click, does text scroll by 5 lines or by
> more?  I get exactly 5 lines, which looks to me a much better default
> than have it scroll by just one line.
>

Yes, functionally it behaves as expected; no issues there.

PS: Thanks to Tak and this thread, I learned about
mouse-wheel-scroll-amount. While I did not customize that option earlier, I
had unknowingly set a "scroll by 1 line" behavior by manually binding
mouse-4 and mouse-5.
-- 

Kaushal Modi

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

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

* Re: mouse-wheel-scroll
  2017-03-30  5:07     ` mouse-wheel-scroll Tak Kunihiro
@ 2017-03-30 18:15       ` Eli Zaretskii
  2017-03-30 18:39         ` mouse-wheel-scroll Stefan Monnier
  2017-03-31  0:26         ` mouse-wheel-scroll Tak Kunihiro
  0 siblings, 2 replies; 39+ messages in thread
From: Eli Zaretskii @ 2017-03-30 18:15 UTC (permalink / raw)
  To: Tak Kunihiro; +Cc: kaushal.modi, emacs-devel

> Date: Thu, 30 Mar 2017 14:07:16 +0900 (JST)
> From: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
> Cc: tkk@misasa.okayama-u.ac.jp, emacs-devel@gnu.org, kaushal.modi@gmail.com
> 
> > If you turn the wheel one click, does text scroll by 5 lines or by
> > more?  I get exactly 5 lines, which looks to me a much better default
> > than have it scroll by just one line.
> 
> In my environment with defaults, turning the wheel one click scrolls
> 75 lines.

Did you customize your system's mouse speed?  It sounds strange that a
single click scrolls 15 lines by default.  Is that what happens with
other applications?



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

* Re: mouse-wheel-scroll
  2017-03-30 18:15       ` mouse-wheel-scroll Eli Zaretskii
@ 2017-03-30 18:39         ` Stefan Monnier
  2017-03-30 20:34           ` mouse-wheel-scroll Eli Zaretskii
  2017-03-31  0:26         ` mouse-wheel-scroll Tak Kunihiro
  1 sibling, 1 reply; 39+ messages in thread
From: Stefan Monnier @ 2017-03-30 18:39 UTC (permalink / raw)
  To: emacs-devel

> Did you customize your system's mouse speed?  It sounds strange that a
> single click scrolls 15 lines by default.  Is that what happens with
> other applications?

This whole issue is due to changes to the underlying hardware.  AFAICT,
it started with the "mouse wheel" which had fairly coarse "steps", but
nowadays we can get such events from touchpad scrolling gestures, and
given todays's touchpads's size and resolution (and the habit of using
capacitive touch screens with pixel-level scrolling) people expect
a much finer control, so events are generated for much finer movements.
Hence the desire to reduce the default mouse-wheel-scroll-amount (IME
other applications have also changed correspondingly).

I guess in response, mouse are themselves changing to also send finer
grained events, so as to adjust to the new expectations of
newer software.


        Stefan





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

* Re: mouse-wheel-scroll
  2017-03-30 18:39         ` mouse-wheel-scroll Stefan Monnier
@ 2017-03-30 20:34           ` Eli Zaretskii
  0 siblings, 0 replies; 39+ messages in thread
From: Eli Zaretskii @ 2017-03-30 20:34 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Thu, 30 Mar 2017 14:39:50 -0400
> 
> > Did you customize your system's mouse speed?  It sounds strange that a
> > single click scrolls 15 lines by default.  Is that what happens with
> > other applications?
> 
> This whole issue is due to changes to the underlying hardware.  AFAICT,
> it started with the "mouse wheel" which had fairly coarse "steps", but
> nowadays we can get such events from touchpad scrolling gestures, and
> given todays's touchpads's size and resolution (and the habit of using
> capacitive touch screens with pixel-level scrolling) people expect
> a much finer control, so events are generated for much finer movements.
> Hence the desire to reduce the default mouse-wheel-scroll-amount (IME
> other applications have also changed correspondingly).

But we cannot change the defaults to cater to users of laptops, if
that will ruin the user experience on desktop machines, can we?
Unless someone can come up with a reliable way of detecting a laptop,
that is.

> I guess in response, mouse are themselves changing to also send
> finer grained events, so as to adjust to the new expectations of
> newer software.

I see no such changes on desktop machines.



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

* Re: mouse-wheel-scroll
  2017-03-30 18:15       ` mouse-wheel-scroll Eli Zaretskii
  2017-03-30 18:39         ` mouse-wheel-scroll Stefan Monnier
@ 2017-03-31  0:26         ` Tak Kunihiro
  2017-03-31  6:39           ` mouse-wheel-scroll Eli Zaretskii
  1 sibling, 1 reply; 39+ messages in thread
From: Tak Kunihiro @ 2017-03-31  0:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: kaushal.modi, Kunihiro Tak, emacs-devel

>>> If you turn the wheel one click, does text scroll by 5 lines or by
>>> more?  I get exactly 5 lines, which looks to me a much better default
>>> than have it scroll by just one line.
>> 
>> In my environment with defaults, turning the wheel one click scrolls
>> 75 lines.
> 
> Did you customize your system's mouse speed?  It sounds strange that a
> single click scrolls 15 lines by default.  Is that what happens with
> other applications?

On my system `acceleration' is set to middle.  Wheel one click scrolls
1 line on Firefox and 75 lines on Emacs.

With `acceleration’ none, wheel one click scrolls 1 line on Firefox
and 5 lines on Emacs.  On this condition, because of lack of acceleration
scroll gets too slow on other applications.

I think argument is if Emacs assumes acceleration by system.




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

* Re: mouse-wheel-scroll
  2017-03-31  0:26         ` mouse-wheel-scroll Tak Kunihiro
@ 2017-03-31  6:39           ` Eli Zaretskii
  2017-03-31  6:55             ` mouse-wheel-scroll Dani Moncayo
                               ` (2 more replies)
  0 siblings, 3 replies; 39+ messages in thread
From: Eli Zaretskii @ 2017-03-31  6:39 UTC (permalink / raw)
  To: Tak Kunihiro; +Cc: kaushal.modi, emacs-devel

> From: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
> Date: Fri, 31 Mar 2017 09:26:28 +0900
> Cc: Kunihiro Tak <tkk@misasa.okayama-u.ac.jp>,
>  emacs-devel@gnu.org,
>  kaushal.modi@gmail.com
> 
> >> In my environment with defaults, turning the wheel one click scrolls
> >> 75 lines.
> > 
> > Did you customize your system's mouse speed?  It sounds strange that a
> > single click scrolls 15 lines by default.  Is that what happens with
> > other applications?
> 
> On my system `acceleration' is set to middle.  Wheel one click scrolls
> 1 line on Firefox and 75 lines on Emacs.
> 
> With `acceleration’ none, wheel one click scrolls 1 line on Firefox
> and 5 lines on Emacs.  On this condition, because of lack of acceleration
> scroll gets too slow on other applications.

Very strange.  On my system, with acceleration turned on, one click
scrolls about 2 to 7 lines in several applications I tried.  Emacs
scrolls 5, and so does Firefox.

> I think argument is if Emacs assumes acceleration by system.

Not here.

I'm not sure what to make of this issue.  It seems the results of
scrolling by the wheel differ widely across systems, so customizations
are necessary in any case, and altering the defaults will not change
that.



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

* Re: mouse-wheel-scroll
  2017-03-31  6:39           ` mouse-wheel-scroll Eli Zaretskii
@ 2017-03-31  6:55             ` Dani Moncayo
  2017-03-31  8:01               ` mouse-wheel-scroll Eli Zaretskii
  2017-03-31  9:04             ` mouse-wheel-scroll Tak Kunihiro
  2017-04-02 23:20             ` mouse-wheel-scroll Tak Kunihiro
  2 siblings, 1 reply; 39+ messages in thread
From: Dani Moncayo @ 2017-03-31  6:55 UTC (permalink / raw)
  To: Emacs development discussions

> I'm not sure what to make of this issue.  It seems the results of
> scrolling by the wheel differ widely across systems, so customizations
> are necessary in any case, and altering the defaults will not change
> that.

I think there is consensus in that 'mouse-wheel-progressive-speed'
should be set to nil by default.

-- 
Dani Moncayo



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

* Re: mouse-wheel-scroll
  2017-03-31  6:55             ` mouse-wheel-scroll Dani Moncayo
@ 2017-03-31  8:01               ` Eli Zaretskii
  2017-03-31  8:53                 ` mouse-wheel-scroll Dani Moncayo
  0 siblings, 1 reply; 39+ messages in thread
From: Eli Zaretskii @ 2017-03-31  8:01 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: emacs-devel

> From: Dani Moncayo <dmoncayo@gmail.com>
> Date: Fri, 31 Mar 2017 08:55:53 +0200
> 
> > I'm not sure what to make of this issue.  It seems the results of
> > scrolling by the wheel differ widely across systems, so customizations
> > are necessary in any case, and altering the defaults will not change
> > that.
> 
> I think there is consensus in that 'mouse-wheel-progressive-speed'
> should be set to nil by default.

Is there?  I wasn't sure, because at least some issues are raised with
the amount of scrolling for a single wheel click, which doesn't
involve that variable's effect.



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

* Re: mouse-wheel-scroll
  2017-03-31  8:01               ` mouse-wheel-scroll Eli Zaretskii
@ 2017-03-31  8:53                 ` Dani Moncayo
  2017-03-31  9:05                   ` mouse-wheel-scroll Eli Zaretskii
  2017-04-01  8:17                   ` mouse-wheel-scroll Anders Lindgren
  0 siblings, 2 replies; 39+ messages in thread
From: Dani Moncayo @ 2017-03-31  8:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Emacs development discussions

>> I think there is consensus in that 'mouse-wheel-progressive-speed'
>> should be set to nil by default.
>
> Is there?  I wasn't sure, because at least some issues are raised with
> the amount of scrolling for a single wheel click, which doesn't
> involve that variable's effect.

IIUC, the amount of scrolling for a single (isolated in time) wheel
click is currently 5 lines by default in Emacs for anyone who have not
set some system-specific setting for increasing that amount (75 lines
in Tak's environment).  And it seems that we all (except you) would
prefer lowering that amount a bit.

But regardless of the above question about the default value of
'mouse-wheel-scroll-amount', I think none of us like the
Emacs-specific acceleration of the mouse-wheel scrolling.  IOW, we all
prefer 'mouse-wheel-progressive-speed' set to nil by default.

-- 
Dani Moncayo



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

* Re: mouse-wheel-scroll
  2017-03-31  6:39           ` mouse-wheel-scroll Eli Zaretskii
  2017-03-31  6:55             ` mouse-wheel-scroll Dani Moncayo
@ 2017-03-31  9:04             ` Tak Kunihiro
  2017-04-02 23:20             ` mouse-wheel-scroll Tak Kunihiro
  2 siblings, 0 replies; 39+ messages in thread
From: Tak Kunihiro @ 2017-03-31  9:04 UTC (permalink / raw)
  To: eliz; +Cc: tkk, kaushal.modi, emacs-devel

> >> In my environment with defaults, turning the wheel one click scrolls
>> >> 75 lines.
>> > 
>> > Did you customize your system's mouse speed?  It sounds strange that a
>> > single click scrolls 15 lines by default.  Is that what happens with
>> > other applications?
>> 
>> On my system `acceleration' is set to middle.  Wheel one click scrolls
>> 1 line on Firefox and 75 lines on Emacs.
>> 
>> With `acceleration’ none, wheel one click scrolls 1 line on Firefox
>> and 5 lines on Emacs.  On this condition, because of lack of acceleration
>> scroll gets too slow on other applications.
> 
> Very strange.  On my system, with acceleration turned on, one click
> scrolls about 2 to 7 lines in several applications I tried.  Emacs
> scrolls 5, and so does Firefox.
> 
>> I think argument is if Emacs assumes acceleration by system.
> 
> Not here.
> 
> I'm not sure what to make of this issue.  It seems the results of
> scrolling by the wheel differ widely across systems, so customizations
> are necessary in any case, and altering the defaults will not change
> that.

How about putting an example into @file{frames.texi}, soon after
description of @code{mouse-wheel-progressive-speed}?  Here is a draft.

  Occasionally scrolling by a ``wheel'' or a ``touchpad'' is accelerated
  by system.  In such case, default configuration may scroll too fast.
  If so, for example, you can add the following lines to your init file
  (@pxref{Init File}) to scroll less.
  
  @example
  (setq mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control))))
  (setq mouse-wheel-progressive-speed nil)
  @end example

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

* Re: mouse-wheel-scroll
  2017-03-31  8:53                 ` mouse-wheel-scroll Dani Moncayo
@ 2017-03-31  9:05                   ` Eli Zaretskii
  2017-03-31  9:24                     ` mouse-wheel-scroll Dani Moncayo
  2017-04-01  8:17                   ` mouse-wheel-scroll Anders Lindgren
  1 sibling, 1 reply; 39+ messages in thread
From: Eli Zaretskii @ 2017-03-31  9:05 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: emacs-devel

> From: Dani Moncayo <dmoncayo@gmail.com>
> Date: Fri, 31 Mar 2017 10:53:49 +0200
> Cc: Emacs development discussions <emacs-devel@gnu.org>
> 
> IIUC, the amount of scrolling for a single (isolated in time) wheel
> click is currently 5 lines by default in Emacs for anyone who have not
> set some system-specific setting for increasing that amount (75 lines
> in Tak's environment).  And it seems that we all (except you) would
> prefer lowering that amount a bit.

I'm not sure everyone prefers that.  You proposed lowering it to 3,
the OP wanted 1, and I think no one else proposed any other value, nor
expressed opinions on that.

If everyone is okay with lowering to 3, I don't object (not sure why
you thought I did, as I didn't until now express any opinion on that).

> But regardless of the above question about the default value of
> 'mouse-wheel-scroll-amount', I think none of us like the
> Emacs-specific acceleration of the mouse-wheel scrolling.  IOW, we all
> prefer 'mouse-wheel-progressive-speed' set to nil by default.

That is a separate issue, and almost everything in this thread,
including what I wrote, described the original scroll amount, which is
unaffected by this variable.  I'm not sure I even see its effect in my
testing, and no one presented a clear recipe for me to be sure.



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

* Re: mouse-wheel-scroll
  2017-03-31  9:05                   ` mouse-wheel-scroll Eli Zaretskii
@ 2017-03-31  9:24                     ` Dani Moncayo
  2017-03-31 12:22                       ` mouse-wheel-scroll Eli Zaretskii
  0 siblings, 1 reply; 39+ messages in thread
From: Dani Moncayo @ 2017-03-31  9:24 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Emacs development discussions

On Fri, Mar 31, 2017 at 11:05 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Dani Moncayo <dmoncayo@gmail.com>
>> Date: Fri, 31 Mar 2017 10:53:49 +0200
>> Cc: Emacs development discussions <emacs-devel@gnu.org>
>>
>> IIUC, the amount of scrolling for a single (isolated in time) wheel
>> click is currently 5 lines by default in Emacs for anyone who have not
>> set some system-specific setting for increasing that amount (75 lines
>> in Tak's environment).  And it seems that we all (except you) would
>> prefer lowering that amount a bit.
>
> I'm not sure everyone prefers that.  You proposed lowering it to 3,
> the OP wanted 1, and I think no one else proposed any other value, nor
> expressed opinions on that.
>
> If everyone is okay with lowering to 3, I don't object (not sure why
> you thought I did, as I didn't until now express any opinion on that).

?? You said this:

On Thu, Mar 30, 2017 at 4:47 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Kaushal Modi <kaushal.modi@gmail.com>
>> Date: Wed, 29 Mar 2017 21:22:36 +0000
>>
>>  mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control) . nil))
>>  mouse-wheel-progressive-speed nil
>>
>> FWIW, I like the suggested default change too. I anyways had the progressive speed set to nil in my config.
>
> It is strange that you-all say that, while for me the defaults work
> quite well.

So, if the defaults work quite well for you, I conclude that your vote
is against changing them.

>> But regardless of the above question about the default value of
>> 'mouse-wheel-scroll-amount', I think none of us like the
>> Emacs-specific acceleration of the mouse-wheel scrolling.  IOW, we all
>> prefer 'mouse-wheel-progressive-speed' set to nil by default.
>
> That is a separate issue, and almost everything in this thread,
> including what I wrote, described the original scroll amount, which is
> unaffected by this variable.  I'm not sure I even see its effect in my
> testing, and no one presented a clear recipe for me to be sure.

The recipe is: visit a (large enough) file and scroll through it by
spinning the wheel of the mouse quickly enough (e.g. 4 "wheel steps"
in half of a second approx.).  Maybe you can't reproduce this on your
environment, I don't know.  In all the environments I've done that,
the scrolling is too fast and accelerated.  I can't imagine who may
want that behavior, but maybe there are some people who do.  In any
case, it seems clear that most people don't what this feature, hence
it should be disabled by default.

-- 
Dani Moncayo



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

* Re: mouse-wheel-scroll
  2017-03-31  9:24                     ` mouse-wheel-scroll Dani Moncayo
@ 2017-03-31 12:22                       ` Eli Zaretskii
  2017-03-31 19:02                         ` mouse-wheel-scroll Richard Copley
  0 siblings, 1 reply; 39+ messages in thread
From: Eli Zaretskii @ 2017-03-31 12:22 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: emacs-devel

> From: Dani Moncayo <dmoncayo@gmail.com>
> Date: Fri, 31 Mar 2017 11:24:33 +0200
> Cc: Emacs development discussions <emacs-devel@gnu.org>
> 
> ?? You said this:
> 
> On Thu, Mar 30, 2017 at 4:47 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> >> From: Kaushal Modi <kaushal.modi@gmail.com>
> >> Date: Wed, 29 Mar 2017 21:22:36 +0000
> >>
> >>  mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control) . nil))
> >>  mouse-wheel-progressive-speed nil
> >>
> >> FWIW, I like the suggested default change too. I anyways had the progressive speed set to nil in my config.
> >
> > It is strange that you-all say that, while for me the defaults work
> > quite well.
> 
> So, if the defaults work quite well for you, I conclude that your vote
> is against changing them.

No, it doesn't mean that.  I was just saying that for me Emacs behaves
as advertised: scrolls by 5 lines each click of the wheel.  I didn't
express any opinion for or against changing the default scroll size.
Please note that the OP explicitly said the defaults scroll much more
than they should on their machine.

> The recipe is: visit a (large enough) file and scroll through it by
> spinning the wheel of the mouse quickly enough (e.g. 4 "wheel steps"
> in half of a second approx.).  Maybe you can't reproduce this on your
> environment, I don't know.  In all the environments I've done that,
> the scrolling is too fast and accelerated.  I can't imagine who may
> want that behavior, but maybe there are some people who do.  In any
> case, it seems clear that most people don't what this feature, hence
> it should be disabled by default.

Thanks, I will try that.



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

* Re: mouse-wheel-scroll
@ 2017-03-31 14:02 Angelo Graziosi
  2017-03-31 22:37 ` mouse-wheel-scroll Richard Stallman
  0 siblings, 1 reply; 39+ messages in thread
From: Angelo Graziosi @ 2017-03-31 14:02 UTC (permalink / raw)
  To: tkk, Emacs developers

Tak wrote
> @example
>   (setq mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control))))
>   (setq mouse-wheel-progressive-speed nil)
>   @end example

I tried that in my init file and now the scrolling is very nice!

Thank you!

   Angelo



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

* Re: mouse-wheel-scroll
  2017-03-31 12:22                       ` mouse-wheel-scroll Eli Zaretskii
@ 2017-03-31 19:02                         ` Richard Copley
  2017-04-01 14:29                           ` mouse-wheel-scroll Eli Zaretskii
  0 siblings, 1 reply; 39+ messages in thread
From: Richard Copley @ 2017-03-31 19:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Emacs Development, Dani Moncayo

Hi Eli,
On MS Windows, one WM_MOUSEWHEEL event doesn't always mean the same
as another. Programs need to examine the wParam to find the scroll
distance. As far as I can tell Emacs doesn't do that. This might
(possibly) explain Kunihiro's results, if what Raymond Chen calls a
"sub-detent mouse" was involved. (See "Scrollbars bart [sic] 6 – The wheel",
"https://blogs.msdn.microsoft.com/oldnewthing/20030807-00/?p=42963".)

I can't verify that with my hardware. For me Emacs scrolls 5 lines
per click.



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

* Re: mouse-wheel-scroll
  2017-03-31 14:02 mouse-wheel-scroll Angelo Graziosi
@ 2017-03-31 22:37 ` Richard Stallman
  2017-04-01  8:13   ` mouse-wheel-scroll Angelo Graziosi
  0 siblings, 1 reply; 39+ messages in thread
From: Richard Stallman @ 2017-03-31 22:37 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: tkk, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > @example
  > >   (setq mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control))))
  > >   (setq mouse-wheel-progressive-speed nil)
  > >   @end example

  > I tried that in my init file and now the scrolling is very nice!

Is there any way we can detect pertinent conditions so as to
set up better defaults on various kinds of platforms?

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.




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

* Re: mouse-wheel-scroll
  2017-03-31 22:37 ` mouse-wheel-scroll Richard Stallman
@ 2017-04-01  8:13   ` Angelo Graziosi
  0 siblings, 0 replies; 39+ messages in thread
From: Angelo Graziosi @ 2017-04-01  8:13 UTC (permalink / raw)
  To: rms; +Cc: tkk, emacs-devel

Il 01/04/2017 00:37, Richard Stallman ha scritto:
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > > @example
>   > >   (setq mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control))))
>   > >   (setq mouse-wheel-progressive-speed nil)
>   > >   @end example
>
>   > I tried that in my init file and now the scrolling is very nice!
>
> Is there any way we can detect pertinent conditions so as to
> set up better defaults on various kinds of platforms?
>

Maybe all this depend on the screen / font height.

In my case Emacs fills the screen height with about 60 lines and 
scrolling 5 lines at wheel "click" seems too much.

This value (5/"click") could be reasonable if one has 100 - 150 lines 
(or more) at screen height.

If this is the case, it is not so simple to find optimal values.. Fixing 
the default to 2 or 3 could be the solution.


Ciao,
  Angelo.



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

* Re: mouse-wheel-scroll
  2017-03-31  8:53                 ` mouse-wheel-scroll Dani Moncayo
  2017-03-31  9:05                   ` mouse-wheel-scroll Eli Zaretskii
@ 2017-04-01  8:17                   ` Anders Lindgren
  1 sibling, 0 replies; 39+ messages in thread
From: Anders Lindgren @ 2017-04-01  8:17 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: Eli Zaretskii, Emacs development discussions

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

Hi!

I'm using a trackpad on a mac, and I would like Emacs to behave like other
applications.

In macOS, scrolling slowly scrolls the display very little and smoothly
(even less than a line, for applications that support it). Whereas, if I
scroll fast, large amount of text is moved. One big advantage of this is
that it's easier for the eye to follow the scrolled text when it scrolls
smoothly. When the text jump (as it does by default in Emacs) it's easy to
loose track of what is what on the screen, and you wast time trying to find
visual markers on the screen.

To get the smooth scroll, I have used the settings suggested by the
original poster for `mouse-wheel-scroll-amount': (1 ((shift) . 5)
((control) . nil)) I have always seen the old setting as a relic from the
time when computers weren't powerful enough to perform scrolling
effectively.

However, `mouse-wheel-progressive-speed' should be `t' -- at least when
using a trackpad. If not, it's not possible to scroll fast through a
buffer. (In numbers, I can scroll through a 2000 lines file in three
strokes when it is set to `t', but it would require about 60 strokes when
nil -- which clearly makes it utterly useless.)


TL;DR: When using a trackpad or a magic mouse on macOS, the following
settings are suitable:

    mouse-wheel-scroll-amount: (1 ((shift) . 5) ((control) . nil))
    mouse-wheel-progressive-speed: t

    -- Anders

On Fri, Mar 31, 2017 at 10:53 AM, Dani Moncayo <dmoncayo@gmail.com> wrote:

> >> I think there is consensus in that 'mouse-wheel-progressive-speed'
> >> should be set to nil by default.
> >
> > Is there?  I wasn't sure, because at least some issues are raised with
> > the amount of scrolling for a single wheel click, which doesn't
> > involve that variable's effect.
>
> IIUC, the amount of scrolling for a single (isolated in time) wheel
> click is currently 5 lines by default in Emacs for anyone who have not
> set some system-specific setting for increasing that amount (75 lines
> in Tak's environment).  And it seems that we all (except you) would
> prefer lowering that amount a bit.
>
> But regardless of the above question about the default value of
> 'mouse-wheel-scroll-amount', I think none of us like the
> Emacs-specific acceleration of the mouse-wheel scrolling.  IOW, we all
> prefer 'mouse-wheel-progressive-speed' set to nil by default.
>
> --
> Dani Moncayo
>
>

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

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

* Re: mouse-wheel-scroll
  2017-03-31 19:02                         ` mouse-wheel-scroll Richard Copley
@ 2017-04-01 14:29                           ` Eli Zaretskii
  2017-04-02 10:41                             ` mouse-wheel-scroll Richard Copley
  0 siblings, 1 reply; 39+ messages in thread
From: Eli Zaretskii @ 2017-04-01 14:29 UTC (permalink / raw)
  To: Richard Copley; +Cc: emacs-devel, dmoncayo

> From: Richard Copley <rcopley@gmail.com>
> Date: Fri, 31 Mar 2017 20:02:25 +0100
> Cc: Dani Moncayo <dmoncayo@gmail.com>, Emacs Development <emacs-devel@gnu.org>
> 
> On MS Windows, one WM_MOUSEWHEEL event doesn't always mean the same
> as another. Programs need to examine the wParam to find the scroll
> distance. As far as I can tell Emacs doesn't do that.

Not sure what you mean by "examine wParam".  We do use the recommended
GET_WHEEL_DELTA_WPARAM macro.

> This might (possibly) explain Kunihiro's results

Were they on MS-Windows?  I'm not sure.

> if what Raymond Chen calls a
> "sub-detent mouse" was involved. (See "Scrollbars bart [sic] 6 – The wheel",
> "https://blogs.msdn.microsoft.com/oldnewthing/20030807-00/?p=42963".)

What that blog suggests, AFAIU, means that the amount of scrolling
could not be controlled via the system customization interfaces, only
via Emacs's user options.  Is that what we want?  It would mean that
Emacs behaves differently from other applications on the same system.



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

* Re: mouse-wheel-scroll
  2017-04-01 14:29                           ` mouse-wheel-scroll Eli Zaretskii
@ 2017-04-02 10:41                             ` Richard Copley
  2017-04-02 16:37                               ` mouse-wheel-scroll Eli Zaretskii
  0 siblings, 1 reply; 39+ messages in thread
From: Richard Copley @ 2017-04-02 10:41 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Emacs Development, Dani Moncayo

On 1 April 2017 at 15:29, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Richard Copley <rcopley@gmail.com>
>> Date: Fri, 31 Mar 2017 20:02:25 +0100
>> Cc: Dani Moncayo <dmoncayo@gmail.com>, Emacs Development <emacs-devel@gnu.org>
>>
>> On MS Windows, one WM_MOUSEWHEEL event doesn't always mean the same
>> as another. Programs need to examine the wParam to find the scroll
>> distance. As far as I can tell Emacs doesn't do that.
>
> Not sure what you mean by "examine wParam".  We do use the recommended
> GET_WHEEL_DELTA_WPARAM macro.

So we do. Good. Sorry, I missed that.

I had thought we were treating each message as single-notch scroll.
It seemed like that could explain some of the strange scroll speeds
reported. My mistake.

Apologies for the delayed response too.

>> This might (possibly) explain Kunihiro's results
>
> Were they on MS-Windows?  I'm not sure.

We'd have had to ask, but it's a moot point now as far as this idea is
concerned.

>> if what Raymond Chen calls a
>> "sub-detent mouse" was involved. (See "Scrollbars bart [sic] 6 – The wheel",
>> "https://blogs.msdn.microsoft.com/oldnewthing/20030807-00/?p=42963".)
>
> What that blog suggests, AFAIU, means that the amount of scrolling
> could not be controlled via the system customization interfaces, only
> via Emacs's user options.

I'm confused. The blog says "the amount of scrolling is a user setting
which must be respected", and the sample code "requeries the user's
desired scroll delta at each mouse wheel message". But I don't see
anything there that applies to Emacs's user options. They are outside
its scope.

> Is that what we want?  It would mean that
> Emacs behaves differently from other applications on the same system.

Confused again. The blog is only about the interpretation of wheel messages.
How we respond to the messages is under our control. What they mean is not.

I posted the blog because it's a good explanation of the basics (remember
from earlier that I stupidly thought I'd found a big mistake?) and to say
what a sub "detent wheel" was.



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

* Re: mouse-wheel-scroll
  2017-04-02 10:41                             ` mouse-wheel-scroll Richard Copley
@ 2017-04-02 16:37                               ` Eli Zaretskii
  0 siblings, 0 replies; 39+ messages in thread
From: Eli Zaretskii @ 2017-04-02 16:37 UTC (permalink / raw)
  To: Richard Copley; +Cc: emacs-devel, dmoncayo

> From: Richard Copley <rcopley@gmail.com>
> Date: Sun, 2 Apr 2017 11:41:39 +0100
> Cc: Dani Moncayo <dmoncayo@gmail.com>, Emacs Development <emacs-devel@gnu.org>
> 
> >> if what Raymond Chen calls a
> >> "sub-detent mouse" was involved. (See "Scrollbars bart [sic] 6 – The wheel",
> >> "https://blogs.msdn.microsoft.com/oldnewthing/20030807-00/?p=42963".)
> >
> > What that blog suggests, AFAIU, means that the amount of scrolling
> > could not be controlled via the system customization interfaces, only
> > via Emacs's user options.
> 
> I'm confused. The blog says "the amount of scrolling is a user setting
> which must be respected", and the sample code "requeries the user's
> desired scroll delta at each mouse wheel message". But I don't see
> anything there that applies to Emacs's user options. They are outside
> its scope.

They mean system-wide user settings, not settings specific to
applications.

> > Is that what we want?  It would mean that
> > Emacs behaves differently from other applications on the same system.
> 
> Confused again. The blog is only about the interpretation of wheel messages.
> How we respond to the messages is under our control. What they mean is not.

My reading of the code presented there is that, if we go the way they
suggest, scrolling in Emacs will be unaffected by the system-wide
customizations.  Maybe I misunderstood.



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

* Re: mouse-wheel-scroll
  2017-03-31  6:39           ` mouse-wheel-scroll Eli Zaretskii
  2017-03-31  6:55             ` mouse-wheel-scroll Dani Moncayo
  2017-03-31  9:04             ` mouse-wheel-scroll Tak Kunihiro
@ 2017-04-02 23:20             ` Tak Kunihiro
  2017-04-03  2:34               ` mouse-wheel-scroll Eli Zaretskii
  2 siblings, 1 reply; 39+ messages in thread
From: Tak Kunihiro @ 2017-04-02 23:20 UTC (permalink / raw)
  To: Eli Zaretskii, emacs-devel; +Cc: Kunihiro Tak

>>>> In my environment with defaults, turning the wheel one click scrolls
>>>> 75 lines.
>>> 
>>> Did you customize your system's mouse speed?  It sounds strange that a
>>> single click scrolls 15 lines by default.  Is that what happens with
>>> other applications?
>> 
>> On my system `acceleration' is set to middle.  Wheel one click scrolls
>> 1 line on Firefox and 75 lines on Emacs.
>> 
>> With `acceleration’ none, wheel one click scrolls 1 line on Firefox
>> and 5 lines on Emacs.  On this condition, because of lack of acceleration
>> scroll gets too slow on other applications.
...
> This might (possibly) explain Kunihiro's results

> Were they on MS-Windows?  I'm not sure.


> We'd have had to ask, but it's a moot point now as far as this idea is

> concerned.


My environment with one-click 75-lines is show below.
 - Logitech Anywhere Mouse MX
 - MacOS 10.9.5
 - Logitech Control Center 3.9.0.
   - Speed: Slow
   - Acceleration: Middle

Its wheel is similar to Logitech Performance MX mouse as described by
Kaushal.  It seems that `one-click' on the device generates several
`typical one-click’ considering velocity.




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

* Re: mouse-wheel-scroll
  2017-04-02 23:20             ` mouse-wheel-scroll Tak Kunihiro
@ 2017-04-03  2:34               ` Eli Zaretskii
  2017-04-03  5:50                 ` mouse-wheel-scroll Tak Kunihiro
  0 siblings, 1 reply; 39+ messages in thread
From: Eli Zaretskii @ 2017-04-03  2:34 UTC (permalink / raw)
  To: Tak Kunihiro; +Cc: tkk, emacs-devel

> From: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
> Date: Mon, 3 Apr 2017 08:20:02 +0900
> Cc: Kunihiro Tak <tkk@misasa.okayama-u.ac.jp>
> 
> My environment with one-click 75-lines is show below.
>  - Logitech Anywhere Mouse MX
>  - MacOS 10.9.5
>  - Logitech Control Center 3.9.0.
>    - Speed: Slow
>    - Acceleration: Middle
> 
> Its wheel is similar to Logitech Performance MX mouse as described by
> Kaushal.  It seems that `one-click' on the device generates several
> `typical one-click’ considering velocity.

Isn't it expected that such special mice need non-default
customizations of the related Emacs features?  IOW, why non-default
values that give good results for these mice would be good for the
rest of the users, _as_defaults_?



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

* Re: mouse-wheel-scroll
  2017-04-03  2:34               ` mouse-wheel-scroll Eli Zaretskii
@ 2017-04-03  5:50                 ` Tak Kunihiro
  2017-04-03 14:37                   ` mouse-wheel-scroll Eli Zaretskii
  0 siblings, 1 reply; 39+ messages in thread
From: Tak Kunihiro @ 2017-04-03  5:50 UTC (permalink / raw)
  To: eliz; +Cc: tkk, emacs-devel

>> My environment with one-click 75-lines is show below.
>>  - Logitech Anywhere Mouse MX
>>  - MacOS 10.9.5
>>  - Logitech Control Center 3.9.0.
>>    - Speed: Slow
>>    - Acceleration: Middle
>> 
>> Its wheel is similar to Logitech Performance MX mouse as described by
>> Kaushal.  It seems that `one-click' on the device generates several
>> `typical one-click’ considering velocity.
> 
> Isn't it expected that such special mice need non-default
> customizations of the related Emacs features?  IOW, why non-default
> values that give good results for these mice would be good for the
> rest of the users, _as_defaults_?

(1) Mouse

I did not notice if I am using special since that works well with
other applications.  Regardless of my understanding, it took 3 years
to find how to teak.  It is good to have the tips in Info to scroll
less.

(2) Touchpad and Trackbar

Using touchpad or trackbar on laptop computers, I think that defaults
scroll too fast, especially by trackbar.  Don't you think so?

I use following laptop computers as well.

 - MacOS 10.9.5 on MacBook Air 13-inch, Mid 2011
 - Windows 10 on Lenovo X260

Laptop computers without mouse are common.  I wonder if unusable on
laptop computers without mouse beats inconvenience on desktop
computers with mouse.

No matter who has a priority, it is good to have the tips in Info for
those who think Emacs scrolls too fast.

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

* Re: mouse-wheel-scroll
  2017-04-03  5:50                 ` mouse-wheel-scroll Tak Kunihiro
@ 2017-04-03 14:37                   ` Eli Zaretskii
  2017-04-03 23:07                     ` mouse-wheel-scroll Tak Kunihiro
  2017-04-04 12:35                     ` mouse-wheel-scroll Alan Third
  0 siblings, 2 replies; 39+ messages in thread
From: Eli Zaretskii @ 2017-04-03 14:37 UTC (permalink / raw)
  To: Tak Kunihiro; +Cc: emacs-devel

> Date: Mon, 03 Apr 2017 14:50:49 +0900 (JST)
> Cc: emacs-devel@gnu.org, tkk@misasa.okayama-u.ac.jp
> From: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
> 
> >> My environment with one-click 75-lines is show below.
> >>  - Logitech Anywhere Mouse MX
> >>  - MacOS 10.9.5
> >>  - Logitech Control Center 3.9.0.
> >>    - Speed: Slow
> >>    - Acceleration: Middle
> >> 
> >> Its wheel is similar to Logitech Performance MX mouse as described by
> >> Kaushal.  It seems that `one-click' on the device generates several
> >> `typical one-click’ considering velocity.
> > 
> > Isn't it expected that such special mice need non-default
> > customizations of the related Emacs features?  IOW, why non-default
> > values that give good results for these mice would be good for the
> > rest of the users, _as_defaults_?
> 
> (1) Mouse
> 
> I did not notice if I am using special since that works well with
> other applications.

How much does it scroll for a single click with, for instance, a Web
browser or a word processor?

I'm saying that the acceleration setting is AFAIK not available with
other mice.

> Regardless of my understanding, it took 3 years to find how to teak.
> It is good to have the tips in Info to scroll less.

The information is already in the manual, but if you think it is not
detailed enough, we can certainly expand it.

> (2) Touchpad and Trackbar
> 
> Using touchpad or trackbar on laptop computers, I think that defaults
> scroll too fast, especially by trackbar.  Don't you think so?

I will try that later.

> Laptop computers without mouse are common.  I wonder if unusable on
> laptop computers without mouse beats inconvenience on desktop
> computers with mouse.

If we can more-or-less reliably detect each situation, sure, adapting
Emacs to each one would be an improvement.  Does anyone know how to
detect them?

> No matter who has a priority, it is good to have the tips in Info for
> those who think Emacs scrolls too fast.

I agree.



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

* Re: mouse-wheel-scroll
  2017-04-03 14:37                   ` mouse-wheel-scroll Eli Zaretskii
@ 2017-04-03 23:07                     ` Tak Kunihiro
  2017-04-04 12:35                     ` mouse-wheel-scroll Alan Third
  1 sibling, 0 replies; 39+ messages in thread
From: Tak Kunihiro @ 2017-04-03 23:07 UTC (permalink / raw)
  To: Eli Zaretskii, emacs-devel; +Cc: Kunihiro Tak

>>>> My environment with one-click 75-lines is show below.
>>>> - Logitech Anywhere Mouse MX
>>>> - MacOS 10.9.5
>>>> - Logitech Control Center 3.9.0.
>>>>   - Speed: Slow
>>>>   - Acceleration: Middle
>>>> 
>>>> Its wheel is similar to Logitech Performance MX mouse as described by
>>>> Kaushal.  It seems that `one-click' on the device generates several
>>>> `typical one-click’ considering velocity.
>>> 
>>> Isn't it expected that such special mice need non-default
>>> customizations of the related Emacs features?  IOW, why non-default
>>> values that give good results for these mice would be good for the
>>> rest of the users, _as_defaults_?
>> 
>> (1) Mouse
>> 
>> I did not notice if I am using special since that works well with
>> other applications.
> 
> How much does it scroll for a single click with, for instance, a Web
> browser or a word processor?
> 
> I'm saying that the acceleration setting is AFAIK not available with
> other mice.

Number of lines with a single click scroll is shown below.
- Emacs: 75 lines
- Firefox: 1 line
- Word processor: 2 lines
- Spreadsheet: 5 lines (rows)

It seems other applications consider the `one-click' to be `typical one-lick’.
Maybe they consider interval between event?





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

* Re: mouse-wheel-scroll
  2017-04-03 14:37                   ` mouse-wheel-scroll Eli Zaretskii
  2017-04-03 23:07                     ` mouse-wheel-scroll Tak Kunihiro
@ 2017-04-04 12:35                     ` Alan Third
  1 sibling, 0 replies; 39+ messages in thread
From: Alan Third @ 2017-04-04 12:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Tak Kunihiro, emacs-devel

On Mon, Apr 03, 2017 at 05:37:21PM +0300, Eli Zaretskii wrote:
> > Date: Mon, 03 Apr 2017 14:50:49 +0900 (JST)
> > Cc: emacs-devel@gnu.org, tkk@misasa.okayama-u.ac.jp
> > From: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
> > 
> > (2) Touchpad and Trackbar
> > 
> > Using touchpad or trackbar on laptop computers, I think that defaults
> > scroll too fast, especially by trackbar.  Don't you think so?
> 
> I will try that later.
> 
> > Laptop computers without mouse are common.  I wonder if unusable on
> > laptop computers without mouse beats inconvenience on desktop
> > computers with mouse.
> 
> If we can more-or-less reliably detect each situation, sure, adapting
> Emacs to each one would be an improvement.  Does anyone know how to
> detect them?

As far as I can tell on macOS the two‐finger touchpad gesture and the
scrollwheel result in different types of ‘deltas’ being returned. We
may be able to identify which type of delta is in use and treat them
differently.

I can’t speak for MS Windows, or any other environment, though.

(FWIW, I have progressive scroll turned off in Emacs.)
-- 
Alan Third



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

end of thread, other threads:[~2017-04-04 12:35 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-28 23:13 mouse-wheel-scroll Tak Kunihiro
2017-03-29  2:39 ` mouse-wheel-scroll Eli Zaretskii
2017-03-29  6:06   ` mouse-wheel-scroll Tak Kunihiro
2017-03-29  7:36 ` mouse-wheel-scroll martin rudalics
2017-03-29  7:44   ` mouse-wheel-scroll Dani Moncayo
2017-03-29 19:09     ` mouse-wheel-scroll Philipp Stephani
2017-03-29 21:18       ` mouse-wheel-scroll Simen Heggestøyl
2017-03-29 21:22 ` mouse-wheel-scroll Kaushal Modi
2017-03-30  2:47   ` mouse-wheel-scroll Eli Zaretskii
2017-03-30  5:07     ` mouse-wheel-scroll Tak Kunihiro
2017-03-30 18:15       ` mouse-wheel-scroll Eli Zaretskii
2017-03-30 18:39         ` mouse-wheel-scroll Stefan Monnier
2017-03-30 20:34           ` mouse-wheel-scroll Eli Zaretskii
2017-03-31  0:26         ` mouse-wheel-scroll Tak Kunihiro
2017-03-31  6:39           ` mouse-wheel-scroll Eli Zaretskii
2017-03-31  6:55             ` mouse-wheel-scroll Dani Moncayo
2017-03-31  8:01               ` mouse-wheel-scroll Eli Zaretskii
2017-03-31  8:53                 ` mouse-wheel-scroll Dani Moncayo
2017-03-31  9:05                   ` mouse-wheel-scroll Eli Zaretskii
2017-03-31  9:24                     ` mouse-wheel-scroll Dani Moncayo
2017-03-31 12:22                       ` mouse-wheel-scroll Eli Zaretskii
2017-03-31 19:02                         ` mouse-wheel-scroll Richard Copley
2017-04-01 14:29                           ` mouse-wheel-scroll Eli Zaretskii
2017-04-02 10:41                             ` mouse-wheel-scroll Richard Copley
2017-04-02 16:37                               ` mouse-wheel-scroll Eli Zaretskii
2017-04-01  8:17                   ` mouse-wheel-scroll Anders Lindgren
2017-03-31  9:04             ` mouse-wheel-scroll Tak Kunihiro
2017-04-02 23:20             ` mouse-wheel-scroll Tak Kunihiro
2017-04-03  2:34               ` mouse-wheel-scroll Eli Zaretskii
2017-04-03  5:50                 ` mouse-wheel-scroll Tak Kunihiro
2017-04-03 14:37                   ` mouse-wheel-scroll Eli Zaretskii
2017-04-03 23:07                     ` mouse-wheel-scroll Tak Kunihiro
2017-04-04 12:35                     ` mouse-wheel-scroll Alan Third
2017-03-30  7:29     ` mouse-wheel-scroll Dani Moncayo
2017-03-30  7:29     ` mouse-wheel-scroll martin rudalics
2017-03-30 13:44     ` mouse-wheel-scroll Kaushal Modi
  -- strict thread matches above, loose matches on Subject: below --
2017-03-31 14:02 mouse-wheel-scroll Angelo Graziosi
2017-03-31 22:37 ` mouse-wheel-scroll Richard Stallman
2017-04-01  8:13   ` mouse-wheel-scroll Angelo Graziosi

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