emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: Julian Burgos <jmburgos@uw.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: Automatically insert inactive timestamps
Date: Tue, 07 Dec 2010 22:01:09 -0500	[thread overview]
Message-ID: <87y681nf2i.fsf@norang.ca> (raw)
In-Reply-To: <AANLkTi=znNNzYZJR0OqY_obiqJGqq-3-HoMiJpdRn4q8@mail.gmail.com> (Julian Burgos's message of "Wed, 8 Dec 2010 00:24:33 +0000")

Julian Burgos <jmburgos@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

  parent reply	other threads:[~2010-12-08  3:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08  0:24 Automatically insert inactive timestamps Julian Burgos
2010-12-08  2:06 ` Russell Adams
2010-12-08  3:01 ` Bernt Hansen [this message]
2010-12-08 12:53   ` Andrew J. Korty
2010-12-08 15:10     ` Nick Dokos
2010-12-08 17:25       ` Andrew J. Korty
2010-12-08 17:42     ` Matt Lundin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y681nf2i.fsf@norang.ca \
    --to=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    --cc=jmburgos@uw.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).