\file_if_exist_input:nTF
is still indexed in interface3.pdf
, though deprecated (more precisely, what seems to deprecated is \file_if_exist:nT
).
What gives you the idea these are deprecated?
What gives you the idea these are deprecated?
The compilation of the following MCE:
\documentclass{article}
\begin{document}
\ExplSyntaxOn
\file_if_exist_input:nTF {Foo} {Bar} {Baz}
\ExplSyntaxOff
\end{document}
returns:
! LaTeX3 Error: Use \file_if_exist:nT and \file_input:n not
(LaTeX3) \file_if_exist_input:nTF deprecated on 2018-03-05.Type
to continue.
...l.21 \file_if_exist_input:nTF
{Foo} {Bar} {Baz}
Ah, right: this one is tricky as we've kept the n
and nF
forms.
BTW, I don't understand why it has been deprecated as it would be still useful for cases as the following one:
\file_if_exist_input:nTF {foo}{
\pdfbookmark[1]{Foo}{foo}
}{
\msg_warning:nn{module}{`foo~file~is~missing!}
}
Okay, this can be achieved with:
\file_if_exist:nTF {foo}{
\file_input:n {foo}
\pdfbookmark[1]{Foo}{foo}
}{
\msg_warning:nn{module}{`foo~file~is~missing!}
}
but that's less handy.
The problem is 'where does the T
branch live' - it's not at all clear whether such a branch goes before or after the input, and whichever one picks, there will be use cases for the opposite one.
BTW, I don't understand why it has been deprecated as it would be still useful for cases as the following one:
Why would you execute the \pdfbookmark after the processing of the file?
Why would you execute the \pdfbookmark after the processing of the file?
Oooops! Before, of course :smile:
See #253, which suggests \file_if_exist_input:nnTF
(file) (preliminary set up) (true code after the file is input) (false code if not input). I think we should continue that discussion there.
Here we should keep the indexing issue: the deprecated function \file_if_exist_input:nTF
shouldn't be indexed. What is happening is that \file_if_exist_input:nF
is indexed as its base form \file_if_exist_input:nTF
. This is similar to #618 where l3doc
assumes that some base form exists when it doesn't actually exist. Probably the fixes will be related.
Most helpful comment
The problem is 'where does the
T
branch live' - it's not at all clear whether such a branch goes before or after the input, and whichever one picks, there will be use cases for the opposite one.