unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5711: 23.1; Customizing the bell
@ 2010-03-12 15:54 Eli Barzilay
  2010-03-12 17:14 ` Drew Adams
  2010-03-12 18:05 ` Stefan Monnier
  0 siblings, 2 replies; 5+ messages in thread
From: Eli Barzilay @ 2010-03-12 15:54 UTC (permalink / raw)
  To: 5711

I'd like for my Emacs to sometimes ring the bell as usual, sometimes
flash the screen, and sometimes play a sound.  Currently, I can change
it to do one of these things in the usual way, but I cannot write code
that determines what to do dynamically.  What's missing is a primitive
function to the "real" beep.  Something that would allow me to do
this:

  (setq ring-bell-function
        (lambda ()
          (if (foo)
            (call-process "aplay" nil 0 nil "foo.wav")
            (let ((visible-bell (bar))) (real-ding)))))

(I could do this in a bad way, by installing some hook that will set
`ring-bell-function' and `visible-bell' -- for example in an idle
timer, but the above would be much more convenient.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!







^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-15 19:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-12 15:54 bug#5711: 23.1; Customizing the bell Eli Barzilay
2010-03-12 17:14 ` Drew Adams
2010-03-12 18:05 ` Stefan Monnier
2010-03-12 19:20   ` Eli Barzilay
2010-03-15 19:39     ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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