emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: Make a time-stamp non-interactively


From: Bernt Hansen
Subject: [Orgmode] Re: Make a time-stamp non-interactively
Date: Wed, 14 Apr 2010 22:26:20 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Zachary Young <address@hidden> writes:

> Hi all,
>
> I'm still new to elisp, so forgive me if I am missing something obvious...
>
> I would like to make an orgmode active time-stamp from within a custom 
> function I am writing. I have
> looked at `org-time-stamp' but do not see a way to call this in a 
> *non-interactive* fashion from my
> code. Inside `org-time-stamp' I was looking for a "core time-stamp function" 
> that the interactive
> functions would call... but could not make one out. Is there a function 
> already defined that when
> called will make a time-stamp with default values?
>
> If not, can someone point out the lines of code inside `org-time-stamp' that 
> I can duplicate in my
> own code?
>
> I would prefer not to have to make a macro.
>
> Thank you,
> Zachary

Hi Zachary,

You probably want something like org-insert-time-stamp.

I use this to insert inactive timestamps in buffers like this:

(defun bh/insert-inactive-timestamp ()
  (interactive)
  (org-insert-time-stamp nil t t nil nil nil))


If you change the third parameter from t to nil it gives you active
timestamps.

See the docstring for more details.

HTH,
Bernt




reply via email to

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