Send jabber message as appt reminders

This commit is contained in:
Tom Willemsen 2012-12-06 22:40:43 +01:00
parent 777c6413a8
commit 614fcffbb7
3 changed files with 11 additions and 0 deletions

View file

@ -140,6 +140,7 @@
(setq-default tab-width 4) (setq-default tab-width 4)
(setq-default truncate-lines t) (setq-default truncate-lines t)
(setq appt-disp-window-function #'oni:appt-display-window-and-jabber)
(setq appt-display-diary nil) (setq appt-display-diary nil)
(setq auto-mode-case-fold nil) (setq auto-mode-case-fold nil)
(setq auto-save-file-name-transforms (setq auto-save-file-name-transforms

View file

@ -25,6 +25,7 @@
;;; Code: ;;; Code:
(autoload 'notifications-notify "notifications") (autoload 'notifications-notify "notifications")
(autoload 'jabber-send-message "jabber-chat")
(defmacro oni:define-mailbox (name email &optional signature longname) (defmacro oni:define-mailbox (name email &optional signature longname)
"Define a mailbox function for mailbox NAME with address EMAIL. "Define a mailbox function for mailbox NAME with address EMAIL.
@ -72,6 +73,13 @@ DOT are intentionally being skipped."
(shell-command (shell-command
(concat "make -C " dom-dir " TAGS >/dev/null 2>&1"))))) (concat "make -C " dom-dir " TAGS >/dev/null 2>&1")))))
(defun oni:appt-display-window-and-jabber (min-to-app new-time appt-msg)
"Send a message to my phone jabber account."
(jabber-send-message (car jabber-connections) "phone@ryuslash.org"
nil (format "%s%s (in %s minutes)"
new-time appt-msg min-to-app) nil)
(appt-disp-window min-to-app new-time appt-msg))
(defun oni:before-save-func () (defun oni:before-save-func ()
"Function for `before-save-hook'." "Function for `before-save-hook'."
(if (eq major-mode 'html-mode) (if (eq major-mode 'html-mode)

View file

@ -93,6 +93,8 @@
(setq org-use-fast-todo-selection t) (setq org-use-fast-todo-selection t)
(setq org-use-property-inheritance '("slug")) (setq org-use-property-inheritance '("slug"))
(add-hook 'org-agenda-mode-hook 'org-agenda-to-appt)
(add-to-list 'org-modules 'habit) (add-to-list 'org-modules 'habit)
(org-indent-mode t) (org-indent-mode t)