emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: Automatically insert inactive timestamps


From: Bernt Hansen
Subject: [Orgmode] Re: Automatically insert inactive timestamps
Date: Tue, 07 Dec 2010 22:01:09 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Julian Burgos <address@hidden> 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



reply via email to

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