diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-04-10 20:10:47 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-04-10 20:10:47 +0200 |
commit | 36170429c3037522e927961c00614049af59fa76 (patch) | |
tree | a7e14bf11170f22e2accd5ec5ba2e32eaead39e0 | |
parent | 442e7a2911e3e0229b1b6dd1fe0449653274ec31 (diff) | |
parent | 1553aae9948ff8c664d20df04ff3580ecf947a42 (diff) | |
download | org-mode-36170429c3037522e927961c00614049af59fa76.tar.gz |
Merge branch 'maint'
-rw-r--r-- | contrib/lisp/org-notify.el | 19 |
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 |