From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: Ding doing nothing Date: Sun, 11 Jan 2015 14:27:48 +0100 Message-ID: <87387hphuz.fsf@wmi.amu.edu.pl> References: <87mw5r3gd3.fsf@turtle.gmx.de> <87lhlbyc0a.fsf@wmi.amu.edu.pl> <87oaq7wtkk.fsf@wmi.amu.edu.pl> <20150109142211514786476@bob.proulx.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1420982916 29909 80.91.229.3 (11 Jan 2015 13:28:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Jan 2015 13:28:36 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 11 14:28:31 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YAIZD-0005qL-HP for geh-help-gnu-emacs@m.gmane.org; Sun, 11 Jan 2015 14:28:31 +0100 Original-Received: from localhost ([::1]:58322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAIZC-0008Jo-3N for geh-help-gnu-emacs@m.gmane.org; Sun, 11 Jan 2015 08:28:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAIYu-0008J8-6D for help-gnu-emacs@gnu.org; Sun, 11 Jan 2015 08:28:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YAIYp-0002I3-Jk for help-gnu-emacs@gnu.org; Sun, 11 Jan 2015 08:28:12 -0500 Original-Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:48881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAIYp-0002Ht-7i for help-gnu-emacs@gnu.org; Sun, 11 Jan 2015 08:28:07 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id 68C90474F1 for ; Sun, 11 Jan 2015 14:28:05 +0100 (CET) Original-Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7fxm7AIyrhta for ; Sun, 11 Jan 2015 14:28:05 +0100 (CET) Original-Received: from localhost (117-116.echostar.pl [213.156.117.116]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id C8986474EF for ; Sun, 11 Jan 2015 14:28:04 +0100 (CET) In-reply-to: <20150109142211514786476@bob.proulx.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:808:114:2::50 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101993 Archived-At: On 2015-01-09, at 22:47, Bob Proulx wrote: > Marcin Borkowski wrote: >> Well, it does not... Maybe I should just live with it (and turn the >> "visual bell" on). > > There are a lot of reasons why the tty bell might not ring on modern > computer systems. Sven already noted that it uses the PC speaker. > Usually that has really harsh binary output audio suitable only for > very limited noise making. A lot of modern computers don't even have > a PC speaker these days. It is considered obsolescent hardware having > been replaced by a sound card with speakers. On several of my > computers there isn't any PC speaker present. Therefore on those > systems there can't be a traditional tty bell that rings through the > PC speaker. > > In addition to the older Linux kernel module pcspkr there is a newer > module that uses snd_pcsp. On my system in order to prevent the tty > bell I have to blacklist both of those kernel modules. > > On my Debian Sid system the tty bell is routed through the sound card > speakers. This uses ALSA. There is an alsa mixer control for Beep. > In the alsa control it may be muted or unmuted. Try looking for that > control. > > amixer scontrols > amixer get Beep > amixer set Beep 50% unmute > > It is possible that you have PulseAudio installed which will override > all of the audio controls. I won't say anything more other than on my > system in order to get a working sound system I need to remove PA. YMMV. > > So first I would really check that your system has the hardware > capability for ringing the terminal bell. It might not. > > On a system with a working terminal bell the following will ring the > bell in a simple and automatable way. It basically emits ASCII > character 7 the BEL character. In Emacs every C-g (control-g is the > ascii 0x7 BEL character) rings the bell. But this can be done in a > loop while testing and debugging. > > printf "\a" > while sleep 1; do printf "Ding! \a\n"; done > > As for looking at the bell configuration if you are running X then > check 'xset q' for bell information. It might be disabled in X. > On my system: > > $ xset q | grep bell > bell percent: 50 bell pitch: 400 bell duration: 100 > > You mentioned visual bell. If you are using screen then it also > interprets the BEL character too. If you are using ssh to a remote > system and screen there then it is still the local terminal that > handles the tty bell, if it receives the ASCII BEL 7 character. > > I have seen BIOS configurations that allow for enabling and disabling > the PC Speaker. > > There are so many ways for it to be blocked that it is hard to have a > single cookbook way of controlling every possibilty. All I can do is > suggest to get to the lowest level available for debugging and then to > wish you good luck. > > Good Luck! > Bob Thanks for your input! Somehow it started to work. Strange. Anyway, would it be a good idea to redefine (ding) to e.g. fire aplay with some wav file? I mean: would this work? I guess that if some code invokes (ding), it would; but what if that code is byte-compiled, for instance? Should it then be compiled again? Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University