I am trying to learn Racket by creating a Todo manager based on the Todo.txt format by Gina Trapani (http://todotxt.com/)
I also have an Android tablet that uses a todo.txt application. This application uses "\n\r" at the end of each line. I'm on Windows 7, so I need this newline to work as well, because if I open the file up in Notepad, it messes up my lines and my todos (normally one per line) become one multi-line todo. The program reads the text file using file->lines and filters any blank lines. The program writes the text file and I manually write the "\n\r" using write, display, and print. That is to say, I've tried all three and ended up with extra "\n" characters. Here is a snippet from my do-task procedure: (with-output-to-file (task-file-path) #:mode 'text #:exists 'truncate/replace (lambda () (write (string-join (drop-right uptos 1) "\n\r")) (write "\n\r") (write (complete-task (last uptos) (rest taskstuff))) (write "\n\r") (write (string-join afters "\n\r"))))) When I open the file with SciTe, it shows the CR and LF characters at the end of each line, plus a blank line with a CR character. The complite-task procedure transforms a task and returns a trimmed string. Where is this extra blank line coming from? Full draft code at http://pastebin.com/z3C5BQJP Thanks, Josh -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.