One little hiccup with running Emacs on Windows is that, by default, the spell checker does not work. The reason is simple enough, Emacs relies on an external program called ispell to do the spell checking work, and ispell is typically not installed on Windows.
Installing ispell isn't too difficult, though it's not trivial either. The first requirement is that Cygwin needs to be installed, or at least, the cygwin1.dll shared library needs to be somewhere accessible. Once Cygwin is installed, you can download ispell. See the README file for instructions. Do make sure to follow the instructions! Especially, do not forget to set the variable DICTDIR. It's easy with the instructions, but skipping a step can result in odd errors.
Afterwards, ispell can be invoked on the current Emacs buffer with the simple command M-x ispell.
Showing posts with label Emacs. Show all posts
Showing posts with label Emacs. Show all posts
Tuesday, January 02, 2007
Monday, December 04, 2006
Emacs Tip: No Tabs Whatsoever
I my last post, I tried to describe how to get rid of tabs in Python mode, and managed to not get it quite right. The previous command, python-guess-indent, really only turns off the indent guessing, but doesn't actually remove the tabs. It just happens that tabs are only used for every other indentation level. I had only tested the first level and missed that the tabs are still inserted later in.
So, to get rid of all tabs all the time, add the line (setq-default indent-tabs-mode nil) to your .emacs file. This turns off the replacement of spaces with tabs globally. Hooray! tabs are gone.
So, to get rid of all tabs all the time, add the line (setq-default indent-tabs-mode nil) to your .emacs file. This turns off the replacement of spaces with tabs globally. Hooray! tabs are gone.
Friday, December 01, 2006
Emacs Tip: Troublesome Tabs in Python Mode
The Python mode in Emacs 22 (using python.el, not the python-mode.el from XEmacs) has a nice feature of deducing the spacing style based on the spacing and tabs that already exist in the file. Most of the time, it works really well, but, it does make getting rid of large tabs difficult. So, if you're having problems getting rid of tabs, simply toggle the indent guessing mode with the command python-guess-indent and just use the default Python mode settings for indentation.
Thursday, November 30, 2006
Python Tip: Make Python & Emacs Play Nice on Windows
I've discovered that making Python 2.4.4 work well under Emacs 22 on Windows has a few speed bumps. I'm not sure if these problems apply to other combinations of versions, but they may. Here's a list of things I had to do to make for a happy working environment.
To Run Python in Emacs
To Run Python in Emacs
- Install the ctypes package.
- Install the pyreadlines package. The binary installer worked well.
- Use C-c C-c to run the python code loaded in the current buffer
- Download the pychecker package
- Decompress it and go to the extracted folder in a Command Prompt
- In that folder, run the command python setup.py install
- Use C-c C-v to run the python code loaded in the current buffer with pychecker
- It seems that the debugger (pdb) is set up differently with Python 2.4.4 under Windows than other configurations. Consequently, Emacs' calls to pdb are all wrong.
- When the Python interpreter is loaded into Emacs, it appears to be in a text-only mode. Running programs with graphics does not seem to work.
Subscribe to:
Posts (Atom)