emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Kyle Meyer
Subject: Re: [O] Org-Timer has nice popups; how can I use them elsewhere?
Date: Mon, 23 Mar 2015 17:10:29 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

address@hidden (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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]