branch: elpa-admin commit 07ef2ff6b4f611798d6d49401a2a56a8587a7ab5 Author: Teemu Likonen <tliko...@iki.fi> Commit: Teemu Likonen <tliko...@iki.fi>
Add README file --- README | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) diff --git a/README b/README new file mode 100644 index 0000000..1ce6571 --- /dev/null +++ b/README @@ -0,0 +1,155 @@ +Wcheck mode +=========== + +Wcheck mode is an extension for Emacs text editor. It's a general +interface for integrating text checkers for Emacs. + + +Copyright and license +--------------------- + +Copyright (C) 2009-2011 Teemu Likonen <tliko...@iki.fi> + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation, either version 3 of the License, or (at your +option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +Public License for more details. + +<http://www.gnu.org/licenses/gpl-3.0.html> + + +Introduction +------------ + +Wcheck mode is a general-purpose text-checker interface for Emacs. +Technically it's a minor mode which provides an on-the-fly text checker. +It checks the visible text area as you type and possibly highlights some +parts of it. What is checked and how, are all configurable. + +Wcheck mode can use external programs or Emacs Lisp functions for +checking text. For example, Wcheck mode can be used with spell-checker +programs such as Ispell, Enchant and Hunspell, but actually any tool +that can receive text from standard input stream and send text to +standard output can be used. Wcheck mode sends parts of buffer's content +to an external program or an Emacs Lisp function and, based on their +output, decides if some parts of text should be marked in the buffer. + + +Features +-------- + +User can have several different configuration units which are called +"languages". In terms of spelling checker it is natural to think of them +as different human languages. That's not the only point of view, though. +In Wcheck mode language is just a configuration unit for certain kind of +text checking purpose. + +Each language can use its own checker engine (external program or a +function), command-line arguments and other settings, such as the +regular expressions and syntax table that are used to match words (or +other text elements) in Emacs buffer. User can choose which "face" is +used to mark text elements in buffer. + +User can create language-specific and major mode specific settings +defining which "faces" to read or skip in buffers. A typical use for +this feature is to spell-check only those areas in buffer which are +written in human language. For example, in email messages usually the +message body and Subject header are important enough to spell-check. In +programming modes user could spell-check only documentation strings and +comments (or the opposite if you want to use Wcheck mode to check +keywords and syntax of the programming language itself). + +Wcheck mode can also be configured to offer any kind of actions for +marked text. Actions are presented to user through a menu which is +activated either by (1) clicking the right mouse button on a marked text +or (2) executing interactive command `wcheck-actions' while the cursor +(the point) is on a marked text. + +If you use `wcheck-mode' as a spelling checker then it's natural to +configure an action menu that offers spelling suggestions for the +misspelled word. The action menu could also have an option to add the +word to spell-checker's dictionary, so that the word is recognized next +time. That's only one application for Wcheck mode, though. Wcheck mode +can be configured to find almost any kind of text elements from buffer, +highlight them, and offer any kind of actions for them. + + +How does it compare to other spell-checkers? +-------------------------------------------- + +The open design makes Wcheck mode (internally) quite different from +spell-checkers like flyspell-mode and speck-mode. They are specific +tools for spell-checking through Ispell or compatible program and are +therefore very much tied to Ispell's features and command-line +interface. This can be useful if you want to use Ispell or fully +compatible program for spell-checking natural languages. However, not +all human languages can be supported through Ispell and there can also +be other kind of text-checking needs. + +The motivation behind Wcheck mode is to offer more general-purpose and +configurable interface for text checking. It can be configured to work +with almost anything: user's custom shell, awk or perl scripts, Lisp +functions or other checkers and text filters. Even if you only need a +spelling checker for human languages Wcheck mode can be a good choice. +It has more configuration possibilities than other spell-checkers and +the on-the-fly checker performs very well. It's a true real-time +checker. + + +Install +------- + +Put wcheck-mode.el file to some directory in your Emacs's `load-path' +and add the following lines to Emacs's initialization file (~/.emacs): + + (autoload 'wcheck-mode "wcheck-mode" + "Toggle wcheck-mode." t) + (autoload 'wcheck-change-language "wcheck-mode" + "Switch wcheck-mode languages." t) + (autoload 'wcheck-actions "wcheck-mode" + "Open the action menu." t) + (autoload 'wcheck-jump-forward "wcheck-mode" + "Move point forward to next marked text area." t) + (autoload 'wcheck-jump-backward "wcheck-mode" + "Move point backward to previous marked text area." t) + + +Configuration and basic usage +----------------------------- + +The internal documentation of variable `wcheck-language-data' has a +complete description on how to configure Wcheck mode language data. For +easy configuration you can use the options in customize group named +"wcheck" (M-x customize-group RET wcheck RET). + +It might be convenient if Wcheck mode commands are bound to some easily +accessible keys, for example: + + (global-set-key (kbd "C-c s") 'wcheck-mode) + (global-set-key (kbd "C-c l") 'wcheck-change-language) + (global-set-key (kbd "C-c c") 'wcheck-actions) + (global-set-key (kbd "C-c n") 'wcheck-jump-forward) + (global-set-key (kbd "C-c p") 'wcheck-jump-backward) + +Interactive command `wcheck-mode' toggles the text-checker for the +current buffer. Command `wcheck-change-language' is used to switch +languages and command `wcheck-actions' (or the right mouse button) opens +an actions menu for marked text. Commands `wcheck-jump-forward' and +`wcheck-jump-backward' jump to next or previous marked text area. + + +Examples +-------- + + + +# Local Variables: +# mode: text +# mode: auto-fill +# fill-column: 72 +# End: