From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Prevost Newsgroups: gmane.emacs.bugs Subject: bug#4124: 23.1; mwheel in --daemon mode Date: Tue, 11 Aug 2009 14:13:10 -0400 Message-ID: References: <200908111727.n7BHRmJn008727@godzilla.ics.uci.edu> Reply-To: John Prevost , 4124@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250046844 17630 80.91.229.12 (12 Aug 2009 03:14:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Aug 2009 03:14:04 +0000 (UTC) Cc: "4124@emacsbugs.donarmstrong.com" <4124@emacsbugs.donarmstrong.com> To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 12 05:13:57 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mb4Hl-00035k-2D for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Aug 2009 05:13:57 +0200 Original-Received: from localhost ([127.0.0.1]:52486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mb4Hj-0003qq-53 for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Aug 2009 23:13:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Maw3l-0005dN-9K for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 14:26:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Maw3g-0005bP-Fp for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 14:26:56 -0400 Original-Received: from [199.232.76.173] (port=48642 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Maw3g-0005bJ-9G for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 14:26:52 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:39214) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Maw3f-0002EF-D4 for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 14:26:52 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7BIQmbn009388; Tue, 11 Aug 2009 11:26:49 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7BIK4C6008574; Tue, 11 Aug 2009 11:20:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: John Prevost Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 11 Aug 2009 18:20:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4124 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4124-submit@emacsbugs.donarmstrong.com id=B4124.12500143937987 (code B ref 4124); Tue, 11 Aug 2009 18:20:04 +0000 Original-Received: (at 4124) by emacsbugs.donarmstrong.com; 11 Aug 2009 18:13:13 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from TELPERION.WV.CC.CMU.EDU (TELPERION.WV.CC.CMU.EDU [128.237.240.133]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7BIDCAQ007984 for <4124@emacsbugs.donarmstrong.com>; Tue, 11 Aug 2009 11:13:13 -0700 Original-Received: by TELPERION.WV.CC.CMU.EDU (Postfix, from userid 501) id 8AC9B4B48F0; Tue, 11 Aug 2009 14:13:10 -0400 (EDT) In-Reply-To: <200908111727.n7BHRmJn008727@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Tue, 11 Aug 2009 13:27:48 -0400") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (darwin) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Tue, 11 Aug 2009 14:26:56 -0400 X-Mailman-Approved-At: Tue, 11 Aug 2009 23:13:27 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30120 Archived-At: Dan Nicolaescu writes: > In emacs-23 uses of window-system to initialize variables are most of > the time bugs because window-system is not a constant anymore. Its > value depends of the frame it is used in, and we can have TTY and GUI > frames in the same emacs sessions, so... That was my assumption, yup. > w32 does not use the daemon mode, nor can it use TTY and w32 frames at > the same time, so it should not matter. Hmm. Is it not possible to start emacs in --daemon mode and use emacsclient to open a file in w32? I thought I had tested this and that it had worked. I did note that it was impossible to create tty and w32 frames at the same time. > What happens on ns if you take the `ns' out of the memq test above, does > it make it work? (I don't have a mouse with a wheel, nor ns ...) No. The essential problem is that in 'x', the mouse wheel events are 'mouse-4' and 'mouse-5', while in 'ns' and 'w32', the mouse wheel events are 'wheel-up' and 'wheel-down'. The defcustom sets the default for the events it will expect for to 'mouse-4' and 'mouse-5' (i.e. X-style bindings), unless the window-system is ns or w32, in which case it uses 'wheel-up' and 'wheel-down'. In fact, ns does need 'wheel-up' and 'wheel-down', so removing it from the memq would result it in never working at all (i.e. failing always, rather than only failing when emacs is started with --daemon). It is possible to set the value of the mouse-wheel-down-event and mouse-wheel-up-event variables in the user startup file to work around this problem. The drawback here is that either the startup file/customization is specialized to ns/w32 (and the same startup file cannot be used on X), or the variable has to be set in the .emacs file based on the operating system (which is a problem if the user has both X and NS versions of emacs on Mac OS). Hence my suggestion that a better long-term solution is to pick one or the other representation of the mouse-wheel as "standard" (either mouse-4 and mouse-5 as in X or wheel-up and wheel-down as in NS and W32) and have the term init files set up the appropriate mapping from native events to the standard events. In any case, it's clear that this is a problem in mwheel, and I do have a short-term workaround. Thanks very much, John.