scrod / nv

Notational Velocity: modeless, mouseless Mac OS X note-taking application
http://notational.net
GNU General Public License v3.0
2.06k stars 404 forks source link

Store Notes & Settings database outside of notes folder #95

Closed jrk closed 13 years ago

jrk commented 13 years ago

I use Dropbox to sync most of my work across multiple machines, but use Simplenote synchronization with NV (whose data lives as plain-text files within my Dropbox tree) to sync with my iOS devices. Now that I'm moving to having one fixed, always-on desktop Mac, in addition to my previous primary MacBook Pro, I want to keep NV running 24x7 on the desktop to keep Dropbox data and Simplenote data in sync. This matters because I want to be able to make changes directly to the Dropbox files (e.g. on a PC with a simple text editor and no explicit Simplenote support) and have them stay in sync with the iOS devices and my Simplenote account, and also because I want changes from the iOS devices to be constantly pulled down and versioned in Dropbox—not just when I happen to be actively using NV on a single Mac.

This workflow is at odds with the current design which stores the Notes & Settings data (including all Simplenote sync configuration) directly in the folder of notes, which I am syncing between multiple Macs. It is unsafe to have multiple copies of NV actively touching the same configuration database, and simultaneously racing to sync the same note changes to a single Simplenote account.

Instead, it would be useful if it were possible to keep the Notes & Settings database stored separately, in a non-synced location, which would allow the different copies of NV to coexist peacefully, in particular with only one actually synchronizing with Simplenote.

scrod commented 13 years ago

Notes & Settings is the database, so moving it outside the notes folder would mean that people now have to track files in multiple locations to preserve their notes during backups or transfers.

If you'd like to use Simplenote with Dropbox, just follow the directions on the Synchronization FAQ:

Use Simplenote to actually sync between Macs, and configure only one of your Macs to store its NV database in Dropbox. Leave the rest in the App Support folder. This way you have only one gateway to Dropbox and there are no possibilities for conflicts, because each NV instance will have its own dedicated, uncontested notes folder.

jrk commented 13 years ago

Fair enough. Sorry for missing that in the FAQ.

I do understand that Notes & Settings is the app's entire state database, outside of what's stored in the raw files and their filesystem metadata, but for the common usage model NV encourages of having one and only one database, centralizing this Notes & Settings file in e.g. Application Support, apart from the plain-text notes folder which would normally live in a more user-visible location, seemed perfectly reasonable. Your goal of keeping them together for simplicity of backup or transfer is fair, and this seems like a reasonable workaround. (And if it's not effective for me in practice, I can always hack my desired functionality on my own branch, anyway.)