diff --git a/tools/build_trexio.sh b/tools/build_trexio.sh index 6f40ab6..95009cd 100755 --- a/tools/build_trexio.sh +++ b/tools/build_trexio.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e # Check that script is executed from tools directory if [[ $(basename $PWD) != "tools" ]] ; then @@ -17,11 +18,12 @@ function tangle() { local command="(org-babel-tangle-file \"$1\")" emacs --batch \ - --eval "(require 'org)" \ - --eval "(org-babel-do-load-languages 'org-babel-load-languages '((python . t)))" \ - --eval "(setq org-confirm-babel-evaluate nil)" \ + --load=${TOOLS}/emacs/config_tangle.el \ --eval "$command" } +# --eval "(require 'org)" \ +# --eval "(org-babel-do-load-languages 'org-babel-load-languages '((python . t)))" \ +# --eval "(setq org-confirm-babel-evaluate nil)" \ # Create trex.json file cd ${TREXIO_ROOT} diff --git a/tools/emacs/config_doc.el b/tools/emacs/config_doc.el index 9501d64..e22fedb 100755 --- a/tools/emacs/config_doc.el +++ b/tools/emacs/config_doc.el @@ -14,6 +14,7 @@ ;(setq org-latex-listings t) ;(add-to-list 'org-latex-packages-alist '("" "listings")) ;(add-to-list 'org-latex-packages-alist '("" "color")) +(setq org-babel-python-command "python3") (require 'subr-x) ;; for `when-let' diff --git a/tools/emacs/config_tangle.el b/tools/emacs/config_tangle.el index 6f1eed1..ff60f75 100755 --- a/tools/emacs/config_tangle.el +++ b/tools/emacs/config_tangle.el @@ -31,16 +31,5 @@ (makefile . t) )) - -; The following is required to compute the file names -(setq pwd (file-name-directory buffer-file-name)) -(setq name (file-name-nondirectory (substring buffer-file-name 0 -4))) -(setq f (concat pwd name "_f.f90")) -(setq fh (concat pwd name "_fh.f90")) -(setq c (concat pwd name ".c")) -(setq h (concat name ".h")) -(setq h_private (concat name "_private.h")) -(setq c_test (concat pwd "test_" name ".c")) -(setq f_test (concat pwd "test_" name "_f.f90")) -(org-babel-lob-ingest "../tools/lib.org") +(setq org-babel-python-command "python3 -q")