I'm looking for a way to have emacs send me desktop notifications (on Windows 10) for appointments in my org file. I did find a way to be notified within emacs (https://sachachua.com/blog/2007/11/setting-up-appointment-reminders-in-org/) and also how to have a desktop notification on Mac (https://lists.gnu.org/archive/html/emacs-orgmode/2013-02/msg00644.html ) and also on Linux (Good methods for setting up alarms (audio + visual) triggered by org-mode events? ) but not on Windows. Can anyone help me with that maybe through Windows native message boxes or Autohotkeys? Thanks!
Found a solution buried in this video: https://vimeo.com/16533939 It uses a visual basic code that popups up a message showing the title of your event. Here's the VB code (I put it in a file named PopUp.vbs):
On Error Resume Next Msgbox wscript.Arguments(0),0,"Agenda Reminder"
and here's the configuration needed in your .emacs or .spacemacs file (you need to modify the path to the VB file accordingly):
;; Enabling the "appt" Windows notifier ;; https://vimeo.com/16533939 ;; Get appointments for today (defun my-org-agenda-to-appt () "Rebuild all appt reminders" (interactive) (setq appt-time-msg-list nil) (run-at-time "24:01" nil 'my-org-agenda-to-appt) (let ((org-deadline-warning-days 0)) (org-agenda-to-appt))) ;;; Disabled so that I can open multiple emacs without org loading agenda files (appt-activate t) ;; 5 minutes warning (setq appt-message-warning-time '60) (setq appt-display-interval '15) ;; Update appt each time agenda is opened (add-hook 'org-finalize-agenda-hook 'my-org-agenda-to-appt) ;; Setup agenda popup, we tell appt to use window, and replace default function (setq appt-display-format 'window) (setq appt-disp-window-function (function my-appt-disp-window)) (defun my-appt-disp-window (min-to-app new-time msg) (save-window-excursion (shell-command (concat "c:/Windows/System32/cscript.exe //nologo c:/Dropbox/ToDo/PopUp.vbs \"" msg "\"")nil nil)))