From: Rick Moynihan <rick@calicojack.co.uk>
To: Alex Ott <alexott@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: MacOSX: Notifications with Growl
Date: Fri, 07 Nov 2008 11:25:54 +0000 [thread overview]
Message-ID: <491425C2.4020706@calicojack.co.uk> (raw)
In-Reply-To: <87bpwwvmgr.fsf@gmail.com>
Alex Ott wrote:
> Hi all
>
> I wrote small note about show notifications with Growl under Mac OS X.
> This could be useful when using org-mode. Note is could be found on my site
> http://xtalk.msk.su/~ott/en/writings/EmacsMacOSXAndGrowl.html
Thanks for this, this'll prove handy at work. I took the liberty of
simplifying the elisp a little. This version doesn't create a temporary
file, and instead uses a shell HEREDOC.
(defun output-to-growl (msg)
(shell-command (format "osascript <<ENDSCRIPT
tell application \"GrowlHelperApp\"
notify with name \"Emacs Notification\" title \"Emacs alert\" \
description «data utxt%s» as Unicode text \
application name \"Emacs\"
end tell
ENDSCRIPT" (osd-text-to-utf-16-hex msg))))
(defun osd-text-to-utf-16-hex (text)
(let* ((utext (encode-coding-string text 'utf-16))
(ltext (string-to-list utext)))
(apply #'concat
(mapcar (lambda (x) (format "%02x" x)) ltext))))
R.
next prev parent reply other threads:[~2008-11-07 11:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-03 15:49 MacOSX: Notifications with Growl Alex Ott
2008-11-03 17:22 ` Christopher Suckling
2008-11-07 11:25 ` Rick Moynihan [this message]
2008-11-07 16:10 ` Jonathan Arkell
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=491425C2.4020706@calicojack.co.uk \
--to=rick@calicojack.co.uk \
--cc=alexott@gmail.com \
--cc=emacs-orgmode@gnu.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.