emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] suggestion: automatically recording entry creation date


From: Paul Holcomb
Subject: Re: [Orgmode] suggestion: automatically recording entry creation date
Date: Fri, 20 Nov 2009 14:21:17 -0600
User-agent: Mutt/1.4.2i

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]