1 [[!meta title="Working with Org-mode: Committing Changes Everywhere"]]
3 I'm a huge fan of [Org-mode](http://orgmode.org/), and I keep all of
4 my org-mode files in git repositories which are under
5 [myrepos](http://myrepos.branchable.com/) control.
7 However, because I often make lots of changes to my agenda and notes,
8 I hate having to manually visit each individual project and make
10 [And it's also annoying when I forget to commit a specific change and then have to try to get my laptop and desktop back into sync.]
12 Luckily, myrepos can easily run a command in parallel in all of the
13 repositories! The following "update_org_files" command will update all
14 of my org-file containing repositories in parallel:
19 ORG_GREP='-e .org$ -e .org_archive$ -e .org_done$'
21 if [ "x$1" == "xdoit" ]; then
22 if git status --porcelain -z | grep -z '^ M' | grep -zq $ORG_GREP; then
23 git status --porcelain -z | grep -z '^ M' | grep -z $ORG_GREP | \
25 xargs -0 git commit -m'update org files'
29 emacsclient -n -e '(org-save-all-org-buffers)' >/dev/null 2>&1
30 mr -d ~ -j5 run update_org_files doit;
35 [updated version](http://git.donarmstrong.com/?p=bin.git;a=blob_plain;f=update_org_files;hb=HEAD)
37 [git repository](http://git.donarmstrong.com/bin.git)
39 [[!tag tech org-mode emacs debian]]