bug-auctex
[Top][All Lists]
Advanced

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

Re: [Bug-AUCTeX] 11.87; Bug in the expansion of %' in TeX-expand-list


From: Mosè Giordano
Subject: Re: [Bug-AUCTeX] 11.87; Bug in the expansion of %' in TeX-expand-list
Date: Sun, 24 Aug 2014 20:06:33 +0200

Hi Florent,

2014-08-24 16:01 GMT+02:00 Florent Rougon <address@hidden>:
> Hello,
>
> Here is a tiny patch for a bug in the expansion of %' in TeX-expand-list
> (tex.el): when it inserts the concatenation of TeX-command-text and
> " \"\\input\"" into the command line being constructed, it does:
>
>   (setq pos (+ (length TeX-command-text) 9))
>
> where 9 is the length of " \"\\input\"". However, this number
> (+ (length TeX-command-text) 9) should be *added to the current value*
> of pos instead of replacing it. The result with the buggy code is that
> TeX-command-expand will start expanding the command line under
> construction again from (+ (length TeX-command-text) 9), which is
> earlier than it should be (and therefore expand things that ought to be
> left as is).

Thank you for the bug report and patch, I've installed it.  This was a
tiny change, but for the future consider assigning the copyright to
the FSF, so you'll be able to provide much longer patches ;-)  In
addition, a ChangeLog entry for the possible future patches would be
really useful.

> One can exhibit the problem by putting for instance %%%% before the %'
> in a TeX-command-list entry. Normally, this sequence should expand to
> %%. However, because of the bug, it is expanded a second time after %'
> has been expanded, thus yielding a single %. This is illustrated in the
> attached file auctex-bugtest.el.

Thank you also for the recipe to reproduce the bug, I'll try to write
an ERT test for it.

Bye,
Mosè



reply via email to

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