From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik Hetzner Subject: Re: Favorite way of syncing? Date: Fri, 11 Sep 2015 22:18:05 -0700 Message-ID: <55f3b58e.0a01450a.289e6.ffffa323@mx.google.com> References: Reply-To: Erik Hetzner Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZadCX-0006OP-OK for emacs-orgmode@gnu.org; Sat, 12 Sep 2015 01:18:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZadCT-00005Y-0d for emacs-orgmode@gnu.org; Sat, 12 Sep 2015 01:18:13 -0400 Received: from mail-pa0-x231.google.com ([2607:f8b0:400e:c03::231]:35589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZadCS-0008Uz-OR for emacs-orgmode@gnu.org; Sat, 12 Sep 2015 01:18:08 -0400 Received: by pacfv12 with SMTP id fv12so94682412pac.2 for ; Fri, 11 Sep 2015 22:18:07 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Tobias Frischholz Cc: Org Mode Mailing List Hi Tobias, On Fri, 11 Sep 2015 06:59:31 -0700, Tobias Frischholz wrote: >=20 > Hey there! >=20 > I was wondering what is your favorite way of syncing your org files and e= verything. > I=E2=80=99ve checked out unison, but I want more of an automated system t= hat synchronizes my two clients via an SSH server. > [=E2=80=A6] I finally settled on the following (although syncthing looks promising): 1. git for my 2 org dirs (for home & work) 2. git-annex to manage attachments (I have a local patch to automatically get annex files from a repo when opening, but haven=E2=80=99t submitted it yet) 3. git-auto-commit-mode with the following setup: ;; auto-commit to git if the file is in one of my notes repos (defun egh:maybe-git-auto-commit-mode () (let* ((bfn (buffer-file-name)) (root (and bfn (vc-git-root (buffer-file-name)))) (full-root (and root (expand-file-name root)))) (if (or (string-equal full-root "/home/egh/c/notes/h/") (string-equal full-root "/home/egh/c/notes/w/")) (git-auto-commit-mode +1)))) (add-hook 'org-mode-hook #'egh:maybe-git-auto-commit-mode) (setq-default gac-automatically-push-p t) 4. A simple script called morning to sync it up: Hope that helps! #!/bin/sh cd ~/c/notes/h git pull origin master git annex copy --fast --to=3Dcloud git annex sync best, Erik -- Sent from my free software system .