emacs-devel
[Top][All Lists]
Advanced

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

Re: Proposal to improve the nomenclature of scrolling directions


From: Nix
Subject: Re: Proposal to improve the nomenclature of scrolling directions
Date: Thu, 08 Nov 2012 17:33:19 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

On 8 Nov 2012, Stefan Monnier spake thusly:

>> (This model is also why I use Eli Barzilay's wonderfully simple
>> scroll-in-place implementation, which I really should contribute to
>> upstream Emacs one of these years: I had Eli's go-ahead nearly two years
>
> Hadn't heard about it.  I just looked at
> https://github.com/elibarzilay/eliemacs/blob/master/include/scroll-in-place.el
> and IIUC all it does is to remember the previous positions during
> a sequence of scroll commands, and to use them when scrolling back.

Yeah. That version's improved a bit over what I'm using -- it's
respecting the old scroll-in-place variable now, so Gnus shouldn't need
changing at all.

Compared to what XEmacs's scroll-in-place has to do (basically a rewrite
of the entire scrolling code, in Lisp, and it still doesn't entirely
work) it is enormously better. 99% of the work is delegated to the
original scrolling code.

I'm honestly not sure how anyone can tolerate Emacs's default scrolling
behaviour -- I've used something like scroll-in-place for my entire life
with Emacs, the default was so hard to handle. I can't imagine that
anyone actually *wants* page-up/page-down sequences to leave you in a
different place from where you were before, but Emacs users are
conservative old sods so it is likely that a lot of users prefer it. So
the default should surely not change.

> It could also be used to let the user go back to where she was before
> scrolling (to simulate those other editors where point is not moved to
> stay visible while scrolling, so that non-scrolling commands teleport
> you right back to where you were).

Ah. That's an interesting variation. Controlled by (setq scroll-in-place
'unmoving) perhaps? (It should probably hide the cursor while it's
conceptually offscreen as well, on terminals where that's possible, by
flipping cursor-type to nil. Alas this would make it vanish from
non-selected windows too, if cursor-in-non-selected-windows is t...)


I'll look into adding 'unmoving support and post the result this
weekend.

I can remove the rebinding hacks and fold it into the core directly, if
you prefer, removing the SIP-orig-scroll-up / SIP-orig-scroll-down hack
and migrating most of the rest into simple.el or scrolling.el or
something like that, so that all that is needed to turn it on is (setq
scroll-preserve-screen-position 'in-place). Or I can just leave it as an
add-on. (That seems less elegant, but is probably best to start with.)


I have a copyright assignment on file, and my employer (Oracle) signed a
disclaimer long ago. I'm not sure about Eli. (Cc:ed.)

-- 
NULL && (void)



reply via email to

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