21

While compiling an Elisp package from github, I get the

Warning: Package cl is deprecated

How do I find out what triggers it?

The specific file that triggers this is tiny and has no CL code.

I think there should be a way to turn the warning into an error and get the stack trace. Has anyone done this before?

sds
  • 5,928
  • 20
  • 39
  • 1
    Go find cl.el and rename it. This way you will get a trace back from the debugger. – tom Jul 07 '21 at 18:45

1 Answers1

25

Try the following in an Emacs session with the code in question loaded up:

(require 'loadhist)
(file-dependents (feature-file 'cl))
wasamasa
  • 21,803
  • 1
  • 65
  • 97
  • if using 27.1 you can use `(setq byte-complile-warnings '(not cl-functions))` accordingly to `byte-complile-warnings` documentation. – Muihlinn Sep 04 '20 at 08:34
  • Hm, I tried that, in both my `~/.emacs` and some system files (below `/etc/emacs/site-start.d/`, this being Debian/Ubuntu) but no luck. It also prevents `emacs --daemon` from working as the load hangs at the warning :-/ – Dirk Eddelbuettel Dec 20 '20 at 18:13
  • Use it interactively (like by pasting it into the scratch buffer and `M-x eval-buffer`), not in your init file. – wasamasa Dec 21 '20 at 09:18
  • 2
    I get the same warning when starting emacs, but no output from the code above... :-( – AstroFloyd Apr 04 '21 at 07:50
  • Correction of the comment that shows how to suppress the warning:`(setq byte-compile-warnings '((not cl-functions)))` – jobor Jan 13 '22 at 08:38
  • https://github.com/rolandwalker/list-utils/issues/6 – buhtz Apr 16 '23 at 14:59