emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adam Spiers <orgmode@adamspiers.org>
To: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: org-mobile-pull with files in multiple directories?
Date: Mon, 3 Feb 2014 00:00:43 +0000	[thread overview]
Message-ID: <20140203000043.GK31376@pacific.linksys.moosehall> (raw)

Hi all,

I'm trying to figure out how to get org-mobile-pull to work for me.  I
want to be able to edit files from multiple directories via MobileOrg,
e.g.:

  ~/org/TODO.org
  ~/work/TODO.org
  ~/my-project/TODO.org
  ~/org/notes/my-hobby.org

I have a sync-org shell-script which copies them into a temporary
directory, and then runs the following via emacs --batch --eval:

    (let ((org-mobile-files '("/path/to/tmpdir")))
      (require 'org-mobile nil 'noerror)
      (org-mobile-push))

org-mobile-directory is set to an scpx:... path so that the push
happens via TRAMP to my public server.  This all works fine.

However, when I run org-mobile-pull, edits to ~/org/notes/my-hobby.org
fail, and instead an error is appended to the file pointed to by
`org-mobile-inbox-for-pull', e.g.

    * Heading not found on level 1: journal F(edit:body) [[olp:my-hobby.org:journal][a heading]]

I have examined the code in org-mobile.el, and I'm pretty sure that
this is due to org-mobile-locate-entry containing the following code:

        ...
        (setq file (expand-file-name file org-directory))
        (setq path (mapcar 'org-link-unescape
                           (org-split-string path "/")))
        (org-find-olp (cons file path))))))

org-directory is ~/org, so it only succeeds in locating files which
live directly in ~/org.

Is this a known limitation, and if so, can anyone suggest a good way
to work around it?

Thanks!

Adam

                 reply	other threads:[~2014-02-03  0:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20140203000043.GK31376@pacific.linksys.moosehall \
    --to=orgmode@adamspiers.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).