summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-04-08 21:14:51 +0200
committerBastien Guerry <bzg@altern.org>2013-04-08 21:25:10 +0200
commitcd481dfba88d52c52dee7a1868518883633047b9 (patch)
tree1cb556e7b339530fd38e3a38ba14feb5eec4a66a
parent15d6dd651b9b996b60ae374b0f6cddde82e3a86c (diff)
downloadorg-mode-cd481dfba88d52c52dee7a1868518883633047b9.tar.gz
org-agenda.el (org-agenda-goto-date): Fix bug when going to a date in month view
* org-agenda.el (org-agenda-span-to-ndays): Enhance docstring. (org-agenda-goto-date): Fix bug when going to a date in month view. Thanks to Eric S Fraga for reporting this bug.
-rw-r--r--lisp/org-agenda.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index cc0eed5..5cdbe52 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4331,7 +4331,8 @@ items if they have an hour specification like [h]h:mm."
(t n)))
(defun org-agenda-span-to-ndays (span &optional start-day)
- "Return ndays from SPAN, possibly starting at START-DAY."
+ "Return ndays from SPAN, possibly starting at START-DAY.
+START-DAY is an absolute time value."
(cond ((numberp span) span)
((eq span 'day) 1)
((eq span 'week) 7)
@@ -7731,7 +7732,9 @@ Negative selection means regexp must not match for selection of an entry."
(2-arg (nth 2 args))
(with-hour-p (nth 4 org-agenda-redo-command))
(newcmd (list 'org-agenda-list 0-arg date
- (org-agenda-span-to-ndays 2-arg) with-hour-p))
+ (org-agenda-span-to-ndays
+ 2-arg (org-time-string-to-absolute date))
+ with-hour-p))
(newargs (cdr newcmd))
(inhibit-read-only t)
org-agenda-sticky)