Closed freemin7 closed 4 years ago
Hello @freemin7 I have thought about the problem and implemented a work around in the form of a new option.
You can see the work here: https://github.com/pauldub/activity-watch-mode/pull/6
I'm not sure what default function would be a good fit in case projectile is not available.
Maybe
filename - mayor mode is good. Some simple googling yielded this code: (buffer-file-name (window-buffer (minibuffer-selected-window))) and https://stackoverflow.com/questions/2238418/emacs-lisp-how-to-get-buffer-major-mode/22460428#22460428
We already send the file name with each heartbeat so leaving the project as unknown
maybe the best default.
Yeah, leave it as unknown.
Running activity-watch with the fixes from #3 and #2 and the setup described in #2 results in the following stack-trace.
Could we check whether projectile is running/loaded before calling projectile functions?
Workaround: Run projectile for example by adding _ to init.el: