bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#23347: 25.0.92; Follow mode scrolling broken -- scrolls only one pag


From: Anders Lindgren
Subject: bug#23347: 25.0.92; Follow mode scrolling broken -- scrolls only one page
Date: Sun, 24 Apr 2016 17:37:57 +0200

Hi!
 
> The normal `scroll-up-command' and `scroll-down-command' (typically bound
> to C-v and M-v) can scroll a page at a time, there is no need for a Follow
> mode-specific command for that, as the normal Follow mode machinery can
> reposition the other windows. (The only difference is that when using C-v
> the original window is still selected, whereas with the new
> follow-scroll-up command the windows where the original point ends up is
> selected.)

Indeed.  This is a difference important enough to have a command in
follow.el which keeps point at the same buffer position it started with.

Agreed. All three scroll commands (non-follow-mode scroll, scroll one page, and scroll N pages) are useful.

> A cleaner solution would be to define two sets of functions, e.g.
> follow-scroll-up-one-page.

OK.  I'm happy enought with that.

I'm not sure that's a good name, though - the "page" bit could easily
get confused with the region in a buffer between two ^L characters.

Maybe follow-scroll-up-window would be better.  What do you think?

Yes, I agree, `page' isn't a good choice.

What about `follow-scroll-up-keep-point'? That way it would be clear what the difference is between it and the normal scroll command.

If I would have designed Follow mode today, I probably would have used your name, `follow-scroll-up-window', and named the N-page scroll `follow-scroll-up-window-group'.

 
> Many users might want to use both kind of scrolling (I use both C-v
> and C-c . C-v several time every day, depending on how I would like to
> scroll the display). With two sets of functions it's easier to do
> this. (Also, it's easier to write documentation for a function
> designed to do one thing.)

For me, C-c . C-v is too tedious to type, so I've just bound <PageUp>
and <PageDown> to `follow-scroll-down/up'.  I use them many times per
day.

I've remapped them to C-c C-v and C-c v, that way I can scroll a window down a single page using C-v and the entire display using C-c C-v. Of course, this isn't in a part of a keymap available to minor modes, so it's nothing we can make official.


Another possibility would be to use a C-u prefix argument to indicate N
windows as opposed to 1.  No, I don't think that's a good idea, either.

No, too cumbersome.
 

Anyway, here is what I think we can agree on:
1. `follow-scroll-up/down' should scroll by N windows.
2. There need to be commands in follow.el that scroll by 1 window as is
  done by the current `follow-scroll-up/down'.  You have suggested the
  name `follow-scroll-up/down-one-page'.  I have countered with
  `follow-scroll-up/down-window'.

If we can agree, I'm willing to amend follow.el.  I think it's probably
too late for this fix to make it into Emacs 25.1, though.

Well, give it a try. Feel free to pick a suitable name. If we come up with a clean solution quickly John might accept it.
 
    -- Anders


reply via email to

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