From: doom@leland.stanford.edu
Subject: Ispell 3.0 bug -- munges text irrecoverably by moving a word
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 20 Jul 1992 19:54:10 GMT

This is a bug I've seen several times using ispell, both
with ispell-region and ispell-buffer.  The program grabs a
word, questions it's spelling, and then seems to get
confused about where the word was, and it insists on
inserting it somewhere else in the file, often mangling the
original context.  It does this whether you hit space, r, or
do a C-g to break out of it.  Afterwards, an undo will not
recognize the changes.

Below I've included two versions of a file, before and after
ispell has taken the word "tropes" from the first line and
moved it down about ten lines.  It's also deleted a few
characters from the original context (e.g. "ma" from the
word "make").

I've included a dribble file that shows how I ran it, but I
did *not* use "emacs -q", because ispell wouldn't run at all
in that case.  Instead, I deleted my .emacs file first.  
Just for completeness sake, I've appended the site-init.el
file at the bottom. 

I was using Ispell 3.0 with emacs version 18.56, on a
Sun SPARC Station 1 (logged in remotely from a NeXT machine).

-------- "Before", the file I ran ispell on: --------
Tetsuo: The Iron Man

A Japanese, arty flick, supposedly using horror movie tropes
to make some sort of cyberpunk comment on modern culture.
It's got some moments, but it's mostly just dull and stupid. 

To understand the plot of this movie, it helps a lot to read
one of the newspaper reviews that are floating around.
There's nothing particularly deep about it, but the movie
isn't very good at communicating what's supposed to be
happening: a "metal fetishist" inserts a piece of rusty
metal tubing into his leg, freaks out and runs in front of a
car which is being driven by a "salaryman" and his girl
friend.  The salaryman then seems to be infected with some
sort of disease that progressively transforms him into
metal.  The thankfully black and white look of this movie,
involves various disgusting looking chaotic masses of old
machine parts protruding from peoples bodies (like
"Videodrome", but not done as well).  

In the only scene that's worth anything in the movie, the
"salaryman" undergoes the bulk of his transformation into
metal while making love with his girlfriend.  At first it
seems like they might do something interesting with it (she
says something like "No, show it to me.  I don't frighten
easily."), but it degenerates into the usual horror movie
hysterics (a suggestion for directors: prevent the actors
from screaming, using gags if necessary).  Anyway, he
emerges from hiding covered in metal, his penis transformed
into a huge power drill.  They spend some time running
around, fighting.  While she has him briefly subdued,
there's a hint that she's turned on by his new body, but he
kills her with his new tool.  It isn't clear if she meant for
this to happen, but if you beleive the reviews she "dies
in ecstacy".  

I might excuse it's excesses and clumsiness of this movie if
I thought they really had something worthwhile to say, but
they just don't.  This whole business about the
transformation being some sort of disease is completely
dumb.  Cyberpunk is about turning yourself into a monster
*on purpose*, not by accident.  This general theme of
technology being out of control, an implacable, inhuman
force... it isn't just wrong, it's old and stale too.

(Oh, the music is pretty good though.  If you're into moody
industrial music, you might want to check out the
soundtrack.  For that matter, this movie wouldn't be a bad
dance club light show). 
-------- "After", text as mangled by ispell: --------
Tetsuo: The Iron Man

A Japanese, arty flick, supposedly using horror movie ke some sort of cyberpunk comment on modern culture.
It's got some moments, but it's mostly just dull and stupid. 

To understand the plot of this movie, it helps a lot to read
one of the newspaper reviews that are floating around.
There's nothing particularly deep about it, but the movie
isn't very good at communicating what's supposed to be
happening: a "metal fetishist" inserts a piece of rusty
metal tubing into his leg, freaks out and runs in front of a
car which is being driven by a "salaryman" and his girl
friend.  The salaryman then seems to be infected with some
sort of disease that progressively transforms him into
metal.  The thankfully black and white look of this movie,
involves various disgusting looking chaotic masses of old
machine parts protruding from peoples bodies (like
"Videodrome", but not done as well).  

In the only scene that's worth anything in the movie, the
"salaryman" undergoes the bulk of his transformation into
metal while making love with his girlfriend.  At first it
seems like they might do something interesting with it (she
      tropessays something like "No, show it to me.  I don't frighten
easily."), but it degenerates into the usual horror movie
hysterics (a suggestion for directors: prevent the actors
from screaming, using gags if necessary).  Anyway, he
emerges from hiding covered in metal, his penis transformed
into a huge power drill.  They spend some time running
around, fighting.  While she has him briefly subdued,
there's a hint that she's turned on by his new body, but he
kills her with his new tool.  It isn't clear if she meant for
this to happen, but if you beleive the reviews she "dies
in ecstacy".  

I might excuse it's excesses and clumsiness of this movie if
I thought they really had something worthwhile to say, but
they just don't.  This whole business about the
transformation being some sort of disease is completely
dumb.  Cyberpunk is about turning yourself into a monster
*on purpose*, not by accident.  This general theme of
technology being out of control, an implacable, inhuman
force... it isn't just wrong, it's old and stale too.

(Oh, the music is pretty good though.  If you're into moody
industrial music, you might want to check out the
soundtrack.  For that matter, this movie wouldn't be a bad
dance club light show). 
-------- dribble file: --------
xispell bufferiinu
-------- /local/emacs/lisp/site-init.el: --------
(setq load-path (cons "/usr/pubsw/src/elisp"
                      (cons "/usr/pubsw/src/elisp/calc" load-path)))

(setq require-final-newline t)
(setq case-fold-search nil)

(autoload 'gnus "gnus" "Read network news." t)
(autoload 'gnus-post-news "gnuspost" "Post a news." t)
(autoload 'webster-mode "webster" "Put Buffer in webster-mode" t)
(autoload 'webster "webster" "Look up a word" t)
(autoload 'webster-define "webster" "Look up word before point" t)
(autoload 'webster-thesaurus "webster" "Get Syns and Ans" t)
(autoload 'compile "compile" "" t)
(autoload 'ispell-word "ispell" "Check spelling of word at or before point" t)
(autoload 'ispell-complete-word "ispell" "Complete word at or before point" t)
(autoload 'ispell-region "ispell" "Check spelling of region" t)
(autoload 'ispell-buffer "ispell" "Check spelling of buffer" t)
(autoload 'csh-mode "csh-mode" "csh script writing mode" t)
(autoload 'perl-mode "perl-mode" "A Perl Mode" t)
(autoload 'perldb "perldb" "A Perl Debugging Mode" t)
(autoload 'calc             "calc.elc"     "Calculator Mode" t)
(autoload 'calc-extensions  "calc-ext.elc" nil)
(autoload 'quick-calc       "calc.elc"     "Quick Calculator" t)
(autoload 'full-calc        "calc.elc"     "Full-screen Calculator" t)
(autoload 'calc-eval        "calc.elc"     "Use Calculator from Lisp")
(autoload 'calc-grab-region "calc-ext.elc" nil t)
(autoload 'defmath          "calc-ext.elc" nil t t)


Newsgroups: gnu.emacs.bug