emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] auto-push to mobile (but only when editing org buffer)


From: Marcel van der Boom
Subject: Re: [O] auto-push to mobile (but only when editing org buffer)
Date: Wed, 15 Aug 2012 09:33:16 +0200

On di 14-aug-2012 19:10
Ken Mankoff <address@hidden> wrote:

>
>>> How can I wrap that to only run when the active buffer is in Org 
>>> Mode?
>>
>> (run-at-time "00:10" 10 (lambda () (if (eq major-mode 'org-mode) 
>> (org-mobile-push))))
>
>That works well. After reading run-at-time documentation, the 
>"00:10" isn't ideal. I now use the following, which syncs files 
>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

-- 
Marcel van der Boom  -- http://hsdev.com/mvdb.vcf
HS-Development BV    -- http://www.hsdev.com
We use bitcoin!      -- http://bitcoin.org

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]