Open amoore opened 7 years ago
Don't want to read a remote file every time a heartbeat is sent, for performance reasons. Could we pass wakatime-cli a local temporary file along with the "real path" of that file?
Bumping this just to show there's still interest in this.
How about this solution:
--real-entity <actual file path>
so wakatime-cli reads the file's stats from the local file but uses <actual file path>
for the name displayed on your dashboard.The change to wakatime-cli is trivial, I just don't know where tramp stores it's local copy of a remote file.
Looks like tramp uses generate-new-buffer-name
to create a local buffer when editing files. If we can pass that local buffer file to wakatime-cli then we can track tramp files:
https://github.com/jwiegley/tramp/blob/master/lisp/tramp.el#L628
I've just tested that on a few mechanisms, and tramp-temp-buffer-file-name
doesn't seem to ever get a value, so I think that might be a bust.
Related to wakatime/wakatime-cli#623, which added support for ssh://
and sftp://
remote files.
Still having this issue using tramp on doom emacs
Wakatime does not appear to keep track of time spent in files loaded from remote machines via tramp.
For example, if I visit a file like "/ssh:remotehostname:/home/user/example.conf", then this appears in the log:
That file does exist, but I don't think that wakatime realizes that it's on a remote machine.
Perhaps it should be testing for file existence at all.