Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treemacs-follow-mode on remote(tramp) server #1093

Open
ileixe opened this issue Mar 12, 2024 · 6 comments
Open

treemacs-follow-mode on remote(tramp) server #1093

ileixe opened this issue Mar 12, 2024 · 6 comments

Comments

@ileixe
Copy link

ileixe commented Mar 12, 2024

Hi, I wonder treemacs-follow-mode is working (I'm not at least) on remote server. If not, any guidance to support it would be appreicated.

@Alexander-Miller
Copy link
Owner

I'v never worked with remote files in Emacs, so I don't now how treemacs handles them. Let's first check if treemacs is able to even find your file. Open it and call treemacs-find-file.

If that doesn't work, try both of these code snippets. They must be evaluated inside the file you want followed.

(with-selected-window (treemacs-get-local-window)
  (treemacs-find-file (buffer-file-name (current-buffer))))

(with-selected-window (treemacs-get-local-window)
  (treemacs-find-file (treemacs-canonical-path (buffer-file-name (current-buffer)))))

@ileixe
Copy link
Author

ileixe commented Mar 14, 2024

treemacs-find-file seems to find right place. (It's not in project but I think it's unrelated in that it's same as local)

[Treemacs] /kubectl:ubuntu@yan-cpu-0:/home/ubuntu/kernel/furiosa-hal2/src/physical/commit/commit.rs does not fall under any project in the workspace.

I've been used treemacs in tramp well, and only thing that I've felt different from now is treemacs-follow-mode.

Copy link

stale bot commented May 13, 2024

This issue has been automatically marked as stale because it has not had recent activity (this bot only works as a reminder, it will not close issues).

@stale stale bot added the stale label May 13, 2024
@Alexander-Miller
Copy link
Owner

(It's not in project but I think it's unrelated in that it's same as local)

What does this mean exactly, the file is found anyway because it's also local?

Also what do you see when you call trace-function on treemacs-find-file-node?

@stale stale bot removed the stale label May 17, 2024
@ileixe
Copy link
Author

ileixe commented May 19, 2024

I myself don't remember what I supposed to say 😇

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  treemacs-dom-node->set-position!(nil #<marker (moves after insertion) at 257 in  *Treemacs-Scoped-Buffer-#<frame  0x5636d8afebc0>*>)
  treemacs-find-file-node("/kubectl:ubuntu@yan-cpu-0:~/kernel/furiosa-hal2/README.md" #s(treemacs-project :name "furiosa-hal2" :path "/kubectl:ubuntu@yan-cpu-0:~/kernel/furiosa-hal2" :path-status remote-readable :is-disabled? nil))
  treemacs-find-file(nil)
  (progn (select-window (car save-selected-window--state) 'norecord) (treemacs-find-file (buffer-file-name (current-buffer))))
  (unwind-protect (progn (select-window (car save-selected-window--state) 'norecord) (treemacs-find-file (buffer-file-name (current-buffer)))) (internal--after-with-selected-window save-selected-window--state))
  (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) 'norecord) (treemacs-find-file (buffer-file-name (current-buffer)))) (internal--after-with-selected-window save-selected-window--state)))
  (let ((save-selected-window--state (internal--before-with-selected-window (treemacs-get-local-window)))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) 'norecord) (treemacs-find-file (buffer-file-name (current-buffer)))) (internal--after-with-selected-window save-selected-window--state))))
  eval((let ((save-selected-window--state (internal--before-with-selected-window (treemacs-get-local-window)))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) 'norecord) (treemacs-find-file (buffer-file-name (current-buffer)))) (internal--after-with-selected-window save-selected-window--state)))) nil)
  elisp--eval-last-sexp(nil)
  #<subr eval-last-sexp>(nil)
  #f(compiled-function (&rest _it) #<bytecode 0x19924d5ff442>)()
  eval-sexp-fu-flash-doit-simple(#f(compiled-function (&rest _it) #<bytecode 0x19924d5ff442>) #f(compiled-function (&rest args2) #<bytecode -0x8c9c209d059a8eb>) #f(compiled-function (&rest args2) #<bytecode -0x8ca7589632ba8eb>))
  eval-sexp-fu-flash-doit(#f(compiled-function (&rest _it) #<bytecode 0x19924d5ff442>) #f(compiled-function (&rest args2) #<bytecode -0x8c9c209d059a8eb>) #f(compiled-function (&rest args2) #<bytecode -0x8ca7589632ba8eb>))
  esf-flash-doit(#f(compiled-function (&rest _it) #<bytecode 0x19924d5ff442>) #f(compiled-function (&rest args2) #<bytecode -0x8c9c209d059a8eb>) #f(compiled-function (&rest args2) #<bytecode -0x8ca7589632ba8eb>) #f(compiled-function (&rest args2) #<bytecode 0x5b6fb0399465102>))
  #f(compiled-function (ad--addoit-function eval-last-sexp-arg-internal) #<bytecode 0x80e5aa5c6e43363>)(#<subr eval-last-sexp> nil)
  evil-collection-eval-sexp-fu-advise-bounds-of-thing-at-point(#f(compiled-function (ad--addoit-function eval-last-sexp-arg-internal) #<bytecode 0x80e5aa5c6e43363>) #<subr eval-last-sexp> nil)
  apply(evil-collection-eval-sexp-fu-advise-bounds-of-thing-at-point #f(compiled-function (ad--addoit-function eval-last-sexp-arg-internal) #<bytecode 0x80e5aa5c6e43363>) (#<subr eval-last-sexp> nil))
  ad-Advice-eval-last-sexp(#<subr eval-last-sexp> nil)
  apply(ad-Advice-eval-last-sexp #<subr eval-last-sexp> nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  command-execute(eval-last-sexp)

Here's stacktrace for treemacs-find-file

Copy link

stale bot commented Jul 18, 2024

This issue has been automatically marked as stale because it has not had recent activity (this bot only works as a reminder, it will not close issues).

@stale stale bot added the stale label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants