summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2018-04-10 20:10:47 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-04-10 20:10:47 +0200
commit36170429c3037522e927961c00614049af59fa76 (patch)
treea7e14bf11170f22e2accd5ec5ba2e32eaead39e0
parent442e7a2911e3e0229b1b6dd1fe0449653274ec31 (diff)
parent1553aae9948ff8c664d20df04ff3580ecf947a42 (diff)
downloadorg-mode-36170429c3037522e927961c00614049af59fa76.tar.gz
Merge branch 'maint'
-rw-r--r--contrib/lisp/org-notify.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/contrib/lisp/org-notify.el b/contrib/lisp/org-notify.el
index 8e800ee..56cf85d 100644
--- a/contrib/lisp/org-notify.el
+++ b/contrib/lisp/org-notify.el
@@ -137,15 +137,16 @@ simple timestamp string."
"Create the todo-list for one org-agenda file."
(let* ((files (org-agenda-files 'unrestricted))
(max (1- (length files))))
- (setq org-notify-parse-file
- (if (or (not org-notify-parse-file) (>= org-notify-parse-file max))
- 0
- (1+ org-notify-parse-file)))
- (save-excursion
- (with-current-buffer (find-file-noselect
- (nth org-notify-parse-file files))
- (org-element-map (org-element-parse-buffer 'headline)
- 'headline 'org-notify-make-todo)))))
+ (when files
+ (setq org-notify-parse-file
+ (if (or (not org-notify-parse-file) (>= org-notify-parse-file max))
+ 0
+ (1+ org-notify-parse-file)))
+ (save-excursion
+ (with-current-buffer (find-file-noselect
+ (nth org-notify-parse-file files))
+ (org-element-map (org-element-parse-buffer 'headline)
+ 'headline 'org-notify-make-todo))))))
(defun org-notify-maybe-too-late (diff period heading)
"Print warning message, when notified significantly later than defined by