-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix pet.el to work on tramp #20
Conversation
@wyuenho Could you please take a look at this? |
Hi sorry for the delay. I don't use tramp, and I honestly have no idea how to set up an environment to test this. Is this about using dev containers like the cool kids do these day? If so, can you please provide me with some detailed instructions so I can play around with this PR? Thanks. |
I don't use it for dev containers. Just for editing files on a remote server. To do so, just use |
Just updated with the current main branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking better. Do you mind writing some tests after fixing some minor issues and the conflict?
pet.el
Outdated
(if (eq system-type 'windows-nt) "Scripts" "bin")) | ||
(if (eq (if (file-remote-p default-directory) | ||
(tramp-get-connection-property (tramp-dissect-file-name default-directory) | ||
"uname" 'windows-nt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this property defaulting to windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only machines without uname
installed are windows.
pet.el
Outdated
@@ -378,19 +383,19 @@ This variable is an alist where the key is the absolute path to a | |||
|
|||
Returns the path to the `pre-commit' executable." | |||
(and (pet-pre-commit-config) | |||
(or (executable-find "pre-commit") | |||
(or (executable-find "pre-commit" t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes PET incompatible with Emacs < 27
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The functionality that enables this PR was added in Emacs 27.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well we could do something like this -- thoughts?
https://github.com/joaotavora/eglot/blob/8b5532dd32b25276c1857508030b207f765ef9b6/eglot.el#L450-L453
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly what I have in mind. Give it a shot, turn on GitHub Actions on your fork to see how that goes on Emacs 26 :)
c602f72
to
c0e4637
Compare
remote
parameter ofexecutable-find
tot
(only works in Emacs 27+)process-file
instead ofcall-process
bin
directoryCloses #19