As pointed out by the following MCE, \TeX and \LaTeX are expl3-written to an auxiliary file:
the same way when no manipulation is involved (
\iow_now:Nn) (but that is useless for my real use case):\LaTeX {} \TeX {}differently when exhaustive expansion is involved (
\iow_now:Nx):\protect \LaTeX {} T\kern -.1667em\lower .5ex\hbox {E}\kern -.125emX\@{}
Why this difference and how to get \protect \TeX {} instead of T\kern -.1667em\lower .5ex\hbox {E}\kern -.125emX\@{}?
\documentclass{article}
\usepackage{xparse}
\ExplSyntaxOn
\iow_new:N \g_output_stream
\iow_open:Nn \g_output_stream { \c_sys_jobname_str.sbj }
\iow_now:Nn \g_output_stream { \LaTeX{} }
\iow_now:Nn \g_output_stream { \TeX{} }
\iow_now:Nx \g_output_stream { \exp_not:V\LaTeX{} }
\iow_now:Nx \g_output_stream { \exp_not:V\TeX{} }
\iow_close:N \g_output_stream
\ExplSyntaxOff
\begin{document}
\end{document}
\exp_not:V, but rather\exp_not:N. – egreg May 10 '19 at 10:52