Back with Org Mode

If there is one thing I’d like to commit it must be the my time mangement improvements. For that purpose, Emacs Org-mode is the ultimate tool for programmers. I can keep my notes nicely and I can track my tasks/errands all together. But all my notes are stored in my linux box, I lose access to them once I am away. From that reason, I was always on-and-off with using org-mode due to the portability. We are not in the age doing everything with desktop anymore, more often I need to track my TODOs from cellphone as well.

A long time ago my tooling of choice was git. It seems the perfect tool, optimised for text tracking, and potentially we can use it for text merging. Mannually typing git add *, git commit all the time is annoying, luckly we can do that with a script.

# sync everything
git pull;
git add *;
git commit -m "$(date)"
git push

While this is doable on the linux box, and it was my perferrable method when I was synchronizing notes among my desktops. On cellphones, however, it is not the most convenient way. I had to open pocket-git, pull, resolve conflicts, then on Orgzly, sync with git folder again. everytime I commit would have to pull immediately on the cellphone to avoid conflicts otherwise there were always conflicts for some reason.

Syncthing was the another trial. It is decentralized, you can use it to synchronize any file from different computers so long as we are online, eventially they would be synchronized. Its decentralized nature is both the good and devil here, I don’t have to connect/trust to any servers. My files are with me and only with me. But then I have to keep my devices online for synchronize. It is obviously not the case.

Then I turned to Webdav, at the moment, the best solution among all, given that I can find a Webdav server close-enough. Nextcloud providers are the best choices, sadly all of them are far away from me. Setting up my own nextcloud on a nextcloud is an overkill and much more expensive than necessary. Luckly at where I am, there is a free option, fast enough (only 10ms from me) but a little confusing to setup.

The Webdav server used requires the following options to turn on for mounting davfs:

#sample from davfs2.conf
if_match_bug		1 #otherwise cannot write via davfs 
ignore_dav_header	1 #otherwise davfs failing connect to the server

At the first I could not mount the davfs. Based on what people posted online, this specific webdav server generates wrong capabilities and requires ignore_dav_header set for mounting. Then just when I was happy about finding a fast webdav server, I found out I cannot write to the davfs mount point. It bugged a whole day, disabling the cache, disabling the delay, nothing works. I was about to give up, falling back using cadaver util. I found out folks on launchpad were experiencing the same problem. Given nothing else works, I just gave it a try and it was like magic. This serves as a warning, DO NOT expect the private web service you are using works as expected.

This is probably the last block on my way. Now I can sync the note by one guesture on the phone. For summng up, on desktop:

  1. mount the webdav server using davfs.
  2. Work, coding, capturing on emacs as usual.
  3. umounting once away from keyboard.

on cellphone:

  1. open the APP, drag to sync,
  2. performing org operations if necessary.
  3. tap to sync again.

Directly editing remote files maybe laggy in emacs if the server is far away. For that reason, in the future, I may write a lisp function for pulling and pushing on emacs as well. Orglzy is my current mobile app of choice. It is not the most pretty one but supports editing, if not require editing, Orgro supports more syntax highlighting. Organice is another Webapp I can use but unfortunately not compatible with my current webdav server.

comments powered by Disqus