]> git.donarmstrong.com Git - bin.git/commitdiff
save org mode buffers before calling update_org_files and update_org_ical
authorDon Armstrong <don@donarmstrong.com>
Tue, 14 Jan 2014 20:42:16 +0000 (12:42 -0800)
committerDon Armstrong <don@donarmstrong.com>
Tue, 14 Jan 2014 20:42:16 +0000 (12:42 -0800)
update_org_files
update_org_ical

index 2d0244c3e4d863d04b80b78fa1b29deda2e75e08..3c71d1558e16c16701fa37901a6e9cf5820df39c 100755 (executable)
@@ -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
index eebb11a50a8cf1e9a05e88ebafc9bc363cde9608..3f928d260933a9a87bf6ad8850787ca0640ddb2b 100755 (executable)
@@ -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)")' \