emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ken Mankoff <mankoff@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: auto-push to mobile (but only when editing org buffer)
Date: Tue, 14 Aug 2012 19:10:18 -0700 (PDT)	[thread overview]
Message-ID: <alpine.OSX.2.00.1208141908470.5766@tbetbambyn.ybpny> (raw)
In-Reply-To: <87pq6thr74.fsf@gnu.org>


>> 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	other threads:[~2012-08-15  2:10 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 [this message]
2012-08-15  7:33     ` Marcel van der Boom
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=alpine.OSX.2.00.1208141908470.5766@tbetbambyn.ybpny \
    --to=mankoff@gmail.com \
    --cc=bzg@gnu.org \
    --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).