Open LeafyLappa opened 1 year ago
I'm fairly sure the answer is no.
I assume you have read the discussion in the linked original issue.
The last solution discussed should be doable. We should create that as an enhancement ticket and see if it gets "upvoted" enough to be fixed, now that new contributors are appearing. 👍
I just installed orgzly-revived and it inserted hundreds or thousands of newlines into my notes. Unfortunately, the last time I made a git commit of my notes repo is a few days ago, meaning that un-doing orgzly-revived's modifications to my notes is not so easy without losing some content. I think orgzly shouldn't be able to do such heavy modifications. Maybe when orgzly tries to save files, one could check how many newlines are added, and if it's more than, say, 5, one could at least open a popup with a warning to the user.
Having the newlines added/removed for all Notebooks causes a lot of merge conflicts.
I don't think I thoughtfully configured the newline settings on the emacs side. At least having the same settings would reduce that I guess. If anyone knows what options the Orgzly options refer to, please let me know.
If I dig into this, I will post it here. It should probably go into the docs though.
I am now using a before-save-hook to add blank lines between headings. This significantly reduces theses conflicts.
The snippets from my config can be found here:
I updated the formatting function now to actually remove newlines between emtpy subheaddings.
I am still running into merge conflicts caused by trailing newlines. orgzly add trailing newlines as if a new heading would follow.
In my doomemacs setup there are pre-configured multiple save hook functions removing trailing newlines. I took a look into ws-butler which is one of the modules and unless I change the module directly, there is no way of changing this behavior. doom even adds its own formatter, particularly for removing trailing newlines.
Generally, trailing newlines should be removed, and I have the impression working this from the emacs side may catch us again and again.
@amberin What are your thoughts on fixing this in orgzly by not adding a blank line at the end of the file?
PS: I managed to fix the trailing newlines now by disabling ws-butler: https://github.com/stfl/doom.d/blob/master/config.org#ensure-blank-lines-between-headings-and-before-contents
@stfl Did you try changing the setting Sync -> Org file format -> Separate notes with an empty line?
Yes, I tried removing the blank lines via options before writing the formatter. This removes most of the blank lines and probably also the trailing blank lines. I prefer the blank line, and my formatter is written for the default options.
I am considering writing a dedicated emacs module with the options and functions I found.
I came across this bug on the original repo:
https://github.com/orgzly/orgzly-android/issues/190
Has this somehow been dealt with?