Difference between revisions of "Spell check"

From WikEmacs
Jump to: navigation, search
(Basic setup)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
'''{{{1}}}''' is a wonderful mode which does wonderful things.
+
'''Spell Checking''' is done by Emacs by calling external spell checkers.  
  
<!-----DONT REMOVE ANYTHING FROM THIS TEMPLATE ------------------------------>
+
= Basic setup =
<!-----FEW MONTHS, YEARS FROM WE CAN DELETE STUFF. NOT NOW ------------------>
+
<!-----YOU DON"T WANT WIKEMACS TO BE ANOTHER EMACSWIKI RIGHT ------------------>
+
<!-----PLEASE BE PATIENT AND CO-OPERATE FOR GREATER GOOD ------------------>
+
  
 +
You need to install either '''aspell''' or '''hunspell'''.
  
 +
== On Windows==
  
<!------------------------------------------------------------------------->
+
Links to pre compiled binaries are dead at time of writing.
  
= Basic setup =
+
RPMs with the noarch.rpm extension refer to packages which do not depend on a certain computer's architecture (e.g. interpreted programming languages and shell scripts). The utility 7zip can unpack an RPM on Windows, and the enclosed cpio file archive.
  
You can use either '''aspell''' or '''hunspell'''.
+
This did not help with the noarch RPMs I got from
 +
http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Factory/noarch/
 +
The executable hunspell.exe aborted after not finding a dll file.
  
= Helpful keybindings =
+
After that dll was added, another dll was not found. I gave up after
 +
several iterations. This was with
 +
mingw32-hunspell-1.3.2-1.98.noarch.rpm and later
 +
mingw32-hunspell-1.3.2-1.99.noarch.rpm (and associated lang and tools
 +
RPMs).
  
; {{Keys|C-x C-c}}
+
= Useful commands =
: Quit Emacs.
+
 
 +
; {{Command|ispell-change-dictionary RET SPC}}
 +
: Check list of installed dictionaries.
 +
 
 +
; {{CustomizeVariable|ispell-dictionary}}
 +
: Configure default dictionary.
 +
 
 +
; {{Command|add-file-local-variable RET ispell-dictionary RET TAB}}
 +
: Use this to change dictionary on per-file basis.  This command will add this line to the file in question.  Please save and re-load the file for new settings to take effect.
 +
 
 +
<pre>
 +
  -*- ispell-dictionary: "english" -*-
 +
</pre>
  
; {{CommandKeys|C-x C-s|save-buffer}}
 
: Save buffer.
 
  
<!------------------------------------------------------------------------->
 
 
= Common Customization =
 
= Common Customization =
 
<!-- Customization common to all platforms goes here -->
 
<!-- Customization common to all platforms goes here -->
  
== Customization 1 ==
+
== Hunspell ==
 +
 
 +
You need dictionary files for spell check to work. If you have installed '''OpenOffice''' or '''LibreOffice''', then dictionary files are already there.
 +
 
 
<source lang="lisp">
 
<source lang="lisp">
(message "This stuff will go in your .emacs")
+
(setq-default ispell-program-name "hunspell")
 
</source>
 
</source>
  
Line 36: Line 53:
 
</source>
 
</source>
  
 +
==Project Pages==
 +
