oakmac/atom-parinfer

$HOME/.parinfer-file-extensions.txt doesn't seem to take effect when atom first starts up

naartjie opened this issue · 4 comments

.parinfer-file-extensions.txt only seems to work when you open new files, it doesn't seem to take effect when you open atom and some .clj files are already open in some tabs. It then brings up the modification prompt.

Related issues: #45 #11

I'm not sure I understand this issue completely.

atom-parinfer listens to an event when an editor tab is opened and determines whether to start Parinfer, which mode to be in, etc. When atom starts and loads the tabs from your last session, this event fires for each of those tabs as if they were opened individually.

I am working on a project with other programmers who don't use parinfer, so I have disabled it by default, with an empty .parinfer-file-extensions.txt file, so that I don't cause too much formatting chaos in the commit history. And this seems to work well, I turn on parinfer when I am working on my sections, and have ownership of the code.

Regarding your comment:

When atom starts and loads the tabs from your last session, this event fires for each of those tabs as if they were opened individually.

When I first launch Atom, I am still getting the parinfer dialog for all of the files which already have pre-existing open tabs. When I open new files in new tabs, I don't get the prompt to auto-format however.

This was a subtle timing bug; nice catch! Should be fixed in v1.15.0

Can you confirm?

Epic, it works indeed. Thanks!!