wakatime / wakatime-mode

Emacs plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/emacs
267 stars 41 forks source link

Homebrew and Emacs binary name conflict #58

Closed benmezger closed 2 years ago

benmezger commented 2 years ago

It seems that Emacs expects wakatime's binary, however, Homebrew's recent update uses wakatime-cli binary name instead of wakatime.

Question is who should update? Homebrew's binary name or wakatime-mode?

alanhamlett commented 2 years ago

Good question... I think wakatime-mode should change because the reason Homebrew changed is it's using the new Go wakatime-cli which actually is named differently. I'll submit the fix today.

alanhamlett commented 2 years ago

@benmezger can you see if #59 fixes it for you?

benmezger commented 2 years ago

Hey @alanhamlett, I am getting this with #59. Is this my configuration or something is broken in this patch?

Debugger entered--Lisp error: (error "Format specifier doesn’t match argument type")
  format("%s%s--entity \"%s\" --plugin \"%s/%s\" --time %.2f%s%s" "\"/usr/local/bin/wakatime\" " "/Users/seds/.emacs.d/.local/straight/repos/wakatim..." "emacs-wakatime" "1.0.2" 1635942752.665362 "" "")
  wakatime-client-command(nil)
  (let* ((command (wakatime-client-command savep)) (process (start-process "Shell" (generate-new-buffer " *WakaTime messages*") shell-file-name shell-command-switch command))) (set-process-sentinel process '(lambda (process signal) (when (memq (process-status process) '(exit signal)) (kill-buffer (process-buffer process)) (let ((exit-status ...)) (when (and ... ...) (when wakatime-disable-on-error ... ...) (cond ... ... ... ... ...)))))) (set-process-query-on-exit-flag process nil))
  wakatime-call(nil)
  (progn (wakatime-call nil))
  (if (and (buffer-file-name (current-buffer)) (not (auto-save-file-name-p (buffer-file-name (current-buffer))))) (progn (wakatime-call nil)))
  wakatime-ping()
  newline(1)
  comment-indent-new-line(nil)
  +evil--insert-newline()
  evil-insert-newline-below()
  #<subr evil-open-below>(1)
  +evil--insert-newline-below-and-respect-comments-a(#<subr evil-open-below> 1)
  apply(+evil--insert-newline-below-and-respect-comments-a #<subr evil-open-below> 1)
  evil-open-below(1)
  funcall-interactively(evil-open-below 1)
  command-execute(evil-open-below)
alanhamlett commented 2 years ago

It was a bug in the PR. If you try again with the new patch (one less %s in the format("%s%s--entity line) it should be fixed?

benmezger commented 2 years ago

It works! Thank you!