1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-10-02 14:31:05 +02:00

Merge branch 'master' into swig-python

This commit is contained in:
q-posev 2021-09-10 14:04:15 +02:00
commit b1f1aee7ab
3 changed files with 8 additions and 19 deletions

View File

@ -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}

View File

@ -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'

View File

@ -18,29 +18,15 @@
(setq org-confirm-babel-evaluate nil)
(global-font-lock-mode t)
(setq org-src-fontify-natively t)
(require 'org)
(org-babel-do-load-languages
'org-babel-load-languages
'(
(emacs-lisp . t)
(shell . t)
(python . t)
(fortran . t)
(C . t)
(org . t)
(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")