On Fri, Mar 20, 2020 at 8:21 AM John Cowan <xxxxxx@ccil.org> wrote:

The problem is that what port-position returns is *not* what get-position returns.  The port can buffer multiple characters, and the user-supplied get-position can't know how many characters has been read from the port.  It can returns the position where next read! will read from.   The port internally offsets the position, taking into account of what's remaining in its buffer. 

R6RS has nothing to say about character buffering as opposed to byte buffering, and seems to have been written as if it doesn't exist.

Right, I suspect get-position and port-position relation hasn't been thought out wrt. buffering.  Yet,
the read! callback of make-custom-textual-input-port allows multiple characters to be read, implying it allows
character buffering. 

If we keep position of texturing port opaque and the custom port just pass through it, then we should make it
clear that read! callback is one character at a time to make sense.