From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: Package cl is deprecated Date: Wed, 28 Jul 2021 21:36:35 +0800 Message-ID: References: <01eaf257-1142-c407-c9c0-0d6a2e3148b1@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30973"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jean-Christophe Helary , help-gnu-emacs To: Thibaut Verron Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 28 15:37:32 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8jka-0007rV-2Q for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 28 Jul 2021 15:37:32 +0200 Original-Received: from localhost ([::1]:34520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m8jkX-0008Rv-QF for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 28 Jul 2021 09:37:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8jju-0008RM-A3 for help-gnu-emacs@gnu.org; Wed, 28 Jul 2021 09:36:50 -0400 Original-Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]:34770) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m8jjs-0006ad-C2 for help-gnu-emacs@gnu.org; Wed, 28 Jul 2021 09:36:49 -0400 Original-Received: by mail-lj1-x232.google.com with SMTP id f12so3147853ljn.1 for ; Wed, 28 Jul 2021 06:36:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=p0pCOYli/hxvJXRKgg7MM8Q7vn2wOXFrhlq8DiMM9xM=; b=fZnFfNROXgQ1LqQgkfIaeH/qeZkPuV7RgPOn/UPWJoL5p+7kQKpBKjMFM1d2lVALRr m8ehYEx47vfW7NP6wbWpEE2QAAVXXzQ6i+ywWEvXqlncb19Umw/UDVkfcJ1lG7waBRAS PRSLxqVAgGbht3/mJGX5dfpWkBhMtnKdEK7/VbACcI5UkiK2qE+bxvrUWm2m9b2v5DTe w2OtYH/yMNKhI5+8VhH0OpRhw4X4kRK131L05zqmrc7AT1R9pRXrDgLcy2W8fliGDuhl XuqcGTO0pbctHVLFO4+965QEohLMN2FtBUm7Ha7AIJh0FPUXvp2ntgXJ1atj8H0Bkqa7 zILQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=p0pCOYli/hxvJXRKgg7MM8Q7vn2wOXFrhlq8DiMM9xM=; b=fB6+UpCWRswO1tuhjg4FO7FF5/QhC/ivVdeH7RGTxJ5FFfKbOGXql3AXen1+fB4r8M AQ+Gw0Yo2AE7nOMD39GzJxq8VfKNseHkY7a6dzibYjuAUvLU/BRbEO0/boYljtaw09lA 1wSZ0H6KihAxe/ydlYSKitPCuhLfI//afWij8bpA5kShm2kwHRRKNttOH+1SyqzM03K3 M1rz/18RTngL5maTs5rekJ58KJK27vGQ65/xDP2naIiaHdBz21XUk8dcIlK/w5Vgd6w4 jhgdtrKIIwj1tHEdhS94gzDkSc1G+0UIKKyGpN20oR76YL3ABasT0OP1WjkyyCRLjn11 F72Q== X-Gm-Message-State: AOAM531zQX82lEstz+VROhnq9CLvPYy9sQ4r3BhbrrkqxGJqOltgyAT4 Nky3UzImjNkJIVOHWrRq4VSsNsW2WQsiAywMv9k= X-Google-Smtp-Source: ABdhPJxceOHHUy8X7Ws8UfMpi5/CbdlrO//9MPsaZYtqmpk60Fb2WscWSi8TyAAAL9NVjTmYS+0tiPPIg0o6Dn4yyAE= X-Received: by 2002:a2e:8858:: with SMTP id z24mr18936476ljj.413.1627479406641; Wed, 28 Jul 2021 06:36:46 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::232; envelope-from=hongyi.zhao@gmail.com; helo=mail-lj1-x232.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:132146 Archived-At: On Wed, Jul 28, 2021 at 9:33 PM Hongyi Zhao wrote: > > On Wed, Jul 28, 2021 at 9:23 PM Thibaut Verron wrote: > > > > > > On 28/07/2021 15:03, Hongyi Zhao wrote: > > > On Wed, Jul 28, 2021 at 6:04 PM Jean-Christophe Helary > > > wrote: > > >> > > >> > > >>> On Jul 28, 2021, at 18:54, Thibaut Verron wrote: > > >>> > > >>> On 28/07/2021 11:46, Hongyi Zhao wrote: > > >>>> On Wed, Jul 28, 2021 at 5:33 PM Thibaut Verron wrote: > > >>>>> On 28/07/2021 11:23, Hongyi Zhao wrote: > > >>>>>> When I start Emacs, I always notice the following message in *Messages* buffer: > > >>>>>> > > >>>>>> Package cl is deprecated > > >>>>>> > > >>>>>> Any hints for eliminating it? > > >>>>> If you have (require 'cl) somewhere in your init file, replace it with > > >>>>> (require 'cl-lib). You might need to change some macro calls to use > > >>>>> cl- instead of . > > >>>> $ egrep 'require[ ]*'\''cl' .emacs.d/init.el > > >>>> (require 'cl-lib) > > >>> Then it's from a package and you need to identify it. > > >>> > > >>> You can try (untested): > > >>> > > >>> find .emacs.d/ -name "*.el" -exec grep "(require 'cl)" {} \; > > >> find .emacs.d/ -name "*.el" -exec grep "(require 'cl)" {} \; -print > > > There are so many matches: > > > > > > $ find .emacs.d/ -name "*.el" -exec grep -q "(require 'cl)" {} \; > > > -print 2>/dev/null | sort -u | wc -l > > > 40 > > > > > > So this method is basically useless for finding the problem. > > > > I just tried it, indeed quite a few packages contain some form of > > (require 'cl) as a backward-compatibility tool (52 matches in my case). > > Most of those are test files which are never loaded in a normal emacs > > session. > > > > To narrow the search, you can use egrep -q "^\(require 'cl\)" instead. > > In my .emacs, the matches go from 52 to 15. Interestingly enough, > > exactly one of them is loaded at init time (key-combo.el), without any > > warning. > > Strange, I found nothing with this enhanced pattern: > > $ find .emacs.d/ -type f -name "*.el" -exec grep -q "^[ ]*\([ > ]*require[ ]+'cl[ ]*\)" {} \; -print | wc -l > 0 Sorry, egrep should be used: $ find .emacs.d/ -type f -name "*.el" -exec egrep -q "^[ ]*\([ ]*require[ ]+'cl[ ]*\)" {} \; -print | egrep -v '[/]tests?[/]' .emacs.d/straight/repos/dash.el/dash.el .emacs.d/straight/repos/dash.el/dev/examples.el .emacs.d/straight/repos/stardiviner-sdcv.el/sdcv.el .emacs.d/straight/repos/showtip/showtip.el .emacs.d/straight/repos/unicode-escape.el/unicode-escape.el .emacs.d/straight/repos/use-package/use-package-tests.el .emacs.d/straight/repos/macrostep/lib/cl-lib.el .emacs.d/straight/repos/macrostep/lib/ert.el .emacs.d/straight/repos/emacs-websocket/websocket-functional-test.el .emacs.d/straight/repos/s.el/dev/ert.el Regards, HY