unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: John Prevost <prevost1@cert.org>
Cc: 4124@emacsbugs.donarmstrong.com
Subject: bug#4124: 23.1; mwheel in --daemon mode
Date: Tue, 11 Aug 2009 10:27:48 -0700 (PDT)	[thread overview]
Message-ID: <200908111727.n7BHRmJn008727@godzilla.ics.uci.edu> (raw)
In-Reply-To: <m263cul5ck.fsf@TELPERION.WV.CC.CMU.EDU> (John Prevost's message of "Tue, 11 Aug 2009 11:47:55 -0400")

John Prevost <prevost1@cert.org> 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:
  > <help-echo> s-x r e p o r t M-x r e p o t <backspace> 
  > r t - e m <tab> <return>
  > 
  > 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





  reply	other threads:[~2009-08-11 17:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87y6pk9u9o.fsf@cyd.mit.edu>
2009-08-11 15:47 ` bug#4124: 23.1; mwheel in --daemon mode John Prevost
2009-08-11 17:27   ` Dan Nicolaescu [this message]
2009-08-11 18:13     ` John Prevost
2009-08-11 18:22       ` Dan Nicolaescu
2009-08-13 17:49       ` Stefan Monnier
2009-08-16  6:00   ` bug#4124: marked as done (23.1; mwheel in --daemon mode) Emacs bug Tracking System
2009-08-11 17:34 ` bug#4127: 23.1; mwheel in --daemon mode John Prevost
2009-08-16  6:00   ` bug#4127: marked as done (23.1; mwheel in --daemon mode) Emacs bug Tracking System

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200908111727.n7BHRmJn008727@godzilla.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=4124@emacsbugs.donarmstrong.com \
    --cc=prevost1@cert.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).