Re: [Daniel Burrows <[email protected]>] Bug#292886: Phantom spaces appearing in TeX documents; related to fill?

Ralf Angeli <[email protected]>
Newsgroups gmane.emacs.auc-tex
Message-ID <[email protected]>
* Daniel Burrows (2005-01-31) writes:

>   Oh, I see I wasn't clear enough.  You're right that the trailing space in 
> the *current* paragraph gets eaten.  However, trailing spaces get randomly 
> added elsewhere in the file.  And yes, I'm using the current version of 
> auctex; if I'd installed some other version by hand I wouldn't be sending 
> this to the Debian BTS.
>
> AUCTeX-version's value is "11.54"
>
>   I believe I first noticed the appearence of odd whitespace characters about 
> two weeks ago, but that doesn't mean it started then.  I've attached a file 
> that seems to trigger this: fill the first paragraph, and the second 
> paragraph will get trailing whitespace.

Okay, I could reproduce it with Emacs 21.3.  This is actually a very
severe bug.  After the paragraph to be filled _every_ sentence ending
at the end of a line will get an extra space.  It would be good to
release 11.55 in the near future.

I fixed it in CVS.  A patch against 11.54 is attached.

Daniel, thanks for the report.

-- 
Ralf
latex.el.patch (text/x-patch, 370 B)
--- latex.el.orig	2005-01-31 17:26:30 +0100
+++ latex.el	2005-01-31 17:26:49 +0100
@@ -2419,7 +2419,7 @@
 		  sentence-end-double-space)
 	      (progn
 		(goto-char from)
-		(while (re-search-forward "[.?!][]})\"']*$" nil t)
+		(while (re-search-forward "[.?!][]})\"']*$" to t)
 		  (insert ? ))))
 	  ;; Then change all newlines to spaces.
 	  (let ((point-max (progn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.