orgzly / orgzly-android

Outliner for taking notes and managing to-do lists
https://www.orgzly.com
GNU General Public License v3.0
2.69k stars 306 forks source link

[Feature request] Allow bulk selection for notebooks #810

Open rieje opened 3 years ago

rieje commented 3 years ago

Just a simple feature request: allow bulk selection of notebooks to perform actions like deleting in one go. At the moment, selecting a notebook allows some options such as overwriting local/remote notebook, exporting, renaming, and deleting.

If user chooses to do a bulk selection, at least allow the option to delete the notebooks. Other actions like bulk renaming notebooks may not be as appropriate,

My use-case is I use Syncthing to sync my notes periodically. Occasionally, there are conflicts and conflict files will automatically be created on my phone and these files get synced to my machines. If I just delete the conflicting files on my machines, they aren't deleted in Orgzly so it re-syncs them back to my machine. As a result, I must delete these conflicting notebooks manually on Orgzly and it's a big pain to delete them manually one by one.

JimBreton commented 3 years ago

Just curious, what conditions do you find cause most of your conflicts?

I've found that I greatly reduced the incidence of conflicts by setting Syncthing's Fs Watcher Delay setting (in "Advanced") to 5 seconds (default is 10). Doesn't seem like a big change but made a huge difference.

Also using 'global-auto-revert-mode' in Emacs has reduced the probability of writing to the shared file without realizing something on disk had already been changed by some other process. Between these two changes I hardly ever get conflicts anymore.

makuto commented 3 years ago

I also have problems using Syncthing and Orgzly. The most common way I hit it is as follows:

I think a better solution may be to ignore *.sync-conflict* files in Orgzly. This could be implemented as a "file exclusion filter" so it would be useful for any similar problems.

If it is still useful to you to see the sync conflict files in Orgzly (I prefer to handle all diff resolution on my PC, because there's no good Diff programs on Android afaik), then the exclude filter could become more nuanced: If the file matching the filter no longer exists, delete the notebook automatically.

Another solution would be "Do not auto-create missing notebooks in remote repository". This would still require you to delete the notebooks after resolving the conflict, but at least the conflict won't keep propagating across devices.

makuto commented 3 years ago

A more heavy-handed option would be "Delete notebooks which no longer exist in remote repository".

This is potentially destructive, so it may require some additional safety backups and user warnings. Optionally, it could be a separate "Archive" group of notebooks that it would move the now deleted sync conflicts to.

makuto commented 3 years ago

Related issue which may solve this one: #287

rieje commented 3 years ago

My conflicts are the result of using Tasker to run Syncthing periodically (every hour or so) for 60 seconds (enough for syncing my files, which are mostly text and pictures). So within the window between syncs, I get conflicts if I changed something both on the phone and on the computer. So I guess my issue is mostly avoidable by syncing even more frequently. I don't have Syncthing running as a background service 24/7 to maximize battery life.

Bulk selection already exists in some form with the app, so I feel like extending it to notebooks seems like an obvious choice. I will have to follow the issues involving other ways Syncthing conflicts occur that you guys mentioned that has also been my experience.