From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Spiers Subject: org-mobile-pull with files in multiple directories? Date: Mon, 3 Feb 2014 00:00:43 +0000 Message-ID: <20140203000043.GK31376@pacific.linksys.moosehall> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WA6y4-0007i4-F2 for emacs-orgmode@gnu.org; Sun, 02 Feb 2014 19:00:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WA6xy-0003Pe-9l for emacs-orgmode@gnu.org; Sun, 02 Feb 2014 19:00:52 -0500 Received: from coral.adamspiers.org ([85.119.82.20]:42423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WA6xy-0003PY-4K for emacs-orgmode@gnu.org; Sun, 02 Feb 2014 19:00:46 -0500 Received: from localhost (243.103.2.81.in-addr.arpa [81.2.103.243]) by coral.adamspiers.org (Postfix) with ESMTPSA id 1DA492E32F for ; Mon, 3 Feb 2014 00:00:44 +0000 (GMT) Content-Disposition: inline List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: org-mode mailing list 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