Re: [code] [Textadept] SFTP plugin?

From: Ryan P.C. McQuen <ryanpcmcquen.att.member.fsf.org>
Date: Fri, 05 May 2017 09:24:52 -0700

—— On Tue, 25 Apr 2017 16:09:23 -0700 Ryan P.C. McQuen ryanpcmcquen.att.member.fsf.org wrote ——
 

---- On Mon, 24 Apr 2017 14:29:03 -0700 Robert Gieseke &lt;rob.g.att.web.de&gt; wrote ----

Am 24/04/17 um 21:58 schrieb Ryan P.C. McQuen:

&gt; That’s awesome! I got |sshfs| going, but how do I make Textadept notify

&gt; me if the file changed remotely?

By default, Textadept checks on the following events whether the

modification time has changed

events_connect(events.BUFFER_AFTER_SWITCH, update_modified_file)

events_connect(events.VIEW_AFTER_SWITCH, update_modified_file)

events_connect(events.FOCUS, update_modified_file)

events_connect(events.RESUME, update_modified_file)

You could maybe periodically check for updates?

 I’m now interested in writing a plugin to accomplish this. Looks like timeout() may be used to accomplish something in an interval. Would every 5 or 10 seconds be unreasonable?
 Would I just put this in init.lua?
 timeout(5, update_modified_file) -Ryan
[ryanpcmcquen.org]
 ​

-- 
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 05 May 2017 - 12:24:52 EDT

This archive was generated by hypermail 2.2.0 : Sat 06 May 2017 - 06:40:24 EDT