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

Auditory Icon Function



Kalyan,

It seems to me you are not being terribly methodical about all of this
nor does it seem you are using much in the way of diagnostic
skill. I'm not trying to be rude, but rather trying to point out some
flaws in your approach. I'm hoping doing this will allow you to better
be able t solve your problems independently.

You wrote ..
>Hi Cheryl, Tom, and the rest of the list, 
>Cheryl: you had suggested I add 
>(setq toggle-auditory-icons t)

Using C-h v and C-h f would have shown you very quickly that there is
no variable called toggle-auditory-icons. Furthermore, you should have
observe that all variables and functions associated with emacspeak
either have the word emacspeak- or dtk- at the beginning. 

Using the apropos command and putting in something like auditory-icons
as the search string would have revealed -

emacspeak-toggle-auditory-icons is an interactive compiled Lisp function in `emacspeak-sounds'.
(emacspeak-toggle-auditory-icons &optional PREFIX)

Toggle use of auditory icons.
Optional interactive PREFIX arg toggles global value.

So, what you really need in your .emacs is
(emacspeak-toggle-auditory-icons t)

That is, a function call, not a variable setting, which is what setq does.

You further wrote....
> Tim, you had suggested after saving my choice
> emacspeak-native-auditory-icon-function for future sessions,
> I ought to try C-h v and see what the function is set to. As
> I had said in my last posting, if I restart emacspeak after
> saving my choice for future sessions and quitting, Emacspeak
> becomes useless. Any command at all yields "Cannot find sound
> file, no such file or directory". I have to quit (C-x C-c)
> and take out the line added by customize to my "custom-file"
> using plain emacs(no speak) and then restart emacspeak.

This should clearly indicate there is a problem of some sort in the
loading of your customization file. You should still try C-h v to see
what the value is as it may provide some more valuable clues. Knowing
you have been editing the customization section by hand makes me
suspect that your customization file is currupted - there is a reason
it clearly states 

;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.

As you are puting your customize section in its own file, I assume you
have checked to make sure there isn't part of an old one still in your
.emacs file? 

You further wrote....
> My custom-file certainly gets loaded: 1.  I have taken the -q
> flag out of the script which starts emacspeak; 2. My .emacs
> file starts off: ;-*- Mode: Emacs-Lisp -*- (setq custom-file
> "~/emacspeak.el") (load-file "emacspeak.el")

> In fact, if the file was not loaded, then the problem (not
> being able to do _anything_) would not sppear!

I'm afraid this is flawed thinking. It is quite possible there is an
error in your customize settings file which is preventing the whole
file from being loaded correctly. It is possible that such an error
does not show any obvious signs until the custmization line added for
the sound function is included - adding that customization may make
the problem obvious, but it in itself may not be the cause of the
error. It could be the error is the line above or below (or any other
place for that matter) where the real error is. This sort of thing is
common with emacs due to the global nature of functions and variables
- I have often spent days trying to rack down some difficult little
bug only to find it was something which seemed totally unrelated in
some custmoization file. Be very wary of making assumptions like this
as they can prevent you from seeing what the real cause of the problem
is. Also keep in mind that as nobody else has reported the problems
you are encountering, there is a very high likelyhood its your
installation or configuration which is the problem.

On another note, it is also VERY important to ensure that emacspeak is
loaded BEFORE any other custmoizations - this is why the emacspeak
script has the -q switch - the script ensure emacspeak is loaded
before your .emacs. However, while this was adequate in older Linux
distributions, this is not always the case with newer ones. Older
distributions use to install a very vanilla emacs with no site-init
scripts or site-init.d directories of initialization scripts. However,
newer relases are now using various mechanisms to handle add-on
packages and their customization. Therefore, you now need to take a
lot more care to ensure emacspeak is loaded first. 

On many systems, there is an /etc/emacs/site-lisp.el and
/etc/emacs/site-lisp.d directory. The site-lisp.el file usually does
some initial setup and then runs the *.el files in the site-lisp.d
directory. These are all executed BEFORE your .emacs is
loaded. Therefore, it is now sometimes a good idea to put an emacspeak
specific initialization file into the site-lisp.d directory. Often the
scripts in this directory are similar to init.d scripts in that they
start with two digits. These digits are used to control the order in
which files are run. This means you can put something like
00emacspeak.el into this directory which contains the eamcspeak
startup (and possibly some initialization code) into this file and be
able to ensure it is run first. I posted an example file to this list
back at the beginning of the year which you could find in the archives.

Finally, you wrote...
> Tim: your hunch that emacs is not sound enabled is to me, at
> least, demonstrably false, since emacspeak character, word
> echo etc and auditory icons, start-up icon are playing. It is
> simply that emacspeak can't figure out where a cetain sound
> file is.

This statement is so far off the mark that I'm beginning to dispair
at how little you understand about how emacspeak works and what is
actually happening when you start up.

Firstly, character, word echo etc has ABSOLUTELY NOTHING AT ALL to do
with emacs having or not having native sound support. The same goes for
the playing of the emacspeak icon at startup. All of these functions
are handled completely outside of emacs. The word, character etc echo
are all handled by the speech server. I beleive in your case, this is
flite. The emacspeak auditory icon is a sound file which is played by
either directly cat'ing it to the audio device or via a script such as
the play script. Again, nothing to do with native sound support within
emacs. 

The whole idea of native sound support is that emacs can play sounds
without having to resort to external programs. For this to work, the
support must be compiled into emacs when it is built and for that to
work, you must have the necessary sound playing libraries which emacs
needs to link with installed. 

In previous e-mails, I asked if you have a multi-channel capable sound
card. Note that if you don't, then all of this effort is a total waste
of time. If your sound card is not multi-channel capable, then you
cannot use both a software speech synthesizer and auditory icons at
the same time unless you go the midi option using stdiosynth. This is
because there will be too much contention for access to your sound
card if its just a single channel card - flite needs it and whatever
method used to play *.au files will also need it (emacs, play,
whatever) and one of them is going to loose - worse yet, you won't be
able to predict which will loose, so sometimes you may get icons and
other times you may get speech and in the worst case, you won't get
anything at all. 

Also, I suspect the error message you are getting about sound file not
being found could be the error generated by emacs when you don't have
the necessary sound support libraries or sound has not been compiled
in. Have you read the emacs NEWS and PROBLEMS files about native sound
support? Have you established independently of emacspeak that native
sound support is compiled in and working? 

Here is the approach I would follow

1. Assumeing you do have a multi-channel capable sound card, establish
   that native sound support is available and working under vanilla
   emacs without emacspeak loaded.

2. Start emacs with emacspeak, but without any of your customization
   files being loaded. 

3. Open your .emacs file and evaluate it and see
   if you get any errors. You can try evaluating the whole buffer, but
   it may be better just to evaluate in smaller chunks to make sure
   thee are no errors.

4. Start your customizations from scratch. Start by setting the
   auditory icon function customization, exiting and then
   restarting. There should be only one item in your customization
   section and if it still causes an error, then turn on debug on
   error and get the backtrace - see if it gives you any clues. If you
   need help, post the backtrace and your customization file to the
   list.

Tim

>>>>> "Kalyan" == Kalyan Mukherjea <kalyanm@xxxxxxxxxxx> writes:

 Kalyan> Hi Cheryl, Tom, and the rest of the list, Cheryl: you had
 Kalyan> suggested I add (setq toggle-auditory-icons t)

 Kalyan> But this leads to the message Void Function definition at
 Kalyan> start-up.

 Kalyan> Tim, you had suggested after saving my choice
 Kalyan> emacspeak-native-auditory-icon-function for future sessions,
 Kalyan> I ought to try C-h v and see what the function is set to. As
 Kalyan> I had said in my last posting, if I restart emacspeak after
 Kalyan> saving my choice for future sessions and quitting, Emacspeak
 Kalyan> becomes useless. Any command at all yields "Cannot find sound
 Kalyan> file, no such file or directory". I have to quit (C-x C-c)
 Kalyan> and take out the line added by customize to my "custom-file"
 Kalyan> using plain emacs(no speak) and then restart emacspeak.

 Kalyan> My custom-file certainly gets loaded: 1.  I have taken the -q
 Kalyan> flag out of the script which starts emacspeak; 2. My .emacs
 Kalyan> file starts off: ;-*- Mode: Emacs-Lisp -*- (setq custom-file
 Kalyan> "~/emacspeak.el") (load-file "emacspeak.el")

 Kalyan> In fact, if the file was not loaded, then the problem (not
 Kalyan> being able to do _anything_) would not sppear!

 Kalyan> Tim: your hunch that emacs is not sound enabled is to me, at
 Kalyan> least, demonstrably false, since emacspeak character, word
 Kalyan> echo etc and auditory icons, start-up icon are playing. It is
 Kalyan> simply that emacspeak can't figure out where a cetain sound
 Kalyan> file is.

 Kalyan> I had mentioned that my emacspeak got installed in
 Kalyan> /usr/share/emacs/site-lisp (there was no directory emacs
 Kalyan> under /usr/share before I built emacspeak) while my emacs
 Kalyan> lives in /usr/local/share/emacs. Could this cause a problem?
 Kalyan> I could try to reinstall emacspeak forcing it to install in
 Kalyan> /usr/local/share/emacs/site-lisp but then I recall the
 Kalyan> engineers' maxim: "If it ain't broken, don't fix it".

 Kalyan> The troble is that I am not sure if emacspeak is broken or
 Kalyan> not!

 Kalyan> Further ideas will be gratefully received.  Cheers.  Kalyan

 Kalyan> -----------------------------------------------------------------------------
 Kalyan> To unsubscribe from the emacspeak list or change your address
 Kalyan> on the emacspeak list send mail to
 Kalyan> "emacspeak-request@xxxxxxxxxxx" with a subject of
 Kalyan> "unsubscribe" or "help"

-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
subject of "unsubscribe" or "help"


Emacspeak Files | Subscribe | Unsubscribe | Search