jerrypnz / major-mode-hydra.el

Spacemacs-esque major mode leader key powered by Hydra
294 stars 9 forks source link

Calling a pretty hydra gives "wrong type argument" error #34

Closed hjpotter92 closed 4 years ago

hjpotter92 commented 4 years ago

I have defined the following pretty-hydra for omni-scratch package:

(use-package omni-scratch
  :custom
  (omni-scratch-pale-background nil)
  :pretty-hydra
  ((:color amaranth :quit-key "q" :title "Omni scratch buffer management")
   ("Omni Scratch"
    (("DEL" omni-scratch "omni-scratch")
     ("-" omni-scratch-major "major mode")
     ("_" omni-scratch-buffer "buffer")
     ("$" omni-scratch-goto-latest "goto latest")
     ("b" omni-scratch-buffers "buffers"))
    "Quit"
    (("q" nil "Quit hydra"))))
  :bind
  ("C-c $" . omni-scratch-hydra/body))

After trying to trigger the omni-scratch-hydra, it raises the following error:

apply: Wrong type argument: stringp, nil

Is the hydra definition wrong? Or is it some other issue?

jerrypnz commented 4 years ago

Hmm I couldn't reproduce it. I ran your code snippet and then pressed C-c $. The hydra showed up fine. Maybe try M-x toggle-debug-on-error and see where the error comes from.

hjpotter92 commented 4 years ago

weird, I can reproduce the same error if I do M-x omni-scratch-hydra/body

hjpotter92 commented 4 years ago

Closing the issue. I removed both packages, omni-scratch and pretty-hydra. On restarting emacs, things seem to be working smoothly.