On text reflow. It's not about bullets!

solderpunk solderpunk at SDF.ORG
Fri Nov 29 15:31:37 GMT 2019
A relatively quick response to this, while I have a little spare time
and one clearly formed idea in my head:

If it is considered desirable that Gemini documents be able to contain
source code which can be successfully copied and pasted directly into
another file and then compiled/interpreted without error (which sure
seems like a nice thing to have, and one which would likely be
appreciated by a hypothetical "typical Gemini user")...

and given that the spec currently says (and I am about 95% sure I will
not be convinced to change this) that simple clients which don't want
to fuss with text formatting can display the non-link lines of
text/gemini content as if it were text/plain (i.e. raw text with no
wrapping, reflowing, etc) and still be considered valid, spec-abiding
Gemini clients...

then the folling seems to me an unescapable conclusion which must be
taken into account in any discussion of text/gemini markup:

We cannot convey "this line is verbatim text which should not be
reformatted at all" with a start-of-line marker like ==, because that
marker will get picked up by the copy and paste, and almost certainly
break the semantics of the code.  Instead, there need to be lines which
toggle on and off a verbatim mode, which a user of a simple client that
does no formatting can simply not select before copying.  Something
like:

```
// Parse request as URL
URL, err := url.Parse(string(request))
if err != nil {
    conn.Write([]byte("59 Error parsing URL!r\n"))
    log.Status = 59
    return
}
log.RequestURL = URL.String()
```

That particular example being borrowed from ratfactor's Text Junior
format, but certainly other things would solve the problem.  But there's
no getting around the conclusion that verbatim text needs to be included
unedited, so needs to be denoted by lines before/after the text iteself,
not markers at the beginning.

It's not logically necessary that the on/off lines be identical, but
it's simplest if they are.

Cheers,
Solderpunk



Archive home | About this archive