rolandwalker / unicode-fonts

Configure Unicode fonts for Emacs
227 stars 28 forks source link

Error on recent Emacs-29 build #37

Closed genehack closed 1 year ago

genehack commented 1 year ago

With an Emacs-29 built from 45b16bfb496, I get the following error/backtrace when calling unicode-fonts-setup:

Debugger entered--Lisp error: (wrong-number-of-arguments #<subr puthash> 1)
  puthash(("Symbola" nil nil nil))
  font-utils-exists-p("Symbola" nil nil nil)
  unicode-fonts-font-exists-p("Symbola")
  cl-remove(nil ("Symbola" "Quivira") :if-not unicode-fonts-font-exists-p)
  cl-remove-if-not(unicode-fonts-font-exists-p ("Symbola" "Quivira"))
  unicode-fonts--generate-instructions("fontset-default")
  unicode-fonts--load-or-generate-instructions("fontset-default" nil)
  unicode-fonts--setup-1("fontset-default" nil)
  unicode-fonts-setup()

The "Symbola" font is installed.

rolandwalker commented 1 year ago

Hello!

Interesting. I can't duplicate using this nightly: https://emacsformacosx.com/emacs-builds/Emacs-2023-03-27_00-09-38-e8790f42935762f34297400b09a00236b94ed6f0-universal.dmg on Mac.

What platform are you on?

There doesn't seem to be a way to call puthash with only one argument, which would clearly be wrong. I'm wondering about changes to lexical binding defaults.

What happens when you quit Emacs, dig out these three files, delete them, and restart?

find ~/.emacs.d -name font-utils -or -name ucs-utils -or -name unicode-fonts
genehack commented 1 year ago

I'm on a Mac.

That find command showed me those three files under var/pcache. I stopped Emacs, removed those three files, started it up again, and got the exact same error when I evaluated unicode-fonts-setup (and the three files were not re-created).

Trying with the nightly you linked, I can not reproduce the bug there either, but it looks like that is built from a point in the commit graph that's a little older than where I built from. Unfortunately, git diff --shortstat 45b16bfb496..e8790f42935762f34297400b09a00236b94ed6f0 gives:

495 files changed, 33606 insertions(+), 24354 deletions(-)

I suspect something in there is the cause, and if I'm right, somebody else will be along shortly with a second instance of this. If I just picked an unlucky place to build from, hopefully I remember in a few weeks and try again and this goes away...

rolandwalker commented 1 year ago

Thank you so much. That narrows it down considerably! I hope to try it soon on a later version.

genehack commented 1 year ago

I just tried re-enabling this, and I no longer see the error ¯_(ツ)_/¯

Current Emacs version is GNU Emacs 29.0.90 (build 2, x86_64-apple-darwin22.4.0, NS appkit-2299.50 Version 13.3.1 (Build 22E261)) of 2023-04-10

Gonna close this ticket out!