From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: Smoother macOS touchpad scrolling Date: Tue, 19 Sep 2017 20:12:03 +0100 Message-ID: <20170919191203.GA50068@breton.holly.idiocy.org> References: <20170908184634.GA20058@breton.holly.idiocy.org> <86y3pox258.fsf@misasa.okayama-u.ac.jp> <20170909081805.GA20275@breton.holly.idiocy.org> <86ingrl56v.fsf@misasa.okayama-u.ac.jp> <20170910083758.GA30315@breton.holly.idiocy.org> <20170916223317.GA58067@breton.holly.idiocy.org> <20170918190337.GA16455@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1505848401 19485 195.159.176.226 (19 Sep 2017 19:13:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 19 Sep 2017 19:13:21 +0000 (UTC) User-Agent: Mutt/1.9.0 (2017-09-02) Cc: homeros.misasa@gmail.com, emacs-devel@gnu.org To: "Charles A. Roelli" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 19 21:13:18 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duNxN-0004tD-Sq for ged-emacs-devel@m.gmane.org; Tue, 19 Sep 2017 21:13:18 +0200 Original-Received: from localhost ([::1]:44955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duNxV-0002U2-By for ged-emacs-devel@m.gmane.org; Tue, 19 Sep 2017 15:13:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duNwI-0001xr-UL for emacs-devel@gnu.org; Tue, 19 Sep 2017 15:12:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duNwH-0005a6-W8 for emacs-devel@gnu.org; Tue, 19 Sep 2017 15:12:10 -0400 Original-Received: from mail-wr0-x230.google.com ([2a00:1450:400c:c0c::230]:47552) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1duNwH-0005YH-Oi for emacs-devel@gnu.org; Tue, 19 Sep 2017 15:12:09 -0400 Original-Received: by mail-wr0-x230.google.com with SMTP id k20so452136wre.4 for ; Tue, 19 Sep 2017 12:12:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=QACS2JQOYqa95krLaQrotdccsThW6dWsG2Y4G8i2nno=; b=sfdP2uJmf3eUp/UUT6N8wIMyt0kBsrHvAaVquS3AwADSSk51zWgebWkDNR3vh8O2hJ yDygNwgBo7UTpLKIrQqbtBP8Enx6Vm+j7dAgd9MWmEqLQCnMT6I4b6+vTrezqxhokc4h bG4thlj+uAwRHmv3I5LTwygVCGRiHqR6csZKB2TZqIySDsWF/dNyAXmEJLVrGoB9fpve nrkT3g2GkwpwZ4lL3jMc7//fiGleK5/toUCt2+7RplLfvGaRwbEkzwZaPbLVXPpL6GOG gqbOGvQ1Jzw6+m/Do4R/mAe/h0bi+ZgUwmLyt//Pp0/C+6YAlOevOiZFl0Ocjl0eXZPj Dnzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=QACS2JQOYqa95krLaQrotdccsThW6dWsG2Y4G8i2nno=; b=MqU3zTO01+gFFHcH5uZNqzFfDFb4RBo+crdptvudEvDArn2bEQUp1huj+rsyPyfY1d hE0Hl/mgrgHe1VT3lwhyYMiMXURtCLYxt7/nsQEglBzxXtm1ULQh5pwCebNLeEbxJY4Z jaND4GyrbmJF7WAa4ypFrfb8zBXrMv194y7Gzy2y10lze0GI8Kpt+wSi/JvOWllYGrYW XXzO7khMKN3Ffj03Cr18r4sG4yp3LZVC845MmWiQ0XxCj+G68QDQ597e+7RgNuxAbFHs 81+piZ5pWMxjGBUT7Z0m3tbRIAyrCXZDSdzJ/zokYC7+AnOLUJu8eo4WU/D+IAXZwcWL hHmQ== X-Gm-Message-State: AHPjjUg2quwOngQESVIOxStrSf35RZ5EuNDXu47ntiNcR23HMpqHZaJ9 v0ByGrYQs/Zir85qyIgZhfw= X-Google-Smtp-Source: AOwi7QC9lnB5yj3zIfpelZxRXOyO3aa0K2CHbi/RuQ1hC6yzT7MWKDNbCR+fkOsan/E9tOg1MntczQ== X-Received: by 10.223.142.73 with SMTP id n67mr2180542wrb.278.1505848327310; Tue, 19 Sep 2017 12:12:07 -0700 (PDT) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-dc16-e8c9-c53b-72e4.holly.idiocy.org. [2001:8b0:3f8:8129:dc16:e8c9:c53b:72e4]) by smtp.gmail.com with ESMTPSA id a39sm33548wrc.48.2017.09.19.12.12.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Sep 2017 12:12:05 -0700 (PDT) Content-Disposition: inline In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:218535 Archived-At: On Mon, Sep 18, 2017 at 10:19:30PM +0200, Charles A. Roelli wrote: > Yes, it returns nil. I think this check (or maybe a function that > returns the appkit version as an integer) could be added to ns-win.el. I’m leaving it as an inline check at the moment as we only have a single use of it just now. If you’re aware of other places it could be useful, please let me know. > > (let ((appkit-version (progn > > (string-match "^appkit-\\([^\s-]*\\)" ns-version-string) > > (match-string 1 ns-version-string)))) > > (when (and (featurep 'cocoa) (>= (string-to-number appkit-version) 1138)) > > (setq mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control)))) > > (put 'mouse-wheel-scroll-amount 'customized-value > > (list (custom-quote (symbol-value 'mouse-wheel-scroll-amount)))) > > > > (setq mouse-wheel-progressive-speed nil) > > (put 'mouse-wheel-progressive-speed 'customized-value > > (list (custom-quote (symbol-value 'mouse-wheel-progressive-speed)))))) I’ve pushed (roughly) this to Emacs 26. See below. > We could also make the defcustoms in mwheel.el look something like > this: > > (defcustom mouse-wheel-scroll-amount > (cond > ((and (featurep 'cocoa) (>= (ns-appkit-version) 1138)) > '(1 ((shift) . 5) ((control) . nil))) > (t '(5 ((shift) . 1) ((control) . nil)))) ... > > instead of: > > (defcustom mouse-wheel-scroll-amount '(5 ((shift) . 1) ((control) . nil)) ... > > Then in ns-win.el we could do: > > (custom-reevaluate-setting 'mouse-wheel-scroll-amount) I tried this but it just set mouse-wheel-scroll-amount to nil. It seems that custom-reevaluate-setting uses the :set function, which is already in use for mouse-wheel-scroll-amount. Since I want this in Emacs 26 I figured it’s better to go with an ugly method that works for now, and figure out a neater solution later. > Then it sets the user option to that value (using the option’s > ‘:set’ property if that is defined). ^^^^ > I /think/ this is the right thing to do, but if any Customize experts > can weigh in, that would be great. Please do. -- Alan Third