all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* No sound with Emacs 23.1.1 on Ubuntu 9.10
@ 2009-12-30 17:56 Joe Casadonte
  2009-12-31 23:03 ` B. T. Raven
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Joe Casadonte @ 2009-12-30 17:56 UTC (permalink / raw
  To: help-gnu-emacs

I installed Emacs 23.1.1 via apt-get under Ubuntu 9.10, and it doesn't
generate any sounds (e.g. C-g does not make it go "beep").  Sound does
work on the computer (e.g. CDs and YouTube and such).  Any ideas?
Thanks!

--
Regards,


joe
Joe Casadonte
jcasadonte@northbound-train.com


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

* Re: No sound with Emacs 23.1.1 on Ubuntu 9.10
  2009-12-30 17:56 No sound with Emacs 23.1.1 on Ubuntu 9.10 Joe Casadonte
@ 2009-12-31 23:03 ` B. T. Raven
  2010-01-01 20:20   ` Joe Casadonte
  2010-01-01  4:52 ` Óscar Fuentes
       [not found] ` <mailman.508.1262321580.18930.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 10+ messages in thread
From: B. T. Raven @ 2009-12-31 23:03 UTC (permalink / raw
  To: help-gnu-emacs

Joe Casadonte wrote:
> I installed Emacs 23.1.1 via apt-get under Ubuntu 9.10, and it doesn't
> generate any sounds (e.g. C-g does not make it go "beep").  Sound does
> work on the computer (e.g. CDs and YouTube and such).  Any ideas?
> Thanks!
> 
> --
> Regards,
> 
> 
> joe


Look at variable visible-bell via C-h v. If this is non-nil you might
get a frame-flash instead of a ding.

> Joe Casadonte
> jcasadonte@northbound-train.com


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

* Re: No sound with Emacs 23.1.1 on Ubuntu 9.10
  2009-12-30 17:56 No sound with Emacs 23.1.1 on Ubuntu 9.10 Joe Casadonte
  2009-12-31 23:03 ` B. T. Raven
@ 2010-01-01  4:52 ` Óscar Fuentes
       [not found] ` <mailman.508.1262321580.18930.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 10+ messages in thread
