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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:26:29+00:00 2026-05-19T04:26:29+00:00

My current use pattern of emacs results in my having several shell-mode buffers open,

  • 0

My current use pattern of emacs results in my having several shell-mode buffers open, each running an ssh session. I am running into an issue with this, though – when I try to tab-complete file names and other things in my remote session, the shell attempts to use completions available on the local machine instead of on the remote machine.

For example, if the file ~/foobar exists on the local machine and ~/frob exists on the remote machine, typing in ~/f and pressing tab results in ~/foobar instead of completing correctly. If I use ssh outside of emacs and try the same thing, I get the correct completion of ~/frob instead.

How can I get tab-completion to complete the way it does in normal ssh sessions ?

Later note: M-x cd RET /ssh:host.example.com:/path/to/me also seems to nudge it into being able to gracefully deal with tab completion.

  • 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-19T04:26:29+00:00Added an answer on May 19, 2026 at 4:26 am

    Emacs can’t track the current directory (default-directory) when ssh-ing to other machines.

    You could set default-directory to a tramp file-name like /ssh:YOURHOST:/home/dir” on your current shell-buffer manually.

    I start shell-sessions on a remote machine mostly via tramp-bookmarks/shell. Tramp sets default-directory automatically.
    But there is a bug in directory tracking on remote files, which is fixed in trunk (unreleased).

    http://comments.gmane.org/gmane.emacs.bugs/39082

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

Sidebar

Related Questions

I use the Builder pattern for several classes of my project (multiple arguments, some
We are trying to use the MVP pattern in our current project (asp.net app)
in my current project i use the MVP-Pattern and i want to register a
One common pattern when caching with Django is to use the current site's ID
I usually use the Hibernate ThreadLocal session management pattern in Java web projects: The
Short and sweet, Is it ok to use (current version) Ruby 1.9.1 with Rails
On my current page I use old file upload with input element. However, now
How would I get the system's current language and use that for the ResourceBundle?
I use next code to print current time Calendar cal = Calendar.getInstance(); System.out.println(cal.getTime()); I
Say I use glRotate to translate the current view based on some arbitrary user

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.