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

From: Mitchell <m.att.foicica.com>
Date: Fri, 8 Nov 2013 08:26:36 -0500 (Eastern Standard Time)

Hi Chris,

On Wed, 6 Nov 2013, Chris Emerson wrote:

> On Tue, Nov 05, 2013 at 11:07:52PM -0500, Mitchell wrote:
>> Hi Chris,
>>
>> On Tue, 5 Nov 2013, Chris Emerson wrote:
>>> 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.
>>
>> Since this is a pretty special case (I cannot think of anything
>> similar on other platforms), I don't feel like exposing a low-level
>> `io` function is justified; I would copy the functionality for your
>> own use. Jumping through hoops to manually emit the proper events
>> seems too hackish.
>
> I agree that the suspend/resume is unusual, but what about other things that
> may deliberately cause files on disk to change - eg VCS integration (after
> an update/pull, you'd want to check for changes), or if you've got a buffer
> with the output of a "compile" (for example a log file)?

I guess the question then is when should ta check for changes in all open
files? I like the current model of only checking when a file is put into
view, but I can see the value in your scenarios.

Cheers,
Mitchell

-- 
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 Fri 08 Nov 2013 - 08:26:36 EST

This archive was generated by hypermail 2.2.0 : Sat 09 Nov 2013 - 06:42:42 EST