; [http://fmg-www.cs.ucla.edu/geoff/ispell.html International Ispell]
 +
: Official Home page and lots of dictionaries
 +
* [http://kdstevens.com/~stevens/ispell-page.html International, Interactive Spell checker]
  
<!------------------------------------------------------------------------->
 
  
= [[GNU/Linux]] =
+
== Tutorial Pages==
<!-- Customization/Notes specific to GNU/Linux goes here -->
+
== GNU/Linux Notes 1 ==
+
== GNU/Linux Notes 2 ==
+
 
+
<!------------------------------------------------------------------------->
+
 
+
= [[OS X]] =
+
<!-- Customization/Notes specific to OS X goes here -->
+
== OS X Notes 1 ==
+
== OS X Notes 2 ==
+
 
+
<!------------------------------------------------------------------------->
+
 
+
= [[Windows]] =
+
<!-- Customization/Notes specific to Windows goes here -->
+
 
+
Links to precompiled binaries are dead at time of writing.
+
 
+
I got RPMs from [http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Factory/noarch/ openSUSE], but hunspell.exe aborted after not finding a dll file. After that dll was added, another dll was not found. I gave up after several iterations. This was with mingw32-hunspell-1.3.2-1.98.noarch.rpm  and later mingw32-hunspell-1.3.2-1.99.noarch.rpm (and associated lang and tools RPMs).
+
Windows users be aware of this.
+
 
+
== Windows Notes 1 ==
+
== Windows Notes 2 ==
+
 
+
<!------------------------------------------------------------------------->
+
 
+
= [[Emacs-24]] =
+
<!-- Customization/Notes specific to Emacs-24 -->
+
<!-- Recent revision should come first. This way important information stays at top  -->
+
 
+
Emacs-24 specific notes.
+
 
+
== Emacs-24 specific notes 1 ==
+
== Emacs-24 specific notes 2 ==
+
 
+
<!------------------------------------------------------------------------->
+
 
+
= [[Emacs-23]] =
+
<!-- Customization/Notes specific to Emacs-22 -->
+
Emacs-23 is not as great as Emacs-24. You will have these problems and you can workaround it this way.
+
== Emacs-23 specific notes 1 ==
+
== Emacs-23 specific notes 2 ==
+
 
+
<!------------------------------------------------------------------------->
+
 
+
= [[Emacs-22]] =
+
<!-- Customization/Notes specific to Emacs-22 -->
+
 
+
Seriously...Why are you even looking at this? You suck.  Your Emacs sucks.  Your organization sucks.
+
 
+
== Emacs-24 specific notes 1 ==
+
== Emacs-24 specific notes 2 ==
+
 
+
<!------------------------------------------------------------------------->
+
 
+
= Recommended Reading =
+
<!-- Only internal links. DO NOT insert EXTERNAL LINKS -->
+
* [[Internal Link1]]
+
* [[Internal Link2]]
+
 
+
<!------------------------------------------------------------------------->
+
 
+
= Project Pages =
+
* [http://bazaar.canonical.com/en/ Bazaar]
+
* [http://doc.bazaar-vcs.org/bzr.dev/en/user-guide/index.html Bzr Users Guide]
+
 
+
<!------------------------------------------------------------------------->
+
 
+
= Tutorial Pages =
+
  
 
; [http://xahlee.org/emacs/emacs_spell_checker_problems.html Spell checker problems]
 
; [http://xahlee.org/emacs/emacs_spell_checker_problems.html Spell checker problems]
Line 114: Line 65:
  
 
==External Links==
 
==External Links==
*[http://emacswiki.org/emacs/InteractiveSpell Emacswiki:InteractiveSpell]
+
* [http://emacswiki.org/emacs/InteractiveSpell Emacswiki:InteractiveSpell]
 +
 
 +
== See Also ==
 +
 
 +
* [[Flyspell-mode]]
  
<!------------------------------------------------------------------------->
 
<!-- Add categories based on user-level (beginner etc), user-role (programming, emacs contributor etc), platform (windows, linux etc) or work flow (text editing, document authoring etc)  -->
 
  
[[Category:TestCategory1]][[Category:TestCategory2]]
+
[[Category:Text Editing]]

Latest revision as of 16:47, 20 April 2012

Spell Checking is done by Emacs by calling external spell checkers.

Basic setup[edit]

You need to install either aspell or hunspell.

On Windows[edit]

Links to pre compiled binaries are dead at time of writing.

RPMs with the noarch.rpm extension refer to packages which do not depend on a certain computer's architecture (e.g. interpreted programming languages and shell scripts). The utility 7zip can unpack an RPM on Windows, and the enclosed cpio file archive.

This did not help with the noarch RPMs I got from http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Factory/noarch/ The executable hunspell.exe aborted after not finding a dll file.

After that dll was added, another dll was not found. I gave up after several iterations. This was with mingw32-hunspell-1.3.2-1.98.noarch.rpm and later mingw32-hunspell-1.3.2-1.99.noarch.rpm (and associated lang and tools RPMs).

Useful commands[edit]

M-x ispell-change-dictionary RET SPC
Check list of installed dictionaries.
M-x customize-variable RET ispell-dictionary
Configure default dictionary.
M-x add-file-local-variable RET ispell-dictionary RET TAB
Use this to change dictionary on per-file basis. This command will add this line to the file in question. Please save and re-load the file for new settings to take effect.
  -*- ispell-dictionary: "english" -*-


Common Customization[edit]

Hunspell[edit]

You need dictionary files for spell check to work. If you have installed OpenOffice or LibreOffice, then dictionary files are already there.

(setq-default ispell-program-name "hunspell")

Customization 2[edit]

(message "You can also do this customization")

Project Pages[edit]

International Ispell
Official Home page and lots of dictionaries


Tutorial Pages[edit]

Spell checker problems
Xahlee's notes and tutorials

External Links[edit]

See Also[edit]