Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add org wild notifier to org layer #14418

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.develop
Original file line number Diff line number Diff line change
Expand Up @@ -2814,6 +2814,7 @@ files (thanks to Daniel Nicolai)
- Added package =org-roam= (thanks to Mariusz Klochowicz)
- Added package =org-contacts= (thanks to Daniel Nicolai)
- Added package =org-appear= (thanks to winsphinX)
- Added package =org-wild-notifier= (thanks to Daniel Nicolai)
- Key bindings:
- ~SPC m T i~ to toggle inline images
- Move clock related key bindings to ~SPC a o C~
Expand Down
35 changes: 35 additions & 0 deletions layers/+emacs/org/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- [[#important-note][Important Note]]
- [[#install][Install]]
- [[#layer][Layer]]
- [[#agenda-notifications][Agenda notifications]]
- [[#github-support][GitHub support]]
- [[#twitter-bootstrap-support][Twitter Bootstrap support]]
- [[#gnuplot-support][Gnuplot support]]
Expand Down Expand Up @@ -113,6 +114,40 @@ To use this configuration layer: in the main Spacemacs configuration
file (=~/.spacemacs=), to the existing =dotspacemacs-configuration-layers= list
add the =org= entry.

** Agenda notifications
To enable notifications for agenda events, set the variable
=org-enable-notifications= to =t=.

#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers '(
(org :variables
org-enable-notifications t
org-start-notification-daemon-on-startup t)))
#+END_SRC

This will install and configure the [[https://github.com/akhramov/org-wild-notifier.el][org-wild-notifier]] package. After install run
the =org-wild-notifier-mode= to start the =org-wild-notifier= notification daemon. To
start the notification daemon automatically on Spacemacs startup, set the
variable =org-start-notification-daemon-on-startup= to =t= as shown in the code
snippet above.

Documentation for how the notifications system can be configured is provided
[[https://github.com/akhramov/org-wild-notifier.el#configuration][here]] (on GNU/linux and Windows, using the =notifications= style is recommended.
Note also [[https://github.com/jwiegley/alert/pull/94][this issue]]).

Press =M-S RET= to enter a todo headline and then press =, d t= to add a
timestamp to the headline (or use the =org-journal-new-scheduled-entry= that
becomes available by enabling [[Org-journal support]]. By default, the
=org-wild-notifier= package will scan your =org-agenda-files= (every minute) for
=TODO= headlines that include a timestamp (configuration options are documented
[[https://github.com/akhramov/org-wild-notifier.el#configuration][here]]). The default configuration shows a notification 10 minutes before the
event using the [[https://melpa.org/#/alert][alert]] package. The default behavior can be configured via the
=org-wild-notifier-alert-time= variable. The notification type can be configured
via the [[https://github.com/jwiegley/alert#for-users][the alert package its configuration settings]]. Additional notification
times can be added using the [[https://github.com/akhramov/org-wild-notifier.el#configuration][:WILD_NOTIFIER_NOTIFY_BEFORE:]] keyword (*note* that
[[https://github.com/akhramov/org-wild-notifier.el/issues/46][this additionally requires a =SCHEDULED:= stamp)]]. Properties can be added with
=, i p=.

** GitHub support
To install GitHub related extensions like [[https://github.com/larstvei/ox-gfm][ox-gfm]] to export to GitHub
flavored markdown set the variable =org-enable-github-support= to =t=.
Expand Down
6 changes: 6 additions & 0 deletions layers/+emacs/org/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ path, one file per project is used (and the path is relative to
the project root). If it an absolute path, one global file is
used.")

(defvar org-enable-notifications nil
"If non-nil org-wild-notifier is configured.")

(defvar org-start-notification-daemon-on-startup nil
"If non-nil start the notification daemon on startup.")

(defvar org-enable-org-contacts-support nil
"If non-nil org-contacts is configured.")

Expand Down
9 changes: 9 additions & 0 deletions layers/+emacs/org/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
(ob :location built-in)
(org :location built-in)
(org-agenda :location built-in)
(org-wild-notifier
:toggle org-enable-notifications)
(org-contacts :location built-in
:toggle org-enable-org-contacts-support)
(org-vcard :toggle org-enable-org-contacts-support)
Expand Down Expand Up @@ -590,6 +592,13 @@ Headline^^ Visit entry^^ Filter^^ Da
(kbd "M-SPC") 'spacemacs/org-agenda-transient-state/body
(kbd "s-M-SPC") 'spacemacs/org-agenda-transient-state/body)))

(defun org/init-org-wild-notifier ()
(use-package org-wild-notifier
:defer t
:init
smile13241324 marked this conversation as resolved.
Show resolved Hide resolved
(when org-start-notification-daemon-on-startup
(org-wild-notifier-mode))))

(defun org/init-org-brain ()
(use-package org-brain
:defer t
Expand Down