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

org-mode with wakatime-mode #33

Open
ht-hieu opened this issue Dec 11, 2017 · 6 comments
Open

org-mode with wakatime-mode #33

ht-hieu opened this issue Dec 11, 2017 · 6 comments

Comments

@ht-hieu
Copy link

ht-hieu commented Dec 11, 2017

Hi all,

I'm an org-mode fan. I usually code in org-mode files (literate programming style). But, sadly, wakatime-mode seem doesn't track my activities (even when I tried org-edit-special). Is there any way to use wakatime-mode with org-mode?

Thank you. 😄

@alanhamlett
Copy link
Member

This is probably because WakaTime counts coding activity around files, so if there's not a file available on disc then WakaTime doesn't log anything. Can you save an org-mode session to disc somehow?

@thomasf
Copy link
Contributor

thomasf commented Dec 11, 2017

it's a literate programming mode which opens a new buffer with a subset of the original file buffer for editing of a code section.. It probably has some variable one can check to find out which file-buffer it corresponds to.

@thomasf
Copy link
Contributor

thomasf commented Dec 11, 2017

Ok.. it does actually present itself as a file-buffer.. evaluating (buffer-file-name (current-buffer)) inside a org-edit-special buffer (C-c ') returns "/home/thomasf/src/dotfiles/notes/org/file.org[*Org Src file.org • dotfiles/notes/org[ example ]*]" which is based on my buffer formatting configuration.

Editing file buffers in org-mode normally seems to be reported just fine for me.

@ht-hieu
Copy link
Author

ht-hieu commented Dec 12, 2017

Hi @thomasf,
It can report but it reported as other language instead of a language which is defined in major-mode. My buffer format is: "~/name.org[*Org Src name.org[ major-mode ]*]". Is wakatime-mode uses file name extension to detect language?

@alanhamlett
Copy link
Member

@gochit WakaTime uses pygments for language detection. It uses a combination of symbols parsed from file contents and the file's extension.

@alanhamlett
Copy link
Member

Someone suggested recently that we detect when org-mode is enabled, and add argument --language Org to the wakatime-cli call.

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

3 participants