Radosław Grzanka <radosl...@gmail.com> writes: > Hello, > is it possible to select and clock-in default task when emacs starts? > > I'm trying to implement GTD setup as described here > http://doc.norang.ca/org-mode.html and I like concept of > "punching-in". However, I found out it is not necessary for me to > select "default task" each time I punch in becaue I have only one such > task. > > Therefore, I'd like to set default task and clock it in when emacs starts. > > Any help? > > Thanks, > Radek.
Hi Radek, Sure it is possible. You can identify a task by a globally unique id and clock that in. I have a function for this but I don't use it anymore. I've modified the org-clock-in call to provide the double prefix argument so it also sets this as the default task. Now you can just call (bh/clock-in-organization-task) in your .emacs or bind it to a key to set that task to the default. --8<---------------cut here---------------start------------->8--- (require 'org-id) (defun bh/clock-in-organization-task () (interactive) (bh/clock-in-task-by-id "eb155a82-92b2-4f25-a3c6-0304591af2f9")) (defun bh/clock-in-task-by-id (id) "Clock in a task by id" (save-restriction (widen) (org-with-point-at (org-id-find id 'marker) (org-clock-in '(16))))) --8<---------------cut here---------------end--------------->8--- Regards, Bernt