SQLite Forum

edit() function usage
I don't see anything wrong. (That's what I call "a statement of ignorance.")

Have you looked to see if the file, (which is created as a randomly named file in the process's current directory), is present and modified while the editor is open, after a save but before quitting? (It is automatically deleted after editor terminates and the edit() function has sucked its content, so you must look at the right time. It will be a recently created file.)

Have your tried using 'TextEdit' in place of 'BBEdit'?

I do not have BBEdit on my Macs because they are headless, so I am not prepared to do repro on this. I can say that edit() works fine on Windows and Linux. You might try using edit('notes', 'vi') (or some other not-overly-clever editor.) If you do, please report what happens.

(2.1 amendment:)

FWIW, the edit('', 'mg') function works fine as an insert value on my Mac mini running the last OS X version 10.?. The mg editor is findable on my $PATH and knows how to edit, in place<sup><b>1</b></sup>, a file named as its 1st argument.

<b>1.</b> In-place editing can sometimes be important. There are editors that play games with file names as part of keeping a backup. If more than one process was involved in running an editor, this could interact badly with how edit() works.