From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Re: Automatically insert inactive timestamps Date: Wed, 08 Dec 2010 10:10:14 -0500 Message-ID: <12555.1291821014@gamaville.dokosmarshall.org> References: <87y681nf2i.fsf@norang.ca> <83884.1291812788@iu.edu> Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=39014 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQLf8-0004Z7-Nm for emacs-orgmode@gnu.org; Wed, 08 Dec 2010 10:10:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQLf6-0006JW-RS for emacs-orgmode@gnu.org; Wed, 08 Dec 2010 10:10:34 -0500 Received: from vms173019pub.verizon.net ([206.46.173.19]:52116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQLf6-0006J6-Lk for emacs-orgmode@gnu.org; Wed, 08 Dec 2010 10:10:32 -0500 Received: from gamaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173019.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LD400G5J7H2JW80@vms173019.mailsrvcs.net> for emacs-orgmode@gnu.org; Wed, 08 Dec 2010 09:10:15 -0600 (CST) In-reply-to: Message from "Andrew J. Korty" of "Wed, 08 Dec 2010 07:53:08 EST." <83884.1291812788@iu.edu> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Andrew J. Korty" Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Andrew J. Korty wrote: > Bernt Hansen wrote: > > > (add-hook 'org-insert-heading-hook 'bh/insert-heading-inactive-timestamp) > > Using org-insert-heading-hook is more elegant than my way, but I only > want timestamps on TODO entries, so I use > I think you should be able to use org-entry-get in the hook to get the TODO property of the entry and then conditionally add the timestamp - something like this: (if (equal (org-entry-get (point) "TODO") "TODO") add the timestamp Nick