orgzly-revived / orgzly-android-revived

Outliner for taking notes and managing to-do lists
https://www.orgzlyrevived.com
GNU General Public License v3.0
602 stars 38 forks source link

orgzly creates merge conflicts due to property formatting #293

Open stfl opened 2 months ago

stfl commented 2 months ago

When editing an entry in orgzly, the formatting of the PROPERTY drawer is updated. This leads to merge conflicts when using the git repo backend.

 :PROPERTIES:
-:CREATED: [2024-07-21 So 17:03]
-:ID: c91630fd-92b2-4b56-b34d-a2b725afe1f5
+:CREATED:  [2024-07-21 So 17:03]
+:ID:       c91630fd-92b2-4b56-b34d-a2b725afe1f5
 :END:

In Emacs one can set org-property-format to define the alignment. In my case, the properties are written by a capture template and are therefore not aligned. Incorrectly aligned properties are not updated on save in Emacs, so the behavior differs from orgzly.

I assume it is the same situation as https://github.com/orgzly-revived/orgzly-android-revived/issues/78 I will update my capture templates and hopefully this will eliminate further conflicts.

amberin commented 2 months ago

I believe you are running into one of the limitations of using the text file format. Orgzly currently has no code which allows replacing only a part of a file. When it makes a change, it exports its view of the entire org file, with its own formatting.

I hope you can work around the problem, as I believe it is not trivial. But maybe someone can think of a clever solution.