unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5821: bug in TeX mode
@ 2010-04-02  5:01 Dan Stratila
  2010-04-03 23:46 ` Chong Yidong
  2010-04-06 15:43 ` Chong Yidong
  0 siblings, 2 replies; 6+ messages in thread
From: Dan Stratila @ 2010-04-02  5:01 UTC (permalink / raw)
  To: 5821

Hello,

The TeX mode introduces a new bug in Emacs 23.1 that was not present in
22.3. This bug is not present when using AUCTeX - I am referring to the TeX
mode that comes with Emacs.

Specifically, when I want to manually re-fill a paragraph that has an empty
comment line right before it, the first line of the paragraph is "bumped up"
into the comment line. This "breaks" the document, since of course comment
lines do not appear in the document LaTeX produces. Here is an example:

===
%
Aaa aaa bbb bbb. Aaa aaa bbb bbb. Aaa aaa bbb bbb. Aaa aaa bbb bbb. 
Aaa aaa bbb bbb. Aaa aaa bbb bbb. Aaa aaa bbb bbb. 
===

Placing the cursor on a sentence and then manually re-filling triggers the
bug. It seems to be introduced by a change on line 1052 (of the new
list/textmodes/tex-mode.el). The new line says:

===
  (setq paragraph-separate
	(concat "[\f]\\|[ \t]*\\($\\|"
		"\\\\[][]\\|"
===

The old line (which had a different number) used to say

===
  (setq paragraph-separate
	(concat "[\f%]\\|[ \t]*\\($\\|"
		"\\\\[][]\\|"
===

Reverting just this line to the old one fixes the problem.

Thanks,
Dan








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

* bug#5821: bug in TeX mode
  2010-04-02  5:01 bug#5821: bug in TeX mode Dan Stratila
@ 2010-04-03 23:46 ` Chong Yidong
  2010-04-04  0:44   ` Dan Stratila
  2010-04-04 14:37   ` Stefan Monnier
  2010-04-06 15:43 ` Chong Yidong
  1 sibling, 2 replies; 6+ messages in thread
From: Chong Yidong @ 2010-04-03 23:46 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 5821, Dan Stratila

> ===
> %
> Aaa aaa bbb bbb. Aaa aaa bbb bbb. Aaa aaa bbb bbb. Aaa aaa bbb bbb.
> Aaa aaa bbb bbb. Aaa aaa bbb bbb. Aaa aaa bbb bbb.
> ===
>
> Placing the cursor on a sentence and then manually re-filling triggers the
> bug.

This seems to have been done deliberately.  Stefan, could you check your
change?


  2008-03-03  Stefan Monnier  <monnier@iro.umontreal.ca>

    * textmodes/tex-mode.el (latex-mode): Remove % from paragraph-separate
    so that M-q can fill comments.






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

* bug#5821: bug in TeX mode
  2010-04-03 23:46 ` Chong Yidong
@ 2010-04-04  0:44   ` Dan Stratila
  2010-04-04 14:37   ` Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Dan Stratila @ 2010-04-04  0:44 UTC (permalink / raw)
  To: 'Chong Yidong', 'Stefan Monnier'; +Cc: 5821

M-q does fill comments without the change. It just doesn't mix them with
non-comment text (which is probably what you want anyway). 


> -----Original Message-----
> From: Chong Yidong [mailto:cyd@stupidchicken.com] 
> Sent: Saturday, April 03, 2010 7:47 PM
> To: Stefan Monnier
> Cc: Dan Stratila; 5821@debbugs.gnu.org
> Subject: Re: bug in TeX mode
> 
> > ===
> > %
> > Aaa aaa bbb bbb. Aaa aaa bbb bbb. Aaa aaa bbb bbb. Aaa aaa bbb bbb.
> > Aaa aaa bbb bbb. Aaa aaa bbb bbb. Aaa aaa bbb bbb.
> > ===
> >
> > Placing the cursor on a sentence and then manually 
> re-filling triggers the
> > bug.
> 
> This seems to have been done deliberately.  Stefan, could you 
> check your
> change?
> 
> 
>   2008-03-03  Stefan Monnier  <monnier@iro.umontreal.ca>
> 
>     * textmodes/tex-mode.el (latex-mode): Remove % from 
> paragraph-separate
>     so that M-q can fill comments.







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

* bug#5821: bug in TeX mode
  2010-04-03 23:46 ` Chong Yidong
  2010-04-04  0:44   ` Dan Stratila
@ 2010-04-04 14:37   ` Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2010-04-04 14:37 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 5821, Dan Stratila

> This seems to have been done deliberately.  Stefan, could you check your
> change?

>   2008-03-03  Stefan Monnier  <monnier@iro.umontreal.ca>
>     * textmodes/tex-mode.el (latex-mode): Remove % from paragraph-separate
>     so that M-q can fill comments.

It looks like this commit was mistaken: the problem it introduces is
too serious.  Please revert it if you get to it before I do,


        Stefan






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

* bug#5821: bug in TeX mode
  2010-04-02  5:01 bug#5821: bug in TeX mode Dan Stratila
  2010-04-03 23:46 ` Chong Yidong
@ 2010-04-06 15:43 ` Chong Yidong
  2010-04-09  1:56   ` Dan Stratila
  1 sibling, 1 reply; 6+ messages in thread
From: Chong Yidong @ 2010-04-06 15:43 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 5821, Dan Stratila

> > This seems to have been done deliberately.  Stefan, could you check your
> > change?
>
> >   2008-03-03  Stefan Monnier  <monnier <at> iro.umontreal.ca>
> >     * textmodes/tex-mode.el (latex-mode): Remove % from paragraph-separate
> >     so that M-q can fill comments.
>
> It looks like this commit was mistaken: the problem it introduces is
> too serious.  Please revert it if you get to it before I do,

Done.






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

* bug#5821: bug in TeX mode
  2010-04-06 15:43 ` Chong Yidong
@ 2010-04-09  1:56   ` Dan Stratila
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Stratila @ 2010-04-09  1:56 UTC (permalink / raw)
  To: 'Chong Yidong', 'Stefan Monnier'; +Cc: 5821

Great, thanks!
 

> -----Original Message-----
> From: Chong Yidong [mailto:cyd@stupidchicken.com] 
> Sent: Tuesday, April 06, 2010 11:44 AM
> To: Stefan Monnier
> Cc: 5821@debbugs.gnu.org; Dan Stratila
> Subject: Re: bug in TeX mode
> 
> > > This seems to have been done deliberately.  Stefan, could 
> you check your
> > > change?
> >
> > >   2008-03-03  Stefan Monnier  <monnier <at> iro.umontreal.ca>
> > >     * textmodes/tex-mode.el (latex-mode): Remove % from 
> paragraph-separate
> > >     so that M-q can fill comments.
> >
> > It looks like this commit was mistaken: the problem it introduces is
> > too serious.  Please revert it if you get to it before I do,
> 
> Done.







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

end of thread, other threads:[~2010-04-09  1:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-02  5:01 bug#5821: bug in TeX mode Dan Stratila
2010-04-03 23:46 ` Chong Yidong
2010-04-04  0:44   ` Dan Stratila
2010-04-04 14:37   ` Stefan Monnier
2010-04-06 15:43 ` Chong Yidong
2010-04-09  1:56   ` Dan Stratila

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).