|
@@ -9178,14 +9178,14 @@ the Internet, and outside of business hours, with something like this:
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
(defun org-my-auto-exclude-fn (tag)
|
|
|
- (and (cond
|
|
|
- ((string= tag "net")
|
|
|
- (/= 0 (call-process "/sbin/ping" nil nil nil
|
|
|
- "-c1" "-q" "-t1" "mail.gnu.org")))
|
|
|
- ((or (member tag '("errand" "call")))
|
|
|
- (let ((hr (nth 2 (decode-time))))
|
|
|
- (or (< hr 8) (> hr 21)))))
|
|
|
- (concat "-" tag)))
|
|
|
+ (if (cond
|
|
|
+ ((string= tag "net")
|
|
|
+ (/= 0 (call-process "/sbin/ping" nil nil nil
|
|
|
+ "-c1" "-q" "-t1" "mail.gnu.org")))
|
|
|
+ ((member tag '("errand" "call"))
|
|
|
+ (let ((hr (nth 2 (decode-time))))
|
|
|
+ (or (< hr 8) (> hr 21)))))
|
|
|
+ (concat "-" tag)))
|
|
|
|
|
|
(setq org-agenda-auto-exclude-function 'org-my-auto-exclude-fn)
|
|
|
#+end_src
|