[Top][All Lists]

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

Re: [Bug-AUCTeX] 11.87; Little problems with 'file' in TeX-command-expan

From: Florent Rougon
Subject: Re: [Bug-AUCTeX] 11.87; Little problems with 'file' in TeX-command-expand/TeX-expand-list
Date: Mon, 25 Aug 2014 11:07:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)


Tassilo Horn <address@hidden> wrote:

> Thanks, good catch.  I've applied this patch.  However, it's quite on
> the borderline to "not so tiny patch".  So would you please be willing
> to sign a copyright assignment so that we can easily take your
> contributions in the future?

OK, I will see that. Had forgotten about this one... (will think about
writing ChangeLog entries, too, hello Mosè! ;-)

> That patch doesn't apply for me failing in the tex.el hunk.

Did you apply auctex_TeX-expand-list.patch from my previous bug report
(<address@hidden>, "Bug in the expansion of %' in
TeX-expand-list")? It does work here:

/tmp % tar -xzf ~/src-pastouche/auctex-11.87.tar.gz                405 
/tmp % cd auctex-11.87                                             406 
/tmp/auctex-11.87 % patch -p1 <~/tmp/auctex_TeX-expand-list.patch  407 
patching file tex.el
/tmp/auctex-11.87 % patch -p1 
patching file tex-buf.el
/tmp/auctex-11.87 % patch -p1 
patching file tex-buf.el
patching file tex.el
/tmp/auctex-11.87 %

>                                                              And I'm not
> sure if its a good idea to rename the function parameter.  If you'd
> rename the let-bound `file', then you wouldn't need to change the
> `TeX-expand-list' entry, right?

You can't do that, because this is precisely the binding used by all
other `TeX-expand-list' entries, and the documented one that users are
likely to be relying upon... In AUCTeX 11.87 without any patch, the only
place from `TeX-command-expand', including of course the expansion of
`TeX-expand-list', where the 'file' binding used is *not* the one
created by let, is the place in tex-buf.el where my patch changes 'file'
into 'filefunc' for clarity:

  (let (pat
        entry TeX-command-text TeX-command-pos
        (file `(lambda (&rest args)
                  (concat (and (stringp TeX-command-pos) TeX-command-pos)
-->                       (apply ',file args)
                          (and (stringp TeX-command-pos) TeX-command-pos)))))
        case-fold-search string expansion arguments)

In this place, 'file' is taken from the corresponding function argument,
which is why I renamed both. In all other places, the binding used by
Emacs comes from the let AFAICT. However, as I tried to explain in the
bug report, there is one of these places where the correct thing to do
IMHO would be to use the binding from the `TeX-command-expand' function
arguments: this is in the expansion of %' as defined in
`TeX-expand-list'. This is why my patch changes 'file' into 'filefunc'
there too.



reply via email to

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