From a6776f1fe4b25f5074f7b9850703465aaccc7e93 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Mon, 8 Jun 2020 12:51:10 +0200 Subject: [PATCH] Do not try to use dbus when showing notifications under windows --- init.el | 53 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/init.el b/init.el index c6af10e..ffaebd3 100644 --- a/init.el +++ b/init.el @@ -916,29 +916,36 @@ With given ARG, display files in `db/important-document-path’." (use-package org-clock :defer t :commands (org-clock-save) - :init (setq org-clock-history-length 23 - org-clock-in-resume t - org-clock-into-drawer t - org-clock-idle-time nil - org-clock-out-remove-zero-time-clocks t - org-clock-out-when-done '("DONE" "CANC" "WAIT" "HOLD") - org-clock-auto-clock-resolution 'when-no-clock-is-running - org-clock-mode-line-total 'auto - org-clock-report-include-clocking-task t - org-clock-in-switch-to-state (lambda (_) - (when (not - (and (boundp 'org-capture-mode) - org-capture-mode)) - (cond - ((member (org-get-todo-state) - (list "TODO" "READ")) - "CONT") - ((member (org-get-todo-state) - (list "GOTO")) - "ATTN")))) - org-clock-persist t - org-clock-persist-query-resume nil - org-time-stamp-rounding-minutes '(1 1)) + :init (progn + (setq org-clock-history-length 23 + org-clock-in-resume t + org-clock-into-drawer t + org-clock-idle-time nil + org-clock-out-remove-zero-time-clocks t + org-clock-out-when-done '("DONE" "CANC" "WAIT" "HOLD") + org-clock-auto-clock-resolution 'when-no-clock-is-running + org-clock-mode-line-total 'auto + org-clock-report-include-clocking-task t + org-clock-in-switch-to-state (lambda (_) + (when (not + (and (boundp 'org-capture-mode) + org-capture-mode)) + (cond + ((member (org-get-todo-state) + (list "TODO" "READ")) + "CONT") + ((member (org-get-todo-state) + (list "GOTO")) + "ATTN")))) + org-clock-persist t + org-clock-persist-query-resume nil + org-time-stamp-rounding-minutes '(1 1)) + + ;; On Windows, we don't have dbus to show notifications; default to + ;; `message' instead + (when on-windows + (setq org-show-notification-handler #'message))) + :config (progn (org-clock-persistence-insinuate)