Browse Source

made shell script to test and fix existence of ob-beancount symlink

master
Marc Pohling 6 years ago
parent
commit
b1e4d7be14
1 changed files with 26 additions and 2 deletions
  1. 28
      config.org

28
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: 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 #+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 #+END_SRC
** Setup ** Setup
@ -958,6 +959,29 @@ deactivate
) )
#+END_SRC #+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. Installing fava for reports is strongly recommended.
#+BEGIN_EXAMPLE #+BEGIN_EXAMPLE

Loading…
Cancel
Save