all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Adding ispell-multi.el and friends to Emacs
@ 2007-06-14 12:58 Peter Heslin
  2007-06-15  8:48 ` Richard Stallman
  2007-06-15  9:21 ` martin rudalics
  0 siblings, 2 replies; 33+ messages in thread
From: Peter Heslin @ 2007-06-14 12:58 UTC (permalink / raw)
  To: emacs-devel


In another thread, it was suggested that this might be a good time to
suggest including a package of mine, ispell-multi.el, in Emacs, possibly
along with two other packages that depend on it.  When I posted
ispell-multi to emacs.sources a few years ago, RMS expressed an interest
in including it in Emacs.  He noted a few things that needed fixing, and I
believe these have been fixed in the interim.

ispell-multi.el extends ispell.el so that it maintains a collection of
running ispell processes instead of just one.  So if you have one buffer
in English and another in French, Emacs no longer kills the old process
and starts a new one every time you switch buffers.  This is a useful
feature, but the real reason I wrote it is to support the ability to
spell-check multiple languages in the same buffer using flyspell.
Without the ability to maintain several running processes, there would
be a very noticeable delay when moving the cursor from one language region 
to another.

ispell-multi therefore also provides a hook that tells flyspell to
switch languages depending on the value of a particular text property,
and provides hooks to trigger re-parsing of the buffer in order to set
that text property to the correct language.  This facility is used by
two other packages of mine, both of which allow you to mix text in
different languages in the same buffer, and have flyspell check it all.

These two packages might also be considered for inclusion:

* flyspell-babel.el: It roughly parses a LaTeX buffer and sets the text
  property to the correct language for flyspell, depending on the Babel
  language-switching commands in the buffer.  These are configurable, so
  if you use custom LaTeX commands instead of Babel, you can still use
  the package.  Of course, TeX can only be parsed by TeX, so it is far
  from foolproof; but it does work well for normal usage.

* flyspell-xml-multi.el:  As above, but changes the language for
  flyspell depending on the xml:lang attribute of the current element in
  an XML buffer.  If the major mode is nxml-mode, it should understand XML
  pretty well; if not, it falls back on an even rougher sort of parsing
  than what is used for LaTeX.

I believe the only change that would be required in Emacs to integrate
these would be to provide a hook in ispell-accept-buffer-local-defs in
ispell.el where ispell-multi could be called.  This is currently
achieved by means of a defadvice, which would have to be changed.

I don't know if the functionality of ispell-multi should be enabled by
default, or only if the user requests it.

All three files are available here:
http://www.dur.ac.uk/p.j.heslin/Software/Emacs/index.php

Peter

-- 
Peter Heslin (http://www.dur.ac.uk/p.j.heslin)

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2008-01-13 17:19 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-14 12:58 Adding ispell-multi.el and friends to Emacs Peter Heslin
2007-06-15  8:48 ` Richard Stallman
2007-06-15 23:00   ` Peter Heslin
2007-06-16 18:50     ` Richard Stallman
2007-06-16 19:46       ` Frank Schmitt
2007-06-17 21:05         ` Agustin Martin
2007-06-17 21:31           ` Juri Linkov
2007-06-17 23:11             ` Peter Heslin
2007-06-18  9:55               ` Agustin Martin
2007-06-18 12:35                 ` martin rudalics
2007-06-19 13:14                   ` Agustin Martin
2007-06-20 12:46                     ` martin rudalics
2007-06-20 23:09                       ` Agustin Martin
2007-06-21 18:44                 ` Davis Herring
2007-06-18 21:31               ` Richard Stallman
2007-06-15  9:21 ` martin rudalics
2007-06-15 22:53   ` Peter Heslin
2007-06-16 10:03     ` martin rudalics
2007-06-16 10:55     ` Eli Zaretskii
2007-06-16 12:24       ` martin rudalics
2007-06-18 10:02     ` Agustin Martin
2007-06-18 12:37       ` martin rudalics
2007-06-19 15:13         ` Agustin Martin
2007-06-20 12:47           ` martin rudalics
2007-06-20 23:33             ` Agustin Martin
2007-06-21 17:32               ` Richard Stallman
2007-06-21 17:59                 ` David Kastrup
2007-06-21 21:39                 ` Peter Heslin
2007-06-22 16:24                   ` Richard Stallman
2007-06-22 21:22                     ` Peter Heslin
2007-06-23 18:26                       ` Richard Stallman
2008-01-13 17:19                         ` Dan Nicolaescu
2007-06-21 21:25               ` Peter Heslin

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.