[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20296: 11.88.3; LaTeX-fill-paragraph gives unexpected result
From: |
jfbu |
Subject: |
bug#20296: 11.88.3; LaTeX-fill-paragraph gives unexpected result |
Date: |
Sat, 11 Apr 2015 09:42:43 +0200 |
Le 10 avr. 2015 à 23:38, Tassilo Horn <address@hidden> a écrit :
> jfbu <address@hidden> writes:
>
>> I do not understand the behavior of LaTeX-fill-paragraph. It keeps
>> annoying me with partially filled paragraphs.
>>
>> Sample .tex file illustrating the problem:
>>
>> -------------
>> \documentclass{article}
>>
>> \begin{document}
>> % Sample paragraph
>>
>> Without the separation axiom this does not work, for example let $V$ be an
>> infinite dimensional Banach space and let $X = V\cup\{*\}$, and let's
>> declare
>> open the standard open $U\subset V$ as well as $X$ itself. This defines a
>> topology. The space is globally compact in the sense of coverings, but it
>> is not locally compact. Fortunately, it is not separated.
>>
>> % Applying M-q (LaTeX-fill-paragraph) to the paragraph above we get:
>>
>> Without the separation axiom this does not work, for example let $V$ be an
>> infinite dimensional Banach space and let $X =
>> V\cup\{*\}$, and let's declare open the standard open $U\subset V$ as well as
>> $X$ itself. This defines a topology. The space is globally compact in the
>> sense
>> of coverings, but it is not locally compact. Fortunately, it is not
>> separated.
>>
>> % fill-column is 78
>> \end{document}
>> -------------
>
> With a fresh emacs running AUCTeX 11.88.3 with no configurations, the
> paragraph above is filled to
>
> --8<---------------cut here---------------start------------->8---
> Without the separation axiom this does not work, for example let $V$ be an
> infinite dimensional Banach space and let $X = V\cup\{*\}$, and let's declare
> open the standard open $U\subset V$ as well as $X$ itself. This defines a
> topology. The space is globally compact in the sense of coverings, but it is
> not locally compact. Fortunately, it is not separated.
> --8<---------------cut here---------------end--------------->8---
>
> here when fill-column is 78. That looks correct to me. So maybe
> something in your configs causes the bad filling.
>
> Bye,
> Tassilo
Hi Tassilo,
thanks for having looked into this.
I have identified the bad config (sorry for not having done it earlier).
Turns out I have
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
; ...
'(LaTeX-verbatim-macros-with-delims nil)
;...
)
in my custom file
If I comment the LaTeX-verbatim-macros-with-delims setting, the problem
disappears.
(I obtained that via a dichotomy search on both my custom and init files,
that was full of suspense and the final result is a surprise)
As it stands the effect is:
LaTeX-verbatim-macros-with-delims is a variable defined in `latex.el'.
Its value is nil
Original value was ("verb" "verb*")
As I don't master elisp I must have done an error, and assigning nil
value to this variable is not the correct way to remove "verb" and "verb*"
from it.
The rationale for me is that sometimes I redefine the \verb macro to
allow line breaks in the source and also in the dvi/pdf output, thus I don't
care about fill-paragraph not breaking \verb|...| things.
Here is a more complete excerpt with possibly relevant lines:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(Info-additional-directory-list (quote ("/sw/share/info")))
'(LaTeX-indent-environment-list
(quote
(("verbatim" current-indentation)
("verbatim*" current-indentation)
("everbatim" current-indentation)
("everbatim*" current-indentation)
("array")
("displaymath")
("eqnarray")
("eqnarray*")
("equation")
("equation*")
("picture")
("tabbing")
("table")
("table*")
("tabular")
("tabular*"))))
'(LaTeX-verbatim-environments (quote ("verbatim" "verbatim*" "everbatim"
"everbatim*")))
;;BAD
'(LaTeX-verbatim-macros-with-delims nil)
;;ENDBAD
'(TeX-auto-save nil)
'(TeX-close-quote "»")
'(TeX-command "etex")
;
; <many more lines>
)
For my current context, commenting out the bad line is enough of a fix
but I would like to understand better why the bad line is bad.
Sorry again for not having looked for a bad config before posting the
bug report (I should have posted the bug report to myself only first)
best
Jean-François