Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8613713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:57:00+00:00 2026-06-12T04:57:00+00:00

I like a scroll margin of around 8 or so. This means the buffer

  • 0

I like a scroll margin of around 8 or so. This means the buffer will start scrolling when the cursor gets within 8 lines of the top or bottom. However, this scheme does not work well with eshell and ansi-term buffers, isql buffers, or any REPL buffers that one might use with emacs. In any of those buffers, when one does anything, it immediately scrolls the buffer up so that there are 8 lines between the bottom of the buffer and the input line, making it awkward at best, unusable at worst, to use any terminal-like buffer in emacs, depending on the situation.

No buffer seems to recognize the scroll-margin variable unless it is global. So while I can set the variable to different values with hooks in different modes, it affects all of my open buffers.

So lets say I’m editing some code. I decide to do some stuff in a shell. My shell-mode-hooks set the scroll-margin to 0 (so that they may be usable). Then the scroll-margin is set to 0 for all buffers, making it awkward to scroll in my coding buffers. But then if I open a new coding buffer, it will set my scroll-margin back to 8. Then my shell buffers are awkward or unusable because it immediately scrolls up 8 spaces whenever they get focus or display output from a command.

Is there any solution to this problem, other than to keep a scroll-margin of 0, globally, for all buffers?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:57:01+00:00Added an answer on June 12, 2026 at 4:57 am

    Converting comment into answer. Use a buffer local variable in hook.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On the document ready of my page I bind the scroll event like this:
I wasnt to make something like this site where I can scroll up and
I am looking to scroll the page to a particular location.Something like this: function
Links within a page scroll your content to the top of the browser window.
I need to make tabs like this which is having horizontal scroll and I'm
Ok, I have the following problem: I would like to scroll an overflowing ListBox
Do you have any idea how to implement an indefinite scroll widget like google
I would like to be able to scroll further down in Eclipse, below the
EDIT : Scroll down to see the updated code. I would like to build
I would like to reproduce UIScrollView's flick-to-scroll behavior, but I don't want to use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.