From: "Andrew J. Korty" <ajk@iu.edu>
To: emacs-orgmode@gnu.org
Subject: Re: Re: Automatically insert inactive timestamps
Date: Wed, 08 Dec 2010 07:53:08 -0500 [thread overview]
Message-ID: <83884.1291812788@iu.edu> (raw)
In-Reply-To: <87y681nf2i.fsf@norang.ca>
Bernt Hansen <bernt@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
next prev parent reply other threads:[~2010-12-08 12:53 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
2010-12-08 12:53 ` Andrew J. Korty [this message]
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=83884.1291812788@iu.edu \
--to=ajk@iu.edu \
--cc=emacs-orgmode@gnu.org \
/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).