Slightly simpler MWE:

   \setuppapersize[A6,landscape]

   \setupinteraction[state=start]
   \setuptagging[state=start]

   \starttexdefinition IndexPageCommand #1
      \doifsomethingelse{\currentregisterpageuserdata{note}}
        {n\currentregisterpageuserdata{note}}
        #1
      \doifsomething{\currentregisterpageuserdata{id}}
        {\in[\currentregisterpageuserdata{id}]}
   \stoptexdefinition

   \defineregister[Pindex]
   \setupregister [Pindex][pagecommand=\IndexPageCommand]

   \starttexdefinition tolerant protected unexpanded PIndex
   [#1]#:#2#*#=#*#=
      \doifelse{#3}{}
        {\setregisterentry[Pindex][keys={#1},entries={#2}]}
        {\setregisterentry[Pindex][keys={#1},entries={#2}][#3]}
   \stoptexdefinition

   \starttext
        \PIndex{OK, Entry}
        \PIndex{OK, Entry1}[note={ote}]%
      Here is some text.
   \startendnote
        \PIndex{Bad, Entry2}
        \PIndex{Bad, Entry3}[note={ote}]%
      Here is an endnote.
   \stopendnote
   \page
      \placenotes[endnote]
   \page
      \placeregister[Pindex]
   \stoptext

Fails with tagging and/or interaction enabled. Succeeds with both disabled.

--
Rik
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to