help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: sound on emacs COCOA


From: Pascal J. Bourguignon
Subject: Re: sound on emacs COCOA
Date: Wed, 08 Dec 2010 15:37:13 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> I have the following version:
>
> GNU Emacs 23.2.1 (x86_64-apple-darwin10.3.0, NS apple-appkit-1038.29) of
> 2010-05-09 on linc
>
> I would like (just for fun) to have the typewriter sound when I type in
> emacs, maybe even with the "carriage return" sound ;) This version
> apparently doesn't support sound natively, so is there a nice way to
> play sounds with emacs on OSX?

You could run an external program to play a sound.  For example,
playsound, from macports.  http://www.macport.org

  (shell-command  "/opt/local/bin/playsound /usr/local/share/sounds/key.wav")


Notice that advices on a subr such as self-insert-command are not called
when the subr is called from C code.  So you'd have to use
pre-command-hook or post-command-hook.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.


reply via email to

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