Julian Burgos <jmbur...@uw.edu> writes:

> This is the newbie question of the day.  I would like to get an inactive time 
> stamp automatically in each new
> entry in org mode. Could somebody explain me how to do this?

Hi Julian,

Here is what I use in my setup:

Creating new headlines insert inactive timestamps automatically:

--8<---------------cut here---------------start------------->8---
(defun bh/insert-inactive-timestamp ()
(interactive)
(org-insert-time-stamp nil t t nil nil nil))

(defun bh/insert-heading-inactive-timestamp ()
(save-excursion
(org-return)
(org-cycle)
(bh/insert-inactive-timestamp)))

(add-hook 'org-insert-heading-hook 'bh/insert-heading-inactive-timestamp)
--8<---------------cut here---------------end--------------->8---

Manually add an inactive timestamp anywhere with f9-t

--8<---------------cut here---------------start------------->8---
(global-set-key (kbd "<f9> t") 'bh/insert-inactive-timestamp)
--8<---------------cut here---------------end--------------->8---

and my Capture templates insert inactive timestamps when capture tasks
are created (using %U)

--8<---------------cut here---------------start------------->8---
(setq org-capture-templates (quote (("t" "todo" entry (file 
"~/git/org/refile.org") "* TODO %?
%U
%a" :clock-in t :clock-resume t))))
--8<---------------cut here---------------end--------------->8---

HTH,
Bernt

_______________________________________________
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