The documentation of the write_term/[2,3] options tells
me that there is numbervars/1 option, with the following behaviour:
If N is an atom it is written without quotes. This extension
allows for writing variables with user-provided names.
https://www.swi-prolog.org/pldoc/doc_for?object=write_term/2
Does this option only work for some atoms and not for all atoms?
Is there an option to enable it for all atoms, or should I use some
portray hook. How can this be done, that all atoms are accepted?
Currently I get this result, the atom ‘Fido$’ is not accepted:
?- X = '$VAR'('Fido'), write(X), nl.
Fido
X = Fido.
?- X = '$VAR'('Fido$'), write(X), nl.
$VAR(Fido$)
X = '$VAR'('Fido$').