From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Holcomb Subject: Re: suggestion: automatically recording entry creation date Date: Fri, 20 Nov 2009 14:21:17 -0600 Message-ID: <20091120202117.GV18489@cpoint.net> References: <4b11f87e0910301913i75b7f899jd236c6a77ac869fe@mail.gmail.com> <20091103000142.GE32187@atlantic.linksys.moosehall> <20091104125919.GC18202@atlantic.linksys.moosehall> Reply-To: pholcomb@cpoint.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBa3g-00058o-70 for emacs-orgmode@gnu.org; Fri, 20 Nov 2009 15:26:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBa3b-00056l-5Y for emacs-orgmode@gnu.org; Fri, 20 Nov 2009 15:26:19 -0500 Received: from [199.232.76.173] (port=52095 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBa3a-00056U-Uz for emacs-orgmode@gnu.org; Fri, 20 Nov 2009 15:26:14 -0500 Received: from mailhost.cpoint.net ([204.10.55.14]:39356) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1NBa3a-0001oM-79 for emacs-orgmode@gnu.org; Fri, 20 Nov 2009 15:26:14 -0500 Content-Disposition: inline In-Reply-To: <20091104125919.GC18202@atlantic.linksys.moosehall> 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: emacs-orgmode@gnu.org On Wed, Nov 04, 2009 at 12:59:19PM +0000, Adam Spiers wrote: > > Bernt's approach is nice, but I agree that a completely clutter-free > > solution (i.e. :PROPERTIES: drawers completely hidden by default) > > would be extremely nice. > > I suspect this might be tricky to implement :-/ I ended up combining Bernt's and Tim's approaches. The below adds a CREATED timestamp in both remember items and buffer-added items. -- ;; added "created" type (setq org-log-note-headings '((done . "CLOSING NOTE %t") (state . "State %-12s from %-12S %t") (note . "Note taken on %t") (reschedule . "Rescheduled from %S on %t") (redeadline . "New deadline from %S on %t") (created . "CREATED %t") (clock-out . ""))) ;; for TODOs created in the buffer (defun pah/insert-creation-date () "Insert CREATED timestamp into logbook" (org-add-log-setup 'created nil nil 'findpos 'time)) (add-hook 'org-insert-heading-hook 'pah/insert-creation-date) ;; for remember (setq org-remember-templates (quote (("todo" ?t "* TODO %?\n :LOGBOOK:\n - CREATED:%U\n :END:\n" nil bottom nil) -- Is there a way to get this function to work with remember as well? I tried adding to org-remember-before-finalize-hook, but the marker is in a weird state at that point. -- Paul Holcomb *pholcomb \@ cpoint net* GPG key fingerprint 2B62 05AE EE74 845A 705F D716 28C4 FE1C 088F CFAC