Emacs and Beancount mode not working

84 views
Skip to first unread message

SKlmcanskl

unread,
Dec 2, 2020, 7:32:26 PM12/2/20
to Beancount

I loaded the beancount.el file for emacs
i receive the following issues:

When I try beancount mode: Alt-x beancount-mode I get an error:
(beancount-highlight-transaction-at-point): (void-function beancount-highlight-transaction-at-point)

When I open emacs:
Warning (initialization): An error occurred while loading `/home/family281/.emacs.d/init.el':
Symbol's value as variable is void: completion-category-default

No keybindings work.  Colors work!

But can't use

James Cook

unread,
Dec 3, 2020, 2:05:42 PM12/3/20
to bean...@googlegroups.com
Are you sure it said "completion-category-default" and not "completion-category-defaults" (with an s)? The latter is a variable in emacs; I don't think the other is.
 
I don't have an answer, but it may help if you can provide some more information, like:

* What version of emacs? (M-x version)
* How did you load beancount.el?

James

SKlmcanskl

unread,
Dec 3, 2020, 3:23:58 PM12/3/20
to Beancount
Thank You for a response!  I am new to computers, so please go easy!

I followed this:

file is located here:
/home/family281/.emacs.d/lisp/beancount.el
copied the beancount.el file off of the website, saved it, placed in the above folder

Version: This is GNU Emacs 24.5.1

On opening Emacs (Copied from Emacs):
Warning (initialization): An error occurred while loading `/home/family281/.emacs.d/init.el':

Symbol's value as variable is void: completion-category-defaults

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the `--debug-init' option to view a complete error backtrace.

On opening my beancount file:
Loading 00debian-vars...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done
Loading debian-ispell...done
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Error in post-command-hook (beancount-highlight-transaction-at-point): (void-function beancount-highlight-transaction-at-point)

Using the commands:
command-execute: Symbol's function definition is void: beancount-insert-account
C-c r is undefined
command-execute: Symbol's function definition is void: beancount-check
command-execute: Symbol's function definition is void: beancount-query
command-execute: Symbol's function definition is void: beancount-context


Using the Debugger:
Debugger entered--Lisp error: (void-variable completion-category-defaults)
  (member beancount--completion-overrides completion-category-defaults)
  (if (member beancount--completion-overrides completion-category-defaults) completion-category-defaults (setq completion-category-defaults (cons beancount--completion-overrides completion-category-defaults)))
  eval-buffer(#<buffer  *load*-462683> nil "/home/family281/.emacs.d/lisp/beancount.el" nil t)  ; Reading at buffer position 18269
  load-with-code-conversion("/home/family281/.emacs.d/lisp/beancount.el" "/home/family281/.emacs.d/lisp/beancount.el" nil t)
  require(beancount)
  eval-buffer(#<buffer  *load*> nil "/home/family281/.emacs.d/init.el" nil t)  ; Reading at buffer position 130
  load-with-code-conversion("/home/family281/.emacs.d/init.el" "/home/family281/.emacs.d/init.el" t t)
  load("/home/family281/.emacs.d/init" t t)
  #[0 " \205\262

My init file:

;; Tell emacs where is your personal elisp lib dir

(add-to-list 'load-path "/home/family281/.emacs.d/lisp/")

(require 'beancount)


;; setup files ending in “.js” to open in js2-mode

(add-to-list 'auto-mode-alist '("\\.beancount\\'" . beancount-mode))



So I hope you guys can help me!
I am also going to try Vim, have never used.

Thank You!

Daniele Nicolodi

unread,
Dec 3, 2020, 3:59:06 PM12/3/20
to Beancount
Hello,

the information you provided is not really enough to try to help you.
Can you please be much more precise about what you did? Which Emacs
version are you using?

On 03/12/2020 01:32, SKlmcanskl wrote:
> I loaded the beancount.el file for emacs

What you mean with "loaded"? How did you obtain the beancount.el file?
How have you loaded the code in Emacs?

> i receive the following issues:
>
> When I try beancount mode: Alt-x beancount-mode I get an error:
> (beancount-highlight-transaction-at-point): (void-function
> beancount-highlight-transaction-at-point)

This suggests that either something is wrong with the beancount.el file
you obtained or that it has not been executed completely, however, this
should have resulted in an error.

> When I open emacs:
> Warning (initialization): An error occurred while loading
> `/home/family281/.emacs.d/init.el':
> Symbol's value as variable is void: completion-category-default

Ok. So beancount.el has not been completely executed because of this
error. However, there is no mention of a "completion-category-default"
symbol in the beancount.el code, only a "completion-category-defaults"
(note the trailing s). Did you edit beancount.el (intentionally or
unintentionally) or is this a mistake in reporting the exact error message?

Emacs documentation does not say when "completion-category-defaults" has
been introduced, so I suspect it has been there since a long time, thus
I don't think this is caused by you using a too old Emacs version.

Cheers,
Dan

Daniele Nicolodi

unread,
Dec 3, 2020, 4:14:16 PM12/3/20
to bean...@googlegroups.com, SKlmcanskl
On 03/12/2020 21:23, SKlmcanskl wrote:
> Version: This is GNU Emacs 24.5.1

It may be that the completion framework in Emacs has been updated in non
backward compatible ways since the release of Emacs 24.5 (in April
2015). Looking at the Emacs code, it looks like indeed this variable may
have been introduced in Emacs 25.1.

I am afraid you need to upgrade your Emacs installation. And it would be
a good idea to upgrade your Linux installation: most likely, any
distribution that ships such an old Emacs does not receive security
upgrades anymore.

Cheers,
Dan

SKlmcanskl

unread,
Dec 3, 2020, 5:37:54 PM12/3/20
to Beancount
Thank you, I have been updating with Synaptic Pacakge Manager.
My version of Linux does require an update.
Only a clean install will work, thank you for pointing that out!

Daniele Nicolodi

unread,
Dec 3, 2020, 5:54:48 PM12/3/20
to bean...@googlegroups.com, SKlmcanskl
On 03/12/2020 23:37, SKlmcanskl wrote:
> Thank you, I have been updating with Synaptic Pacakge Manager.
> My version of Linux does require an update.
> Only a clean install will work, thank you for pointing that out!

This may not be the case. Which distributions is it?

Cheers,
Dan

SKlmcanskl

unread,
Dec 3, 2020, 6:37:17 PM12/3/20
to Beancount
I just performedf clean install.  MX18 to MX19.3,
Worked!!

Emacs is updated, and my sytem is performing correctly.  I would have never known!
Reply all
Reply to author
Forward
0 new messages