I started taking piano lessons when I was ten to be able to achieve this, and now I did it: I’m using Emacs.
In this post I’ll describe my Emacs setup, emphasising accessibility related matters, as for the rest you can get far better advice elsewhere.
First things first. When I’m running OSX I trust the awesome Homebrew package manager. Install it first if you don’t have it (you should already, you really should).
Now for installing emacs. I prefere the latest emacs 24 available, so to get it, fire a terminal and run:
brew install emacs --with-cocoa --srgb
Wait a bit while your machine compiles all the universe… When over, run the following to get a link to emacs in your Applications folder (yes, you can put Emacs forever on your Dock):
brew linkapps emacs
And that’s it. Now for the accessibility stuff.
For Linux based systems you can install emacs along with emacspeak as explained in the next section.
Emacspeak - The Complete Audio Desktop speech-enables emacs and empowers visual impaired users to use it (or almost all of it). This is great software, it really is, at least if you are able to read a little LiSP and can live with its author’s notion of usability.
On Linux-based systems you can easily install Emacspeak with your favorite package manager. For instance in Debian or ubuntu ryb
sudo apt-get install emacspeak
You can also run it from source with almost no effort, given you have emacs installed, as explained bellow.
On the Apple world you are stuck with running from source. Thanks it’s easy. I based my setup on this how-to. You may take a look at it to get more details.
First make sure you have Xcode or its command line tools (not a bad IDE, Xcode). Moreover make sure you got Git installed.
Then you need to create a directory where to checkout emacspeak sources, and do the checkout (change as appropriate):
mkdir -p ~/srccd ~/srcgit clone git://github.com/tvraman/emacspeak.git
Now lets compile emacspeak:
cd emacspeakmac configmake emacspeak
Wait a bit for it to compile, it takes minutes.
In OS X, If you want fancy sound effects install sox, the mac speech server can use it or not, depending if it is installed. Honestly I don’t like it that much, but you can try:
brew install sox
Did you think it was over? No, at least if you are running OS X… You still need to write some emacs LiSP. Ok, you can just copy and past it :).
Create an Emacs customizations file at
~/.emacs.d/init.el. Put the bellow code there (read it and maybe change it, it’s easy and stuff are commented so you can experiment):
;; Emacspeak (setq load-path (cons "~/src/emacspeak/lisp" load-path)) (setq emacspeak-directory "~/src/emacspeak") (setq dtk-program "mac") (load-file "~/src/emacspeak/lisp/mac-voices.el") ;;; Voice rate: (setq mac-default-speech-rate 450) (load-file "~/src/emacspeak/lisp/emacspeak-setup.el") ;; Uncomment to try sound icons: ;(emacspeak-toggle-auditory-icons t) ;(emacspeak-sounds-select-theme "chimes-stereo/") (emacspeak-tts-startup-hook) ;; Mac keyboard (not emacspeak-related though) (setq default-input-method "MacOSX") (setq mac-command-modifier 'meta) (setq mac-option-modifier 'none)
This is just a code snippet, you can do just whatever you want. You can find my emacs customizations on Github. This configuration works both on OS X and Ubuntu, please take a look.
Note that for Ubunut the default emacspeak package is already configured to start speaking.
In Debian or ubuntu you can just run the
emacspeak command and have a speaking emacs environment working.
In OS X, go to your
/Applicationsfolder and find Emacs. Run it!
If you are a VoiceOver user, you will need to disable the quick navigation feature (press left+right arrows).
If you are new to emacspeak take a look at the manual. To get up and running with emacs the emacs tutorial is a good starting point, press
c-h t (
controlºh and then
I’ve been using this Emacs setup mostly for writing code. I’m learning go and along with go-mode, company-mode and company-go, the emacspeak-company has been providing me a great boost on productivity (read code completion) and a nice way to learn libraries and such. For Clojure, Cider also works very well with emacspeak and company-mode.
Emacs is useful for many more stuff further from code completion :), but not all IDEs are so accessible or even powerful, so the example.
Hope you enjoyed it.
- Many corrections in OS X instructions.
- Added instructions for Linux-based systems, mainly Debian and Ubuntu.
- Replace subversion references with Git, since emacspeak as moved to Github.