emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Piotr Zielinski" <piotr.zielinski@gmail.com>
To: nicholas.dokos@hp.com
Cc: org-mode mailing list <emacs-orgmode@gnu.org>,
	Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: automatic reminders in Emacs as pop ups [was: Re: Survey results ]
Date: Sun, 27 Jan 2008 22:42:26 +0000	[thread overview]
Message-ID: <3c12eb8d0801271442s4cb090deu555fd6405ebdd291@mail.gmail.com> (raw)
In-Reply-To: <13222.1201471868@gamaville.dokosmarshall.org>

Also, debian/ubuntu package libnotify-bin contains a command-line
utility "notify-send" that you can use to display non-modal user
notifications, in the same way as popup.py.

Piotr

On Jan 27, 2008 10:11 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:
> One answer to question 5 on the survey was another question: automatic
> reminders in Emacs as pop ups?
>
> Here is how I do it, using very little machinery. As part of org-mode
> initialization, I add appointments from the diary to the agenda at
> startup and I also make org-agenda-redo rescan the appt list:
>
> -----------------------------------
> (require 'appt)
> (setq org-agenda-include-diary t)
> (setq appt-time-msg-list nil)
> (org-agenda-to-appt)
>
> (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)
> -----------------------------------
>
> I enable appt reminders, set the format to 'window and provide
> a display function that calls a python program to do the popup:
>
> -----------------------------------
> (progn
>   (appt-activate 1)
>   (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)
>     (call-process "/home/nick/bin/popup.py" nil 0 nil min-to-app msg new-time)))
> -----------------------------------
>
> Finally, the popup.py program is trivial:
>
> -----------------------------------
> #!/usr/bin/env python
>
> """ Simple dialog popup example similar to the GTK+ Tutorials one """
>
> import gtk
> import sys
>
> mins = sys.argv[1]
> text = ' '.join(sys.argv[2:])
> dialog = gtk.MessageDialog(None,
>                            gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
>                            gtk.MESSAGE_INFO, gtk.BUTTONS_OK,
>                            "Appt in %s mins: %s" % (mins, text))
> dialog.run()
> dialog.destroy()
> -----------------------------------
>
> HTH,
> Nick
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

  reply	other threads:[~2008-01-27 22:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-27 21:22 Survey results Carsten Dominik
2008-01-27 22:11 ` automatic reminders in Emacs as pop ups [was: Re: Survey results ] Nick Dokos
2008-01-27 22:42   ` Piotr Zielinski [this message]
2008-01-27 23:05 ` Survey results Leo
2008-01-27 23:21   ` Bastien Guerry

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=3c12eb8d0801271442s4cb090deu555fd6405ebdd291@mail.gmail.com \
    --to=piotr.zielinski@gmail.com \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicholas.dokos@hp.com \
    /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).