From 96c6760a82404074d81d044ecfd691b154dca092 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 14 Jan 2014 12:42:16 -0800 Subject: [PATCH] save org mode buffers before calling update_org_files and update_org_ical --- update_org_files | 2 ++ update_org_ical | 1 + 2 files changed, 3 insertions(+) diff --git a/update_org_files b/update_org_files index 2d0244c..3c71d15 100755 --- a/update_org_files +++ b/update_org_files @@ -4,6 +4,8 @@ ORG_GREP='-e .org$ -e .org_archive$ -e .org_done$' cd ~; +emacsclient -n -e '(org-save-all-org-buffers)' >/dev/null 2>&1 + for a in $(mr list |grep 'list:'|grep -v 'finished'|awk -F'list: ' '{print $2}' 2>/dev/null); do (cd "$a"; if git status --porcelain|grep '^ M'|grep -q $ORG_GREP; then diff --git a/update_org_ical b/update_org_ical index eebb11a..3f928d2 100755 --- a/update_org_ical +++ b/update_org_ical @@ -7,6 +7,7 @@ LOCKOPTS=-q if [ -n "$PS1" ]; then LOCKOPTS=-f; fi; +with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical emacsclient -n -e '(org-save-all-org-buffers)' >/dev/null 2>&1 with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical emacs --batch -l ~/.emacs \ --eval '(setq org-icalendar-combined-description "Don Armstrong’s Calendar (org-mode)")' \ --eval '(setq org-icalendar-combined-name "Don Armstrong (org-mode)")' \ -- 2.39.2