emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: emacs-orgmode@gnu.org
Subject: Re: Two bugs with setting deadlines/scheduling
Date: Wed, 24 Oct 2007 03:13:46 +0100	[thread overview]
Message-ID: <87bqapqmxx.fsf@bzg.ath.cx> (raw)
In-Reply-To: <b2e202b30710231454g1fa11da1h86dcc3d6892b543e@mail.gmail.com> (Scott Jaderholm's message of "Tue, 23 Oct 2007 15:54:22 -0600")

[-- Attachment #1: Type: text/plain, Size: 859 bytes --]

"Scott Jaderholm" <jaderholm@gmail.com> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org.el.patch --]
[-- Type: text/x-diff, Size: 1354 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 13 bytes --]


-- 
Bastien

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2007-10-24  1:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-23 21:54 Two bugs with setting deadlines/scheduling Scott Jaderholm
2007-10-24  2:13 ` Bastien [this message]
2007-10-24  6:08 ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bqapqmxx.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).