I like the scroll bar for about 8 or so. This means that the buffer will start scrolling when the cursor enters 8 lines above or below. However, this scheme does not work very well with eshell and ansi-term buffers, isql buffers, or any REPL buffers that can be used with emacs. In any of these buffers, when someone does something, he immediately scrolls the buffer so that there are 8 lines between the bottom of the buffer and the input line, which at best was inconvenient, unsuitable for use in the worst case, for use any terminal buffer in emacs, depending on the situation.
No buffer recognizes a scroll variable if it is not global. Therefore, although I can set the variable to different values using hooks in different modes, it affects all my open buffers.
So let's say I'm editing some kind of code. I decided to do something in the shell. My shell bindings set the scroll handle to 0 (so that they can be used). Then the scroll token is set to 0 for all buffers, which makes it harder to scroll in my encoding buffers. But then, if I open a new encoding buffer, it will return my scroll margin to 8. Then my shell buffers will be uncomfortable or unusable because they immediately scroll through 8 spaces when they receive focus or output the output from the command.
Is there any solution to this problem, besides keeping the scroll token at 0, globally, for all buffers?
source
share