From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Bug: org-get-current-options uses fixed format-time-string [7.6] Date: Wed, 25 Jan 2012 10:16:08 +0100 Message-ID: <87vco0m9bb.fsf@gnu.org> References: <4F156D1E.2020508@ditec.um.es> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:38013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpywT-0006Gy-8c for emacs-orgmode@gnu.org; Wed, 25 Jan 2012 04:15:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpywR-0007LH-Rq for emacs-orgmode@gnu.org; Wed, 25 Jan 2012 04:14:57 -0500 Received: from mail-we0-f169.google.com ([74.125.82.169]:49065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpywR-0007L3-De for emacs-orgmode@gnu.org; Wed, 25 Jan 2012 04:14:55 -0500 Received: by wera13 with SMTP id a13so2527871wer.0 for ; Wed, 25 Jan 2012 01:14:54 -0800 (PST) In-Reply-To: <4F156D1E.2020508@ditec.um.es> (Diego Sevilla Ruiz's message of "Tue, 17 Jan 2012 13:44:14 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Diego Sevilla Ruiz Cc: emacs-orgmode@gnu.org Hi Diego, this is not a bug -- please use `org-submit-bug-report' for bugs only. Diego Sevilla Ruiz 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