Giovanni Ridolfi <giovanni.rido...@yahoo.it> writes: > Radosław Grzanka <radosl...@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?