bug-auctex
[Top][All Lists]
Advanced

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

bug#28456: 11.90.2.2017-07-25; \\input parsing


From: Pierre Lorenzon
Subject: bug#28456: 11.90.2.2017-07-25; \\input parsing
Date: Sat, 16 Sep 2017 05:23:06 +0200 (CEST)

Hi Mosè,

Here is a small hack to fix this bug in particular case I
encountered but I am not sure that the regexp is able to render
the whole complexity of expressions that might be parsed.


>>>  -- Patch 
(defconst regexp-input
  
"\\\\input{\\(\\(\\(\\.*\\)/\\)*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}"
  "Regexp used to match \\input{something}")

(defconst regexp-include
  
"\\\\include{\\(\\(\\(\\.*\\)/\\)*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}"
  "Regexp used to match \\include{something}")

(add-to-list 'LaTeX-auto-regexp-list
              (list regexp-input 1 'TeX-auto-file))
(add-to-list 'LaTeX-auto-regexp-list
              (list regexp-include 1 'TeX-auto-file))

>>>  -- End Patch


It is clear that two constants above derive from the same
expression and that a common model might certainly be defined
for all these regexps.



Pierre



From: Mosè Giordano <address@hidden>
Subject: Re: bug#28456: 11.90.2.2017-07-25; \\input parsing
Date: Fri, 15 Sep 2017 18:44:15 +0200

> Hi Pierre,
> 
> 
> 2017-09-14 7:55 GMT+02:00 Pierre Lorenzon <address@hidden>:
>> As if second \input
>>   \input{../../Exercices/Ensembles/Applications-Proprietes}
>>
>> were not parsed when first one
>>
>>   \input{Introduction}
>>
>> is. In fact looking carefully at regexp used to match \\input
>> which is part of the LaTeX-auto-regexp-list variable, it
>> clearly appears that an path like \input{../../something} will
>> not be parsed.
> 
> I can reproduce the error and confirm your analysis.
> 
>> Question is why? When LaTex allows inputs with so complexe
>> paths, why are they not parse by auctex?
> 
> It's hard to answer the question: that regexp has been there for more
> than 20 years now ;-)
> 
> I don't have the time to do it now (I also have a flaky Internet
> connection in this period), but if someone wants to tackle this issue,
> I fixed something similar for \addbibresource a few months ago:
> 
>     * b2f69e18 (2017-03-31)  Fix detection of bibliography files with
>     dots in path
> 
> Please, also add a test.  Maybe this could be an occasion to review
> similar regexps (for \include, \bibliography, etc), or maybe have a
> common variable for all this cases.
> 
> Bye,
> Mosè





reply via email to

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