diff options
author | Marco Wahl <marcowahlsoft@gmail.com> | 2019-03-18 15:06:15 +0100 |
---|---|---|
committer | Marco Wahl <marcowahlsoft@gmail.com> | 2019-03-18 15:06:15 +0100 |
commit | ee1ec294056ad71c7356ff8ba3b46d786a606f38 (patch) | |
tree | 6451c874151ae6dd45428ae15d0a8d74644fc18a | |
parent | c2f3f1912e78bd9eb0f79f28d876e97ab52f924c (diff) | |
download | org-mode-ee1ec294056ad71c7356ff8ba3b46d786a606f38.tar.gz |
org-agenda: Test if span makes sense
* lisp/org-agenda.el (org-agenda-list): Raise an error if span is
negative.
Recent behavior was to create an agenda for one day.
-rw-r--r-- | lisp/org-agenda.el | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index f6f501b..baf9c8d 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4127,6 +4127,9 @@ items if they have an hour specification like [h]h:mm." span (nth 2 org-agenda-overriding-arguments))) (when (and (integerp arg) (> arg 0)) (setq span arg arg nil)) + (when (numberp span) + (unless (< 0 span) + (user-error "Agenda creation impossible for this span(=%d days)." span))) (catch 'exit (setq org-agenda-buffer-name (or org-agenda-buffer-tmp-name |