From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Beno=C3=AEt_Coste?= Subject: MobileOrg: creating new org file from the mobile side Date: Fri, 13 May 2016 16:46:02 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1136c8c837a4a50532bc0375 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1GEC-000116-9c for emacs-orgmode@gnu.org; Fri, 13 May 2016 12:46:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b1GEA-0001Pe-Id for emacs-orgmode@gnu.org; Fri, 13 May 2016 12:46:16 -0400 Received: from mail-lb0-x235.google.com ([2a00:1450:4010:c04::235]:34143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1GEA-0001Pa-4j for emacs-orgmode@gnu.org; Fri, 13 May 2016 12:46:14 -0400 Received: by mail-lb0-x235.google.com with SMTP id n11so27848959lbh.1 for ; Fri, 13 May 2016 09:46:13 -0700 (PDT) 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" To: emacs-orgmode@gnu.org --001a1136c8c837a4a50532bc0375 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dear all, First of all, thanks for maintaining the awesome org-mode. My name is Beno=C3=AEt Coste. I have recently forked the Android version of MobileOrg to take back the development and I am facing a problem when syncing new files created from the mobile side. I want people to be able to create new org files from the mobile side and keep them synced with Emacs. If my understanding is correct this is currently not possible because it is Emacs who is in charge of creating the list of synced files through index.org and checksums.dat. One start of hack I have been doing is to append the newly created file in these too files via the mobile side. *Eg: the user has created the file test.org . Then the line "* [[file:test.org ][test.org ]]" will be appended to index.org and "0 test.org " to checksums.dat by the mobile app.* The hack only half-works. It works for pulling but not push. Emacs get the list of files to pull by scanning the index.org file so it will pull (org-mobile-pull) the new file. However for pushing (org-mobile-push) Emacs refers to its own internal variable org-agenda-files and won't push the new version of the new file. One simple solution I have been thinking about was that when Emacs performs org-mobile-pull, if it sees files not belonging to org-agenda-files, it would then prompt the user to add them to the list. To be a bit more abstract I would say this is just a quick fix that would patch only the surface of a bigger problem. Conceptually I find that the real root of the problem is there are two lists keeping the same list of synced files: org-agenda-files controls pushed files and index.org controls pulled files. Moreover the variable org-agenda-files is unreachable from the mobile side (it is normally stored in Emacs init.el). To my taste, it seems that org-agenda-files is not necessary for MobileOrg and I think it should not be used. The list of files to be synced should only be in the staging area (Dropbox or whatever) and every application willing to sync (Emacs included) should refer to it when doing the syncing. The only useful usage of org-agenda-files I see would be in the case of an empty staging area. Then Emacs could use org-agenda-file to initialize the list of synced files. These are just suggestions, I'd be glad to help if there is any changes to be done in the lisp code (even if I am pretty noob at it!). Maybe I missed something, maybe there is already a way to add files from the mobile side. Please tell me your thoughts. Cheers, Beno=C3=AEt --001a1136c8c837a4a50532bc0375 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Dear all,

First of all, thanks for maintaining the awesome org-mode. My name= is Beno=C3=AEt Coste. I have recently=C2=A0forked=C2=A0the Android version of MobileOrg to take back the development and I am= facing a problem when syncing new files created from the mobile side.=C2= =A0

I want people to be able to create new org files from= the mobile side and keep them synced with Emacs. If my understanding is co= rrect this is currently not possible because it is Emacs who is in charge o= f creating the list of synced files through=C2=A0index.org<= span class=3D"inbox-inbox-Apple-converted-space">=C2=A0and checksums= .dat. One start of hack I have been doing is to append the newly created fi= le in these too files via the mobile side.=C2=A0
Eg: the user has created the file=C2=A0test= .org. Then the line "* [[file:test.or= g][test.org]]" will be appended t= o=C2=A0index.org=C2=A0and "0 =C2=A0test.org= " to checksums.dat by the mobile app.
The hack only half-works. It works for pulling but not = push. Emacs get the list of files to pull by scanning the index.org file so it will pull (org-mobile-pull) the new fi= le. However for pushing (org-mobile-push) Emacs refers to its own internal = variable org-agenda-files and won't push the new version of the new fil= e.
One simple solution I have b= een thinking about was that when Emacs performs org-mobile-pull, if it sees= files not belonging to org-agenda-files, it would then prompt the user to = add them to the list.=C2=A0
To be a bit more abstract I w= ould say this is just a quick fix that would patch only the surface of a bi= gger problem. Conceptually I find that the real root of the problem is ther= e are two lists keeping the same list of synced files: org-agenda-files con= trols pushed files and=C2= =A0index.org=C2=A0controls pulled = files. Moreover the variable org-agenda-files is unreachable from the mobil= e side (it is normally stored in Emacs init.el).=C2=A0To my taste, it seems that org-agenda-files is not necessary for= MobileOrg and I think it should not be used. The list of files to be synce= d should only be in the staging area (Dropbox or whatever) and every applic= ation willing to sync (Emacs included) should refer to it when doing the sy= ncing. The only useful usage of org-agenda-files I see would be in the case= of an empty staging area. Then Emacs could use org-agenda-file to initiali= ze the list of synced files.

These are just suggestion= s, I'd be glad to help if there is any changes to be done in the lisp c= ode (even if I am pretty noob at it!). Maybe I missed something, maybe ther= e is already a way to add files from the mobile side. Please tell me your t= houghts.

Cheers,
Beno=C3=AEt
--001a1136c8c837a4a50532bc0375--