emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Bug: org-get-current-options uses fixed format-time-string [7.6]


From: Bastien
Subject: Re: [O] Bug: org-get-current-options uses fixed format-time-string [7.6]
Date: Wed, 25 Jan 2012 10:16:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Hi Diego,

this is not a bug -- please use `org-submit-bug-report' for bugs
only.

Diego Sevilla Ruiz <address@hidden> writes:

> org-get-current-options uses the following line to fill the `#+DATE:'
> property in a new file:
>
> (format-time-string (substring (car org-time-stamp-formats) 1 -1))
>
> While this is correct, I think it is too much tightly coupled with the
> org-time-stamp-formats constant defined in org.el.
>
> I would like to suggest to add a new defun (possibly interactive) to add a
> plain actual date. Something along the lines of:
>
> (defun org-current-time-stamp-string ()
>   "Returns the current time stamp string in the org format."
>   (format-time-string (substring (car org-time-stamp-formats) 1 -1)))
>
> (defun org-insert-current-time-stamp-string ()
>   "Insert at point the current time stamp string in the org format."
>   (interactive)
>   (insert (org-current-time-stamp-string)))
>
> If those functions already exist, it would be then more appropriate to use
> them in that function `org-get-current-options`.

I'm not sure to understand -- can you try to rephrase your request?  
What do you want to achieve exactly?

Thanks,

-- 
 Bastien



reply via email to

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