bug-auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-AUCTeX] 11.84; Problems with formatting verbatim enviroment


From: David Kastrup
Subject: Re: [Bug-AUCTeX] 11.84; Problems with formatting verbatim enviroment
Date: Sun, 25 Mar 2007 11:57:17 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux)

Ralf Angeli <address@hidden> writes:

> * Alexander Borovsky (2007-03-25) writes:
>
>> When I format verbatim enviroment, witch starts with square brackets,
>> it's moves text for previous line. Simple example of problematic file:
>>
>> \documentclass[12pt,a4paper]{book}
>>
>> \begin{document}
>>
>> \begin{verbatim}
>> address@hidden ~]$ cd ~/projects/
>> address@hidden projects]$ ls
>> \end{verbatim}
>>
>> \end{document}
>
> `LaTeX-backward-paragraph' fails to stop before the line with \begin
> because the function `TeX-find-macro-end' assumes that the brackets
> are an optional argument of the `begin' macro.  We could abort the
> search for further arguments in `TeX-find-macro-end' as soon as a
> verbatim construct is entered (to be checked by `LaTeX-verbatim-p'),
> but this would add some overhead to macro boundary discovery.  Also,
> this would just be a refinement of a heuristic.

The problem is that inside of verbatim environments you can't put
anything like empty lines/comments/whatever in order to put AUCTeX
back on track.

So the problem is somewhat more serious.

One possible remedy would be to retain any spacing before optional
arguments when filling, assuming that the user had a good reason to
put them in in the first place.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

[Prev in Thread] Current Thread [Next in Thread]