Hans van der Meer via ntg-context schrieb am 17.08.2021 um 15:15:
Is it possible to retrieve the contents of a file directly into a
buffer? On the Wiki I could not find such a command. That is,
equivalent to something like:
\startbuffer[from file]
contents of the file
\stopbuffer
Yes and no. The \samplefile command used to read file for example
stores the content of a file in a buffer to avoid rereading the file each
time the content is output but there is no way to suppress the output
neither to change the name of the buffer.
\starttext
\startnointerference
\samplefile{knuth}
\stopnointerference
\typebuffer[knuth]
\getbuffer[knuth]
\stoptext
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________