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

Emacspeak in .emacs VS. emacspeak script



Based on information provided by Raman some time ago, I try to make sure
emacspeak is loaded as early as possible. Therefore I have a script in
/etc/emacs/site-start.d which sets things up. On my system, the init scripts in
this directory all start with a number in their name so that you have control
over the order in which they are loaded. On my system, the script is called
10speech.el. My script is a bit more complicated than the standard one as I
like to compile emacspeak for different versions of emacs, so if I run emacs
21, it loads emacspeak built with emacs 21 and if I run emacs 22, it loads
emacspeak built with emacs 22. 

The script is as follows

;;      Filename: /home/tcross/cvs/elisp/10speech.el
;; Creation Date: Sunday, 16 January 2005 01:38 PM EST
;; Last Modified: Saturday, 05 May 2007 06:48 PM EST
;;        Author: Tim Cross <tcross@xxxxxxxxxxx>
;;   Description: Emacspeak startup script
;;

(when (and (not noninteractive)
           (not (featurep 'emacspeak)))
  (let ((src-path (concat "/home/tcross/svn/" 
                          emacs-major-version 
                          "/emacspeak")))
    (add-to-list 'load-path src-path)
    (setenv "EMACSPEAK_DIR" src-path)
    (setq emacspeak-aumix-multichannel-capable-p t)
    (setq tts-default-speech-rate 90)
    (setq outloud-default-speech-rate 90)
    (setq emacspeak-vm-use-raman-settings nil)
    (add-hook 'emacspeak-startup-hook
              (lambda ()
                (dtk-set-rate tts-default-speech-rate 1)
                (dtk-interp-sync)
                (when (emacspeak-sounds-theme-p "cartoon-22k-mono/")
                  (emacspeak-sounds-select-theme "cartoon-22k-mono/"))
                (emacspeak-toggle-auditory-icons t)))
    (load-file (concat src-path "/lisp/emacspeak-setup.el"))))

One of the unfortunate side effects from using a script that uses emacs -q to
ensure emacspeak is loaded first and then load the personal .emacs file is that
it can prevent changes being made via customize from being saved. Note however,
that my approach only works well if your the only user on the system. If you
have multiple users and they run emacs, things will be broken - for one thing,
they won't have access to the sources, which for convenience, I keep in my home
area rather than installing into /usr/share/emacs/site-lisp or
/usr/local/share/emacs/site-lisp.

Tim

zkline@ writes:
 > Hiya,
 > 	A somewhat odd question, this--but it's one I haven't seen 
 > addressed.
 > What is everybody's personal opinion on putting a load statement in 
 > .emacs to bring up Emacspeak automatically?  This contrasted with the 
 > provided emacspeak script?  Is it better for the latter, or the former, 
 > or is there no difference?
 > I've noticed that I can't readily customize with the emacspeak 
 > script--for some reason customize refuses to save changes.
 > Thanks,
 > Zack.
 > 
 > -----------------------------------------------------------------------------
 > 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"
 > 

-- 
Tim Cross
tcross@xxxxxxxxxxx

There are two types of people in IT - those who do not manage what they 
understand and those who do not understand what they manage.

-----------------------------------------------------------------------------
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"



If you have questions about this archive or had problems using it, please send mail to:

priestdo@xxxxxxxxxxx No Soliciting!

Emacspeak List Archive | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998 | Pre 1998

Emacspeak Files | Emacspeak Blog