From: Óscar Fuentes @ 2010-01-01  4:52 UTC (permalink / raw
  To: help-gnu-emacs

Joe Casadonte <jcasadonte@northbound-train.com> writes:

> I installed Emacs 23.1.1 via apt-get under Ubuntu 9.10, and it doesn't
> generate any sounds (e.g. C-g does not make it go "beep").  Sound does
> work on the computer (e.g. CDs and YouTube and such).  Any ideas?

IIRC, there was a problem with (K)ubuntu 9.10 and the PC buzzer, because
now it is emulated by default. IIRC again, you need some alsamixer
tweak. A quick Internet seach for "alsamixer ubuntu beep pc" returned
this:

http://friendlytechninja.com/2009/10/16/howto-fix-alert-system-beep-in-ubuntu-9-10-karmic-koala/

HTH

-- 
Óscar





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

* Re: No sound with Emacs 23.1.1 on Ubuntu 9.10
  2009-12-31 23:03 ` B. T. Raven
@ 2010-01-01 20:20   ` Joe Casadonte
  2010-01-02  0:41     ` B. T. Raven
  0 siblings, 1 reply; 10+ messages in thread
From: Joe Casadonte @ 2010-01-01 20:20 UTC (permalink / raw
  To: help-gnu-emacs

On Dec 31 2009, 6:03 pm, "B. T. Raven" <ni...@nihilo.net> wrote:

> Look at variable visible-bell via C-h v. If this is non-nil you might
> get a frame-flash instead of a ding.

Thanks, but it's 'nil'


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

* Re: No sound with Emacs 23.1.1 on Ubuntu 9.10
       [not found] ` <mailman.508.1262321580.18930.help-gnu-emacs@gnu.org>
@ 2010-01-01 20:21   ` Joe Casadonte
  0 siblings, 0 replies; 10+ messages in thread
From: Joe Casadonte @ 2010-01-01 20:21 UTC (permalink / raw
  To: help-gnu-emacs

On Dec 31 2009, 11:52 pm, Óscar Fuentes <o...@wanadoo.es> wrote:

> http://friendlytechninja.com/2009/10/16/howto-fix-alert-system-beep-i...

That's like the opposite problem; I can't get mine to turn on, they
can get theirs to turn off :)


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

* Re: No sound with Emacs 23.1.1 on Ubuntu 9.10
  2010-01-01 20:20   ` Joe Casadonte
@ 2010-01-02  0:41     ` B. T. Raven
  2010-01-03  2:24       ` Joe Casadonte
  0 siblings, 1 reply; 10+ messages in thread
From: B. T. Raven @ 2010-01-02  0:41 UTC (permalink / raw
  To: help-gnu-emacs

Joe Casadonte wrote:
> On Dec 31 2009, 6:03 pm, "B. T. Raven" <ni...@nihilo.net> wrote:
> 
>> Look at variable visible-bell via C-h v. If this is non-nil you might
>> get a frame-flash instead of a ding.
> 
> Thanks, but it's 'nil'

If you position cursor after

(ding)

in *scratch* and evaluate with

C-x C-e do you hear anything?



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

* Re: No sound with Emacs 23.1.1 on Ubuntu 9.10
  2010-01-02  0:41     ` B. T. Raven
@ 2010-01-03  2:24       ` Joe Casadonte
  2010-01-04  0:17         ` B. T. Raven
  2010-01-18 13:47         ` Joe Casadonte
  0 siblings, 2 replies; 10+ messages in thread
From: Joe Casadonte @ 2010-01-03  2:24 UTC (permalink / raw
  To: help-gnu-emacs

On Jan 1, 7:41 pm, "B. T. Raven" <ni...@nihilo.net> wrote:

> If you position cursor after
>
> (ding)
>
> in *scratch* and evaluate with
>
> C-x C-e do you hear anything?

Sadly -- nothing.


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

* Re: No sound with Emacs 23.1.1 on Ubuntu 9.10
  2010-01-03  2:24       ` Joe Casadonte
@ 2010-01-04  0:17         ` B. T. Raven
       [not found]           ` <n_KdnTP2Us8JptzWnZ2dnUVZ_hydnZ2d@sysmatrix.net>
  2010-01-18 13:47         ` Joe Casadonte
  1 sibling, 1 reply; 10+ messages in thread
From: B. T. Raven @ 2010-01-04  0:17 UTC (permalink / raw
  To: help-gnu-emacs

Joe Casadonte wrote:
> On Jan 1, 7:41 pm, "B. T. Raven" <ni...@nihilo.net> wrote:
> 
>> If you position cursor after
>>
>> (ding)
>>
>> in *scratch* and evaluate with
>>
>> C-x C-e do you hear anything?
> 
> Sadly -- nothing.

Maybe your Ubuntu build didn't have this in term.c for some reason:

DEFVAR_LISP ("ring-bell-function", &Vring_bell_function,
    doc: /* Non-nil means call this function to ring the bell.
The function should accept no arguments.  */);
  Vring_bell_function = Qnil;

If this variable names some function then maybe the problem is with that
function.

I tried to write a countdown timer in elisp once but could't get the
bell, C-g or char 7, to work in a loop; it would only ring once when the
counter went to zero. This is all it does now:

(defun alarm-message (text)
  "Pop up alarm message"
   (ding)
   (message-box text))


(defun alarm ()
  "Set an alarm.
The time format is the same accepted by `run-at-time'.  For
example \"11:30am\"."
  (interactive)
  (let ((time (read-string "Time: "))
        (text "Get lead out!"))
     (run-at-time time nil 'alarm-message text)))

Does any of you know how to get (ding) to work in a loop that breaks
when a key is pressed?

Ed




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

* Re: No sound with Emacs 23.1.1 on Ubuntu 9.10
       [not found]           ` <n_KdnTP2Us8JptzWnZ2dnUVZ_hydnZ2d@sysmatrix.net>
@ 2010-01-04 18:03             ` B. T. Raven
  0 siblings, 0 replies; 10+ messages in thread
From: B. T. Raven @ 2010-01-04 18:03 UTC (permalink / raw
  To: help-gnu-emacs

B. T. Raven wrote:
> B. T. Raven wrote:
>> Joe Casadonte wrote:
>>> On Jan 1, 7:41 pm, "B. T. Raven" <ni...@nihilo.net> wrote:
>>>
>>>> If you position cursor after
>>>>
>>>> (ding)
>>>>
>>>> in *scratch* and evaluate with
>>>>
>>>> C-x C-e do you hear anything?
>>> Sadly -- nothing.
>> Maybe your Ubuntu build didn't have this in term.c for some reason:
>>
>> DEFVAR_LISP ("ring-bell-function", &Vring_bell_function,
>>     doc: /* Non-nil means call this function to ring the bell.
>> The function should accept no arguments.  */);
>>   Vring_bell_function = Qnil;
>>
>> If this variable names some function then maybe the problem is with that
>> function.
>>
>> I tried to write a countdown timer in elisp once but could't get the
>> bell, C-g or char 7, to work in a loop; it would only ring once when the
>> counter went to zero. This is all it does now:
>>
>> (defun alarm-message (text)
>>   "Pop up alarm message"
>>    (ding)
>>    (message-box text))
> 
> 
> This puts ding in a 30 per minute loop that can't be broken out of:
> 
> (defun alarm-message (text)
>   "Pop up alarm message"
>    (ding)
>    (read-event)
> (while (waiting-for-user-input-p)
>    (sleep-for 2)
>    (ding)
> )
> (message-box text)
> )
> 
> I had to kill the emacs process to escape from this. What's going on here?
> 
> 
>>
>> (defun alarm ()
>>   "Set an alarm.
>> The time format is the same accepted by `run-at-time'.  For
>> example \"11:30am\"."
>>   (interactive)
>>   (let ((time (read-string "Time: "))
>>         (text "Get lead out!"))
>>      (run-at-time time nil 'alarm-message text)))
>>
>> Does any of you know how to get (ding) to work in a loop that breaks
>> when a key is pressed?
>>
>> Ed
>>
>>


Replacing alarm-message with this sort of works, in case anyone is
interested:

(defun alarm-message (text)
  "Pop up alarm message"
  (while (not (read-char nil nil 1))
   (sleep-for 2)
   (ding)
  )
 (message-box text)
)

The number of more elegant solutions is probably legion.



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

* Re: No sound with Emacs 23.1.1 on Ubuntu 9.10
  2010-01-03  2:24       ` Joe Casadonte
  2010-01-04  0:17         ` B. T. Raven
@ 2010-01-18 13:47         ` Joe Casadonte
  1 sibling, 0 replies; 10+ messages in thread
From: Joe Casadonte @ 2010-01-18 13:47 UTC (permalink / raw
  To: help-gnu-emacs

Evidently in 9.10 the PC speaker is disabled by default:

   https://bugs.launchpad.net/ubuntu/karmic/+source/linux/+bug/77010

Why they "solved" this issue by disabling the speaker is beyond me;
like many others, I feel the real solution is to let Gnome deal with
the sound. That would be a way better default behavior, IMHO.

So, to get the behavior I desired (turn on the beep but replace it
with a gentler sound) I did the following:

Edit the /etc/pulse/default.pa file and add the following lines at the
bottom of the file:

   load-sample drip-ogg /usr/share/sounds/gnome/default/alerts/
drip.ogg
   load-module module-x11-bell sample=drip-ogg

Then add the following lines to my ~/.bashrc file:

   xset b on
   pactl load-module module-x11-bell sample=drip-ogg >/dev/null

The result is a pleasing system alert sound that's available pre-
login, and the same pleasing system sound available post-login, but
only after I've brought up a terminal window (which I nearly always do
first thing anyway).

The "xset b on" turns the alert sound back on, and the "pactl" line
replaces it with a more pleasing sound. I haven't yet figured out how
to do the "xset" bit globally (putting it in /etc/X11/xinit/xinitrc
didn't work for me), nor have I figured out a way to do without it
(simply commenting out the "pcspkr" line in /etc/modprobe.d/
blacklist.conf didn't do it).

Occasionally I get both the system beep and my more pleasing sound
both happening at once; when it does happen, simply re-running the
"pactl" line fixes the issue (which I can do by opening up another
terminal window). It's not an ideal solution, but it works well enough
for me.  I hope this helps someone else!


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

end of thread, other threads:[~2010-01-18 13:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-30 17:56 No sound with Emacs 23.1.1 on Ubuntu 9.10 Joe Casadonte
2009-12-31 23:03 ` B. T. Raven
2010-01-01 20:20   ` Joe Casadonte
2010-01-02  0:41     ` B. T. Raven
2010-01-03  2:24       ` Joe Casadonte
2010-01-04  0:17         ` B. T. Raven
     [not found]           ` <n_KdnTP2Us8JptzWnZ2dnUVZ_hydnZ2d@sysmatrix.net>
2010-01-04 18:03             ` B. T. Raven
2010-01-18 13:47         ` Joe Casadonte
2010-01-01  4:52 ` Óscar Fuentes
     [not found] ` <mailman.508.1262321580.18930.help-gnu-emacs@gnu.org>
2010-01-01 20:21   ` Joe Casadonte

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.