I want to use the pomodoro technique in org-mode as explained in http://orgmode.org/worg/org-gtd-etc.html
I have added the following lines in .emacs file
(add-to-list 'org-modules 'org-timer)
(setq org-timer-default-timer 25)
(add-hook 'org-clock-in-hook '(lambda ()
(if (not org-timer-current-timer)
(org-timer-set-timer '(16)))))
When starting the emacs the following warning is displayed in the Warnings buffer.
Symbol's value as variable is void: org-modules
I am using org-mode version - 7.7.291.g37db which is cloned from git://orgmode.org/org-mode.git
How to get rid of the error.
org-modules
is defined in org.el
. If you want to add an element to the list, you need to wait until the variable is defined (with a default list). One way to do that is delay the addition until immediately after org.el
is loaded:
(defun my-after-load-org ()
(add-to-list 'org-modules 'org-timer))
(eval-after-load "org" '(my-after-load-org))
Note that add-hook
can cope with a variable that isn't defined yet, but add-to-list
can't. You could write (setq org-modules '(org-timer))
, but that would overwrite the default module list instead of adding to it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With