From b1e4d7be1480ff3b4df6727726141d56e675d6fa Mon Sep 17 00:00:00 2001 From: Marc Pohling Date: Sat, 26 May 2018 10:49:19 +0200 Subject: [PATCH] made shell script to test and fix existence of ob-beancount symlink --- config.org | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/config.org b/config.org index 2bd4724..35000e1 100644 --- a/config.org +++ b/config.org @@ -650,8 +650,9 @@ To avoid problems executing source blocks out of the box. [[https://emacs.stackexchange.com/a/28604][Others have the same problem, too]]. The solution is to remove the .elc files form the package directory: #+BEGIN_SRC shell - var ORG_DIR=(let* ((org-v (cadr (split-string (org-version nil t) "@"))) (len (length org-v))) (substring org-v 1 (- len 2))) - rm ${ORG_DIR}/*.elc +var ORG_DIR=(let* ((org-v (cadr (split-string (org-version nil t) "@"))) (len (length org-v))) (substring org-v 1 (- len 2))) +rm ${ORG_DIR}/*.elc +echo 'cleaned .elc from package directory' #+END_SRC ** Setup @@ -958,6 +959,29 @@ deactivate ) #+END_SRC + To support org-babel, check if it can find the symlink to ob-beancount.el. + +#+BEGIN_SRC shell +orgpath=`find /home/marc/.emacs.d/elpa/ -type d -name "org-plus*" -print` +beansym="$orgpath/ob-beancount.el" +bean="/home/marc/Archiv/Programmierprojekte/Lisp/beancount-mode/ob-beancount.el" + +if [ -h "$beansym" ] +then + echo "$beansym found" +elif [ -e "$bean" ] +then + echo "creating symlink" + ln -s "$bean" "$beansym" +else + echo "$bean not found, symlink creation aborted" +fi +#+END_SRC + +#+RESULTS: +: /home/marc/.emacs.d/elpa/org-plus-contrib-20180521/ob-beancount.el found + + Installing fava for reports is strongly recommended. #+BEGIN_EXAMPLE