* [bug, org.el] Wrong guess of future date
@ 2015-01-05 11:55 Rasmus
2015-01-06 22:22 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Rasmus @ 2015-01-05 11:55 UTC (permalink / raw)
To: emacs-orgmode
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!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [bug, org.el] Wrong guess of future date
2015-01-05 11:55 [bug, org.el] Wrong guess of future date Rasmus
@ 2015-01-06 22:22 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2015-01-06 22:22 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
Hello,
Rasmus <rasmus@gmx.us> writes:
> 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))
This should be fixed. Thank you for reporting it.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-06 22:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-05 11:55 [bug, org.el] Wrong guess of future date Rasmus
2015-01-06 22:22 ` Nicolas Goaziou
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).