emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [OT-emacs] Scrolling horizontally
@ 2011-02-01  5:16 Marcelo de Moraes Serpa
  2011-02-01 11:15 ` Tassilo Horn
  0 siblings, 1 reply; 8+ messages in thread
From: Marcelo de Moraes Serpa @ 2011-02-01  5:16 UTC (permalink / raw)
  To: Org Mode

Hi list,

This might be slightly OT, but I started to miss the trackpad
functionality I have on MacVim. Not that I use it while programming,
but it could be useful to navigate through long orgfiles that span
across the available emacs width (without needing to use wrapping).
The only way I've found was to actually go to the long line and press
C-e, which is totally not what I would like :)

As a side note, scrolling in MacVim seems to be much better
implemented than in Cocoa emacs. Cocoa emacs jumps the lines (i.e it's
not smooth) making you loose track of where you are. MacVim has smooth
scrolling, not sure if it's pixel based but works much better and
integrates seamlessly with the Mac trackpad. Now, I've already talked
about this on the emacs mailing list, unsurprisingly, most of the
folks just said "why would you want that". Sad.

Anyway, what I would like is just a way to scroll horizontally in
emacs using the Mac trackpad. Does anyone know if it's possible?

Cheers,

Marcelo.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [OT-emacs] Scrolling horizontally
  2011-02-01  5:16 [OT-emacs] Scrolling horizontally Marcelo de Moraes Serpa
@ 2011-02-01 11:15 ` Tassilo Horn
  2011-02-01 15:53   ` Marcelo de Moraes Serpa
  0 siblings, 1 reply; 8+ messages in thread
From: Tassilo Horn @ 2011-02-01 11:15 UTC (permalink / raw)
  To: emacs-orgmode

Marcelo de Moraes Serpa <celoserpa@gmail.com> writes:

Hi Marcelo,

> The only way I've found was to actually go to the long line and press
> C-e, which is totally not what I would like :)

,----[ C-h f scroll-left RET ]
| scroll-left is an interactive built-in function in `C source code'.
| 
| It is bound to <C-next>, C-x <.
| 
| (scroll-left &optional ARG SET-MINIMUM)
| 
| Scroll selected window display ARG columns left.
| Default for ARG is window width minus 2.
| Value is the total amount of leftward horizontal scrolling in
| effect after the change.
| If SET-MINIMUM is non-nil, the new scroll amount becomes the
| lower bound for automatic scrolling, i.e. automatic scrolling
| will not scroll a window to a column less than the value returned
| by this function.  This happens in an interactive call.
`----

,----[ C-h f scroll-right RET ]
| scroll-right is an interactive built-in function in `C source code'.
| 
| It is bound to <C-prior>, C-x >.
| 
| (scroll-right &optional ARG SET-MINIMUM)
| 
| Scroll selected window display ARG columns right.
| Default for ARG is window width minus 2.
| Value is the total amount of leftward horizontal scrolling in
| effect after the change.
| If SET-MINIMUM is non-nil, the new scroll amount becomes the
| lower bound for automatic scrolling, i.e. automatic scrolling
| will not scroll a window to a column less than the value returned
| by this function.  This happens in an interactive call.
`----

As you can read, those scroll about one window width by default.  If you
want to have a more "smooth" horizontal scroll experience, you could
wrap two custum commands around that call the default functions with a
sufficiently small ARG.

Bye,
Tassilo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: [OT-emacs] Scrolling horizontally
  2011-02-01 11:15 ` Tassilo Horn
@ 2011-02-01 15:53   ` Marcelo de Moraes Serpa
  2011-02-01 16:32     ` Jeff Horn
  0 siblings, 1 reply; 8+ messages in thread
From: Marcelo de Moraes Serpa @ 2011-02-01 15:53 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: emacs-orgmode

I've seen this article, but thanks for pointing anyway.

What I'd like is a good integration with the Mac/OSX trackpad, I've
tried, but couldn't.

I haven't checked if AquaMacs has any improvements on this side,
anyone out there that could share something? I also noticed that
there's a tendency of people prefering to use cocoa over aquamacs in
the emacs osx community, not sure why.

Anyway, this is starting to be too OT, so, I might as well just post
it on the emacs-users mailing list. I just wanted to know if there are
other OSX (or non-osx) users that share my feelings.

Thanks,

Marcelo.

