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

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

Re: Make scroll-{up, down} move point to {start, end} of newly visible t


From: Spencer Baugh
Subject: Re: Make scroll-{up, down} move point to {start, end} of newly visible text
Date: Thu, 03 Aug 2023 15:58:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

Spencer Baugh <sbaugh@janestreet.com> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>>> From: Spencer Baugh <sbaugh@janestreet.com>
>>> Date: Tue, 01 Aug 2023 14:09:47 -0400
>>> 
>>> An issue with a solution based on scroll-margin is that scroll-margin
>>> applies even when at the end of the buffer.  I'd like to be able to have
>>> the end of the buffer at the end of the window, to maximize the amount
>>> of content on-screen at a time.
>>> 
>>> In particular comint buffers, like async-shell-command and compilation
>>> and shell-mode, become quite ugly with scroll-margin on, since in such
>>> buffers one is generally always at the end of the buffer.
>>> 
>>> Is there a way to teach scroll-margin to not do automatic scrolling when
>>> point is near the end of the buffer?
>>
>> You _can_ have EOB at the end of the window, you just cannot move
>> point into the margin without causing a scroll.
>
> Sure.  So I can have either point at EOB, or EOB at the end of the
> window, but not both at the same time.  Which is bad for comint buffers,
> since they usually have point at EOB.
>
> I think this would be a good thing to improve: supporting this
> capability in scroll-margin.  Unless, it already exists somehow?

It occurs to me that one way to do this is to disallow Emacs from
scrolling past the end of a buffer.  The default behavior is that with
C-l one can scroll past the end of a buffer, so there's empty space
displayed on screen.  But maybe there's a way to disallow that, so the
last line of the buffer is never above the last line of the window.

Is there a way to get Emacs to do that?  Seems like the kind of thing
someone would have implemented at some point.




reply via email to

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