[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Favorite way of syncing?

From: Erik Hetzner
Subject: Re: [O] Favorite way of syncing?
Date: Fri, 11 Sep 2015 22:18:05 -0700
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/25.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Hi Tobias,

On Fri, 11 Sep 2015 06:59:31 -0700,
Tobias Frischholz <address@hidden> wrote:
> Hey there!
> I was wondering what is your favorite way of syncing your org files and 
> everything.
> I’ve checked out unison, but I want more of an automated system that 
> synchronizes my two clients via an SSH server.

> […]

I finally settled on the following (although syncthing looks

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’t
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!

  cd ~/c/notes/h
  git pull origin master
  git annex copy --fast --to=cloud
  git annex sync

best, Erik
Sent from my free software system <http://fsf.org/>.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]