On Tue, Feb 1, 2011 at 5:15 AM, Tassilo Horn <tassilo@member.fsf.org> wrote:
> Marcelo de Moraes Serpa <celoserpa@gmail.com> writes:
>
> Hi Marcelo,
>
>> The only way I've found was to actually go to the long line and press
>> C-e, which is totally not what I would like :)
>
> ,----[ C-h f scroll-left RET ]
> | scroll-left is an interactive built-in function in `C source code'.
> |
> | It is bound to <C-next>, C-x <.
> |
> | (scroll-left &optional ARG SET-MINIMUM)
> |
> | Scroll selected window display ARG columns left.
> | Default for ARG is window width minus 2.
> | Value is the total amount of leftward horizontal scrolling in
> | effect after the change.
> | If SET-MINIMUM is non-nil, the new scroll amount becomes the
> | lower bound for automatic scrolling, i.e. automatic scrolling
> | will not scroll a window to a column less than the value returned
> | by this function.  This happens in an interactive call.
> `----
>
> ,----[ C-h f scroll-right RET ]
> | scroll-right is an interactive built-in function in `C source code'.
> |
> | It is bound to <C-prior>, C-x >.
> |
> | (scroll-right &optional ARG SET-MINIMUM)
> |
> | Scroll selected window display ARG columns right.
> | Default for ARG is window width minus 2.
> | Value is the total amount of leftward horizontal scrolling in
> | effect after the change.
> | If SET-MINIMUM is non-nil, the new scroll amount becomes the
> | lower bound for automatic scrolling, i.e. automatic scrolling
> | will not scroll a window to a column less than the value returned
> | by this function.  This happens in an interactive call.
> `----
>
> As you can read, those scroll about one window width by default.  If you
> want to have a more "smooth" horizontal scroll experience, you could
> wrap two custum commands around that call the default functions with a
> sufficiently small ARG.
>
> Bye,
> Tassilo
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: [OT-emacs] Scrolling horizontally
  2011-02-01 15:53   ` Marcelo de Moraes Serpa
@ 2011-02-01 16:32     ` Jeff Horn
  2011-02-01 16:57       ` Marcelo de Moraes Serpa
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff Horn @ 2011-02-01 16:32 UTC (permalink / raw)
  To: Marcelo de Moraes Serpa; +Cc: Tassilo Horn, emacs-orgmode

On Tue, Feb 1, 2011 at 10:53 AM, Marcelo de Moraes Serpa
<celoserpa@gmail.com> wrote:
> I haven't checked if AquaMacs has any improvements on this side,
> anyone out there that could share something? I also noticed that
> there's a tendency of people prefering to use cocoa over aquamacs in
> the emacs osx community, not sure why.

Aquamacs does not scroll with the trackpad, AFAIK. I'm using the 3.x
devel version.

I've posted on the OSX Emacs list a few weeks ago why I started out
hating Aquamacs, and then grew to use it every day. The short: the
defaults are annoying, and until recently (version 2) it was difficult
(for me) to figure out where to store preferences, and the order in
which they were executed.

It took a good bit of configuring, but I like it now. I use Aquamacs
for its keyboard bindings, mostly. I'm not big on emacs bundles, since
I use devel versions of the plugins I use most frequently.

-- 
Jeffrey Horn
http://www.failuretorefrain.com/jeff/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: [OT-emacs] Scrolling horizontally
  2011-02-01 16:32     ` Jeff Horn
@ 2011-02-01 16:57       ` Marcelo de Moraes Serpa
  2011-02-01 19:00         ` Trackpad horizontal scrolling (was: Re: [OT-emacs] Scrolling horizontally) Tassilo Horn
  0 siblings, 1 reply; 8+ messages in thread
From: Marcelo de Moraes Serpa @ 2011-02-01 16:57 UTC (permalink / raw)
  To: Jeff Horn; +Cc: Tassilo Horn, emacs-orgmode

Thanks for sharing your experiences, Jeff.

I've never used Aquamacs, but has been using emacs for the last 5
years. Nowadays I mostly use it for my PIM needs, as MacVim really got
me hooked. In the end, for programming, I ended up tending to use
MacVim more and more.

<rant>
Anyway, I really wish there was somethign akin to MacVim for emacs.
Aquamacs doesn't seem to have the same quality. MacVim integrates very
well with OSX, trackpad as well.
</rant>

Cheers,

Marcelo.

