auctex
[Top][All Lists]
Advanced

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

[AUCTeX] Re: Unfillable paragraph with AUCTeX 11.86


From: Tassilo Horn
Subject: [AUCTeX] Re: Unfillable paragraph with AUCTeX 11.86
Date: Tue, 16 Nov 2010 13:03:39 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Tassilo Horn <address@hidden> writes:

Hi again,

>> I cannot reproduce this with the development version of Emacs.  Here
>> it is filled properly.  Do you also see this if you start Emacs with
>> `emacs -Q -l auctex'?
>
> Now I don't get this wrong filling anymore even with emacs with my
> customizations.  I did update my bzr checkout in the meantime, so I
> guess it somehow got fixed...

Well, that was a false assumption.  I frequently get that behavior
again, but it's not really reproducible.  Sometime, I can simply
`revert-buffer' to get proper filling again, but not always.

I edebugged the whole stuff, and the culprit is
`LaTeX-fill-move-to-break-point'.  That function sometimes moves point
to a totally different paragraph!  In this snippet

--8<---------------cut here---------------start------------->8---
        ;; Determine start and end of verbatim macro.
        (let ((beg (point))
              (end (if (not (string-match "[ [{]" (match-string 1)))
                       (cdr (LaTeX-verbatim-macro-boundaries))
                     (TeX-find-macro-end))))
          ;; Determine if macro end is behind fill column.
          (when (and end
                     (> (- end (line-beginning-position))
                        (current-fill-column))
                     (> end final-breakpoint))
            ;; Search backwards for place to break before the macro.
            (goto-char beg)
            (skip-chars-backward "^ \n")
            ;; Determine if point ended up at the beginning of the line.
            (when (save-excursion (skip-chars-backward " \t%") (bolp))
              ;; Search forward for a place to break after the macro.
              (goto-char end)
              (skip-chars-forward "^ \n" (point-max)))
            (setq final-breakpoint (point))))))
--8<---------------cut here---------------end--------------->8---

the variable `end' is set to a value that's much beyond the current
paragraph (a few paragraphs later).

Here's another wrongly filled paragraph:

--8<---------------cut here---------------start------------->8---
All supported domains are depicted in figure
\ref{fig:gruml-metaschema-domains}.  Currently, the basic types
\lstinline{Boolean}, \lstinline{Integer}, \lstinline{Long},
\lstinline{String}, and
\lstinline{Double} are supported.  Additionally, there are homogenous 
collections (\lstinline{Set} and \lstinline{List}), homogenous 
\lstinline{Maps}, and records and enumerations that can be defined in a schema.
--8<---------------cut here---------------end--------------->8---

And before that breakpoint some paragraphs away, the breakpoint in the
4th line is much too early, at least the \lstinline{String} would easily
fit into that line, too.  I think there's some bug in the search for the
start of a verbatim environment...

I've tried to create a minimal document (only that paragraph, or that
paragraph a few times), but there it fills properly. :-(

Bye,
Tassilo




reply via email to

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