emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: "Tory S. Anderson" <torys.anderson@gmail.com>
Cc: orgmode list <emacs-orgmode@gnu.org>
Subject: Re: Org-Timer has nice popups; how can I use them elsewhere?
Date: Mon, 23 Mar 2015 17:10:29 -0400	[thread overview]
Message-ID: <87y4mnmncq.fsf@gmail.com> (raw)
In-Reply-To: 87twxbfqvl.fsf@gmail.com

torys.anderson@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
    ;; 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))

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

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

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.


  reply	other threads:[~2015-03-23 21:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-23 19:36 Org-Timer has nice popups; how can I use them elsewhere? Tory S. Anderson
2015-03-23 21:10 ` Kyle Meyer [this message]
2015-03-24  7:11 ` Bernhard Pröll

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:

  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=87y4mnmncq.fsf@gmail.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=torys.anderson@gmail.com \


* 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


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).