Re: [O] Org-Timer has nice popups; how can I use them elsewhere?

2015-03-24 Thread Bernhard Pröll

This blogpost demonstrates the usage of org-agenda-to-appt:

http://emacs-fu.blogspot.co.at/2009/11/showing-pop-ups.html

Instead of a sound I call notify-send for example.

Tory S. Anderson torys.ander...@gmail.com schrieb am Mon, 23. Mar 15:36:

So, orgmode timers have a nice popup when they run out; on my KDE, it's gentle 
GUI-box (not emacs) that nicely rises and falls. I would love to have this as 
how my appt reminders work, instead of the ugly minibuffer screeching; but 
looking through the org-timer code didn't give me any ideas. How can I achieve 
this?





[O] Org-Timer has nice popups; how can I use them elsewhere?

2015-03-23 Thread Tory S. Anderson
So, orgmode timers have a nice popup when they run out; on my KDE, it's gentle 
GUI-box (not emacs) that nicely rises and falls. I would love to have this as 
how my appt reminders work, instead of the ugly minibuffer screeching; but 
looking through the org-timer code didn't give me any ideas. How can I achieve 
this? 



Re: [O] Org-Timer has nice popups; how can I use them elsewhere?

2015-03-23 Thread Kyle Meyer
torys.ander...@gmail.com (Tory S. Anderson) wrote:
 So, orgmode timers have a nice popup when they run out; on my KDE,
 it's gentle GUI-box (not emacs) that nicely rises and falls. I would
 love to have this as how my appt reminders work, instead of the ugly
 minibuffer screeching; but looking through the org-timer code didn't
 give me any ideas. How can I achieve this?

org-timer uses org-notify for this (which is in org-clock.el).  It seems
that appointments, on the other hand, use appt.el.  Specifically,
appt-display-message is used to show the message.  Perhaps you could set
appt-disp-window-function to a function that uses org-notify.

#+begin_src elisp
  (defun org-notify-display-appt (min-to-app new-time appt-msg)
Use `org-notify' to display an appointment.
  You can use this for `appt-disp-window-function'.
  `appt-display-format' should be set to 'window, and
  `appt-delete-window-function' should be a function that does
  nothing.
;; FIXME: Update the message to incorporate MIN-TO-APP.  See
;; `appt-disp-window'.
(org-notify appt-msg))

  (setq appt-disp-window-function #'org-notify-display-appt)
  (setq appt-delete-window-function (lambda nil))
#+end_src

This seems to work when using appt-display-message directly.

#+begin_src elisp
  (appt-display-message test 1)
#+end_src

I think this should work with Org appointments, but I haven't tested it
(and I don't use appointment reminders myself, so perhaps I'm missing
something).  In any case, hopefully that gives you somewhere to start.

--
Kyle