On Tue, Feb 1, 2011 at 10:32 AM, Jeff Horn <jrhorn424@gmail.com> wrote:
> On Tue, Feb 1, 2011 at 10:53 AM, Marcelo de Moraes Serpa
> <celoserpa@gmail.com> wrote:
>> I haven't checked if AquaMacs has any improvements on this side,
>> anyone out there that could share something? I also noticed that
>> there's a tendency of people prefering to use cocoa over aquamacs in
>> the emacs osx community, not sure why.
>
> Aquamacs does not scroll with the trackpad, AFAIK. I'm using the 3.x
> devel version.
>
> I've posted on the OSX Emacs list a few weeks ago why I started out
> hating Aquamacs, and then grew to use it every day. The short: the
> defaults are annoying, and until recently (version 2) it was difficult
> (for me) to figure out where to store preferences, and the order in
> which they were executed.
>
> It took a good bit of configuring, but I like it now. I use Aquamacs
> for its keyboard bindings, mostly. I'm not big on emacs bundles, since
> I use devel versions of the plugins I use most frequently.
>
> --
> Jeffrey Horn
> http://www.failuretorefrain.com/jeff/
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Trackpad horizontal scrolling (was: Re: [OT-emacs] Scrolling horizontally)
  2011-02-01 16:57       ` Marcelo de Moraes Serpa
@ 2011-02-01 19:00         ` Tassilo Horn
  2011-02-01 20:32           ` Jeff Horn
  0 siblings, 1 reply; 8+ messages in thread
From: Tassilo Horn @ 2011-02-01 19:00 UTC (permalink / raw)
  To: Marcelo de Moraes Serpa; +Cc: Jeff Horn, emacs-orgmode

Hi all,

if you are all looking for making emacs scrolling horizontally by
sliding with one finger in the lower part of the trackpad (or with some
2 finger special move [dunno what Mac users like]), that shouldn't be
any different from any other keybinding.

For example, the syntaptics trackpad on my Lenovo Thinkpad emacs
mouse-6/7 events when sliding left/right in the lower trackpad corner.
So I can easily use that to make emacs scroll horizontally like it's the
common behavior in most web browsers:

--8<---------------cut here---------------start------------->8---
(global-set-key (kbd "<mouse-7>") (lambda ()
                                    (interactive)
                                    (scroll-left 1)))
(global-set-key (kbd "<mouse-6>") (lambda ()
                                    (interactive)
                                    (scroll-right 1)))
--8<---------------cut here---------------end--------------->8---

Bye,
Tassilo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Trackpad horizontal scrolling (was: Re: [OT-emacs] Scrolling horizontally)
  2011-02-01 19:00         ` Trackpad horizontal scrolling (was: Re: [OT-emacs] Scrolling horizontally) Tassilo Horn
@ 2011-02-01 20:32           ` Jeff Horn
  2011-02-01 21:30             ` Trackpad horizontal scrolling Tassilo Horn
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff Horn @ 2011-02-01 20:32 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: emacs-orgmode, Marcelo de Moraes Serpa

On Tue, Feb 1, 2011 at 2:00 PM, Tassilo Horn <tassilo@member.fsf.org> wrote:
> (global-set-key (kbd "<mouse-7>") (lambda ()
>                                    (interactive)
>                                    (scroll-left 1)))
> (global-set-key (kbd "<mouse-6>") (lambda ()
>                                    (interactive)
>                                    (scroll-right 1)))

Thanks for the snippet Tassilo. I tried this out in the minibuffer and
it didn't work. =C-h k <two-finger-swipe-left-gesture>= (a motion, not
a binding) produced nothing. However, =C-h k <two-finger-swipe-down>=
actually produced =C-h k wheeldown=, so I can see that <mouse-6> isn't
a valid button for the trackpad on my Mac (Snow Leopard). It might be
an Aquamacs thing, or perhaps a driver issue.

I simply don't know enough to debug further or provide more info.


-- 
Jeffrey Horn
http://www.failuretorefrain.com/jeff/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Trackpad horizontal scrolling
  2011-02-01 20:32           ` Jeff Horn
@ 2011-02-01 21:30             ` Tassilo Horn
  0 siblings, 0 replies; 8+ messages in thread
From: Tassilo Horn @ 2011-02-01 21:30 UTC (permalink / raw)
  To: Jeff Horn; +Cc: emacs-orgmode, Marcelo de Moraes Serpa

Jeff Horn <jrhorn424@gmail.com> writes:

Hi Jeff,

> Thanks for the snippet Tassilo. I tried this out in the minibuffer and
> it didn't work. =C-h k <two-finger-swipe-left-gesture>= (a motion, not
> a binding) produced nothing. However, =C-h k <two-finger-swipe-down>=
> actually produced =C-h k wheeldown=, so I can see that <mouse-6> isn't
> a valid button for the trackpad on my Mac (Snow Leopard).

Hm, too bad.  For me, C-h k "swipe finger rightwards on lower trackpad
border" tells me that this is recognized as <mouse-7>. It's clear that
this may be report different events depending on trackpad vendor and
driver, buf if it reports nothing, I guess you are stranded. :-(

Bye,
Tassilo

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-02-01 21:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-01  5:16 [OT-emacs] Scrolling horizontally Marcelo de Moraes Serpa
2011-02-01 11:15 ` Tassilo Horn
2011-02-01 15:53   ` Marcelo de Moraes Serpa
2011-02-01 16:32     ` Jeff Horn
2011-02-01 16:57       ` Marcelo de Moraes Serpa
2011-02-01 19:00         ` Trackpad horizontal scrolling (was: Re: [OT-emacs] Scrolling horizontally) Tassilo Horn
2011-02-01 20:32           ` Jeff Horn
2011-02-01 21:30             ` Trackpad horizontal scrolling Tassilo Horn

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).