jwiegley / use-package

A use-package declaration for simplifying your .emacs
https://jwiegley.github.io/use-package
GNU General Public License v3.0
4.42k stars 261 forks source link

:custom trigger a load error while loading yankpad #984

Closed marczz closed 1 year ago

marczz commented 2 years ago

If I put in my init file:

(custom-set-variables
'(yankpad-descriptive-list-treatment 'abbrev))
 (require 'yankpad)

Yankpad load without error.

When I want to set it with use-package:

(use-package yankpad
 :ensure t
 :custom (yankpad-descriptive-list-treatment 'abbrev))

I get at emacs init the following error:

Error (use-package): yankpad/:catch: Symbol’s function definition is void: yankpad-category-descriptions

And from then any command on emacs gives this "symbol's function definition is void" and have no choice but killing emacs.

If I replace the :custom by

:config (setq yankpad-descriptive-list-treatment 'abbrev)

there is no error.

I have tested it with an init file limited to the previous statement, to avoid conflict with other settings, on Emacs 28.0.91

skangas commented 1 year ago

I can't reproduce this on Emacs 29.0.50. I tried evaluating this with emacs -Q:

(progn
  (package-initialize)
  (use-package yankpad
    :ensure t
    :custom (yankpad-descriptive-list-treatment 'abbrev)))

Can you reproduce this in emacs -Q? If not, there seems to be some additional customization required to reproduce it, or it has already been fixed in use-package and/or Emacs 29 (but not in Emacs 28.0.91).

Thanks.

marczz commented 1 year ago

I confirm that evaluating with emacs -Q on emacs 28.2.50:

 (progn
  (setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
    ("nongnu" . "https://elpa.nongnu.org/nongnu/")
    ("melpa" . "https://melpa.org/packages/")))
  (package-initialize)
  (use-package yankpad
    :ensure t
    :custom (yankpad-descriptive-list-treatment 'abbrev)))

now don't produces an error, my full config which first triggered the error runs now also flawlessly. I m too lazy to test it with earliers version of use-package, yankpad and emacs to understand what fixed it. But It seems the bug could be now labelled as closed.

skangas commented 1 year ago

@marczz Thanks for reporting back. I'm happy that it is now working.