GNU bug report logs -
#20296
11.88.3; LaTeX-fill-paragraph gives unexpected result
Previous Next
Reported by: jfbu <jfbu <at> free.fr>
Date: Fri, 10 Apr 2015 20:33:02 UTC
Severity: normal
Found in version 11.88.3
Done: Arash Esbati <arash <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20296 in the body.
You can then email your comments to 20296 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-auctex <at> gnu.org
:
bug#20296
; Package
auctex
.
(Fri, 10 Apr 2015 20:33:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
jfbu <jfbu <at> free.fr>
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Fri, 10 Apr 2015 20:33:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.
Be sure to consult the FAQ section in the manual before submitting
a bug report. In addition check if the bug is reproducable with an
up-to-date version of AUCTeX. So please upgrade to the version
available from http://www.gnu.org/software/auctex/ if your
installation is older than the one available from the web site.
If the bug is triggered by a specific (La)TeX file, you should try
to produce a minimal sample file showing the problem and include it
in your report.
Your report will be posted for the auctex package at the GNU bug
tracker. Visit http://debbugs.gnu.org/cgi/pkgreport.cgi?pkg=auctex
to browse existing AUCTeX bugs.
------------------------------------------------------------------------
Emacs : GNU Emacs 24.4.91.1 (x86_64-apple-darwin13.4.0, Carbon Version 157 AppKit 1265.21)
of 2015-03-15 on Atago.local
Package: 11.88.3
I do not understand the behavior of LaTeX-fill-paragraph. It keeps annoying
me with partially filled paragraphs.
I always work with hard-wrapped paragraphs and hit M-q very often to rewrap
when I modify things.
But something seems weird with LaTeX-fill-paragraph perhaps related to $..$
material it finds.
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}
-------------
regards,
Jean-François
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#20296
; Package
auctex
.
(Fri, 10 Apr 2015 21:39:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 20296 <at> debbugs.gnu.org (full text, mbox):
jfbu <jfbu <at> free.fr> 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
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#20296
; Package
auctex
.
(Sat, 11 Apr 2015 07:44:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 20296 <at> debbugs.gnu.org (full text, mbox):
Le 10 avr. 2015 à 23:38, Tassilo Horn <tsdh <at> gnu.org> a écrit :
> jfbu <jfbu <at> free.fr> 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
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#20296
; Package
auctex
.
(Sat, 11 Apr 2015 11:59:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 20296 <at> debbugs.gnu.org (full text, mbox):
jfbu <jfbu <at> free.fr> writes:
Hi!
> 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)
> ;...
> )
>
> 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.
I can reproduce that here but I have no clue why that line breaks
indentation. But at least the problem isn't there in the development
version. I'll try to make a new ELPA release ASAP. Please report back
if that fixes things.
Bye,
Tassilo
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#20296
; Package
auctex
.
(Sat, 11 Apr 2015 12:08:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 20296 <at> debbugs.gnu.org (full text, mbox):
Tassilo Horn <tsdh <at> gnu.org> writes:
> jfbu <jfbu <at> free.fr> writes:
>
> Hi!
>> 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)
>> ;...
>> )
>>
>> 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.
>
> I can reproduce that here but I have no clue why that line breaks
> indentation. But at least the problem isn't there in the development
> version. I'll try to make a new ELPA release ASAP. Please report back
> if that fixes things.
(regexp-opt nil t) => ""
Which does _not_ heed "If optional PAREN is non-nil, ensure that the
returned regexp is enclosed by at least one regexp grouping construct."
and matches everywhere instead of nowhere.
Probably enough to throw AUCTeX off track.
--
David Kastrup
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#20296
; Package
auctex
.
(Sat, 11 Apr 2015 14:47:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 20296 <at> debbugs.gnu.org (full text, mbox):
Hi Tassilo,
>> 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)
>> ;...
>> )
>>
>> 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.
>
> I can reproduce that here but I have no clue why that line breaks
> indentation. But at least the problem isn't there in the development
> version. I'll try to make a new ELPA release ASAP. Please report back
> if that fixes things.
good news that it is already fixed in the development version !
thus my custom setup for LaTeX-verbatim-macros-with-delims shouldn't
have theoretically by itself caused the trouble ?
I will of course report back when next ELPA release becomes available
These days, I am sometimes off the net for some more or less extended
periods, thus in case feedback is not immediate, it will be because
I am in the "off" phase,
thanks
Jean-François
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#20296
; Package
auctex
.
(Sat, 11 Apr 2015 19:28:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 20296 <at> debbugs.gnu.org (full text, mbox):
jfbu <jfbu <at> free.fr> writes:
>> I can reproduce that here but I have no clue why that line breaks
>> indentation. But at least the problem isn't there in the development
>> version. I'll try to make a new ELPA release ASAP. Please report back
>> if that fixes things.
>
> good news that it is already fixed in the development version !
>
> thus my custom setup for LaTeX-verbatim-macros-with-delims shouldn't
> have theoretically by itself caused the trouble ?
David has a point there. I'll have to look how the regexp is used in
the filling code.
> I will of course report back when next ELPA release becomes available
Thanks.
> These days, I am sometimes off the net for some more or less extended
> periods, thus in case feedback is not immediate, it will be because
> I am in the "off" phase,
That's no problem. I won't hold my breath until your feedback. :-)
Bye,
Tassilo
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#20296
; Package
auctex
.
(Sun, 03 Mar 2024 14:28:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 20296 <at> debbugs.gnu.org (full text, mbox):
Tassilo Horn <tsdh <at> gnu.org> writes:
> jfbu <jfbu <at> free.fr> writes:
>
>>> I can reproduce that here but I have no clue why that line breaks
>>> indentation. But at least the problem isn't there in the development
>>> version. I'll try to make a new ELPA release ASAP. Please report back
>>> if that fixes things.
>>
>> good news that it is already fixed in the development version !
>>
>> thus my custom setup for LaTeX-verbatim-macros-with-delims shouldn't
>> have theoretically by itself caused the trouble ?
>
> David has a point there. I'll have to look how the regexp is used in
> the filling code.
(I'm going through old bug reports that unfortunately weren't resolved
at the time.)
Eval'ing (regexp-opt nil t) says "\\(\\`a\\`\\)" for me with Emacs 30.
Trying the recipe provided with `LaTeX-verbatim-macros-with-delims' set
to nil and it works as expected.
Therefore I'm closing this report.
Best, Arash
bug closed, send any further explanations to
20296 <at> debbugs.gnu.org and jfbu <jfbu <at> free.fr>
Request was from
Arash Esbati <arash <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 03 Mar 2024 14:29:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 01 Apr 2024 11:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 40 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.