-
Notifications
You must be signed in to change notification settings - Fork 17
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
BUG: `tramp-dissect-file-name' apparently used to return an array #39
base: master
Are you sure you want to change the base?
Conversation
... but now it returns an object of type `tramp-file-name', which is a `cl-structure-class'.
Thanks for sending a PR for this (I just ran into this issue myself). Note that the |
I ran into the same bug, and here is my workaround (it also adds the missing support for non-default port): (defun git-gutter+-remote-default-directory (dir file)
(let* ((vec (tramp-dissect-file-name file))
(method (tramp-file-name-method vec))
(user (tramp-file-name-user vec))
(domain (tramp-file-name-domain vec))
(host (tramp-file-name-host vec))
(port (tramp-file-name-port vec)))
(tramp-make-tramp-file-name method user domain host port dir)))
(defun git-gutter+-remote-file-path (dir file)
(let ((file (tramp-file-name-localname (tramp-dissect-file-name file))))
(replace-regexp-in-string (concat "\\`" dir) "" file))) |
Can @yangsheng6810 's or @KarlHegbloom solution be merged into the package? What's holding it back? It'd be nice if magit-gutter-plus worked with TRAMP off-the-shelf. |
@yangsheng6810 Could you please merge it into the package? |
@beyondpie I am not the owner of this repo so I do not have the permission. I will submit a PR with my workaround though, after checking backward compatibility with older versions of Emacs |
@beyondpie PR submitted. |
... but now it returns an object of type
tramp-file-name', which is a
cl-structure-class'.