Emacs 24.3 for windows, Tramp byte-code: Couldn't find a proper `ls' command

后端 未结 4 1849
深忆病人
深忆病人 2020-12-31 04:12

24.2 works well, but 24.3 bounded tramp got following error when open remote Linux system files or directories:

\"byte-code: Couldn\'t find a proper `ls\' co         


        
相关标签:
4条回答
  • 2020-12-31 04:21

    Merging the answer by @AlanThird and the comment by @uscjeremy, here is what worked for me (GNU Emacs 24.3.1 (i386-mingw-nt5.1.2600) of 2013-03-17 on MARVIN, Windows XP/SP3/32):

    1. Byte compile tramp-sh.el (adapt path accordingly):

      (byte-compile-file "C:/Program Files (X86)/emacs/lisp/net/tramp-sh.el")
      
    2. Exit Emacs.

    3. Delete Tramp cache: ~/.emacs.d/tramp

    4. Start Emacs.

    See also bug report #14030 on gnu.org.

    0 讨论(0)
  • 2020-12-31 04:22

    Using eval-expression with (byte-compile-file ..) didn't work for me, but the following did:

    1. Open emacs as administrator (right click on emacs button on taskbar, right click on emacs icon in resulting popup, click 'Run as Administrator')
    2. Use Alt-X to do the compilation rather than eval-expression: M-x byte-compile-file: c:/Program Files/emacs-24.3/lisp/net/tramp-sh.el
    3. Enter tramp-cleanup-all-connections in original emacs window, then try opening your remote file again.
    0 讨论(0)
  • 2020-12-31 04:38

    It seems this is a bug in tramp but you don't need to upgrade tramp, all you have to do is recompile tramp-sh.el on a Windows box. See the bug report here for more information.

    Enter this on the scratch buffer:

    (byte-compile-file "C:/Program Files/emacs/lisp/net/tramp-sh.el")
    

    adjusting the path to match your install, then type Ctrl-Meta-x to recompile the file. If it complains about permissions you might need to restart emacs using the "run as administrator" option in Windows.

    Once the file is recompiled type M-x tramp-cleanup-all-connections in order to reset the tramp connection cache. This will close any tramp connections you have open.

    0 讨论(0)
  • 2020-12-31 04:42

    I had the same problem after switching to Emacs 24.3. The solution was to upgrade to the latest Tramp 2.2.7. Here is what I did:

    1. downloaded http://ftp.gnu.org/gnu/tramp/tramp-2.2.7.tar.gz
    2. unpacked the archive to my ~/.emacs.d/src. I am using emacs-starter-kit which adds this directory and all its subdirectories to the load-path. Otherwise follow the instructions in the Tramp's INSTALL file.
    3. used Cygwin bash to configure and compile the files. I don't use Cygwin's Emacs normally but it is convenient to have it for occasions like this.
    4. deleted the old tramp's el and elc files in my emacs/lisp/net for safety.
    5. restarted Emacs of course.

    Do M-x tramp-version to make sure it is installed correctly. Now tramp works everywhere (dired, eshell, shell, etc).

    0 讨论(0)
提交回复
热议问题