[code] [textadept] Checking for changed files on disk

From: Chris Emerson <c-ta.att.mail.nosreme.org>
Date: Tue, 5 Nov 2013 23:06:56 +0000


When changing views/buffers, textadept will check if the file on disk is
newer, and prompt to reload it.

What would be the recommended way of triggering that check on other events?
I've mapped C-z to suspend textadept-curses (by sending it a SIGTSTP via a C
module), and it'd be nice to have it do the check when it's resumed. I might
want to do it on all currently-open views. Or I might kick off a program
which is expected to modify the current file.

I could duplicate core/file_io.lua:update_modified_file(), or do some
combination of switching buffers/views and manually emiting
BUFFER/VIEW_AFTER_SWITCH events, but it would be nice to have a standard API
for it.

Best regards,


You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 05 Nov 2013 - 18:06:56 EST

This archive was generated by hypermail 2.2.0 : Wed 06 Nov 2013 - 06:32:16 EST