<div dir="ltr"><div>I wrote a 10-line program[1] for converting from org-mode format to smsn-mode format. Both formats use indentation to indicate hierarchy. In org, a line at level k (levels are positive integers) starts with k asterisks, followed by a space, followed by the text of the line. In smsn-mode, a line at level k starts with 4*(k-1) spaces, followed by an asterisks, followed by a space.</div><div><br></div><div>I feel like there ought to be an intermediate step where it converts the data to something other than string -- for instance, </div><div><br></div><div>data IndentedLine = IndentedLine Int String | BadLine</div><div><br></div><div>and then generates the output from that. It feels like it needs a parser. But when I resurrect my parser code that I understood many moons ago, it looks like a lot of machinery.</div><div><br></div><div>Thanks.</div><div><br></div>[1] <a href="https://github.com/synchrony/smsn-mode/blob/develop/org-to-smsn-mode.hs">https://github.com/synchrony/smsn-mode/blob/develop/org-to-smsn-mode.hs</a><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Jeff Brown | Jeffrey Benjamin Brown</div><div dir="ltr"><a href="https://msu.edu/~brown202/" style="font-size:12.8px" target="_blank">Website</a>   |   <a href="https://www.facebook.com/mejeff.younotjeff" style="font-size:12.8px" target="_blank">Facebook</a>   |   <a href="https://www.linkedin.com/in/jeffreybenjaminbrown" style="font-size:12.8px" target="_blank">LinkedIn</a><span style="font-size:12.8px">(spammy, so I often miss messages here)   </span><span style="font-size:12.8px">|</span><span style="font-size:12.8px">   </span><a href="https://github.com/jeffreybenjaminbrown" style="font-size:12.8px" target="_blank">Github</a><span style="font-size:12.8px">   </span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>