From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thibaut Verron Newsgroups: gmane.emacs.help Subject: Re: Package cl is deprecated Date: Wed, 28 Jul 2021 16:25:17 +0200 Message-ID: <3d2ecf7e-10e6-d69e-7987-2cdac7e41da2@gmail.com> References: <01eaf257-1142-c407-c9c0-0d6a2e3148b1@gmail.com> <62ae7a85-4986-4309-4f9f-cdec0f9c5329@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38600"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 Cc: Jean-Christophe Helary , help-gnu-emacs To: Hongyi Zhao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 28 16:25:50 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 1m8kVJ-0009rR-Mi for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 28 Jul 2021 16:25:49 +0200 Original-Received: from localhost ([::1]:56624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m8kVI-00044P-OE for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 28 Jul 2021 10:25:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8kUs-00041F-3N for help-gnu-emacs@gnu.org; Wed, 28 Jul 2021 10:25:22 -0400 Original-Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:36404) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m8kUq-000622-Fj for help-gnu-emacs@gnu.org; Wed, 28 Jul 2021 10:25:21 -0400 Original-Received: by mail-wr1-x42a.google.com with SMTP id g15so2822134wrd.3 for ; Wed, 28 Jul 2021 07:25:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=/GSCz4sqH5RTE7rZvMtFVo5Btx24JvrReqLH5E/ytCs=; b=GMDXZRnwvJRg/ICGjZt2Z3J0n09c+o2I3YlF5svsKXWhqpdtHA5K07oMI+N0gyRlTt lz18qOkquMOXzq4Iw2dl0hdI8cVsPwMACMtHJQdcJdTdXWs6Cdw7aViMxC6vAWoikWsr Kdqi6RRYVVQa4uXYQGSsp0o1Y4GqIElxW52b8riGq4B2PyTccTEre0dxRjgVUzJUdWsk j9/JWkHzvIKRPtUx+exWEFazJzHK73JLjgyr1FMIE0Fj+7JeY5pRGCJr09/wOvXSK4X5 5BmdLsewbClIQLMJwYv+75IVYjVH84Zw6QH5L1GLYd7oisdntlGZmm6FSOI/oJzcBb52 od2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=/GSCz4sqH5RTE7rZvMtFVo5Btx24JvrReqLH5E/ytCs=; b=Z+HgO52jd9x6HYAmLC6BgsGzkdeyyiGTVT5XMdhHrIZPwS5ogpJjVaCrz7Q/h50f9t rYXdzl1QiG04sMjTIqzrbkjzeEMvqaQOWLC5vP44r1y+zZt6k2m1jvF4ETvO8dMo+AX9 86Txdp0Wq5ddQdHy2MKDdktpSYgX+kUtl0Cx5EXsCiw9RaYLsiPYz9hqg88T5KM1GofX 066VCQOrkTEW4SbO5jcEvBrOqSqShI2oZfzGp7Wl0BNH3bFC4EVN7A9iAXjw9YIHQyJe 4lbZKdbHPM6io5jAbNvtm1H5yTHAbyqY9q6JvIC6o22mlwbGfKchA+vgLstwyFRIOJgB nNww== X-Gm-Message-State: AOAM533mngHkjJsLlmU225S3lrd/1PZQhRohcUqPK5m0G2698un68Oyo T51DMHHhVPfCP5wg0x4B/fmnhb/5IEDLqmd+blw= X-Google-Smtp-Source: ABdhPJw8cEZ3hNW3QJQ1kQ8A9cVp+VxVT4DNAVNoXmDH6DqqCYDVM3gp09tObKLJ/z5p8G8IkMsP4w== X-Received: by 2002:adf:ef0d:: with SMTP id e13mr6770006wro.390.1627482318910; Wed, 28 Jul 2021 07:25:18 -0700 (PDT) Original-Received: from ?IPv6:2001:628:2010:4094:3c66:f7a1:82f3:9327? ([2001:628:2010:4094:3c66:f7a1:82f3:9327]) by smtp.gmail.com with ESMTPSA id p7sm202468wmq.5.2021.07.28.07.25.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Jul 2021 07:25:18 -0700 (PDT) In-Reply-To: <62ae7a85-4986-4309-4f9f-cdec0f9c5329@gmail.com> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=thibaut.verron@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 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, NICE_REPLY_A=-0.277, 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:132154 Archived-At: On 28/07/2021 16:23, Thibaut Verron wrote: > On 28/07/2021 16:15, Hongyi Zhao wrote: >> On Wed, Jul 28, 2021 at 10:04 PM Thibaut Verron >> wrote: >>> On 28/07/2021 15:36, Hongyi Zhao wrote: >>>> 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 >>> The point of the regexp was to exclude files which have something >>> (including indentation) before the form, if you allow [ ]* you lose >>> that. That's the case in dash.el for example. >>> >>> In any case, the number of candidates is now small enough that you can >>> examine them. The dev/ and lib/ folders can probably be safely >>> ignored to. >> If so, nothing seems responsible for the problem: >> >> $ find .emacs.d/ -type f -name "*.el" -exec egrep -q "^\(require >> 'cl\)" {} \; -print |egrep -v  '[/]tests?[/]' >> .emacs.d/straight/repos/use-package/use-package-tests.el >> .emacs.d/straight/repos/macrostep/lib/cl-lib.el >> .emacs.d/straight/repos/emacs-websocket/websocket-functional-test.el > > Then I guess you will have to check the other candidates, sorry. I'd > start with the 10 you found above, and then move to the other 30 if > necessary. showtip.el is one.