Org-mode mailing list
 help / color / 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
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
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?

  parent reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-14  6:56 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://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 \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Org-mode mailing list

Archives are clonable:
	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git