From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: Automatically insert inactive timestamps Date: Tue, 07 Dec 2010 22:01:09 -0500 Message-ID: <87y681nf2i.fsf@norang.ca> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=58430 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQAHS-0001xf-Lw for emacs-orgmode@gnu.org; Tue, 07 Dec 2010 22:01:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQAHR-0004eh-0I for emacs-orgmode@gnu.org; Tue, 07 Dec 2010 22:01:22 -0500 Received: from mho-01-ewr.mailhop.org ([204.13.248.71]:53726) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQAHQ-0004ct-UL for emacs-orgmode@gnu.org; Tue, 07 Dec 2010 22:01:20 -0500 In-Reply-To: (Julian Burgos's message of "Wed, 8 Dec 2010 00:24:33 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Julian Burgos Cc: emacs-orgmode@gnu.org Julian Burgos writes: > This is the newbie question of the day.=C2=A0 I would like to get an inac= tive 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 " 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/refi= le.org") "* TODO %? %U %a" :clock-in t :clock-resume t)))) --8<---------------cut here---------------end--------------->8--- HTH, Bernt