emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <esflists@gmail.com>
To: ma3434tt@openmailbox.org
Cc: emacs-orgmode@gnu.org
Subject: Re: org-mode alarms
Date: Sat, 25 Nov 2017 12:33:43 +0000	[thread overview]
Message-ID: <87lgiuy1ug.fsf@ucl.ac.uk> (raw)
In-Reply-To: 20171124203719.6FF184E002D@mta-1.openmailbox.og

[-- Attachment #1: Type: text/plain, Size: 1828 bytes --]

On Friday, 24 Nov 2017 at 20:37, ma3434tt@openmailbox.org wrote:
> What are good ways of setting up alarms for Deadlines and Scheduling
> in org-mode to integrate with Windows or GNU/Linux environments?

I use the following on Linux and it works very well.  Relies on there
being a notification daemon running (I use dunst as the easiest to
configure).

#+begin_src emacs-lisp
  ;; from Tassilo's blog:
  ;; and from RichardRiley's entry: http://www.emacswiki.org/emacs/OrgMode-OSD
  ;; and from Nick Dokos: http://article.gmane.org/gmane.emacs.orgmode/5271
  (message "ESF-ORG: setting up org->appt link")
  (require 'appt)
  (require 'notifications)
  (defun esf/notification-display (min-to-app new-time msg)
    (let (m delay)
      (setq m (string-to-number min-to-app)
            delay (if (<= m 0) 0 (* 1000 (- 20 m))))
      (notifications-notify :title "Agenda"
                            :body (format "%s\nIn %s minutes." msg min-to-app)
                            :app-name "emacs"
                            :app-icon "PATHTOICONS/emacs-icon.xpm"
                            :timeout delay)))
  (setq appt-display-format 'window)
  (setq appt-disp-window-function (function esf/notification-display))
  (setq appt-delete-window-function '(lambda ()))
  ;; Run once, activate and schedule refresh
  (run-at-time "5 minutes" 3600 'org-agenda-to-appt)
  (appt-activate t)
  (setq appt-time-msg-list nil)
  (defadvice  org-agenda-redo (after org-agenda-redo-add-appts)
    "Pressing `r' on the agenda will also add appointments."
    (progn 
      (setq appt-time-msg-list nil)
      (org-agenda-to-appt)))
  (ad-activate 'org-agenda-redo)
  (message "ESF-ORG: done setting up org->appt link")
#+end_src

-- 
: Eric S Fraga via Emacs 27.0.50, Org release_9.1.3-170-g51234f

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

      parent reply	other threads:[~2017-11-25 12:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-24 20:37 org-mode alarms ma3434tt
2017-11-24 21:09 ` Samuel Wales
2017-11-25 12:33 ` Eric S Fraga [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lgiuy1ug.fsf@ucl.ac.uk \
    --to=esflists@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ma3434tt@openmailbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).