MobileOrg / mobileorg

MobileOrg iPhone App
http://mobileorg.github.io
GNU General Public License v2.0
557 stars 70 forks source link

Any way to sync modified org files from sub-dirs back to PC? #293

Closed whatacold closed 5 months ago

whatacold commented 5 months ago

Hi folks,

I set up org-mobile to push some files in ~/org and its sub-dirs to the staged area, for example,

(add-to-list 'org-mobile-files "~/org/aaa.org")
(add-to-list 'org-mobile-files "~/org/bb/cc.org")
(add-to-list 'org-mobile-files "~/org/bb/dd.org")

It's ok to sync these files to MobileOrg, no problem. But if I modify, say, cc.org in MobileOrg, and then sync it back to my PC, it always results in a conflict, as org-mobile-pull thinks it's "~/org/cc.org" on my PC, which is definitely wrong.

How do you deal with this use case? Or is it even possible? I took a quick look at all org-mobile-* variables but failed to find anything interesting.

whatacold commented 5 months ago

Problem solved!

Turns out that it was caused by a different org-directory value, which I set it to ~/org/gtd/ some time ago. It makes org-mobile-push to put files like "~/org/bb/cc.org" as a direct cc.org under org-mobile-directory (without the sub-directory). The problem was gone after I changed org-directory back to the default ~/org.