latex3 add tag
JouleV
MWE

```
\documentclass{article}
\usepackage{fontspec}
\setmainfont[Script=Devanagari]{Shobhika}

\ExplSyntaxOn
\tl_new:N \c_foo_diacritics_tl
\tl_set:Nn \c_foo_diacritics_tl {ािीुूेैोौंःॢृॅँ}
% ा, ि, ी, ु, ू, े, ै, ो, ौ, ं, ः, ॢ, ृ, ॅ, ँ (not separated by commas)
\iow_log:x 
  {
    There ~ are ~ \tl_count:N \c_foo_diacritics_tl \space tokens ~ in ~ the ~ 
    token ~ list
  }
\tl_map_inline:Nn \c_foo_diacritics_tl { \message {#1, } }
\tl_new:N \l_foo_tl
\tl_set:Nn \l_foo_tl {कँ}
\tl_map_variable:NNn \l_foo_tl \l_foo_map_tl
  {
    \tl_log:N \l_foo_map_tl
    \tl_if_in:NnTF \c_foo_diacritics_tl {\l_foo_map_tl}
      {
        \iow_log:x { The ~ token ~ is ~ in ~ the ~ token ~ list. }
      }
      {
        \iow_log:x { The ~ token ~ is ~ NOT ~ in ~ the ~ token ~ list. }
      }
  }
\ExplSyntaxOff

\begin{document}
\end{document}
```

Log file:

```
There are 15 tokens in the token list
 ा, ि, ी, ु, ू, े, ै, ो, ौ, ं, ः, ॢ, ृ, ॅ, ँ,
> \l_foo_map_tl=क.
The token is NOT in the token list.
> \l_foo_map_tl=ँ.
The token is NOT in the token list.
```

Expected log file:

```
There are 15 tokens in the token list
 ा, ि, ी, ु, ू, े, ै, ो, ौ, ं, ः, ॢ, ृ, ॅ, ँ,
> \l_foo_map_tl=क.
The token is NOT in the token list.
> \l_foo_map_tl=ँ.
The token is in the token list.
```

What went wrong?
Top Answer
Skillmon
As already mentioned in the comments, you'll have to expand `\l_foo_map_tl` for `\tl_if_in:NnTF`. For this I generate the variant `\tl_if_in:NoTF`. I also use `\tl_const:Nn` here.

```
\documentclass{article}
\usepackage{fontspec}
\setmainfont[Script=Devanagari]{Shobhika}

\ExplSyntaxOn
\tl_const:Nn \c_foo_diacritics_tl {ािीुूेैोौंःॢृॅँ}
% ा, ि, ी, ु, ू, े, ै, ो, ौ, ं, ः, ॢ, ृ, ॅ, ँ (not separated by commas)
\iow_log:x 
  {
    There ~ are ~ \tl_count:N \c_foo_diacritics_tl \space tokens ~ in ~ the ~ 
    token ~ list
  }
\tl_map_inline:Nn \c_foo_diacritics_tl { \message {#1, } }
\tl_new:N \l_foo_tl
\tl_set:Nn \l_foo_tl {कँ}
\prg_generate_conditional_variant:Nnn \tl_if_in:Nn { No } { TF }
\tl_map_variable:NNn \l_foo_tl \l_foo_map_tl
  {
    \tl_log:N \l_foo_map_tl
    \tl_if_in:NoTF \c_foo_diacritics_tl { \l_foo_map_tl }
      {
        \iow_log:x { The ~ token ~ is ~ in ~ the ~ token ~ list. }
      }
      {
        \iow_log:x { The ~ token ~ is ~ NOT ~ in ~ the ~ token ~ list. }
      }
  }
\ExplSyntaxOff

\begin{document}
\end{document}
```

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.