wakatime / wakatime-mode

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

WakaTime init.el file error #36

Open Vitao18 opened 6 years ago

Vitao18 commented 6 years ago

I'm new to Emacs and I'm trying to configure Wakatime in my init.el file. I've followed the tutorial and installed both wakatime-cli and wakatime-mode, but I'm currently getting this error at Emacs buffer when starting Emacs:


Symbol's function definition is void: wakatime-api-key

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.

Here's my init.el file:

;; Wakatime
(wakatime-api-key "70b484c2-74d0-4ab0-9510-cd425f08f7e3")
(wakatime-cli-path "~/usr/local/bin/wakatime")
(global-wakatime-mode)
thomasf commented 6 years ago

you need to set the variables.

The first argument in an s-expression (...) should be a callable there in so (wakatime-api-key "70b484c2-74d0-4ab0-9510-cd425f08f7e3") means that you are trying to call the function wakatime-api-key with the argument 70..... What you want to do is set the varibles instead (setq wakatime-api-key "70b484c2-74d0-4ab0-9510-cd425f08f7e3")