auctex-devel
[Top][All Lists]
Advanced

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

Re: A strange auto typesetting problem when using auctex.


From: Tassilo Horn
Subject: Re: A strange auto typesetting problem when using auctex.
Date: Mon, 14 Jun 2021 21:14:58 +0200
User-agent: mu4e 1.5.13; emacs 28.0.50

Hongyi Zhao <hongyi.zhao@gmail.com> writes:

>> That's because the URL contains % and therefore looks like a "code
>> comment" to auctex, e.g.
>>
>>   \some\latex{code}% And some comment bla bla bla bla...
>>
>> which would be properly filled as
>>
>>   \some\latex{code}% And some comment bla bla bla
>>                    % ...bla...
>>
>> Of course, here it is wrong.
>>
>> I don't see what we could do here, unfortunately.  But please file a bug
>> report (M-x TeX-submit-bug-report RET).
>
> Where will this submit the bug report?

To the GNU bug tracker, debbugs.gnu.org, assigned to the package auctex.

> But now, very strange, the problem disappeared.

Me neither. :-)

The reason is that once the auto-parser has kicked in and seen that you
are using the hyperref LaTeX package, it'll recognize the \href macro
(which is now also fontified correctly, e.g., not with
font-lock-comment-face including and after the first %) and know that
the % in the URL are not starting a comment.

To demonstrate: When you comment the \usepackage{hyperref} and hit `C-c
C-n' the problem will be back.  Uncommenting it again then and hitting
`C-c C-n' makes it disappear.

Bye the way, you might want to add

    (setq TeX-parse-self t)
    (setq TeX-auto-save t)

to your auctex config as described in (info "(auctex) Top").

Bye,
Tassilo



reply via email to

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