On di 14-aug-2012 19:10
Ken Mankoff <mank...@gmail.com> 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