Bernt Hansen <be...@norang.ca> 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

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to