[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preserving sanity in Emacs [Re: rampant region highlighting]

From: David De La Harpe Golden
Subject: Re: Preserving sanity in Emacs [Re: rampant region highlighting]
Date: Tue, 08 Apr 2008 18:52:43 +0100
User-agent: Mozilla-Thunderbird (X11/20080110)

Alan Mackenzie wrote:
> Morning, David!

Morning. Ish. (I'm largely nocturnal by default)

>>> So, how do you move point rapidly to somewhere else in a buffer?
>>> There's not much point using the <page down> key, if the moment you
>>> try to do something you're jump-scrolled back to where you started.  
>> That just depends on whether you conceptualise a "page down" keypress
>> as "move the point down by a page, and scroll to follow" or "scroll the
>> viewport down (or up) by a page".
> No it doesn't.  You should be a politician.  ;-)  The key sequences you
> need depend on what has been implemented, not the conceptualisation which
> gave rise to that implementation.  I want to scroll with <page down> and
> then type text at the place I've scrolled to.  How?

Maybe I wasn't clear:

PgUp/Dn would still move the point around the buffer, as I would
consider them analogous to cursor keys (cursor keys also move the point
around the buffer in emacs - and when they move the point to somewhere
currently offscreen, emacs scrolls the viewport to bring it back on...).
 i.e. PgUp/Dn means "move the point one page up or down"

C-M-Pgdown mightn't move the point, but only scroll the viewport.

viewport here is ancient amiga terminology, no idea what the youngsters
call it, I mean in a (perhaps virtual) 2D plane, the viewport is the
"window" onto the plane that is viewed.

|                         |
|    +-VP-+               |
|    |    |               |
|    +----+               |
|                         |
|                         |

2D scrolling is moving a viewport around a 2D plane,
or equivalently, moving the 2D plane around beneath the viewport.

Note that I mean that's the model that is desired - in programming
terms, the 2D plane might be an entirely fictional entity, contents of
the viewport JIT rendered into place.  That's AFAIK what emacs basically
does, the current viewport position over the buffer being "window-start".

>> (though I guess that should be for shift-selection by pages in emacs,
>> and M-pgdn/up for scroll-other-window is handy.  C-pgdn/up is taken
>> too, for scroll-left/right (not the most intuitive binding, that, byt
>> hey, I tend to use line wrapping anyway), but that really only leaves
>> C-M-pgdn/up for page-up-leaving-point-where-it-is.
> Exactly!  Bindings involving arrow keys and scrolling keys are precious.
> So lets get back to the point.  Do you have a mechanism, not involving
> the mouse, by which, having scrolled and left point not on the visible
> part of the buffer in the window, you can indicate a position to move
> point to and then move it there?

Not as such, but one could easily be imagined, like a keypress. However,
I think you've missed the point - if I'm scrolling with the mouse wheel
or scroll bar, my hand is already on the mouse, so clicking is hardly
a chore, and mouse scrolling can thus be a viewport scroll by default,
with a click to summon the point to the current viewport location.

If I'm "scrolling" with PgUp/Dn, by the above, the "scrolling" is just a
side effect, the PgUp/Dn can be conceptualised as /moving the point/ up
or down by one page in the buffer, and emacs then happens to autoscroll
the viewport to bring the point back onscreen.

So a keybinding for moving the point onscreen to the current viewport
position would only be "needed" for the C-M-pgdn/up (just calling it
that for example purposes) case, to be equivalent to the mouse click.
  And I don't think the need is  particularly strong, because it would
only apply when you decide to C-M-pgdn/up to gawk at something, but
then change your mind and want to move the point to it - when
you start out wanting to move the point up and down by pages, you just

reply via email to

[Prev in Thread] Current Thread [Next in Thread]