-
Notifications
You must be signed in to change notification settings - Fork 21
No notifications - events seemingly not retrieved properly #61
Description
First, thank you for your work on this package!
I've been trying to get it set up in my config and I've run into a bit of an issue: although I can get the package installed just fine, emacs doesn't seem to be sending out notifications for org events! I've tried, among other things, adding the "chocolate factory" example from the README (with the timestamp adjusted, of course) to one of my org agenda files, but I don't see notifications at any time.
Evaluating (alert "test")
results in a desktop notification as desired. I thought it might have been due to another org-mode package in my config file, so I tried running emacs -Q
and evaluating the following code to get org-wild-notifier installed:
(setq straight-check-for-modifications '(check-on-save find-when-checking))
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(straight-use-package 'use-package)
(setq straight-use-package-by-default t)
(setq org-agenda-files (list "~/org/" "~/org/dailies/"))
(use-package org-wild-notifier)
(setq alert-default-style 'libnotify)
(org-wild-notifier-mode)
The results were the same as in my usual config.
I poked around in the source code a bit and was surprised by the behavior of the following block, lines 265-271 in org-wild-notifier.el at the time of writing:
(--map
(org-map-entries
(lambda ()
(push (org-entry-properties) entries))
(format "%s>\"<today>\"+%s<\"<+2d>\"" it it)
'agenda)
'("DEADLINE" "SCHEDULED" "TIMESTAMP"))
I tried evaluating the following code separately:
(let ((entries))
(--map
(org-map-entries
(lambda ()
(push (org-entry-properties) entries))
(format "%s>\"<today>\"+%s<\"<+2d>\"" it it)
'agenda)
'("DEADLINE" "SCHEDULED" "TIMESTAMP")))
The output was:
(nil (((... ... ... ... ... ... ... ...))) (((... ... ... ... ... ...) (... ... ... ... ... ... ... ...)) ((... ... ... ... ... ...) (... ... ... ... ... ...) (... ... ... ... ... ... ... ...)) ((... ... ... ... ... ...) (... ... ... ... ... ...) (... ... ... ... ... ...) (... ... ... ... ... ... ... ...)) ((... ... ... ... ... ... ...) (... ... ... ... ... ...) (... ... ... ... ... ...) (... ... ... ... ... ...) (... ... ... ... ... ... ... ...))))
I didn't expect this behavior (to be fair, I don't understand the source code super well), so I thought it would be worth mentioning in the issue. This happened when using the "minimal working example" above as well as when using my default emacs config.
EDIT: I tried running the code using ielm rather than M-S-; and the output was reasonable. I realize now that the strange output above is likely just a truncated version of the full output! Oops . . . .
Other things that are probably worth mentioning:
- OS: NixOS.
- Emacs version: 29.0.50 (pure GTK, native compilation).
- Notification daemon: Dunst.
Please let me know if there's any additional information that I can provide that would make debugging easier!