historian.el icon indicating copy to clipboard operation
historian.el copied to clipboard

Wrong type argument: hash-table-p, nil

Open hongyi-zhao opened this issue 2 years ago • 4 comments

On Ubuntu 20.04.2 LTS, I installed historian.el with use-package as follows:

(use-package historian)
(use-package ivy-historian)


(use-package ivy
  :diminish ivy-mode
  :init
  (ivy-mode +1)
  (historian-mode +1)

  :config
  (ivy-historian-mode +1)
  (setq ivy-historian-recent-boost most-positive-fixnum)
  )

But the above configuration will cause so many errors like the following:

Wrong type argument: hash-table-p, nil

Any hints for this problem?

Regards, HZ

hongyi-zhao avatar Oct 08 '21 05:10 hongyi-zhao

This typically means your historian-save-file is malformed. What does it contain?

PythonNut avatar Oct 14 '21 06:10 PythonNut

I can't find the file at all:

werner@X10DAi-00:~/.emacs.d$ find . -type f -name '*historian-save-file*'
werner@X10DAi-00:~/.emacs.d$

hongyi-zhao avatar Oct 14 '21 06:10 hongyi-zhao

Just chiming in that this solved the issue for me.

I did C-h v and inspected the historian-save-file variable, which pointed to ~/.emacs.d/.historian. That file contained a single line with nil. Removing the file fixed the error (but seems to have borked my history—a small price to pay 🙂)

Thanks!

mhlinder avatar Mar 26 '22 15:03 mhlinder

I did C-h v and inspected the historian-save-file variable, which pointed to ~/.emacs.d/.historian.

Thank you for pointing this out. Obviously, in the case of Emacs, the find command by me is out of place.

but seems to have borked my history

Would you please describe the phenomenon in detail? Does this often happen, or just once?

hongyi-zhao avatar Mar 27 '22 01:03 hongyi-zhao