Transition – opening ill-formed or plain text notes with .ftml extension?


#1

Just sitting down this morning to move all my note-taking over from FT to FT4Atom.

First thing I need is a script which creates a date-stamped file for today’s rough notes and planning.
I’m starting with something like:

#!/bin/bash

wkg="$HOME/Notes"
notePrefix="notes-"
fileExtn="ftml"
app="Atom"

# See (in BASH date, the -v flag) 
# "-v-1d" --> yesterday
# "-v+1d" --> tomorrow
# "" --> today (default)
dateAdjusts=""  

dayfile="$wkg/$notePrefix$(date $dateAdjusts "+%Y-%m-%d").ftml"
touch "$dayfile"

open -a "$app" "$dayfile"

( which assumes that OS X has been told to open any .ftml files with Atom )

So far so good, I think, but while experimenting I noticed that a naive user might have a problem if they tried to simply edit the extension of an existing .txt | .ft | .md file to .ftml, and then simply open it in FT4Atom, expecting to see their existing file contents in some form …

( FT4Atom seems at the moment to essentially drop any existing contents if this happens, and offer a fresh blank FT4Atom buffer. There is a warning of file change if the user saves at this point, but if they accepted, then the earlier data, would, I think, be overwritten).

I wonder if it might be worth thinking about error handling which:

  • detected to the opening of an MD or plain text file that has an .ftml extension,
  • and responded in some way ?

Perhaps, for example:

  1. Warning that the contents an’t be opened as FTML ?
  2. or opening as TXT, with explanation ?
  3. or converting and opening as FTML ?

#2

This is good point and need to be fixed. I’ve added an issue here:

I’m going to start tracking issues there instead of in my own local list.

Jesse


#3

Thanks Jesse,

Would it work better for us to flag issues there directly ?

( Or should we, perhaps, use this forum until you go for your first public release of FoldingText for Atom ? )


#4

I’m not sure that there’s a hard rule.

But in general github issues will be my list of things that need doing. This forum will be a place to discuss FoldingText in general. I guess I’d say if something looks to be a likely bug or feature request post in git issues. If you aren’t sure and need some clarification post here. And for anything that’s not a definite feature request or bug post here also.

Jesse