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 6156873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:41:13+00:00 2026-05-23T20:41:13+00:00

If I understand correctly, when running bash under M-x shell , Emacs overrides some

  • 0

If I understand correctly, when running bash under M-x shell, Emacs overrides some of the bash keyboard bindings, and can make some bash commands and features not work as in “native bash” (for an example see this thread)

One of the commands that I use frequently in bash is clear-screen (bounded to Ctrl-l by default ).

Is there an easy way of asking Emacs to reproduce the same behavior in shell-mode so that I can clear my bash screen within Emacs?

I know I can always use M-x term to get a real terminal, but I would like to work out a solution for M-x shell

EDIT: When I type C-l C-l, Emacs moves the current line to the top of the window, but as soon as I enter a new command in bash, the window is scrolled again to the original position.

Thanks

  • 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-05-23T20:41:15+00:00Added an answer on May 23, 2026 at 8:41 pm

    Just type M-> to go to the bottom of the buffer (if necessary), then C-l C-l to move the current line to the top of the window. It looks as if you’ve cleared your screen, but all of the content that would have been erased is still present above the top of the window.

    EDIT:

    To keep Emacs from scrolling the window as you described, put this in your .emacs file:

    (remove-hook 'comint-output-filter-functions
                 'comint-postoutput-scroll-to-bottom)
    

    I found that behavior irritating as well.

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

Sidebar

Related Questions

I'm running mod_python under Apache. If I've understood correctly, each Apache process runs its
If I understand correctly, scala.util.control.TailCalls can be used to avoid stack overflows for non-tail-recursive
If I understand correctly, ClickOnce only checks for prerequisites with the first install of
If I understand correctly the .net runtime will always clean up after me. So
If I understand correctly, in .NET the default implementation of Object.GetHashCode() returns a value
This is just a quick question to understand correctly what happens when you create
If I understand this correctly: Current CPU developing companies like AMD and Intel have
If I understand it correctly this means extern void foo(); that the function foo
Been trying my best to understand this correctly. What is the difference between an
I've just read up on Thread.IsBackground and if I understand it correctly, when it's

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.