Browse Source

Support Emacs Org Mode based diffs

We load ~/.emacs as --batch implies -q
but some customization might be expected.

For the same reason something like --tmpdirprefix .
is necessary for .dir-locals.el to work.

Finally, if on Windows and using Chocolatey,
real emacs and not shim is neccesary
as shim doesn't wait for process completion.

path %ChocolateyInstall%\lib\emacs64\tools\emacs\bin;%PATH%
master
Mikhail Titov 10 years ago
parent
commit
e0c77f60d8
  1. 8
      git-latexdiff

8
git-latexdiff

@ -431,6 +431,13 @@ check_knitr () {
main="${main%\.*}.tex"
}
check_org () {
if test -z "$prepare_cmd"; then
prepare_cmd="emacs --batch --eval \"(load \\\"~/.emacs\\\")\" \"$main\" -f org-latex-export-to-latex --kill"
fi
main="${main%\.*}.tex"
}
log_cmd () {
log=$1
shift
@ -463,6 +470,7 @@ ext=${main##*\.}
case "$ext" in
Rnw) check_knitr ;;
Rtex) check_knitr ;;
org) check_org ;;
*) ;;
esac

Loading…
Cancel
Save