unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Juri Linkov'" <juri@jurta.org>, <emacs-devel@gnu.org>
Subject: RE: mwheel scroll horizontally
Date: Mon, 4 Oct 2010 16:21:56 -0700	[thread overview]
Message-ID: <5D4331260E2E4FD5A8615DC94FEF8ECA@us.oracle.com> (raw)
In-Reply-To: <87hbh1fu7n.fsf@mail.jurta.org>

> Why mwheel.el doesn't allow horizontal scrolling?
> The mouse wheel is indispensable for efficient scrolling
> around large images like maps in image-mode.

Agreed.

> For instance, Gimp allows the Shift modifier to change
> the direction of scrolling from vertical to horizontal.

Google Chrome does likewise, for page scrolling.

(But IE uses Shift-wheel to cycle the history list (URLs).  It doesn't seem to
have a wheel modifier for horizontal scrolling.)

> Shift and Control are already in use in mouse-wheel-scroll-amount,

That's the wrong place for such control, IMO.  I mean that it shouldn't be
hard-coded like that.  We should leave S- and C- open for use with the wheel,
and not hard-code them to representing a scroll amount.

> but Meta is available.  What about using Meta for horizontal
> scrolling?  

That just compounds the problem.

S-, C-, and M- should be left open wrt the mouse wheel.

In effect, you are describing _one_ possible option value:

bind S- to vertical-scroll   by amount P
bind C- to vertical-scroll   by amount Q
bind M- to horizontal-scroll by amount R

We should have a more general option whose values let the user choose any
scrolling combinations s?he wants.  We have 3 modifiers, 2 scrolling directions,
and the possibility of different scrolling amounts.  Let the user mix and match,
deciding what's important.

E.g. Some user might want horizontal and vertical, and give two amount settings
to horizontal (i.e. similar to what you proposed, but privileging horizontal,
not vertical).  Another user might want to not bind horizontal at all and just
give 3 amount-settings to vertical.  Etc.

What we should not do is decide once and for all that modifier X is for
direction A or that direction A gets two scroll amounts but direction B gets
only one.  Whatever we might choose at design time for this can instead be
chosen by the user.

And, as always, we should make it clear that such bindings of the wheel to
scrolling actions are only a convenience (default behavior) and the user and
3rd-party libraries are free to bind the wheel to any other commands, anywhere.

I mention that because too often we give the impression that because some keys
are already bound they are off limits for users/libraries.  We should make it
clear that this is just a default binding.  There is nothing sacred about window
scrolling - a mouse wheel can do lots more interesting things in Emacs than
scroll a window.




  reply	other threads:[~2010-10-04 23:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-04 22:50 mwheel scroll horizontally Juri Linkov
2010-10-04 23:21 ` Drew Adams [this message]
2010-10-04 23:39   ` Juri Linkov
2010-10-05  0:01     ` Drew Adams
2010-10-05  4:29   ` Stephen J. Turnbull
2010-10-04 23:32 ` Juri Linkov
2010-10-07  9:18 ` Stefan Monnier
2010-10-07 22:05   ` Juri Linkov
2010-10-08 10:58     ` Jason Rumney
2010-10-08 23:56     ` Stefan Monnier

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=5D4331260E2E4FD5A8615DC94FEF8ECA@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=juri@jurta.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).