From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Elias_M=E5rtenson?= Newsgroups: gmane.emacs.devel Subject: Re: overly-eager mouse scrolling on mac Date: Fri, 24 Jan 2014 11:31:20 +0800 Message-ID: References: <52E11259.8090802@swipnet.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c3f8aad695c504f0aefd2b X-Trace: ger.gmane.org 1390534283 2695 80.91.229.3 (24 Jan 2014 03:31:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jan 2014 03:31:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: sds@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 24 04:31:32 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W6XUR-0001mX-OQ for ged-emacs-devel@m.gmane.org; Fri, 24 Jan 2014 04:31:31 +0100 Original-Received: from localhost ([::1]:44246 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6XUR-0000cX-CV for ged-emacs-devel@m.gmane.org; Thu, 23 Jan 2014 22:31:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6XUM-0000cF-My for emacs-devel@gnu.org; Thu, 23 Jan 2014 22:31:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6XUK-00062l-Or for emacs-devel@gnu.org; Thu, 23 Jan 2014 22:31:26 -0500 Original-Received: from mail-lb0-x230.google.com ([2a00:1450:4010:c04::230]:37356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6XUI-00062Q-2D; Thu, 23 Jan 2014 22:31:22 -0500 Original-Received: by mail-lb0-f176.google.com with SMTP id w7so2132160lbi.35 for ; Thu, 23 Jan 2014 19:31:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=L9NctmFxn1Uwq2Q+ExDeO6aXpIR9UG86NSzBRNQK9T0=; b=i3FOYzq3Dk7peR1oOuTp8JjtP/ztk7g5zSyk4y37Q6wQxCk2LBoNsDwqF6wV0QblQi 9xsPWQli2/PlHTKNuL+LDfEcVA5xGcTXyT9OG4OcsqpFI6XMW3pEvOGYZ0l8lA0MnENm OiD8dvqFcHK6iMG/0TKiDNcVhEMEGq/2GtsQP5bEYxfcJpNPgmiqUUflAczlGw9jxMox u303cc6yUfPFiYhJoT/O4RxFaVxa1Wsv2euhMVxYKdbfmAA68x77yN+vD/YZbkHDPWs6 gcJZ9BfkePJxQW8CiL99dopYGwQzbkAHWr7DcnU1stT87CYPDCZ+LKzqkvDHqYkMuy4M KmwQ== X-Received: by 10.112.52.74 with SMTP id r10mr4021331lbo.36.1390534280515; Thu, 23 Jan 2014 19:31:20 -0800 (PST) Original-Received: by 10.112.14.169 with HTTP; Thu, 23 Jan 2014 19:31:20 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:168992 Archived-At: --001a11c3f8aad695c504f0aefd2b Content-Type: text/plain; charset=ISO-8859-1 For what it's worth, I was suffering from exactly the same thing and eventually unbound the mwheel stuff altogether and simply rebound them to the following. After that, scrolling was sane again. (defun scroll-up-one () (interactive) (scroll-up 1)) (defun scroll-down-one () (interactive) (scroll-down 1)) (defun scroll-up-double-speed () (interactive) (scroll-up 3)) (defun scroll-down-double-speed () (interactive) (scroll-down 3)) (global-set-key (kbd "") 'scroll-down-one) (global-set-key (kbd "") 'scroll-up-one) (global-set-key (kbd "") 'scroll-down-double-speed) (global-set-key (kbd "") 'scroll-up-double-speed) (global-set-key (kbd "") 'scroll-down-one) (global-set-key (kbd "") 'scroll-up-one) (global-set-key (kbd "") 'scroll-down-double-speed) (global-set-key (kbd "") 'scroll-up-double-speed) Regards, Elias On 24 January 2014 03:52, Sam Steingold wrote: > Hi, > > > * Jan D. [2014-01-23 14:00:09 +0100]: > > > > Sam Steingold skrev 2014-01-22 21:07: > >> In GNU Emacs 24.3.50.1 (x86_64-apple-darwin13.0.0, NS > apple-appkit-1265.00) > >> of 2014-01-21 on sds-MacBook-Pro.local > >> Windowing system distributor `Apple', version 10.3.1265 > >> Configured using: `configure --with-ns' > >> > >> Whenever I touch the mouse, emacs scrolls like crazy, starts blinking > >> (visible-bell is on), and *Message* contains these: > >> > >> byte-code: End of buffer [5 times] > >> byte-code: End of buffer [5 times] > >> byte-code: Beginning of buffer [7 times] > >> > >> lossage is: > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> C-h l > >> > >> is this a known bug? > >> feature? > >> > >> I suspect that there is a timing parameter in the mouse handling code > >> which is too small... > >> > >> PS. All the other applications (firefox &c) behave normally. > >> > > > > The blinking thing has been discussed in bug 16196. > > Thanks for the pointer. > Your problem is slightly different from mine: > you don't like the beeps, > I don't like the scroll amount. > > > There is a mwheel workaround in there. > > Well, the workaround is only a partial fix. (see below) > > > As for "crazy", that is not a clear technical term so I don't know what > > that means. > > My problem is that there are too many mouse events are generated, > so a touch to the mouse results in a huge scroll. > Basically, a scroll means either end-of-buffer or beginning-of-buffer. > > > If you mean that is scrolls very fast, I guess you have to > > either fix mwheel or adjust mouse acceleration in OSX settings. > > All the other applications seem to handle the mouse as I want them too. > The problem seems to be with Emacs. > > > Here (with Magic mouse and trackpad) the speed is reasonable. Faster > > than GNU/Linux/Gtk+ on the same hardware, but still OK. > > Okay, so you are confirming my impression that the problem is with Emacs. > Thanks. > > elp-instrument-function appears to indicate that mwheel-scroll is called > much more often than I want it to be called - 20+ times for a simple > touch of the mouse. > > -- > Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1265 > http://www.childpsy.net/ http://mideasttruth.com http://www.memritv.org > http://memri.org http://dhimmi.com http://americancensorship.org > If money were measured in piles, I would have had a pit of it. > > > --001a11c3f8aad695c504f0aefd2b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
For what it's worth, I was suffering from exactly the = same thing and eventually unbound the mwheel stuff altogether and simply re= bound them to the following. After that, scrolling was sane again.

(defun scroll-up-one ()
=A0 (interactive)
=A0 (scroll-up 1))

(defun scroll-down-one ()
=A0 (interactive)
=A0 (scroll-down 1))

(defun scroll-up-double-speed ()
=A0 (interactive)
=A0 = (scroll-up 3))

(defun scroll-down-double-speed ()<= /div>
=A0 (interactive)
=A0 (scroll-down 3))
=
(global-set-key (kbd "<mouse-4>") 'scro= ll-down-one)
(global-set-key (kbd "<mouse-5>") &#= 39;scroll-up-one)
(global-set-key (kbd "<double-mouse-4&g= t;") 'scroll-down-double-speed)
(global-set-key (kbd "<double-mouse-5>") 'scroll-u= p-double-speed)
(global-set-key (kbd "<wheel-up>"= ) 'scroll-down-one)
(global-set-key (kbd "<wheel-down= >") 'scroll-up-one)
(global-set-key (kbd "<double-wheel-up>") 'scroll-= down-double-speed)
(global-set-key (kbd "<double-wheel-do= wn>") 'scroll-up-double-speed)

Regards,
Elias


On 24 January 2014 03:52, Sam Steingold <sds@gnu.org&= gt; wrote:
Hi,

> * Jan D. <wna.u.q@fjvcarg.fr<= /a>> [2014-01-23 14:00:09 +0100]:
>
> Sam Steingold skrev 2014-01-22 21:07:
>> In GNU Emacs 24.3.50.1 (x86_64-apple-darwin13.0.0, NS apple-appkit= -1265.00)
>> =A0 of 2014-01-21 on sds-MacBook-Pro.local
>> Windowing system distributor `Apple', version 10.3.1265
>> Configured using: `configure --with-ns'
>>
>> Whenever I touch the mouse, emacs scrolls like crazy, starts blink= ing
>> (visible-bell is on), and *Message* contains these:
>>
>> byte-code: End of buffer [5 times]
>> byte-code: End of buffer [5 times]
>> byte-code: Beginning of buffer [7 times]
>>
>> lossage is:
>>
>> <double-wheel-down> <wheel-right> <wheel-down> &= lt;wheel-down>
>> <double-wheel-down> <triple-wheel-down> <triple-whe= el-down>
>> <triple-wheel-down> <triple-wheel-down> <wheel-up&g= t;
>> <double-wheel-up> <wheel-down> <double-wheel-down&g= t;
>> <wheel-up> <double-wheel-up> <triple-wheel-up> &= lt;triple-wheel-up>
>> <wheel-up> <select-window> <wheel-up> <double= -wheel-up>
>> <triple-wheel-up> <triple-wheel-up> <triple-wheel-u= p>
>> <triple-wheel-up> <triple-wheel-up> <wheel-down>= <double-wheel-down>
>> <triple-wheel-down> <triple-wheel-down> <triple-whe= el-down>
>> <triple-wheel-down> <triple-wheel-down> C-h l
>>
>> is this a known bug?
>> feature?
>>
>> I suspect that there is a timing parameter in the mouse handling c= ode
>> which is too small...
>>
>> PS. All the other applications (firefox &c) behave normally. >>
>
> The blinking thing has been discussed in bug 16196.

Thanks for the pointer.
Your problem is slightly different from mine:
you don't like the beeps,
I don't like the scroll amount.

> There is a mwheel workaround in there.

Well, the workaround is only a partial fix. (see below)

> As for "crazy", that is not a clear technical term so I don&= #39;t know what
> that means.

My problem is that there are too many mouse events are generated,
so a touch to the mouse results in a huge scroll.
Basically, a scroll means either end-of-buffer or beginning-of-buffer.

> If you mean that is scrolls very fast, I guess you have to
> either fix mwheel or adjust mouse acceleration in OSX settings.

All the other applications seem to handle the mouse as I want them to= o.
The problem seems to be with Emacs.

> Here (with Magic mouse and trackpad) the speed is reasonable. =A0Faste= r
> than GNU/Linux/Gtk+ on the same hardware, but still OK.

Okay, so you are confirming my impression that the problem is with Em= acs.
Thanks.

elp-instrument-function appears to indicate that mwheel-scroll is called much more often than I want it to be called - 20+ times for a simple
touch of the mouse.
http://www.chi= ldpsy.net/ http:/= /mideasttruth.com = http://www.memritv.org
http://memri.org http://dhimmi.com http://americancensorship.o= rg
If money were measured in piles, I would have had a pit of it.



--001a11c3f8aad695c504f0aefd2b--