From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcel van der Boom <marcel@hsdev.com> Subject: Re: auto-push to mobile (but only when editing org buffer) Date: Wed, 15 Aug 2012 09:33:16 +0200 Message-ID: <20120815093316.58a112d6@hsdev.com> References: <CAFdBzErToSET6Ot1-J4AR2fwUgQ5k_4rt7WNwBCk=uL+aywRJg@mail.gmail.com> <87pq6thr74.fsf@gnu.org> <alpine.OSX.2.00.1208141908470.5766@tbetbambyn.ybpny> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=SHA1; boundary="Sig_/RVdiF8c97mcMS5d8aZ9CAOg"; protocol="application/pkcs7-signature" Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org> Received: from eggs.gnu.org ([208.118.235.92]:44240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <marcel@hsdev.com>) id 1T1Y6t-0003Kv-JI for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 03:33:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <marcel@hsdev.com>) id 1T1Y6s-000605-BG for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 03:33:47 -0400 Received: from router2.hsdev.com ([213.125.12.138]:55729 helo=mrb.hsdev.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <marcel@hsdev.com>) id 1T1Y6s-0005yg-0m for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 03:33:46 -0400 Received: from hsdev.com (localhost [127.0.0.1]) by mrb.hsdev.com (Postfix) with ESMTPS id A508565EF2 for <emacs-orgmode@gnu.org>; Wed, 15 Aug 2012 09:33:17 +0200 (CEST) In-Reply-To: <alpine.OSX.2.00.1208141908470.5766@tbetbambyn.ybpny> List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>, <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode> List-Post: <mailto:emacs-orgmode@gnu.org> List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>, <mailto:emacs-orgmode-request@gnu.org?subject=subscribe> Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --Sig_/RVdiF8c97mcMS5d8aZ9CAOg Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On di 14-aug-2012 19:10 Ken Mankoff <mankoff@gmail.com> wrote: > >>> How can I wrap that to only run when the active buffer is in Org=20 >>> Mode? >> >> (run-at-time "00:10" 10 (lambda () (if (eq major-mode 'org-mode)=20 >> (org-mobile-push)))) > >That works well. After reading run-at-time documentation, the=20 >"00:10" isn't ideal. I now use the following, which syncs files=20 >every 60 seconds starting 1 minute after launching emacs: > >(run-at-time "1 min" 60 (lambda () (if (eq major-mode >'org-mode)(org-mobile-push)))) > Perhaps you will find https://gist.github.com/3111823 interesting. It contains a bit of code to do the org-mobile-push asynchronously (and notify me about it when done). This makes the push work in the background, in my case it can take quite a while, and not interfere with normal usage. marcel --=20 Marcel van der Boom -- http://hsdev.com/mvdb.vcf HS-Development BV -- http://www.hsdev.com We use bitcoin! -- http://bitcoin.org --Sig_/RVdiF8c97mcMS5d8aZ9CAOg Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=smime.p7s MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAA oIITWzCCBDIwggMaoAMCAQICAQEwDQYJKoZIhvcNAQEFBQAwezELMAkGA1UEBhMC R0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBwwHU2FsZm9y ZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl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