Text reflow woes (or: I want bullets back!)y

Sean Conner sean at conman.org
Thu Jan 16 18:27:46 GMT 2020


It was thus said that the Great Aaron Janse once stated:
> On Thu, Jan 16, 2020, at 7:10 AM, solderpunk wrote:
> > But I realise that, actually, for the majority of people that's far
> > *more* accessible.  Someone using something resembling Notepad is going
> > to have a miserable time writing content hard-wrapped at 40 chars, while
> > the "long line" format just happens, probably without them even realising
> > it.
> 
> I do admit that you've nearly convinced me that 40 chars is easiest for
> readers, even though I'm not sure if it's best if we consider authors, too.
> 
> > Then again, making text/gemini easy to write with "normal" editors
> > arguably isn't worth much if the next step is anyway "now use sftp or a
> > git push to get your content on the server".
> 
> In my experience, though, hard-wrapping text doesn't work well with git
> anyway. And I don't know of any text editors that re-hard-wrap automatically
> when the beginning of a paragraph is edited.
> 
> Maybe gemini files could be authored in either wrapped or unwrapped format,
> then the server could hard-wrap intelligently before sending it to the
> reader? Would that be bad practice?

  First question---how to tell the server the width?  Well, one solution:

	gemini://gemini.conman.org/test/wrap;80
	gemini://gemini.conman.org/test/wrap;40
	gemini://gemini.conman.org/test/wrap;32
	gemini://gemini.conman.org/test/wrap;132

  Just replace the number at the end with your preferred width.  If not
given:

	gemini://gemini.conman.org/test/wrap

it will currently default to 77.

  I just happen to have the code to handle reflowing text at arbitrary
widths, but the code to do so has to take into account a few edge cases that
might not be readily apparent (what if there is no breakpoint within the
mandated width?).

  -spc (Also note---I added that to my Gemini site last September)


More information about the Gemini mailing list