From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: [bug, org.el] Wrong guess of future date Date: Mon, 05 Jan 2015 12:55:20 +0100 Message-ID: <87tx05fnmf.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y86GH-0001rG-73 for emacs-orgmode@gnu.org; Mon, 05 Jan 2015 06:55:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y86GC-0000Vm-55 for emacs-orgmode@gnu.org; Mon, 05 Jan 2015 06:55:53 -0500 Received: from plane.gmane.org ([80.91.229.3]:49819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y86GB-0000VZ-G6 for emacs-orgmode@gnu.org; Mon, 05 Jan 2015 06:55:47 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Y86G2-0003Gi-Hf for emacs-orgmode@gnu.org; Mon, 05 Jan 2015 12:55:38 +0100 Received: from 46.166.186.240 ([46.166.186.240]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 05 Jan 2015 12:55:38 +0100 Received: from rasmus by 46.166.186.240 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 05 Jan 2015 12:55:38 +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 Hi, There seems to be a bug in `org-read-date-analyze' so that when re-scheduling from 2014 to 2014, the year is not updated. Here's an example. Type 30 in the rescheduling prompt. It will be rescheduled to <2014-12-30> rather than <2015-01-30> as expected when org-read-date-prefer-future is non-nil. (let* ((file (make-temp-file "")) (org-read-date-prefer-future t) (org-agenda-files (list file))) (save-window-excursion (find-file file) (insert "* TODO Document\nSCHEDULED: <2014-12-25>") (org-mode) (save-buffer)) (org-agenda-list) (goto-char (point-min)) (search-forward "TODO") (org-agenda-schedule 0) (find-file file) (goto-char (point-min)) (org-show-entry)) I think the bug is in the sexp starting on line 16938 of org.el. I don't know the agenda code well, so if someone can fix it would be great; otherwise input on whether this is truly the place to fix this behavior please let me know. Thanks, Rasmus -- El Rey ha muerto. ¡Larga vida al Rey!