How to create a scratchpad-ish feature

Basically it would be a macro/userscript with a call to new text file and file save as to a more/less random filename.

I’m sorta stuck at save as…

You could use the ko/file SDK for this:

http://docs.komodoide.com/SDK/api/commonjs/file#ko-file_methods_open

It’s mostly the same SDK as sdk/file from mozilla, except that our version is less prone to throw exceptions.

As for the random filename, you could just use a timestamp (Date().now)) or if you really want a unique random name you could use Mozilla’s UUID generator: require('sdk/util/uuid').uuid()

I tried to do this once and got stuck. My plan was to attempt to suppress the save-as when closing the buffer and couldn’t seem to get around it. I assume that under the hood, every file must be backed by a file (eventually) and/or there’s no facility to open a file under some sort of memory:// type url scheme?