emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Riley <rileyrg@googlemail.com>
To: emacs-orgmode@gnu.org
Subject: Re: taking note when clocking out
Date: Thu, 14 Apr 2011 12:17:26 +0200	[thread overview]
Message-ID: <vuoc49jfwp.fsf@news.eternal-september.org> (raw)
In-Reply-To: 83ei552q9h.fsf@yahoo.it

Giovanni Ridolfi <giovanni.ridolfi@yahoo.it> writes:

> Radosław Grzanka <radoslawg@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

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?

  parent reply	other threads:[~2011-04-14 10:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-14  6:56 taking note when clocking out Radosław Grzanka
2011-04-14  8:25 ` Giovanni Ridolfi
2011-04-14  8:34   ` Richard Riley
2011-04-14  9:02     ` Radosław Grzanka
2011-04-14 10:17   ` Richard Riley [this message]
2011-04-14 11:14     ` Radosław Grzanka
2011-04-14 12:21     ` Giovanni Ridolfi
2011-04-14 12:40       ` Richard Riley
2011-04-14 12:58         ` Giovanni Ridolfi
2011-04-14 14:20           ` Matt Lundin
2011-04-14 14:42             ` Richard Riley
2011-04-14 16:48               ` Matt Lundin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vuoc49jfwp.fsf@news.eternal-september.org \
    --to=rileyrg@googlemail.com \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).