GNU bug report logs - #5711
23.1; Customizing the bell

Previous Next

Package: emacs;

Reported by: Eli Barzilay <eli <at> barzilay.org>

Date: Fri, 12 Mar 2010 16:18:01 UTC

Severity: wishlist

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5711 in the body.
You can then email your comments to 5711 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5711; Package emacs. (Fri, 12 Mar 2010 16:18:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eli Barzilay <eli <at> barzilay.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 12 Mar 2010 16:18:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eli Barzilay <eli <at> barzilay.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1; Customizing the bell
Date: Fri, 12 Mar 2010 10:54:49 -0500
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!





Severity set to 'wishlist' from 'normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 12 Mar 2010 17:08:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5711; Package emacs. (Fri, 12 Mar 2010 17:16:02 GMT) Full text and rfc822 format available.

Message #10 received at 5711 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Eli Barzilay'" <eli <at> barzilay.org>, <5711 <at> debbugs.gnu.org>
Subject: RE: bug#5711: 23.1; Customizing the bell
Date: Fri, 12 Mar 2010 09:14:53 -0800
I'd like it to sing the error message using an encrypted vocabulary, with 4-part
harmony and with steel-drum backup.

Sorry; couldn't resist. No, your request is not a silly one.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5711; Package emacs. (Fri, 12 Mar 2010 18:06:01 GMT) Full text and rfc822 format available.

Message #13 received at 5711 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Eli Barzilay <eli <at> barzilay.org>
Cc: 5711 <at> debbugs.gnu.org
Subject: Re: bug#5711: 23.1; Customizing the bell
Date: Fri, 12 Mar 2010 13:05:29 -0500
>   (setq ring-bell-function
>         (lambda ()
>           (if (foo)
>             (call-process "aplay" nil 0 nil "foo.wav")
>             (let ((visible-bell (bar))) (real-ding)))))

Doesn't

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

do the trick?


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5711; Package emacs. (Fri, 12 Mar 2010 19:21:01 GMT) Full text and rfc822 format available.

Message #16 received at 5711 <at> debbugs.gnu.org (full text, mbox):

From: Eli Barzilay <eli <at> barzilay.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 5711 <at> debbugs.gnu.org
Subject: Re: bug#5711: 23.1; Customizing the bell
Date: Fri, 12 Mar 2010 14:20:18 -0500
On Mar 12, Stefan Monnier wrote:
> >   (setq ring-bell-function
> >         (lambda ()
> >           (if (foo)
> >             (call-process "aplay" nil 0 nil "foo.wav")
> >             (let ((visible-bell (bar))) (real-ding)))))
> 
> Doesn't
> 
> (setq ring-bell-function
>       (lambda ()
>         (if (foo)
>             (call-process "aplay" nil 0 nil "foo.wav")
>           (let ((visible-bell (bar)) (ring-bell-function nil)) (ding)))))
> 
> do the trick?

Ah, you're right -- sorry.  Fine to close this bug then.  BTW, a
better answer would be:

  (defun real-ding () (let ((ring-bell-function nil)) (ding)))

The only thing that might make sense is to show this in the docs as a
way to do this kind of thing (but I don't have any strong opinion
about that).

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




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Mon, 15 Mar 2010 19:40:03 GMT) Full text and rfc822 format available.

Notification sent to Eli Barzilay <eli <at> barzilay.org>:
bug acknowledged by developer. (Mon, 15 Mar 2010 19:40:03 GMT) Full text and rfc822 format available.

Message #21 received at 5711-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 5711-done <at> debbugs.gnu.org
Subject: Re: bug#5711: 23.1; Customizing the bell
Date: Mon, 15 Mar 2010 15:39:02 -0400
Eli Barzilay wrote:

> Ah, you're right -- sorry.  Fine to close this bug then.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 13 Apr 2010 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 71 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.