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: Ken Mankoff
Subject: Re: [O] auto-push to mobile (but only when editing org buffer)
Date: Tue, 14 Aug 2012 19:10:18 -0700 (PDT)
User-agent: Alpine 2.00 (OSX 1167 2008-08-23)


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))))

Thanks,

  -k.



reply via email to

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