In the last few weeks, while using the Emacs editor, I noticed that every so often, weird random errors would creep into my documents. It didn't make sense that they were just typing errors, because I would have noticed them right away, instead of much later. I began to try out different theories. Were my coworkers playing a joke, and inserting strange stuff into my files while I was away from my desk? This seemed very unlikely. Besides, it happened even when I hadn't left my desk. Was there some bug in the software? I couldn't believe that there would be such a serious bug that corrupted documents like this, that only happened to me. And I had used this software for years without a problem. Could it be trouble with my keyboard? Maybe my computer was haunted?
Today, finally, I figured out the problem. I had been using the mouse wheel to scroll around in the document, and occasionally while turning the mouse wheel I would press it a little too hard. This would result in a "middle button click" which was defined to paste whatever was in the buffer into the current point in the document. But since I was in the middle of scrolling, I would not notice the paste since it would quickly scroll off the screen. Later, when I came back to that section of the document, I would notice the problem. I redefined "middle button click" to do nothing, and the ghost in the editor was banished.