Emacs Tramp unable to open directory at times

728 Views Asked by At

Normally I am able to use tramp just fine to edit files and browse through the remote file system through SSH. Though at seemingly random times I would lose the ability to browse remote folders in emacs.

I get the error message:

Wrong type argument: number-or-marker-p, //DIRED-OPTIONS//

I've tried doing a clean reinstall of emacs without any customizations and the error still happens.

Also sometimes the error happens after browsing 1 or 2 directories while other times I'm able to do five or six directories before the error will appear.

Edit: I'm using Emacs 23.3 running on OS X 10.6.8

Edit 2: While I'm still going through the tramp debug log A couple of other pieces of information.

  1. After the error I'm still able to use tramp of open and save files, just not view directory listings.
  2. It seems to happen only when I save to a directory that is version controlled using git.
  3. In the debug log the directory contents are listed out but it is not being outputted to the user
  4. The directory listing inside the debug log show ^M (I usually notice this in the emacs info bar when editing files that have been versioned in git) even when I try to access a non-version controlled directory
2

There are 2 best solutions below

4
On

The message is useless by itself. You should try to obtain more traces on the tramp behavior in order to find where is the issue. See the Traces and Profiles Section of the TRAMP User Manual.

Sorry to not help more but with another release on another platform…

Update:

Put the following in your emacs file

(require 'tramp)
(setq tramp-verbose 10)
(setq tramp-debug-buffer t)

Then, use tramp. Now, You should have a *debug tramp/method hostname* buffer.

2
On

I found out that this happens when I enable:

(setq-default dired-omit-mode t)

But for now I don't know how to make it work with this mode