Browse Source

added beancount to babel

master
Marc Pohling 6 years ago
parent
commit
4e5d3264d4
1 changed files with 9 additions and 6 deletions
  1. 15
      config.org

15
config.org

@ -366,6 +366,7 @@ This code block is linux specific. Loading languages which aren't available seem
(js . t) (js . t)
(latex . t) (latex . t)
(ledger . t) (ledger . t)
(beancount . t)
(lisp . t) (lisp . t)
(python . t) (python . t)
(R . t) (R . t)
@ -381,12 +382,13 @@ This code block is linux specific. Loading languages which aren't available seem
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun my-org-confirm-babel-evaluate (lang body) (defun my-org-confirm-babel-evaluate (lang body)
"Do not confirm evaluation for these languages." "Do not confirm evaluation for these languages."
(not (or (string= lang "C")
(not (or (string= lang "beancount")
(string= lang "C")
(string= lang "emacs-lisp")
(string= lang "java") (string= lang "java")
(string= lang "ledger")
(string= lang "python") (string= lang "python")
(string= lang "R") (string= lang "R")
(string= lang "ledger")
(string= lang "emacs-lisp")
(string= lang "sqlite")))) (string= lang "sqlite"))))
(setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate) (setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)
#+end_src #+end_src
@ -637,9 +639,9 @@ deactivate
(load "/home/marc/.emacs.d/elisp/beancount-mode.el") ; somehow load-path in use-package doesn't work (load "/home/marc/.emacs.d/elisp/beancount-mode.el") ; somehow load-path in use-package doesn't work
(use-package beancount (use-package beancount
:load-path "/home/marc/.emacs.d/elisp" :load-path "/home/marc/.emacs.d/elisp"
:mode ("\\.beancount$" . bean-mode)
:mode ("\\.beancount$" . beancount-mode)
:init :init
(add-hook 'bean-mode-hook 'company/beancount-mode-hook)
(add-hook 'beancount-mode-hook 'company/beancount-mode-hook)
(setenv "PATH" (setenv "PATH"
(concat (concat
"/opt/beancount/bin:" "/opt/beancount/bin:"
@ -853,7 +855,8 @@ Backend configuration for beancount
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun company/beancount-mode-hook() (defun company/beancount-mode-hook()
(set (make-local-variable 'company-backends) (set (make-local-variable 'company-backends)
'((company-beancount company-dabbrev) company-capf company-files))
'(company-beancount))
; '((company-beancount company-dabbrev) company-capf company-files))
(company-mode t) (company-mode t)
) )
#+end_src #+end_src

Loading…
Cancel
Save