emacs-neotree
emacs-neotree copied to clipboard
Feature: Add tramp support
Currently when connecting to a remote server via ssh or ftp (using Tramp) it is impossible to use neotree. When I try to ssh in to a remote server and use neotree to pick a file to edit I get the following error Invalid base64 data and it completely clears the contents of the file I tried to edit. This ended up being really bad in one case where I was attempting to edit an index.php and it cleared the contents and saved it.
Hi iDev0urer,
NeoTree supports tramp, and I am usually open a remote directory by using NeoTree.
I found a topic that is similar with it, https://lists.gnu.org/archive/html/emacs-devel/2004-05/msg00804.html
I am not sure whether or not there is a bug in NeoTree. If so, I need more informations to reproduce it.
Jay
Hi. I have the same bug. If I open a remote file with C-x C-f and all work as expected but when I open the same file with neotree I get - Invalid base64 data. I use Emacs 25.1.1 on Mac OS X.
I have the exact same problem described by @AlexeyBelezeko .
When I open a file that's large enough for gzip to be invoked using neotree, I get Invalid base64 data. From my message buffer:
Tramp: Inserting ‘/ssh:doe:vgg16.py’...
Tramp: Encoding remote file ‘/ssh:doe:vgg16.py’ with ‘(gzip <%s | base64)’...done
Tramp: Decoding local file ‘/tmp/tramp.6469P3F.py’ with ‘(lambda (beg end) (base64-decode-region beg end) (let ((coding-system-for-write (quote binary)) (coding-system-for-read (quote binary)) (default-directory (tramp-compat-temporary-file-directory))) (apply (quote tramp-call-process-region) [ssh nil doe vgg16.py nil] (point-min) (point-max) (car (split-string gzip -d)) t t nil (cdr (split-string gzip -d)))))’...failed
Tramp: Inserting ‘/ssh:doe:vgg16.py’...failed
tramp-file-name-handler: Invalid base64 data
I've inspected the transferred string (by setting tramp-verbose up) and I can decode it using gzip and base64, so the data itself is fine, but the decoding step fails.
I'm using emacs 25.1-4 and neotree 20170227.1731.
I can confirm that I have the same problem with neotree and tramp.
+1
yep +1
+1 for me too
+1. The same bug.
Me too
It's working fine for me. However, I mistakenly opened a file in /bin that gave me this error.
Does anyone have any solutions? I found this seem similar but not sure https://github.com/gregsexton/ob-ipython/commit/d5b1385115544d4055d2bf9faf163cc1d40e6623
still actual
This has something to do with initializing a tramp connection from neotree. If I establish a tramp connection using C-c c in neotree that tramp connection won't work anywhere including dired or find file; However if I establish a tramp connection outside of neotree(i.e. with dired or find file), then it works fine in neotree.
Update 1:
From a new emacs window:
- ~~Invalid base64 data: open neotree >
C-c c> connect tramp > load file via tramp in any way~~ - ~~Invalid base64 data:
C-x dorC-x C-f> connect tramp without opening a file > open neotree > load file via tramp in any way~~ - ~~no error:
C-x dorC-x C-f> connect tramp > open file > open neotree(neotree will open in tramp path) > open file from neotree~~ - ~~no error: open neotree >
C-x dorC-x C-f> connect tramp > open file >C-c cin neotree specify tramp path that's been opened > open file from neotree~~
Update 2
After further tinkering I've found:
- Prior to using neotree on a tramp connection I can open any file.
- Once a tramp path has been used in neotree, all files larger than 4096 bytes give the "Invalid base64 data" error regardless of how they're opened
- This only affects opening files. If the file is already open, can be modified and saved without issues. but once closed it can't be reopened in the same session of emacs.