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

Dan Nicolaescu <dann@ics.uci.edu> 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.





  reply	other threads:[~2009-08-11 18:13 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
2009-08-11 18:13     ` John Prevost [this message]
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=m2fxbyjk21.fsf@TELPERION.WV.CC.CMU.EDU \
    --to=prevost1@cert.org \
    --cc=4124@emacsbugs.donarmstrong.com \
    --cc=dann@ics.uci.edu \
    /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).