14 Apr 2011 12:17
Re: taking note when clocking out
Richard Riley <rileyrg <at> googlemail.com>
2011-04-14 10:17:26 GMT
2011-04-14 10:17:26 GMT
Giovanni Ridolfi <giovanni.ridolfi <at> yahoo.it> writes: > Radosław Grzanka <radoslawg <at> gmail.com> writes: > >> Hello, >> I cannot find this using google nor browsing documentation so I ask >> for help. Generally I don't want to take notes when I'm clocking out >> except for one task. > You can use the org-clock-out-hook, > > but if you'll post an example, well'have something real to work on: > > 'But I must have something to work on. I cannot burn snow' > Gandalf > > Giovanni> I thought I'd have a quick crack at this since its ages I tried any elisp Something along the lines of ,---- | (require 'org-clock) | | (defun rgr/check-for-clock-out-note() | (interactive) | (save-excursion | (set-mark (goto-char (org-entry-beginning-position))) | (let ((tags (org-get-tags))) | (message "tags: %s " tags) | (if (member "clockout_note" tags) | (org-add-note))))) | | (add-hook 'org-clock-out-hook 'rgr/check-for-clock-out-note) `---- it uses a tag ("clockout_note") so can benefit from inherit etc. I'm sure its not optimal or well written but a quick test and it worked. btw, when entering a tag "-" is illegal?
>
I thought I'd have a quick crack at this since its ages I tried any
elisp
Something along the lines of
,----
| (require 'org-clock)
|
| (defun rgr/check-for-clock-out-note()
| (interactive)
| (save-excursion
| (set-mark (goto-char (org-entry-beginning-position)))
| (let ((tags (org-get-tags)))
| (message "tags: %s " tags)
| (if (member "clockout_note" tags)
| (org-add-note)))))
|
| (add-hook 'org-clock-out-hook 'rgr/check-for-clock-out-note)
`----
it uses a tag ("clockout_note") so can benefit from inherit etc. I'm
sure its not optimal or well written but a quick test and it worked.
btw, when entering a tag "-" is illegal?
RSS Feed