From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: "transient-define-suffix" autoload error ? Date: Thu, 20 Jun 2024 08:14:02 +0300 Message-ID: <86jziknqlh.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10201"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 20 07:14:44 2024 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 1sKA8C-0002SF-75 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 20 Jun 2024 07:14:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKA7b-0006bx-1H; Thu, 20 Jun 2024 01:14:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKA7Z-0006bo-Qi for help-gnu-emacs@gnu.org; Thu, 20 Jun 2024 01:14:05 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKA7Z-0004rV-J6 for help-gnu-emacs@gnu.org; Thu, 20 Jun 2024 01:14:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=rTtnbIBjoSqzqBU4ecMvxQV+rVVtoFcVuBirK0aU1ko=; b=g5R3J4OO0Z3f iJsRzEEHH8aWJrezdvZDRnHnIpmnNHgSl5uiBW0sqaGe4CuHYzHdpDa5WZe0wW1A5oEEzgABStl1p 7V1ygVOd3NEmoxVWRDnKDKAqhEM2a71K1etqurYMt6YpDan2nJvIOSlldpG47cdxevv2+j8+30oEo cAxZNVFFHWQ4O9eL7bmgrdz1Ns4ZnZaykPEdv2zF6MR9C0hV9WqOq/QrAtpt4RxePBvfVRlRIAs2v AhcdvAt+vT1+AC5C7SjMZVY5X2jwsO82PpfgMC1A2GEcDh7JixzM7R3MpbtJQrciUwLmJLJSKn1gu WHAagd7NckTK0icKSGzM9A==; In-Reply-To: (message from Stefan Monnier on Wed, 19 Jun 2024 17:36:36 -0400) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146917 Archived-At: > From: Stefan Monnier > Cc: Stefan Monnier via Users list for the GNU Emacs text editor > > Date: Wed, 19 Jun 2024 17:36:36 -0400 > > >> `.eln` files are indexed by the SHA of the corresponding `.elc`, so if > >> there's no `.elc` of if it has changed, you should never get some left > >> over `.eln` file instead. > > > > I noticed a few packages had been updated and both the old and new > > version had eln files in the cache. > > Throwing away old `.eln` files is actually a bit difficult to do > automatically, so they tend to accumulate, indeed. Right. But any new Emacs version you install will create a new subdirectory in the cache, so one can delete old subdirectories when they are no longer needed (i.e. when you no longer expect to use the corresponding Emacs version). Emacs 29 has the command native-compile-prune-cache, which will delete all the cache subdirectories except the one used by the Emacs version of the current session. > But Emacs should never load old `.eln`s because when loading a > `.eln` file is looks for it based on the hash of the `.elc` file it > would have loaded instead. I think its hash is based on the .el file instead. And yes, Emacs should never load a .eln file that doesn't match the current Emacs version and the corresponding .el file.