Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package cl is deprecated in Emacs-27 #35

Open
abo-abo opened this issue Oct 16, 2019 · 21 comments
Open

Package cl is deprecated in Emacs-27 #35

abo-abo opened this issue Oct 16, 2019 · 21 comments

Comments

@abo-abo
Copy link

abo-abo commented Oct 16, 2019

Would be nice to fix this, since if the user uses any package that depends on this, they'll get a warning on startup.

@pietrodito
Copy link

Does clrefer to Common-Lisp ? I do not like to see this warning on each startup but I guess many popular packages depend on cl ?

@abo-abo
Copy link
Author

abo-abo commented Dec 18, 2019

Yes. It is relatively easy to depend on (require 'cl-lib) in place of (require 'cl). cl-lib was published many years ago as a better alternative to cl. And in Emacs-27 cl now has a deprecation warning.

@slk500
Copy link

slk500 commented Dec 21, 2019

is this particular warning can be just turned off ?

@holzee
Copy link

holzee commented Jan 10, 2020

is this particular warning can be just turned off ?

As long as you have packages calling cl, I think the warning will remain. I have tried cl-libify without success.

@sangjeedondrub
Copy link

Add this to init.el

(setq byte-compile-warnings '(cl-functions))

@ghali
Copy link

ghali commented Aug 12, 2020

Even if our own .emacs requires only cl-lib, the warning remains. How can I identify the packages that depend on cl? Alternatively, how can I make the "Package cl is deprecated" warning be more verbose, by saying, for example: "while requiring package X: Package cl is deprecated"?

@abo-abo
Copy link
Author

abo-abo commented Aug 13, 2020

@sangjeedondrub Thanks, the code removes the warning for me. Just had to put it early in the init.

@pedro-w
Copy link

pedro-w commented Aug 14, 2020

@ghali see the following link for info on how to list packages that depend on cl
doomemacs/doomemacs#3372 (comment)

@genedelisa
Copy link

genedelisa commented Aug 16, 2020

Even if our own .emacs requires only cl-lib, the warning remains. How can I identify the packages that depend on cl? Alternatively, how can I make the "Package cl is deprecated" warning be more verbose, by saying, for example: "while requiring package X: Package cl is deprecated"?

(require 'loadhist)
(file-dependents (feature-file 'cl))

edit: I missed Pedro-w's comment. Follow his link for more info

@snowman
Copy link

snowman commented Oct 11, 2020

Add this to init.el

(setq byte-compile-warnings '(cl-functions))

I have read the documentation of this variable, just curious:

byte-compile-warnings is a variable defined in ‘bytecomp.el’.
Its value is t

  This variable is safe as a file local variable if its value
  satisfies the predicate which is a byte-compiled expression.
  You can customize this variable.
  Probably introduced at or before Emacs version 23.1.

Documentation:
List of warnings that the byte-compiler should issue (t for all).

Doesn't it means (setq byte-compile-warnings '(cl-functions)) only issue warnings of cl-functions?

@MerlinsGreatBeard
Copy link

Add this to init.el

(setq byte-compile-warnings '(cl-functions))

I have read the documentation of this variable, just curious:

byte-compile-warnings is a variable defined in ‘bytecomp.el’.
Its value is t

  This variable is safe as a file local variable if its value
  satisfies the predicate which is a byte-compiled expression.
  You can customize this variable.
  Probably introduced at or before Emacs version 23.1.

Documentation:
List of warnings that the byte-compiler should issue (t for all).

Doesn't it means (setq byte-compile-warnings '(cl-functions)) only issue warnings of cl-functions?

I agree with you.
It seemed to me that it should be (setq byte-compile-warnings '(not cl-functions)) , this did not work for me however
(setq byte-compile-warnings '(cl-functions)) did.
Then I tried (setq byte-compile-warnings '(not obsolete)) and this worked too.
My guess is then that the warning is listed as an obsolete warning and that when you set byte-compile-warnings to be only
cl-functions, that works only because it exludes obsolete warnings.

@danieljamesross
Copy link

FYI neither (setq byte-compile-warnings '(cl-functions)) nor (setq byte-compile-warnings '(not obsolete)) work on my system. Emacs 27.1 MacOS 10.15.7

@ghost
Copy link

ghost commented Nov 13, 2020

I had the same issue, but I got (setq byte-compile-warnings '(cl-functions)) to work if I put it in early-init.el.

@rafiks
Copy link

rafiks commented Dec 31, 2020

FYI neither (setq byte-compile-warnings '(cl-functions)) nor (setq byte-compile-warnings '(not obsolete)) work on my system. Emacs 27.1 MacOS 10.15.7

i am seeing this as well. is there a difference in how emacs initialize in Mac OS?

@pedro-w
Copy link

pedro-w commented Jan 2, 2021

@rafiks @danieljamesross did you put it in early-init.el as suggested by @Holdnack here? That worked for me, same version of emacs and MacOS.

@DeepBlueRobot
Copy link

@danieljamesross I had the same issue. emacs 27.1-3 on manjaro 20.1.1
when I found an Orphaned package using 'cl in elpa/ , I remove it.
Then put (setq byte-compile-warnings '(cl-functions)) in early init.el.
Finally, the warning is disappeared.

@touxstone
Copy link

touxstone commented Jan 9, 2021

What about slime, the package, because when I run

(require 'loadhist)
(file-dependents (feature-file 'cl))

I got as output the following packages

"/home/txarly/.emacs.d/elpa/deft-20200515.1513/deft.elc" 
"/home/txarly/quicklisp/dists/quicklisp/software/slime-v2.23/contrib/slime-repl.el"
"/home/txarly/quicklisp/dists/quicklisp/software/slime-v2.23/contrib/bridge.el"
"/home/txarly/quicklisp/dists/quicklisp/software/slime-v2.23/contrib/slime-presentations.el"
"/home/txarly/quicklisp/dists/quicklisp/software/slime-v2.23/slime.el"

Then, checking one by one (excepting ..deft.elc because it's a *.elc one file) I found out they already call for 'cl-lib but immediately there is a line which reads (eval-when-compile (require 'cl))
I'd appreciate any clue on this.

@rafiks
Copy link

rafiks commented Jan 13, 2021

@rafiks @danieljamesross did you put it in early-init.el as suggested by @Holdnack here? That worked for me, same version of emacs and MacOS.

yes. i also just tried emacs 28 and it still did not work for me.. I have Doom Emacs and d12frosted's Emacs.

@danieljamesross
Copy link

Confirm that this error is now squashed, thanks @Holdnack and @pedro-w.

For anyone new, I'll reiterate:

Put (setq byte-compile-warnings '(cl-functions)) in early-init.el.

I didn't have an early-init.el file, so I created one at ~/.emacs.d/early-init.el

tagd pushed a commit to tagd/org-bullets that referenced this issue Mar 4, 2021
Removes "package cl is deprecated warning in emacs 27.1.

For more info see this thread:
kiwanami/emacs-epc#35
@gabrielesimeone
Copy link

for those on prelude - i got it to work by adding a file in the ~/.emacs.d/personal/preload/ folder containing this line (setq byte-compile-warnings '(cl-functions))

@michaelpass
Copy link

I had the same issue, but I got (setq byte-compile-warnings '(cl-functions)) to work if I put it in early-init.el.

This finally worked for me on macOS 11.2.3, Big Sur. Thank you so much! 🥂

boneandrea pushed a commit to boneandrea/dotfiles that referenced this issue Apr 29, 2021
boneandrea pushed a commit to boneandrea/dotfiles that referenced this issue Apr 29, 2021
rslopes added a commit to rslopes/MageMacs that referenced this issue May 17, 2021
MatthewZMD added a commit to MatthewZMD/emacs-epc that referenced this issue Aug 5, 2021
Signed-off-by: Mingde (Matthew) Zeng <matthewzmd@posteo.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests