From mboxrd@z Thu Jan 1 00:00:00 1970 From: pmlists@free.fr (Peter =?utf-8?Q?M=C3=BCnster?=) Subject: [PATCH] Timestamps: Fix org-schedule and org-deadline with absolute time arguments Date: Mon, 21 Nov 2011 22:21:41 +0100 Message-ID: <87k46ti32y.fsf@micropit.couberia.bzh> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSbJP-0003ZZ-FE for emacs-orgmode@gnu.org; Mon, 21 Nov 2011 16:22:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSbJM-000507-Dg for emacs-orgmode@gnu.org; Mon, 21 Nov 2011 16:21:59 -0500 Received: from lo.gmane.org ([80.91.229.12]:39452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSbJM-000503-6U for emacs-orgmode@gnu.org; Mon, 21 Nov 2011 16:21:56 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RSbJL-0008M1-NV for emacs-orgmode@gnu.org; Mon, 21 Nov 2011 22:21:55 +0100 Received: from arennes-359-1-145-187.w86-214.abo.wanadoo.fr ([86.214.84.187]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Nov 2011 22:21:55 +0100 Received: from pmlists by arennes-359-1-145-187.w86-214.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Nov 2011 22:21:55 +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: emacs-orgmode@gnu.org * lisp/org.el (org-add-planning-info): Treat absolute time too. TINYCHANGE --- lisp/org.el | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index fffb0c1..3342b87 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -12078,9 +12078,8 @@ be removed." default-input (and ts (org-get-compact-tod ts)))))) (when what (setq time - (if (and (stringp time) - (string-match "^[-+]+[0-9]" time)) - ;; This is a relative time, set the proper date + (if (stringp time) + ;; This is a string (relative or absolute), set proper date (apply 'encode-time (org-read-date-analyze time default-time (decode-time default-time))) @@ -14807,7 +14806,7 @@ The prompt will suggest to enter an ISO date, but you can also enter anything which will at least partially be understood by `parse-time-string'. Unrecognized parts of the date will default to the current day, month, year, hour and minute. If this command is called to replace a timestamp at point, -of to enter the second timestamp of a range, the default time is taken +or to enter the second timestamp of a range, the default time is taken from the existing stamp. Furthermore, the command prefers the future, so if you are giving a date where the year is not given, and the day-month combination is already past in the current year, it will assume you -- 1.7.3.4