Browse Source

minor fixes

master
Marc 1 month ago
parent
commit
91a43f42c5
1 changed files with 7 additions and 4 deletions
  1. 11
      user-global/elisp/beancount.el

11
user-global/elisp/beancount.el

@ -202,7 +202,7 @@
)) ))
(defconst beancount-comments-regex (defconst beancount-comments-regex
(concat ";[^\"\n]*$")) ; right part of the line after a comment symbol if no quote or newline is included
"[ ][ \t]+;.*\|^[;*].*") ; right part of the line after a comment symbol if no quote or newline is included
(defconst beancount-empty-line-regex (defconst beancount-empty-line-regex
"^\\(\\s-+\\)" ;; maybe "^[ \t]+" is better "^\\(\\s-+\\)" ;; maybe "^[ \t]+" is better
@ -409,10 +409,10 @@ Leave point at the beginning of the thing under point.")
(defvar beancount-filename-main buffer-file-name (defvar beancount-filename-main buffer-file-name
"File name of the main beancount file for beancount-check.") "File name of the main beancount file for beancount-check.")
(defvar beancount-terminal-name "kitty"
(defvar beancount-terminal-name "foot"
"Name of the terminal emulator to run fava.") "Name of the terminal emulator to run fava.")
(defvar beancount-fava-exec "/bin/fava"
(defvar beancount-fava-exec "/usr/bin/fava"
"Full path of fava executable.") "Full path of fava executable.")
(defvar beancount-install-dir nil (defvar beancount-install-dir nil
@ -447,6 +447,9 @@ Only useful if you have not installed Beancount properly in your PATH")
(beancount--run beancount-check-program beancount-filename-main))) (beancount--run beancount-check-program beancount-filename-main)))
; (file-relative-name buffer-file-name)))) ; (file-relative-name buffer-file-name))))
;;does not work currently!
;;use source /opt/fava/.env/bin/activate
;;fava /mnt/archiv/Finanzen/Transaktionen/transactions.beancount
(defun beancount-fava () (defun beancount-fava ()
"Run `beancount-fava' and open the URL in the default browser." "Run `beancount-fava' and open the URL in the default browser."
(interactive) (interactive)
@ -736,7 +739,7 @@ Optionally also look at data in selected FILES."
((beancount-looking-at "^[A-za-z]+[A-za-z00-9 ]" 0 pos) ((beancount-looking-at "^[A-za-z]+[A-za-z00-9 ]" 0 pos)
(list (match-beginning 0) (match-end 0) (list (match-beginning 0) (match-end 0)
; (lambda (c) (company-ledger--fuzzy-word-match arg c)) ; (lambda (c) (company-ledger--fuzzy-word-match arg c))
(company-ledger--get-all-postings)))
(company-ledger--get-all-postings)))
; (sort (company-ledger--get-all-postings) #'string-lessp))) ; (sort (company-ledger--get-all-postings) #'string-lessp)))
))))) )))))
;; (sorted t)) ;; (sorted t))

Loading…
Cancel
Save