From unknown Sat Jun 14 19:05:02 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4124: 23.1; mwheel in --daemon mode Reply-To: John Prevost , 4124@debbugs.gnu.org Resent-From: John Prevost Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 11 Aug 2009 15:55:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 4124 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125000569324174 (code B ref -1); Tue, 11 Aug 2009 15:55:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 11 Aug 2009 15:48:13 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7BFm7Vh024169 for ; Tue, 11 Aug 2009 08:48:09 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mata2-0001bV-JC for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 11:48:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MatZx-0001ZX-IB for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 11:48:05 -0400 Received: from [199.232.76.173] (port=43888 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MatZx-0001ZQ-0j for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 11:48:01 -0400 Received: from mx20.gnu.org ([199.232.41.8]:13103) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MatZv-0003LN-VF for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 11:48:00 -0400 Received: from telperion.wv.cc.cmu.edu ([128.237.240.133]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MatZs-0008L7-Gg for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 11:47:56 -0400 Received: by TELPERION.WV.CC.CMU.EDU (Postfix, from userid 501) id 2E9614B4315; Tue, 11 Aug 2009 11:47:55 -0400 (EDT) From: John Prevost To: bug-gnu-emacs@gnu.org Date: Tue, 11 Aug 2009 11:47:55 -0400 Message-ID: User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Detected-Operating-System: by mx20.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: When emacs is started in --daemon mode, the window-system variable is initially 'nil'. In mwheel.el, mouse-wheel-down-event and mouse-wheel-up-event are bound with defcustom declarations like the following: (defcustom mouse-wheel-down-event ;; In the latest versions of XEmacs, we could just use mouse-%s as well. (if (memq window-system '(w32 ns)) 'wheel-up (intern (format (if (featurep 'xemacs) "button%s" "mouse-%s") mouse-wheel-down-button))) "Event used for scrolling down." :group 'mouse :type 'symbol :set 'mouse-wheel-change-button) Since these run before any terminal is created in the --daemon case, window-system may not be set to anything at all. It is possible that this is a bug in mwheel, and that mwheel (and other packages) should take care not to make use of the window-system variable until startup. (This may be particularly important if it's possible for a single emacs binary to have support for multiple window systems.) It is possible that a better solution to the problem that mwheel solves above would be for either term/x-win.el to define-key mouse-4 and mouse-5 to wheel-up and wheel-down, or for term/w32-win.el and term/ns-win.el to define-key wheel-up and wheel-down to mouse-4 and mouse-5, so that mwheel and other packages can use the same symbol on all window systems. Either way, the current state of the world is that --daemon results in a non-functional mouse wheel on w32 and ns. If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /Users/prevost1/Documents/src/emacs-23.1/nextstep/Emacs.app/Contents/Resources/etc/DEBUG for instructions. In GNU Emacs 23.1.1 (i386-apple-darwin9.7.0, NS apple-appkit-949.46) of 2009-08-07 on TELPERION.WV.CC.CMU.EDU Windowing system distributor `Apple', version 10.3.949 configured using `configure '--prefix=/opt/emacs-23.1' '--with-ns'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: nil default-enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: diff-auto-refine-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t global-auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: s-x r e p o r t M-x r e p o t r t - e m Recent messages: Loading /Users/prevost1/Documents/src/elisp/nxml-mode/rng-auto.el (source)...done Loading /Users/prevost1/Documents/src/elisp/mercurial.el (source)...done For information about GNU Emacs and the GNU system, type C-h C-a. Terminal setup done kill-region: The mark is not set now, so there is no region From unknown Sat Jun 14 19:05:02 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4124: 23.1; mwheel in --daemon mode Reply-To: Dan Nicolaescu , 4124@debbugs.gnu.org Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 11 Aug 2009 17:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4124 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4124-submit@emacsbugs.donarmstrong.com id=B4124.12500117022919 (code B ref 4124); Tue, 11 Aug 2009 17:35:03 +0000 Received: (at 4124) by emacsbugs.donarmstrong.com; 11 Aug 2009 17:28:22 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from sallyv2.ics.uci.edu (sallyv2.ics.uci.edu [128.195.1.120]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7BHSLRl002914 for <4124@emacsbugs.donarmstrong.com>; Tue, 11 Aug 2009 10:28:22 -0700 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by sallyv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n7BHRmUf009324; Tue, 11 Aug 2009 10:27:48 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n7BHRmJn008727; Tue, 11 Aug 2009 10:27:48 -0700 (PDT) Date: Tue, 11 Aug 2009 10:27:48 -0700 (PDT) Message-Id: <200908111727.n7BHRmJn008727@godzilla.ics.uci.edu> From: Dan Nicolaescu To: John Prevost Cc: 4124@debbugs.gnu.org References: In-Reply-To: (John Prevost's message of "Tue, 11 Aug 2009 11:47:55 -0400") Lines: 111 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n7BHRmUf009324 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu John Prevost writes: > Please write in English if possible, because the Emacs maintainers > usually do not have translators to read other languages for them. > > Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, > and to the gnu.emacs.bug news group. > > Please describe exactly what actions triggered the bug > and the precise symptoms of the bug: > > When emacs is started in --daemon mode, the window-system variable is > initially 'nil'. In mwheel.el, mouse-wheel-down-event and > mouse-wheel-up-event are bound with defcustom declarations like the > following: > > (defcustom mouse-wheel-down-event > ;; In the latest versions of XEmacs, we could just use mouse-%s as well. > (if (memq window-system '(w32 ns)) 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... > 'wheel-up > (intern (format (if (featurep 'xemacs) "button%s" "mouse-%s") > mouse-wheel-down-button))) > "Event used for scrolling down." > :group 'mouse > :type 'symbol > :set 'mouse-wheel-change-button) > > Since these run before any terminal is created in the --daemon case, > window-system may not be set to anything at all. > > It is possible that this is a bug in mwheel, and that mwheel (and other > packages) should take care not to make use of the window-system variable > until startup. (This may be particularly important if it's possible for > a single emacs binary to have support for multiple window systems.) > > It is possible that a better solution to the problem that mwheel solves > above would be for either term/x-win.el to define-key mouse-4 and > mouse-5 to wheel-up and wheel-down, or for term/w32-win.el and > term/ns-win.el to define-key wheel-up and wheel-down to mouse-4 and > mouse-5, so that mwheel and other packages can use the same symbol on > all window systems. > > > Either way, the current state of the world is that --daemon results in a > non-functional mouse wheel on w32 and ns. w32 does not use the daemon mode, nor can it use TTY and w32 frames at the same time, so it should not matter. 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 ...) > If Emacs crashed, and you have the Emacs process in the gdb debugger, > please include the output from the following gdb commands: > `bt full' and `xbacktrace'. > If you would like to further debug the crash, please read the file > /Users/prevost1/Documents/src/emacs-23.1/nextstep/Emacs.app/Contents/Resources/etc/DEBUG for instructions. > > > In GNU Emacs 23.1.1 (i386-apple-darwin9.7.0, NS apple-appkit-949.46) > of 2009-08-07 on TELPERION.WV.CC.CMU.EDU > Windowing system distributor `Apple', version 10.3.949 > configured using `configure '--prefix=/opt/emacs-23.1' '--with-ns'' > > Important settings: > value of $LC_ALL: nil > value of $LC_COLLATE: nil > value of $LC_CTYPE: nil > value of $LC_MESSAGES: nil > value of $LC_MONETARY: nil > value of $LC_NUMERIC: nil > value of $LC_TIME: nil > value of $LANG: nil > value of $XMODIFIERS: nil > locale-coding-system: nil > default-enable-multibyte-characters: t > > Major mode: Fundamental > > Minor modes in effect: > diff-auto-refine-mode: t > tooltip-mode: t > tool-bar-mode: t > mouse-wheel-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > global-auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > line-number-mode: t > transient-mark-mode: t > > Recent input: > s-x r e p o r t M-x r e p o t > r t - e m > > Recent messages: > Loading /Users/prevost1/Documents/src/elisp/nxml-mode/rng-auto.el (source)...done > Loading /Users/prevost1/Documents/src/elisp/mercurial.el (source)...done > For information about GNU Emacs and the GNU system, type C-h C-a. > Terminal setup done > kill-region: The mark is not set now, so there is no region From unknown Sat Jun 14 19:05:02 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4124: 23.1; mwheel in --daemon mode Reply-To: John Prevost , 4124@debbugs.gnu.org Resent-From: John Prevost Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 11 Aug 2009 18:20:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4124 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4124-submit@emacsbugs.donarmstrong.com id=B4124.12500143937987 (code B ref 4124); Tue, 11 Aug 2009 18:20:04 +0000 Received: (at 4124) by emacsbugs.donarmstrong.com; 11 Aug 2009 18:13:13 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.2 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 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 Received: by TELPERION.WV.CC.CMU.EDU (Postfix, from userid 501) id 8AC9B4B48F0; Tue, 11 Aug 2009 14:13:10 -0400 (EDT) From: John Prevost To: Dan Nicolaescu Cc: "4124\@debbugs.gnu.org" <4124@debbugs.gnu.org> References: <200908111727.n7BHRmJn008727@godzilla.ics.uci.edu> Date: Tue, 11 Aug 2009 14:13:10 -0400 In-Reply-To: <200908111727.n7BHRmJn008727@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Tue, 11 Aug 2009 13:27:48 -0400") Message-ID: User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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. From unknown Sat Jun 14 19:05:02 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4124: 23.1; mwheel in --daemon mode Reply-To: Dan Nicolaescu , 4124@debbugs.gnu.org Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 11 Aug 2009 18:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4124 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4124-submit@emacsbugs.donarmstrong.com id=B4124.12500149878925 (code B ref 4124); Tue, 11 Aug 2009 18:30:04 +0000 Received: (at 4124) by emacsbugs.donarmstrong.com; 11 Aug 2009 18:23:07 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7BIN63k008917; Tue, 11 Aug 2009 11:23:07 -0700 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n7BIMqiq015681; Tue, 11 Aug 2009 11:22:52 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n7BIMpS1009185; Tue, 11 Aug 2009 11:22:51 -0700 (PDT) Date: Tue, 11 Aug 2009 11:22:51 -0700 (PDT) Message-Id: <200908111822.n7BIMpS1009185@godzilla.ics.uci.edu> From: Dan Nicolaescu To: John Prevost Cc: "4124\@debbugs.gnu.org" <4124@debbugs.gnu.org> References: <200908111727.n7BHRmJn008727@godzilla.ics.uci.edu> In-Reply-To: (John Prevost's message of "Tue, 11 Aug 2009 14:13:10 -0400") Lines: 30 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n7BIMqiq015681 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu John Prevost writes: > 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. No, it does not, from emacs/src/emacs.c: #else /* DOS_NT */ fprintf (stderr, "This platform does not support the -daemon flag.\n"); exit (1); #endif /* DOS_NT */ > In any case, it's clear that this is a problem in mwheel, and I do have > a short-term workaround. It would be good if someone would look at mwheel.el and fix it properly... From rgm@gnu.org Tue Aug 11 12:27:08 2009 Received: (at control) by emacsbugs.donarmstrong.com; 11 Aug 2009 19:27:09 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.4 required=4.0 tests=AWL,ONEWORD autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7BJR7tg016020 for ; Tue, 11 Aug 2009 12:27:08 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Mawzy-0002TF-IF; Tue, 11 Aug 2009 15:27:06 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19073.50698.463603.40432@fencepost.gnu.org> Date: Tue, 11 Aug 2009 15:27:06 -0400 From: Glenn Morris To: control Subject: control merge 4122 4125 reassign 4113 emacs,ns merge 4124 4127 reassign 4128 emacs,ns From unknown Sat Jun 14 19:05:02 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4124: 23.1; mwheel in --daemon mode Reply-To: Stefan Monnier , 4124@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 13 Aug 2009 17:55:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4124 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4124-submit@emacsbugs.donarmstrong.com id=B4124.12501857936995 (code B ref 4124); Thu, 13 Aug 2009 17:55:05 +0000 Received: (at 4124) by emacsbugs.donarmstrong.com; 13 Aug 2009 17:49:53 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.4 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7DHnp1h006992 for <4124@emacsbugs.donarmstrong.com>; Thu, 13 Aug 2009 10:49:52 -0700 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n7DHnnuo002549; Thu, 13 Aug 2009 13:49:49 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 72BC39015C; Thu, 13 Aug 2009 13:49:49 -0400 (EDT) From: Stefan Monnier To: John Prevost Cc: 4124@debbugs.gnu.org, Dan Nicolaescu Message-ID: References: <200908111727.n7BHRmJn008727@godzilla.ics.uci.edu> Date: Thu, 13 Aug 2009 13:49:49 -0400 In-Reply-To: (John Prevost's message of "Tue, 11 Aug 2009 14:13:10 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3340=0 > 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 Indeed. We should remap mouse-4/5 to wheel-up/down in term/x-win.el via function-key-map. The only reason why I haven't done that yet is that it is also needed for C-mouse-4/5, M-mouse-4/5, C-M-mouse-4/5 and on and on for all combinations of modifiers (2^5). 64 additional entries in function-key-map is not that bad, but for those users whose mouse-4/5 is not a wheel mouse, it can be a serious pain in the rear to remove them. So basically, I'd like to extend the function-key-map facilities so that you can have entries that remap a whole set of events, but it's still on the todo list. Stefan From unknown Sat Jun 14 19:05:02 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: John Prevost Subject: bug#4124 closed by Chong Yidong (Re: bug#4124: 23.1; mwheel in --daemon mode) Message-ID: References: <87y6pk9u9o.fsf@cyd.mit.edu> X-Emacs-PR-Message: they-closed 4124 X-Emacs-PR-Package: emacs Reply-To: 4124@debbugs.gnu.org Date: Sun, 16 Aug 2009 06:00:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1250402404-9453-1" This is a multi-part message in MIME format... ------------=_1250402404-9453-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #4124: 23.1; mwheel in --daemon mode It has been closed by Chong Yidong . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Chong Yidong by replying to this email. --=20 4124: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D4124 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1250402404-9453-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 4124-done) by emacsbugs.donarmstrong.com; 16 Aug 2009 05:55:22 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.1 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7G5tKwI008939 for <4124-done@emacsbugs.donarmstrong.com>; Sat, 15 Aug 2009 22:55:22 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id DD6CD57E21C; Sun, 16 Aug 2009 01:56:19 -0400 (EDT) From: Chong Yidong To: Stefan Monnier Cc: John Prevost , 4124-done@debbugs.gnu.org, Dan Nicolaescu Subject: Re: bug#4124: 23.1; mwheel in --daemon mode Date: Sun, 16 Aug 2009 01:56:19 -0400 Message-ID: <87y6pk9u9o.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > > 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'. > > Indeed. We should remap mouse-4/5 to wheel-up/down in term/x-win.el > via function-key-map... So basically, I'd like to extend the > function-key-map facilities so that you can have entries that remap a > whole set of events, but it's still on the todo list. In the meantime, we can just test for the `ns-win' and `w32-win' features (or, equivalently, the system-type variable, but I think the former are more to the point). I checked in a fix to mwheel.el along these lines. ------------=_1250402404-9453-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 11 Aug 2009 15:48:13 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7BFm7Vh024169 for ; Tue, 11 Aug 2009 08:48:09 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mata2-0001bV-JC for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 11:48:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MatZx-0001ZX-IB for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 11:48:05 -0400 Received: from [199.232.76.173] (port=43888 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MatZx-0001ZQ-0j for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 11:48:01 -0400 Received: from mx20.gnu.org ([199.232.41.8]:13103) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MatZv-0003LN-VF for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 11:48:00 -0400 Received: from telperion.wv.cc.cmu.edu ([128.237.240.133]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MatZs-0008L7-Gg for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 11:47:56 -0400 Received: by TELPERION.WV.CC.CMU.EDU (Postfix, from userid 501) id 2E9614B4315; Tue, 11 Aug 2009 11:47:55 -0400 (EDT) From: John Prevost To: bug-gnu-emacs@gnu.org Subject: 23.1; mwheel in --daemon mode Date: Tue, 11 Aug 2009 11:47:55 -0400 Message-ID: User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Detected-Operating-System: by mx20.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: When emacs is started in --daemon mode, the window-system variable is initially 'nil'. In mwheel.el, mouse-wheel-down-event and mouse-wheel-up-event are bound with defcustom declarations like the following: (defcustom mouse-wheel-down-event ;; In the latest versions of XEmacs, we could just use mouse-%s as well. (if (memq window-system '(w32 ns)) 'wheel-up (intern (format (if (featurep 'xemacs) "button%s" "mouse-%s") mouse-wheel-down-button))) "Event used for scrolling down." :group 'mouse :type 'symbol :set 'mouse-wheel-change-button) Since these run before any terminal is created in the --daemon case, window-system may not be set to anything at all. It is possible that this is a bug in mwheel, and that mwheel (and other packages) should take care not to make use of the window-system variable until startup. (This may be particularly important if it's possible for a single emacs binary to have support for multiple window systems.) It is possible that a better solution to the problem that mwheel solves above would be for either term/x-win.el to define-key mouse-4 and mouse-5 to wheel-up and wheel-down, or for term/w32-win.el and term/ns-win.el to define-key wheel-up and wheel-down to mouse-4 and mouse-5, so that mwheel and other packages can use the same symbol on all window systems. Either way, the current state of the world is that --daemon results in a non-functional mouse wheel on w32 and ns. If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /Users/prevost1/Documents/src/emacs-23.1/nextstep/Emacs.app/Contents/Resources/etc/DEBUG for instructions. In GNU Emacs 23.1.1 (i386-apple-darwin9.7.0, NS apple-appkit-949.46) of 2009-08-07 on TELPERION.WV.CC.CMU.EDU Windowing system distributor `Apple', version 10.3.949 configured using `configure '--prefix=/opt/emacs-23.1' '--with-ns'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: nil default-enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: diff-auto-refine-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t global-auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: s-x r e p o r t M-x r e p o t r t - e m Recent messages: Loading /Users/prevost1/Documents/src/elisp/nxml-mode/rng-auto.el (source)...done Loading /Users/prevost1/Documents/src/elisp/mercurial.el (source)...done For information about GNU Emacs and the GNU system, type C-h C-a. Terminal setup done kill-region: The mark is not set now, so there is no region ------------=_1250402404-9453-1-- From unknown Sat Jun 14 19:05:02 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: John Prevost Subject: bug#4127 closed by Chong Yidong (Re: bug#4124: 23.1; mwheel in --daemon mode) Message-ID: References: <87y6pk9u9o.fsf@cyd.mit.edu> X-Emacs-PR-Message: they-closed 4127 X-Emacs-PR-Package: emacs Reply-To: 4127@debbugs.gnu.org Date: Sun, 16 Aug 2009 06:00:05 +0000 Content-Type: multipart/mixed; boundary="----------=_1250402405-9453-3" This is a multi-part message in MIME format... ------------=_1250402405-9453-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #4124: 23.1; mwheel in --daemon mode It has been closed by Chong Yidong . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Chong Yidong by replying to this email. --=20 4124: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D4124 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1250402405-9453-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 4124-done) by emacsbugs.donarmstrong.com; 16 Aug 2009 05:55:22 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.1 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7G5tKwI008939 for <4124-done@emacsbugs.donarmstrong.com>; Sat, 15 Aug 2009 22:55:22 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id DD6CD57E21C; Sun, 16 Aug 2009 01:56:19 -0400 (EDT) From: Chong Yidong To: Stefan Monnier Cc: John Prevost , 4124-done@debbugs.gnu.org, Dan Nicolaescu Subject: Re: bug#4124: 23.1; mwheel in --daemon mode Date: Sun, 16 Aug 2009 01:56:19 -0400 Message-ID: <87y6pk9u9o.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > > 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'. > > Indeed. We should remap mouse-4/5 to wheel-up/down in term/x-win.el > via function-key-map... So basically, I'd like to extend the > function-key-map facilities so that you can have entries that remap a > whole set of events, but it's still on the todo list. In the meantime, we can just test for the `ns-win' and `w32-win' features (or, equivalently, the system-type variable, but I think the former are more to the point). I checked in a fix to mwheel.el along these lines. ------------=_1250402405-9453-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 11 Aug 2009 17:34:22 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7BHYKBW003438 for ; Tue, 11 Aug 2009 10:34:22 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MavEq-00041n-BV for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 13:34:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MavEl-0003ur-9Q for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 13:34:19 -0400 Received: from [199.232.76.173] (port=38892 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MavEl-0003uZ-58 for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 13:34:15 -0400 Received: from telperion.wv.cc.cmu.edu ([128.237.240.133]:53538) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MavEk-0005bm-Lw for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 13:34:14 -0400 Received: by TELPERION.WV.CC.CMU.EDU (Postfix, from userid 501) id C530E4B471A; Tue, 11 Aug 2009 13:34:08 -0400 (EDT) From: John Prevost To: bug-gnu-emacs@gnu.org Subject: 23.1; mwheel in --daemon mode User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (darwin) Date: Tue, 11 Aug 2009 13:34:08 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-CrossAssassin-Score: 2 Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: When emacs is started in --daemon mode, the window-system variable is initially 'nil'. In mwheel.el, mouse-wheel-down-event and mouse-wheel-up-event are bound with defcustom declarations like the following: (defcustom mouse-wheel-down-event ;; In the latest versions of XEmacs, we could just use mouse-%s as well. (if (memq window-system '(w32 ns)) 'wheel-up (intern (format (if (featurep 'xemacs) "button%s" "mouse-%s") mouse-wheel-down-button))) "Event used for scrolling down." :group 'mouse :type 'symbol :set 'mouse-wheel-change-button) Since these run before any terminal is created in the --daemon case, window-system may not be set to anything at all. It is possible that this is a bug in mwheel, and that mwheel (and other packages) should take care not to make use of the window-system variable until startup. (This may be particularly important if it's possible for a single emacs binary to have support for multiple window systems.) It is possible that a better solution to the problem that mwheel solves above would be for either term/x-win.el to define-key mouse-4 and mouse-5 to wheel-up and wheel-down, or for term/w32-win.el and term/ns-win.el to define-key wheel-up and wheel-down to mouse-4 and mouse-5, so that mwheel and other packages can use the same symbol on all window systems. Either way, the current state of the world is that --daemon results in a non-functional mouse wheel on w32 and ns. If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /Users/prevost1/Documents/src/emacs-23.1/nextstep/Emacs.app/Contents/Resources/etc/DEBUG for instructions. In GNU Emacs 23.1.1 (i386-apple-darwin9.7.0, NS apple-appkit-949.46) of 2009-08-07 on TELPERION.WV.CC.CMU.EDU Windowing system distributor `Apple', version 10.3.949 configured using `configure '--prefix=/opt/emacs-23.1' '--with-ns'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: nil default-enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: diff-auto-refine-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t global-auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: s-x r e p o r t M-x r e p o t r t - e m Recent messages: Loading /Users/prevost1/Documents/src/elisp/nxml-mode/rng-auto.el (source)...done Loading /Users/prevost1/Documents/src/elisp/mercurial.el (source)...done For information about GNU Emacs and the GNU system, type C-h C-a. Terminal setup done kill-region: The mark is not set now, so there is no region ------------=_1250402405-9453-3--