emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Two bugs with setting deadlines/scheduling


From: Bastien
Subject: Re: [Orgmode] Two bugs with setting deadlines/scheduling
Date: Wed, 24 Oct 2007 03:13:46 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux)

"Scott Jaderholm" <address@hidden> writes:

> As of 5.13 I am unable to schedule or set deadlines other than
> tomorrow. I thought this must be something in my settings but running
> emacs with -q and loading org without any special settings yields the
> same bug. Is anyone else having this problem?

Same here -- fixed in the patch below.  This was a problem with the new
function: `org-read-date-get-relative'

I didn't manage to fix the problem with inserting relative dates like
"++2d" though.  It looks like Org doesn't default to the date at point
anymore.  

> A more minor bug: if I create a file and add a heading without entering
> a newline and then try to schedule or set a deadline it will just say
> End of buffer and not set anything, except it does add a newline. Then
> if I try again the command will work.

Fixed in the patch below.

diff -u /home/guerry/elisp/testing/org/org.el 
/home/guerry/elisp/testing/bzg/org.el
--- /home/guerry/elisp/testing/org/org.el       2007-10-24 03:09:10.000000000 
+0100
+++ /home/guerry/elisp/testing/bzg/org.el       2007-10-24 03:08:00.000000000 
+0100
@@ -13748,7 +13748,8 @@
          (goto-char (match-end 1))
          (setq col (current-column))
          (goto-char (match-end 0))
-         (if (eobp) (insert "\n") (forward-char 1))
+         (if (eobp) (insert "\n"))
+         (forward-char 1)
          (if (and (not (looking-at outline-regexp))
                   (looking-at (concat "[^\r\n]*?" org-keyword-time-regexp
                                       "[^\r\n]*"))
@@ -16474,7 +16475,7 @@
 
 (defun org-read-date-get-relative (s today default)
   "Check string S for special relative date string.
-TODAY and DEFAULT are ionternal times, for today and for a default.
+TODAY and DEFAULT are internal times, for today and for a default.
 Return shift list (N what def-flag)
 WHAT       is \"d\", \"w\", \"m\", or \"y\" for day. week, month, year.
 N          is the number if WHATs to shift
@@ -16482,7 +16483,7 @@
            the DEFAULT date rather than TODAY."
   (when (string-match
         (concat
-         "\\`[ \t]*\\([-+]\\{1,2\\}\\)?"
+         "\\`[ \t]*[-+]+\\(\\{1,2\\}\\)?"
          "\\([0-9]+\\)?"
          "\\([dwmy]\\|\\(" (mapconcat 'car parse-time-weekdays "\\|") "\\)\\)?"
          "\\([ \t]\\|$\\)") s)

Diff finished.  Wed Oct 24 03:09:29 2007
-- 
Bastien

reply via email to

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