Skip to content

Make the list of temp file extensions extendable #456

@muzimuzhi

Description

@muzimuzhi

By default, minted recognizes a list of temp file extensions. This means only files with extensions in that list are processed correctly, if they are overwritten or deleted during compilation.

For temp files with other file extensions, highlightmode=immediate is needed if the files are overwritten or deleted during compilation. fastfirst can work in such cases, but it will give an error message about modified or missing files during the first compile, and then will work correctly during subsequent compiles when it switches to immediate mode.

minted/latex/minted/minted.dtx

Lines 3939 to 3957 in 19ea6fc

\begingroup
\def\minted@set@tempfileextension#1{%
\if\relax\detokenize{#1}\relax
\else
\expandafter\global\expandafter
\let\csname minted@buffertempfileextension@#1\endcsname\relax
\fi}
\minted@forcsvlist{\minted@set@tempfileextension}{
listing,
out,
outfile,
output,
temp,
tempfile,
tmp,
verb,
vrb,
}
\endgroup

It would be useful to make that list extensible (or even configurable/rewritable) by user, so extra file extensions used by other packages or user inputs can be added and highlightmode=fastfirst can continue to work without errors on the first compilation.

For example, the .tcbtemp extension used by tcolorbox, see my TeX-SX answer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions