10 ms·
Emacs' Org-Mode and Syncthing = Perfect (2017)
- Freak_NL 6y agoSyncthing is really nice. It does a thing, and does it well. Once it's set up on the devices that share some stuff it just works. Another combination that works really well for me is the pass Password store¹ and Syncthing to share some passwords with another user. I have pass set up to have a subdirectory shared with my partner (by registering both our GPG-keys in a .gpg-id file in that directory), and that subdirectory is synched by Syncthing to our devices. So now we can store shared accounts there, and have them available in our respective password managers. 1: https://www.passwordstore.org/ https://www.passwordstore.org/
- hbogert 6y agoDo you mean pass can encrypt with multiple keys so you can share creds? I thought it only supported one gpg per store.
- nulbyte 6y agoFrom GP's link: > Multiple GPG keys can be specified...
- Freak_NL 6y agoNo, you can use as many keys as you like. By default it uses the local user's key, but you can specify a list of keys in any directory part of pass' store by adding a .gpg-id text file with one key fingerprint per line.
- philsnow 6y agoIn particular I use this so that I can have one gpg key for my iphone (which is secured with a long passcode + face lock) and one for my laptop (where I use a gpg key that's baked into a yubikey). I keep it in sync with a git repo (I started with a free tier CodeCommit back before github allowed unlimited free private repos).
- StavrosK 6y agoI agree about Syncthing, I've been using for various folders between various computers and it always works really well. I even have it sync my programs directory. It's fast, very light on resources and syncs very well. I can't recommend it enough.
- AshamedCaptain 6y agoThe amount of times I have managed to slightly misconfigure Syncthing and as a result it _deletes all my files_ is incredible. Last time, I configured a Receive only folder in device Y, but forgot to mark it as "shared to device Y" in device X's settings. Net result: directory erased in device Y. Sure, I still had the copy in device X, but that was gigabytes that needed copying around, a couple hours of wasted time. It's just mind boggling that Syncthing would happily go around deleting thousands of files without warning specially with a minor config error .
- zikzak 6y agoThis is why I use Git for this (running MGit on my Android phone). It's really not a huge hassle to do this manually once a day or so (maybe more if I'm doing some out of band stuff).
- RMPR 6y agoWhen doing this, I was always wondering how to name my commits, when I was in a good mood I wrote good and meaningful commit messages, but when it was not the case, I just slap "aaa". In any case, nothing prevents you to use both, syncthing for a more reactive sync and git as a kind of backup.
- sdafsdfwer 6y agoalias gl='git add *; git commit -am"lazy"; git push'
- ryanianian 6y agoFor "running" files I've rarely found commit messages to be all that useful and instead just like to diff head versus last week or something. I have a git alias setup called "git autopush" that adds all, commits with a generic "[autopush]" message, and pushes to the upstream remote. I use this for my repos of "running" files like org files etc. I've modified it recently to require a config param to explicitly enable it because I'm afraid of typing it in work repos :)
- 6y ago
- lgrebe 6y agoMissed opportunity for https://noteplan.co/ https://noteplan.co/
- imglorp 6y agoLooks slick but not comparable. That's (1) pay and closed, and (2) apple only.
- Arkanosis 6y agoI've been using Emacs org-mode + Syncthing + Orgzly (org-mode on Android) for 2 years now, and it's my favorite notes, todo-list and reminders setup so far.
- RMPR 6y agoOn top of that, my org folder is under version control, very useful if you somehow manage to lose all your devices (very unlikely but... the Tao of backup you know http://www.taobackup.com/ http://www.taobackup.com/)
- oefrha 6y agoUnfortunately, in my experience using Syncthing while doing cross-platform development (coding on a Mac, compiling and testing on a Windows machine, both machines connected to the same Ethernet switch and sitting right next to each other), syncing with Syncthing is far from instant. If you just want a cheap Markdown editor with instant syncing, I recommend self-hosted CodiMD. Of course that’s not an option if you actually want the full power of org-mode.
- StavrosK 6y agoThat's odd, it's pretty instant for me. I've been an extremely happy user for years.
- oefrha 6y agoNot sure if it has anything to do with file count. I sync a couple thousand files in a directory with close to a million files (aggressively ignored most), although I was talking about changing one file at a time and having the change show up on the other machine maybe 15 to 20 seconds later — or longer, can’t recall exactly. Scanning is very slow too (this is on a fast SSD).
- StavrosK 6y agoHmm, that's definitely not typical for me, it only takes a second or two for files to show up. It should be using inotify to be notified of changes, but I don't know if there's a difference on OS X (I'm on Linux).
- oefrha 6y agoMy experience has been on macOS and Windows, slow both ways. I haven’t used it on Linux. On macOS FSEvents or kqueue can be used, I’m not sure which one is used. They are definitely using a notification mechanism though, otherwise changes won’t even happen in 15s.
- 6y ago
- valera_rozuvan 6y agoWho can tell me which Android app should be used? Syncthing [1] or Syncthing-Fork [2]? ---------- [1] https://play.google.com/store/apps/details?id=com.nutomic.syncthingandroid https://play.google.com/store/apps/details?id=com.nutomic.sy... [2] https://play.google.com/store/apps/details?id=com.github.catfriend1.syncthingandroid https://play.google.com/store/apps/details?id=com.github.cat...
- StavrosK 6y agoI use Syncthing and it works really well, never heard of Fork though. EDIT: Fork looks really good too, I've installed it to check.
- tams 6y agoI'm using the fork after having issues with the sync stopping and restarting only after device reboots with the original version. So far so good.
- karlicoss 6y agoSyncthing-Fork is great, allows to adjust sync settings (i.e. network/battery) per-folder
- myu701 6y agoI personally would only use the main one unless I had a specific reason to need the fork. I've never had any problems with Syncthing from F-Droid (and syncthing lite for the wimpy cheap android tablets)
- aasasd 6y agoThe fork works way better as an app. The original just wraps the whole web interface as a single screen inside the app, so you have to trod through that web interface to do any setup. On top of that, afaik the original is rather sparsely developed and released.
- kossmoboleat 6y agoI wish there was also an iOS version, that I could also access my notes from there.
- zmaqsood 6y agoWould this help? https://beorgapp.com/ https://beorgapp.com/
- pico303 6y agoThere is. It’s called Beorg. It’s fantastic. https://beorgapp.com/ https://beorgapp.com/
- Arubis 6y agoIt is indeed, but within the context of this overall discussion, note that BeOrg doesn’t support SyncThing. There isn’t an alternative for that particular user case without dual-syncing with another sync provider. Best I can tell, there are zero iOS apps of any kind with SyncThing support. You can (and I have) configure SyncThing to track and sync changes within the iCloud app directory corresponding to BeOrg. It definitely feels janky and I worry about file corruption.
- unhammer 6y agoThere's no (working) iOS SyncThing app, unfortunately: https://forum.syncthing.net/t/ios-iphone-crowdfunding-on-bountysource/13136/16 https://forum.syncthing.net/t/ios-iphone-crowdfunding-on-bou...
- tams 6y agoTo avoid sync issues it's important that Emacs is set up for both autosaving and reloading on external changes. If you add Orgzly to the mix for mobile access, you also want to configure Orgzly to auto-save whenever you open it or make changes. With these two adjustments this becomes a pretty good setup.
- RMPR 6y agoYou can also set up a git repository as a kind of backup, MGit is the mobile client I use for that.
- ubermonkey 6y agoJust so it's in the thread: I believe the emacs option for "hey, that file changed on disk; I'll reload" is (global-auto-revert-mode 1)
- ledauphin 6y agoI've been using emacs for about 15 years and didn't realize this was an option. I've added it to my config - thank you! (and thanks to the GP as well, of course!)
- ubermonkey 6y agoI am a total emacs noob given my relatively shallow exploitation of it, and my absolute ignorance of lisp. This is absolutely the first time I've provided an emacs answer someone found useful in a technical forum. I'm gonna need a minute. (heh)
- zmaqsood 6y agoTo build on this tip, the following will shorten file revert time but a couple seconds (default is 5 secs) (setq auto-revert-interval 1) Found in https://www.gnu.org/software/emacs/manual/html_node/emacs/Reverting.html https://www.gnu.org/software/emacs/manual/html_node/emacs/Re...
- codemac 6y ago
- pgorczak 6y agoI've been using the same combo for a few years. You can run a Syncthing image off Docker Hub directly e.g. using compute engine and optionally persist config and data in volumes, making for a pretty easy setup.
- roland35 6y agoI love org mode (with evil for vim goodness), but the one problem I really wish was easier is image support. Also sometimes a few missed key strokes can really screw up a document! My normal mistake is hitting "J" instead of "j" (vim command for combining the next two lines vs just navigating down one line). I am always interested in seeing what else is out there for organizing, glad to see org mode is still popular!
- corney91 6y agoI've tried Org+Evil a couple of times and really liked it, but missing key strokes always make me go back to Vim+Markdown. If I mistype something in Vim it's trivial to undo/redo to get where I need to be, but I never managed to get my head around the Emacs undo behaviour and that just scared me away.
- dan-robertson 6y agoIf you don’t use undo-tree then emacs undo works like this: 1. You have a linked list of states with your current state: A->B->C->D->(E) 2. Pressing undo moves you to earlier states. Once: A->B->C->(D)->E Twice: A->B->(C)->D->E Doing anything that isn’t undoing again will add your undoings to the history: A->B->C->D->E->D->(C) So now when you undo you in some sense redo what you had preciously undone, then undo it again, then undo further. The advantage is that you never lose history by undoing. The disadvantage is that it can be confusing. Undo in region complicates this.
- corney91 6y agoThanks for the explanation, that makes sense. Good to know that states A and B are still accessible, I remember thinking they'd disappeared forever. Next time I try emacs (no doubt there'll be a next time!) I'll bear this in mind.
- aasasd 6y agoI'd consider using undo-tree instead. First, it might make more sense. Second, afaik Vim has about the same model (haven't used it in a while though). Undo-tree's navigation interface isn't a pinnacle of intuitiveness, however.
- olivierestsage 6y agoIn case anyone is interested in learning more about Org-mode, there are a lot of wonderful tutorials out there. I've found the trick is to start small, usually just with some tasks, and let it grow from there as your needs change. Some great guides: https://orgmode.org/worg/org-tutorials/org4beginners.html https://orgmode.org/worg/org-tutorials/org4beginners.html https://orgmode.org/orgguide.pdf https://orgmode.org/orgguide.pdf
- RMPR 6y agoAn invaluable resource is this Google TechTalk https://www.youtube.com/watch?v=oJTwQvgfgMM https://www.youtube.com/watch?v=oJTwQvgfgMM it was my first introduction to org-mode.
- beilabs 6y agoI've been a happy Dropbox + org-mode user across multiple devices for some time. I tend to divide up my org files across different subjects and then tie them into org-agenda. I also archive my org items on a regular basis to clean up certain files. What's the benefit of Syncthing? I know nothing about it.
- ubermonkey 6y agoI am also curious. I took the time to configure Dropbox from the command line on my headless Linode, and while it's not foolproof -- which is at this point probably on me, since I don't have it running as a proper init or whatever -- it's so far Good Enough, and as such I'm not super convinced going to a secondary sync tool is useful to me. (I mean, since I already rely on Dropbox to manage sync of a broader set of files between 3 other computers + my iOS devices.)
- nathcd 6y ago> What's the benefit of Syncthing? Not needing a service/server is probably the main benefit, compared to stuff like Dropbox or Nextcloud.
- ledauphin 6y agoI use it for everything that I don't need to share with other people, because it scales 'for free' with the size of my data (my music library, for instance), and because I can use it across many different devices but selectively sync different 'types' of things to different devices (e.g., a large photo collection doesn't need to be on my mobile phone).
- rossvor 6y agoSimilar to my note setup with one change -- Vimwiki + Syncthing. I'm also using(abusing) git to daily auto-commit everything, so I could delete everything without worry, and browse history with tooling I'm already familiar with. This setup works quite well across all the devices I use (desktop, laptop, phone). With a caveat that phone setup is mostly read-only (apart from ticking the grocery list on occasion) due to it being just a folder with text files there. I'm actually curious to hear from other vim to emacs org-mode converts since the article didn't elaborate on the cons and pros of the switch. How significantly is org-mode better than vimwiki and is it worth exploring for someone who's been baking in vim ecosystem for a decade?
- swalladge 6y ago"Evil Mode: Or, How I Learned to Stop Worrying and Love Emacs" by Aaron Bieber is an interesting talk on switching from vim to emacs + org-mode. https://www.youtube.com/watch?v=JWD1Fpdd4Pc https://www.youtube.com/watch?v=JWD1Fpdd4Pc
- rossvor 6y agoThanks, I just watched the video, and it did intrigue me enough to install spacemacs to start playing around with it. Having "real" spreadsheet like tables within my wiki does look appealing. I do in fact already have a bunch of small spreadsheets doing some very basic stuff, and it does make more sense for them to be within the wiki itself.
- zmaqsood 6y agoI'm a refugee from the Great Google Tasks switch to a tiny UX and switching off their Canvas (full screen) mode. Had to migrate thousands of tasks. I used https://tasks-backup.appspot.com/ https://tasks-backup.appspot.com/ but that has shut down. Don't know of an easy alternative. I now use a combination of Orgzly, Dropbox, Tasker and Emacs to keep my desktop and mobile notes in sync and it works great. The benefits are: plaintext/markdown (org-mode), automatic backup with restore (dropbox), open source or free apart from I think a couple of pounds for Tasker and of course whatever you are paying for dropbox. Plus, unlike Syncthing, only 1 version of a to-do list file at any one time, so less conflicts. Wider benefit of to-do list customisation limited only by your imagination and patience, via emacs lisp. My various To-do lists (split according to the Eisenhower Matrix) are saved in a dropbox folder. My Orgzly app is set to read from that dropbox folder: Settings > Sync > Repositories > Connect to dropbox My Tasker is set up as Tasker > Tasks > New '+' > Enter Name > New '+' > Code > Run Shell Copy and paste into Command field: am start-foreground-service --user 0 -a com.orgzly.intent.action.SYNC_START com.orgzly/com.orgzly.android.sync.SyncService You can also set a helpful notification via Alert > Notify > Title Then in Profiles I set the task to run - Every hour - Whenever Orgzly is opened or closed - Whenever the phone display is switched on or off Takes about 2 seconds to sync, whenever triggered. One problem with my device (Huawei) is the very aggressive battery optimisation which simply can't be turned off via their settings. You can fix this by going in via ADB as follows: adb shell pm uninstall --user 0 com.huawei.powergenie (thanks to https://dontkillmyapp.com/huawei https://dontkillmyapp.com/huawei) You may need to use ./adb (thanks to https://stackoverflow.com/questions/7609270/not-able-to-access-adb-in-os-x-through-terminal-command-not-found https://stackoverflow.com/questions/7609270/not-able-to-acce...) and Settings > System > Dev options > dev options switch on (thanks https://www.xda-developers.com/install-adb-windows-macos-linux/ https://www.xda-developers.com/install-adb-windows-macos-lin... ) ... It's crazy that in 2020 I have to set all this up for a smooth experience. What I really, really want is an org-mode compatible (I'd live with regular markdown) web app with offline access and auto-sync, accessible from my mobile device and desktop browser and customisable or just any sane keyboard shortcuts. If free or open-source in Vue.js or React + Firebase even better.
- yewenjie 6y agoI am syncing between Orgzly and Emacs by using an automated git script via systemd in laptop and crond inside Termux in phone, along with a git forge for upstream. This is the only setup that worked for me (I don't have a personal server to keep syncing with syncthing and Orgzly WebDav experience was frustrating. )
- neeasade 6y agoI have the same setup, with one addition -- I use termux as an android share target so I can easily capture files and notes on the go. http://notes.neeasade.net/mobile-capture-with-orgzly-termux-and-syncthing.html#h-c6bb3ae8-90ab-473d-a487-e7a020a003af http://notes.neeasade.net/mobile-capture-with-orgzly-termux-...
- johntash 6y agoThanks for posting about this. Sharing urls/files/text/etc to termux is something I never thought about doing. I usually end up sharing urls to the gmail app and just sending it to my todo@ e-mail to go through later. I like your idea of sharing to a script in termux better though. Is your script available somewhere? Is it just a simple "echo org-stuff >> capture.org"?
- oldsj 6y agoI’m syncing my org files with Nextcloud, with an S3 bucket configured as a backend [1]. I can even sync to my org files and agenda to my phone configuring beorg to sync to Nextcloud via WebDAV. I’m still pretty new to emacs and org but this is very close to what I would consider an ideal note / task management solution. It’s all plain text (even in S3) and S3 is configured with server side encryption and versioning enabled. I highly recommend Doom Emacs [2] and Zaiste Programming’s DoomCasts playlist on YouTube [3] to those just getting started. [1] https://docs.nextcloud.com/server/15/admin_manual/configuration_files/external_storage/amazons3.html https://docs.nextcloud.com/server/15/admin_manual/configurat... [2] https://github.com/hlissner/doom-emacs https://github.com/hlissner/doom-emacs [3] https://www.youtube.com/playlist?list=PLhXZp00uXBk4np17N39WvB80zgxlZfVwj https://www.youtube.com/playlist?list=PLhXZp00uXBk4np17N39Wv...