From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giovanni Ridolfi Subject: Re: taking note when clocking out Date: Thu, 14 Apr 2011 14:58:28 +0200 Message-ID: <83wrix0z2j.fsf@yahoo.it> References: <4DA69AAA.9040707@gmail.com> <83ei552q9h.fsf@yahoo.it> <831v152fd5.fsf@yahoo.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:39320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAM6m-0002fR-UH for emacs-orgmode@gnu.org; Thu, 14 Apr 2011 08:57:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QAM6l-0003FP-QJ for emacs-orgmode@gnu.org; Thu, 14 Apr 2011 08:57:16 -0400 Received: from nm13-vm0.bullet.mail.ukl.yahoo.com ([217.146.183.248]:46306) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QAM6l-0003FL-FV for emacs-orgmode@gnu.org; Thu, 14 Apr 2011 08:57:15 -0400 In-Reply-To: (Richard Riley's message of "Thu, 14 Apr 2011 14:40:42 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Richard Riley Cc: Matt Lundin , emacs-orgmode@gnu.org Richard Riley writes: Cc:-ed Matt Lundin > > ps I have signed fsf papers if that little utility snippet is any good > (ok, will need a defvar I guess for the tag used). Maybe in the hack page of worg? Feel free to reword my English ;-) Giovanni ------------------ org-hacks.org ------------ ** Using and Managing Org-Metadata [...] *** A way to tag a task so that when clocking-out user is prompted to take a note. -- Richard G. Riley A small function that, finding the tag "clockout_note" in a headline, prompts for a note. It uses the tag ("clockout_note") so can benefit from inherit etc... #+begin_src emacs-lisp (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) #+end_src