[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Re: Automatically insert inactive timestamps
From: |
Andrew J. Korty |
Subject: |
Re: [Orgmode] Re: Automatically insert inactive timestamps |
Date: |
Wed, 08 Dec 2010 07:53:08 -0500 |
Bernt Hansen <address@hidden> 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
#+begin_src emacs-lisp
(defadvice org-insert-todo-heading (after ajk/org-time-stamp-new-headline
activate
compile)
(let ((previous-location (point))) ; not sure why save-excursion doesn't
work
(org-insert-time-stamp (current-time) t t
(concat "\n " (make-string (org-current-level) ? )))
(goto-char previous-location)))
#+end_src
Here's my vote for a new hook, org-insert-todo-heading-hook. :-)
ajk