Skip to content
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

Doesn't track modes not associated with files #22

Open
Gleek opened this issue May 7, 2022 · 1 comment
Open

Doesn't track modes not associated with files #22

Gleek opened this issue May 7, 2022 · 1 comment

Comments

@Gleek
Copy link

Gleek commented May 7, 2022

The title is a speculation. I apologize if it's not the case as I haven't gone through the code yet.
Modes such as epub-mode by nov.el, org-agenda and bongo.el's Playlist mode are not reported.
All these modes don't have direct file associations. So it seems to me that file association is currently necessary.

Tracking these temporary buffers or buffers with no file associations should be possible with a blank or buffer-name

Regards.

PS: Thanks for working on and sharing this package. Was searching for some automatic tracking inside emacs in the *Packages* list and landed on this gem.

@Gleek
Copy link
Author

Gleek commented May 7, 2022

Seems like that is what the case is as seen here:

(when (and (buffer-file-name (current-buffer))
(not (auto-save-file-name-p (buffer-file-name (current-buffer)))))

What would be the purpose of this check?

I changed the function to only call the (activity-watch--call) and it is now pushing the data correctly. A small caveat remains, as the file name is pushed as "unknown" instead of the buffer name. That should be an easy fix as well.

This is what I did, in case someone landing on the issue wants to replicate it:

  (defun active-watch--save-override()
    (save-match-data
      (activity-watch--call)))
  (advice-add 'activity-watch--save :override 'active-watch--save-override)

Would you be willing to make this change or accept a PR in the core library unless of course you see an issue invisible to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant