From: Marcel van der Boom <marcel@hsdev.com>
To: emacs-orgmode@gnu.org
Subject: Re: auto-push to mobile (but only when editing org buffer)
Date: Wed, 15 Aug 2012 09:33:16 +0200 [thread overview]
Message-ID: <20120815093316.58a112d6@hsdev.com> (raw)
In-Reply-To: <alpine.OSX.2.00.1208141908470.5766@tbetbambyn.ybpny>
[-- Attachment #1: Type: text/plain, Size: 997 bytes --]
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
>>> 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 #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5620 bytes --]
next prev parent reply other threads:[~2012-08-15 7:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-15 1:04 auto-push to mobile (but only when editing org buffer) Ken Mankoff
2012-08-15 1:36 ` Bastien
2012-08-15 2:10 ` Ken Mankoff
2012-08-15 7:33 ` Marcel van der Boom [this message]
2012-08-16 21:54 ` Ken Mankoff
2012-08-17 22:53 ` Ken Mankoff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120815093316.58a112d6@hsdev.com \
--to=marcel@hsdev.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).