You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

628 lines
19 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. #+TITLE: Emacs configuration file
  2. #+AUTHOR: Marc
  3. #+BABEL: :cache yes
  4. #+PROPERTY: header-args :tangle yes
  5. * TODOS
  6. - Paket exec-path-from-shell, um PATH aus Linux auch in emacs zu haben
  7. - Smart mode line?
  8. - Theme
  9. - evil-collection or custom in init file?
  10. - Hydra
  11. - General
  12. - (defalias 'list-buffers 'ibuffer) ;; change default to ibuffer
  13. - ido?
  14. - imenu-list
  15. - treemacs (for linux)
  16. - treemacs-evil?
  17. - treemacs-projectile
  18. - ace-window
  19. - windmove?
  20. - tramp (in linux)
  21. - visual-regexp
  22. - org configuration: paths
  23. - org custom agenda
  24. - org configuration: everything else
  25. - beancount configuration from config.org
  26. - CONTINUE TODO from config.org at Programming
  27. * First start
  28. When pulling the repository the first time, an initial init.el needs to be setup. After start it will replace itself with the configuration from init.org
  29. #+BEGIN_SRC emacs-lisp :tangle no
  30. (require 'org')
  31. (find-file (concat user-emacs-directory "init.org"))
  32. (org-babel-tangle)
  33. (load-file (concat user-emacs-directory "init.el"))
  34. (byte-compile-file (concat user-emacs-directory "init.el"))
  35. #+END_SRC
  36. This function updates init.el whenever changes in init.org are made. The update will be active after saving.
  37. #+BEGIN_SRC emacs-lisp
  38. (defun me/tangle-init ()
  39. "If the current buffer is 'init.org',
  40. the code blocks are tangled, and the tangled file is compiled."
  41. (when (equal (buffer-file-name)
  42. (expand-file-name (concat user-emacs-directory "init.org")))
  43. ;; avoid running hooks
  44. (let ((prog-mode-hook nil))
  45. (org-babel-tangle)
  46. (byte-compile-file (concat user-emacs-directory "init.el"))
  47. (load-file user-init-file))))
  48. (add-hook 'after-save-hook 'me/tangle-init)
  49. #+END_SRC
  50. #+BEGIN_SRC emacs-lisp
  51. (require 'package)
  52. ;; bug before emacs 26.3
  53. (when (version< emacs-version "26.3")
  54. (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3"))
  55. (add-to-list 'package-archives '("elpa" . "https://elpa.gnu.org/packages/") t)
  56. (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
  57. (add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
  58. (add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
  59. (package-initialize)
  60. #+END_SRC
  61. #+BEGIN_SRC emacs-lisp
  62. (unless (package-installed-p 'use-package)
  63. (package-refresh-contents)
  64. (package-install 'use-package))
  65. (setq use-package-verbose nil)
  66. (eval-when-compile
  67. (require 'use-package))
  68. (require 'bind-key)
  69. (use-package diminish
  70. :ensure t)
  71. #+END_SRC
  72. * Default settings
  73. #+BEGIN_SRC emacs-lisp
  74. (defvar me/whoami
  75. (if (string-equal (system-name) "PMTS01")
  76. "work_remote"
  77. (if (string-equal (system-name) "laptop")
  78. "home_laptop"
  79. (if (string-equal (system-name) "PMPCNEU08")
  80. "work_local"
  81. "home_desktop"))))
  82. #+END_SRC
  83. #+BEGIN_SRC emacs-lisp
  84. (defvar MY--PATH_USER_LOCAL (expand-file-name "~/.emacs.d/user-local/"))
  85. (defvar MY--PATH_USER_GLOBAL (expand-file-name "~/.emacs.d/user-global/"))
  86. (defvar MY--PATH_ORG_FILES (expand-file-name "~/Archiv/Organisieren/"))
  87. (defvar MY--PATH_ORG_FILES_MOBILE (expand-file-name "~/Archiv/Organisieren/mobile/"))
  88. (defvar MY--PATH_ORG_JOURNAl (expand-file-name "~/Archiv/Organisieren/Journal/"))
  89. (setq bookmark-default-file (concat MY--PATH_USER_LOCAL "bookmarks"))
  90. (setq recentf-save-file (concat MY--PATH_USER_LOCAL "recentf"))
  91. (setq custom-file (concat MY--PATH_USER_LOCAL "custom.el")) ;; don't spam init.e with saved customization settings
  92. (setq abbrev-file-name (concat MY--PATH_USER_GLOBAL "abbrev_defs"))
  93. (setq backup-directory-alist `((".*" . ,temporary-file-directory)))
  94. (setq auto-save-file-name-transforms `((".*" ,temporary-file-directory)))
  95. (setq save-abbrevs 'silently) ;; don't bother me with asking for abbrev saving
  96. (setq-default create-lockfiles nil) ;; disable lock files, can cause trouble in e.g. lsp-mode
  97. (defalias 'yes-or-no-p 'y-or-n-p) ;; answer with y and n
  98. (setq custom-safe-themes t) ;; don't ask me if I want to load a theme
  99. (setq sentence-end-double-space nil) ;; don't coun two spaces after a period as the end of a sentence.
  100. (delete-selection-mode t) ;; delete selected region when typing
  101. (save-place-mode 1) ;; saves position in file when it's closed
  102. (setq save-place-forget-unreadable-files nil) ;; checks if file is readable before saving position
  103. (setq locale-coding-system 'utf-8)
  104. (set-terminal-coding-system 'utf-8)
  105. (set-keyboard-coding-system 'utf-8)
  106. (set-selection-coding-system 'utf-8)
  107. (if (eq system-type 'windows-nt)
  108. (prefer-coding-system 'utf-8-dos)
  109. (prefer-coding-system 'utf-8))
  110. (blink-cursor-mode -1) ;; turn off blinking cursor
  111. (show-paren-mode t) ;; show other part of brackets
  112. (column-number-mode t)
  113. (setq uniquify-buffer-name-style 'forward)
  114. (setq-default indent-tabs-mode nil) ;; avoid tabs in place of multiple spaces (they look bad in tex)
  115. (setq-default indicate-empty-lines t) ;; show empty lines
  116. (setq scroll-margin 5 ;; smooth scrolling
  117. scroll-conservatively 10000
  118. scroll-preserve-screen-position 1
  119. scroll-step 1)
  120. (global-hl-line-mode t) ;; highlight current line
  121. (menu-bar-mode 0) ;; disable menu bar
  122. (tool-bar-mode 0) ;; disable tool bar
  123. (scroll-bar-mode 0) ;; disable scroll bar
  124. #+END_SRC
  125. Some windows specific stuff
  126. #+BEGIN_SRC emacs-lisp
  127. (when (eq system-type 'windows-nt)
  128. (remove-hook 'find-file-hooks 'vc-refresh-state)
  129. (progn
  130. (setq gc-cons-threshold (* 511 1024 1024)
  131. gc-cons-percentage 0.5
  132. garbage-collection-messages t
  133. w32-pipe-read-delay 0
  134. w32-get-true-file-attributes nil)
  135. (run-with-idle-timer 5 t #'garbage-collect)))
  136. #+END_SRC
  137. * visuals
  138. ** Font
  139. #+BEGIN_SRC emacs-lisp
  140. (if (string-equal system-type "gnu/linux")
  141. (set-face-font 'default "Hack-10"))
  142. #+END_SRC
  143. ** line wrappings
  144. #+BEGIN_SRC emacs-lisp
  145. (global-visual-line-mode)
  146. (diminish 'visual-line-mode)
  147. (use-package adaptive-wrap
  148. :ensure t
  149. :config
  150. (add-hook 'visual-line-mode-hook #'adaptive-wrap-prefix-mode))
  151. ; :init
  152. ; (when (fboundp 'adaptive-wrap-prefix-mode)
  153. ; (defun my/activate-adaptive-wrap-prefix-mode ()
  154. ; "Toggle `visual-line-mode' and `adaptive-wrap-prefix-mode' simultaneously."
  155. ; (adaptive-wrap-prefix-mode (if visual-line-mode 1 -1)))
  156. ; (add-hook 'visual-line-mode-hook 'my/activate-adaptive-wrap-prefix-mode)))
  157. #+END_SRC
  158. ** line numbers
  159. #+BEGIN_SRC emacs-lisp
  160. (use-package display-line-numbers
  161. :init
  162. (add-hook 'prog-mode-hook 'display-line-numbers-mode)
  163. (add-hook 'org-src-mode-hook 'display-line-numbers-mode)
  164. :config
  165. (setq-default display-line-numbers-type 'visual
  166. display-line-numbers-current-absolute t
  167. display-line-numbers-with 4
  168. display-line-numbers-widen t))
  169. ; (add-hook 'emacs-lisp-mode-hook 'display-line-numbers-mode)
  170. #+END_SRC
  171. ** misc
  172. #+BEGIN_SRC emacs-lisp
  173. (use-package rainbow-mode
  174. :ensure t
  175. :diminish
  176. :hook ((org-mode
  177. emacs-lisp-mode) . rainbow-mode))
  178. #+END_SRC
  179. * undo
  180. #+BEGIN_SRC emacs-lisp
  181. (use-package undo-tree
  182. :ensure t
  183. :diminish undo-tree-mode
  184. :init
  185. (global-undo-tree-mode 1))
  186. #+END_SRC
  187. * imenu-list
  188. A minor mode to show imenu in a sidebar.
  189. Call imenu-list-smart-toggle.
  190. [[https://github.com/bmag/imenu-list][Source]]
  191. #+BEGIN_SRC emacs-lisp
  192. (use-package imenu-list
  193. :ensure t
  194. :config
  195. (setq imenu-list-focus-after-activation t
  196. imenu-list-auto-resize t
  197. imenu-list-position 'right)
  198. :bind
  199. (:map global-map
  200. ([f9] . imenu-list-smart-toggle))
  201. )
  202. #+END_SRC
  203. * which-key
  204. #+BEGIN_SRC emacs-lisp
  205. (use-package which-key
  206. :ensure t
  207. :diminish which-key-mode
  208. :config
  209. (which-key-mode)
  210. (which-key-setup-side-window-right-bottom)
  211. (which-key-setup-minibuffer)
  212. (setq which-key-idle-delay 0.5))
  213. #+END_SRC
  214. * Evil
  215. #+BEGIN_SRC emacs-lisp
  216. (use-package evil
  217. :ensure t
  218. :defer .1 ;; don't block emacs when starting, load evil immediately after startup
  219. :config
  220. (evil-mode 1))
  221. #+END_SRC
  222. * orgmode
  223. ** org
  224. #+BEGIN_SRC emacs-lisp
  225. (use-package org
  226. :ensure org-plus-contrib
  227. :init
  228. (add-hook 'org-mode-hook 'company/org-mode-hook)
  229. :config
  230. ;; (require 'org-id)
  231. (add-to-list 'org-modules "org-id")
  232. (setq org-default-notes-file (concat MY--PATH_ORG_FILES "notes.org")
  233. org-agenda-files (list MY--PATH_ORG_FILES
  234. MY--PATH_ORG_FILES_MOBILE)
  235. org-id-locations-file (concat MY--PATH_USER_LOCAL ".org-id-locations")
  236. org-log-into-drawer "LOGBOOK"))
  237. (org-id-update-id-locations)
  238. #+END_SRC
  239. ** habits
  240. #+BEGIN_SRC emacs-lisp
  241. (require 'org-habit) ;;TODO Lösung ohne require finden, scheint mir nicht ideal zu sein, nur um ein org-modul zu aktivieren
  242. ;; (add-to-list 'org-modules "org-habit")
  243. (setq org-habit-graph-column 80
  244. org-habit-preceding-days 30
  245. org-habit-following-days 7
  246. org-habit-show-habits-only-for-today nil)
  247. #+END_SRC
  248. ** *TODO*
  249. org-super-agenda
  250. ** org-caldav
  251. Vorerst deaktiviert, Nutzen evtl. nicht vorhanden
  252. BEGIN_SRC emacs-lisp
  253. (use-package org-caldav
  254. :ensure t
  255. :config
  256. (setq org-caldav-url "https://nextcloud.cloudsphere.duckdns.org/remote.php/dav/calendars/marc"
  257. org-caldav-calendar-id "orgmode"
  258. org-caldav-inbox (expand-file-name "~/Archiv/Organisieren/caldav-inbox")
  259. org-caldav-files (concat MY--PATH_ORG_FILES "tasks")))
  260. END_SRC
  261. ** journal
  262. [[https://github.com/bastibe/org-journal][Source]]
  263. #+BEGIN_SRC emacs-lisp
  264. (use-package org-journal
  265. :ensure t
  266. :defer t
  267. :custom
  268. (org-journal-dir MY--PATH_ORG_JOURNAl)
  269. (org-journal-enable-agenda-integration t))
  270. #+END_SRC
  271. * ivy / counsel / swiper
  272. #+BEGIN_SRC emacs-lisp
  273. ; (require 'ivy)
  274. (use-package ivy
  275. :ensure t
  276. :diminish
  277. (ivy-mode . "")
  278. :init
  279. (ivy-mode 1)
  280. :bind
  281. ("C-r" . ivy-resume) ;; overrides isearch-backwards binding
  282. :config
  283. (setq ivy-use-virtual-buffers t ;; recent files and bookmarks in ivy-switch-buffer
  284. ivy-height 20 ;; height of ivy window
  285. ivy-count-format "%d/%d" ;; current and total number
  286. ivy-re-builders-alist ;; regex replaces spaces with *
  287. '((t . ivy--regex-plus))))
  288. (use-package counsel
  289. :ensure t
  290. :bind*
  291. (("M-x" . counsel-M-x)
  292. ("C-x C-f" . counsel-find-file)
  293. ("C-x C-r" . counsel-recentf)
  294. ("C-c C-f" . counsel-git)
  295. ("C-c h f" . counsel-describe-function)
  296. ("C-c h v" . counsel-describe-variable)
  297. ("M-i" . counsel-imenu)))
  298. (use-package swiper
  299. :ensure t
  300. :bind
  301. ("C-s" . swiper))
  302. (use-package ivy-hydra
  303. :ensure t)
  304. #+END_SRC
  305. * company
  306. #+BEGIN_SRC emacs-lisp
  307. ; (require 'company)
  308. (use-package company
  309. :defer 1
  310. :bind
  311. (:map company-active-map
  312. ("RET" . nil)
  313. ([return] . nil)
  314. ("TAB" . company-complete-selection)
  315. ([tab] . company-complete-selection)
  316. ("<right>" . company-complete-common))
  317. :config
  318. (global-company-mode 1)
  319. (setq-default
  320. company-idle-delay .2
  321. company-minimum-prefix-length 1
  322. company-require-match nil
  323. company-show-numbers t
  324. company-tooltip-align-annotations t))
  325. ; (require 'company-statistics)
  326. (use-package company-statistics
  327. :ensure t
  328. :after company
  329. :init
  330. (setq company-statistics-file (concat MY--PATH_USER_LOCAL "company-statistics-cache.el"));~/.emacs.d/user-dir/company-statistics-cache.el")
  331. :config
  332. (company-statistics-mode 1))
  333. (use-package company-dabbrev
  334. :ensure nil
  335. :after company
  336. :config
  337. (setq-default company-dabbrev-downcase nil))
  338. (use-package company-box
  339. :ensure t
  340. :init
  341. (add-hook 'company-mode-hook 'company-box-mode))
  342. #+END_SRC
  343. ** company backends
  344. #+BEGIN_SRC emacs-lisp
  345. (defun company/org-mode-hook()
  346. (set (make-local-variable 'company-backends)
  347. '(company-capf company-files))
  348. (add-hook 'completion-at-point-functions 'pcomplete-completions-at-point nil t)
  349. (message "company/org-mode-hook"))
  350. (defun company/elisp-mode-hook()
  351. (set (make-local-variable 'company-backends)
  352. '((company-elisp company-dabbrev) company-capf company-files))
  353. (message "company/elisp-mode-hook"))
  354. (defun company/beancount-mode-hook()
  355. (set (make-local-variable 'company-backends)
  356. '(company-beancount)))
  357. #+END_SRC
  358. * Programming
  359. ** Magit / Git
  360. Little crash course in magit:
  361. - magit-init to init a git project
  362. - magit-status (C-x g) to call the status window
  363. In status buffer:
  364. - s stage files
  365. - u unstage files
  366. - U unstage all files
  367. - a apply changes to staging
  368. - c c commit (type commit message, then C-c C-c to commit)
  369. - b b switch to another branch
  370. - P u git push
  371. - F u git pull
  372. #+BEGIN_SRC emacs-lisp
  373. (use-package magit
  374. :ensure t
  375. :defer t
  376. :init
  377. ; set git-path in work environment
  378. (if (string-equal user-login-name "POH")
  379. (setq magit-git-executable "P:/Eigene Dateien/Tools/Git/bin/git.exe")
  380. )
  381. :bind (("C-x g" . magit-status))
  382. )
  383. #+END_SRC
  384. ** LSP
  385. Configuration for the language server protocol
  386. *ACHTUNG* Dateipfad muss absolut sein, symlink im Pfad führt zumindest beim ersten Start zu Fehlern beim lsp
  387. Sobald der lsp einmal lief, kann zukünftig der symlink-Pfad genommen werden.
  388. Getestet wurde die funktionierende Datei selbst und neu erstellte Dateien im selben Pfad.
  389. TODO Unterverzeichnisse wurden noch nicht getestet
  390. #+BEGIN_SRC emacs-lisp
  391. (use-package lsp-mode
  392. :defer t
  393. :commands lsp
  394. :custom
  395. (lsp-auto-guess-root nil)
  396. (lsp-prefer-flymake nil) ; use flycheck instead
  397. (lsp-file-watch-threshold 2000)
  398. :bind (:map lsp-mode-map ("C-c C-f" . lsp-format-buffer))
  399. :hook ((python-mode
  400. js-mode
  401. js2-mode
  402. typescript-mode
  403. web-mode) . lsp))
  404. (use-package lsp-ui
  405. :after lsp-mode
  406. :ensure t
  407. :diminish
  408. :commands lsp-ui-mode
  409. :config
  410. (setq lsp-ui-doc-enable t
  411. lsp-ui-doc-header t
  412. lsp-ui-doc-include-signature t
  413. lsp-ui-doc-position 'top
  414. lsp-ui-doc-border (face-foreground 'default)
  415. lsp-ui-sideline-enable nil
  416. lsp-ui-sideline-ignore-duplicate t
  417. lsp-ui-sideline-show-code-actions nil)
  418. (when (display-graphic-p)
  419. (setq lsp-ui-doc-use-webkit t))
  420. ;; workaround hide mode-line of lsp-ui-imenu buffer
  421. (defadvice lsp-ui-imenu (after hide-lsp-ui-imenu-mode-line activate)
  422. (setq mode-line-format nil)))
  423. (use-package company-lsp
  424. :requires company
  425. :defer t
  426. :ensure t
  427. :config
  428. ;;disable client-side cache because lsp server does a better job
  429. (setq company-transformers nil
  430. company-lsp-async t
  431. company-lsp-cache-candidates nil))
  432. #+END_SRC
  433. ** flycheck
  434. #+BEGIN_SRC emacs-lisp
  435. (use-package flycheck
  436. :ensure t
  437. :hook
  438. ((css-mode . flycheck-mode)
  439. (emacs-lisp-mode . flycheck-mode)
  440. (python-mode . flycheck-mode))
  441. :init
  442. (setq flycheck-emacs-lisp-load-path 'inherit)
  443. :config
  444. (setq-default
  445. flycheck-check-synta-automatically '(save mode-enabled)
  446. flycheck-disable-checkers '(emacs-lisp-checkdoc)
  447. eldoc-idle-delay .1 ;; let eldoc echo faster than flycheck
  448. flycheck-display-errors-delay .3)) ;; this way any errors will override eldoc messages
  449. #+END_SRC
  450. ** Projectile
  451. Manage projects and jump quickly between its files
  452. #+BEGIN_SRC emacs-lisp
  453. (use-package projectile
  454. :ensure t
  455. :defer t
  456. :bind
  457. (("C-c p p" . projectile-switch-project)
  458. ("C-c p s s" . projectile-ag))
  459. :init
  460. (setq-default projectile-cache-file (concat MY--PATH_USER_LOCAL ".projectile-cache")
  461. projectile-known-projects-file (concat MY--PATH_USER_LOCAL ".projectile-bookmarks"))
  462. :config
  463. (projectile-mode t)
  464. (setq-default projectile-completion-system 'ivy
  465. projectile-enable-caching t
  466. projectile-mode-line '(:eval (projectile-project-name))))
  467. #+END_SRC
  468. ** lisp
  469. #+BEGIN_SRC emacs-lisp
  470. (add-hook 'emacs-lisp-mode-hook 'company/elisp-mode-hook)
  471. #+END_SRC
  472. ** web
  473. apt install npm
  474. sudo npm install -g vscode-html-languageserver-bin
  475. evtl alternativ typescript-language-server?
  476. #+BEGIN_SRC emacs-lisp
  477. (use-package web-mode
  478. :ensure t
  479. :defer t
  480. :mode
  481. ("\\.phtml\\'"
  482. "\\.tpl\\.php\\'"
  483. "\\.djhtml\\'"
  484. "\\.[t]?html?\\'"))
  485. #+END_SRC
  486. ** Python
  487. Systemseitig muss python-language-server installiert sein:
  488. pip3 install 'python-language-server[all]'
  489. für andere language servers
  490. https://github.com/emacs-lsp/lsp-mode#install-language-server
  491. #+BEGIN_SRC emacs-lisp
  492. (if (string-equal system-type "gnu/linux")
  493. (use-package pyvenv
  494. :ensure t
  495. :config
  496. (setenv "WORKON_HOME" (expand-file-name "~/Archiv/Programmierprojekte/Python/virtualenv/"))
  497. (add-hook 'pyvenv-post-activate-hooks #'my/postactivatehook))
  498. (defun my/postactivatehook ()
  499. (setq lsp-python-ms-extra-paths pyvenv-virtual-env))
  500. (use-package virtualenvwrapper
  501. :ensure t
  502. :hook (venv-postmkvirtualenv . (lambda() (shell-command "pip3 install importmagic epc")))
  503. :config
  504. (setq venv-location (expand-file-name "~/Archiv/Programmierprojekte/Python/virtualenv/")))
  505. (use-package lsp-python-ms
  506. :ensure t
  507. :after lsp-mode python))
  508. ; :custom (lsp-python-executable-cmd "python3"))
  509. #+END_SRC
  510. * beancount
  511. ** Installation
  512. #+BEGIN_SRC shell
  513. sudo su
  514. cd /opt
  515. python3 -m venv beancount
  516. source ./beancount/bin/activate
  517. pip3 install wheel
  518. pip3 install beancount
  519. sleep 100
  520. echo "shell running!"
  521. deactivate
  522. #+END_SRC
  523. #+BEGIN_SRC emacs-lisp
  524. (if (string-equal system-type "gnu/linux")
  525. (use-package beancount
  526. :load-path "user-local/elisp"
  527. ; :ensure t
  528. :defer t
  529. :mode
  530. ("\\.beancount$" . beancount-mode)
  531. :init
  532. (add-hook 'beancount-mode-hook 'company/beancount-mode-hook)
  533. ; (add-hook 'beancount-mode-hook (pyvenv-activate "/opt/beancount"))
  534. ; (setenv "PATH"
  535. ; (concat "/opt/beancount/bin:"
  536. ; (getenv "PATH")))
  537. :config
  538. (setq beancount-filename-main "/home/marc/Archiv/Finanzen/Transaktionen/transactions.beancount")))
  539. #+END_SRC
  540. To support org-babel, check if it can find the symlink to ob-beancount.el
  541. #+BEGIN_SRC shell
  542. orgpath=`find /home/marc/.emacs.d/elpa/ -type d -name "org-plus*" -print`
  543. beansym="$orgpath/ob-beancount.el
  544. bean="/home/marc/Archiv/Programmierprojekte/Lisp/beancount-mode/ob-beancount.el"
  545. if [ -h "$beansym" ]
  546. then
  547. echo "$beansym found"
  548. elif [ -e "$bean" ]
  549. then
  550. echo "creating symlink"
  551. ln -s "$bean" "$beansym"
  552. else
  553. echo "$bean not found, symlink creation aborted"
  554. fi
  555. #+END_SRC
  556. Fava is strongly recommended.
  557. #+BEGIN_SRC shell
  558. cd /opt
  559. python3 -m venv fava
  560. source ./fava/bin/activate
  561. pip3 install wheel
  562. pip3 install fava
  563. deactivate
  564. #+END_SRC
  565. Start fava with fava my_file.beancount
  566. It is accessable on this URL: [[http://127.0.0.1:5000][Fava]]
  567. Beancount-mode can start fava and open the URL right away.