From 43bfcba2f70cac12a76fb3a3a0162969198a772c Mon Sep 17 00:00:00 2001 From: Marc Pohling Date: Mon, 16 Apr 2018 19:15:02 +0200 Subject: [PATCH] small fixes for beancount --- config.org | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/config.org b/config.org index 70a6122..b6c1dd8 100644 --- a/config.org +++ b/config.org @@ -634,16 +634,18 @@ deactivate ; :load-path "/opt/beancount/elisp/" ;; :ensure t ; :mode ("\\.beancount$" . beancount-mode) + (load "/home/marc/.emacs.d/elisp/beancount-mode.el") ; somehow load-path in use-package doesn't work (use-package beancount - :load-path "/home/marc/.emacs.d/elisp/" + :load-path "/home/marc/.emacs.d/elisp" :mode ("\\.beancount$" . bean-mode) - ) - (setenv "PATH" + :init + (add-hook 'bean-mode-hook 'company/beancount-mode-hook) + (setenv "PATH" (concat "/opt/beancount/bin:" (getenv "PATH")) + ) ) - (add-hook 'beancount-mode-hook 'company/beancount-mode-hook) ) #+end_src @@ -851,7 +853,7 @@ Backend configuration for beancount #+begin_src emacs-lisp (defun company/beancount-mode-hook() (set (make-local-variable 'company-backends) - '((company-dabbrev) company-capf company-files)) + '((company-beancount company-dabbrev) company-capf company-files)) (company-mode t) ) #+end_src @@ -928,6 +930,15 @@ Maybe add [[https://github.com/hlissner/emacs-company-dict][company-dict]]? It's (add-hook 'emacs-lisp-mode-hook 'company/elisp-mode-hook) #+end_src +Add some helpers to handle and understand macros +#+begin_src emacs-lisp +(use-package macrostep + :ensure t + :init + (define-key emacs-lisp-mode-map (kbd "C-c e") 'macrostep-expand) + (define-key emacs-lisp-mode-map (kbd "C-c c") 'macrostep-collapse)) +#+end_src + ** Python Systemwide following packages need to be installed: