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.bugs Subject: bug#52773: Master and (probably) emacs-28: locate-library hides .eln files. Date: Fri, 24 Dec 2021 14:00:21 +0200 Message-ID: <83o856rz56.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12227"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52773@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 24 13:01:30 2021 Return-path: Envelope-to: geb-bug-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 1n0jGM-00030v-5b for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Dec 2021 13:01:30 +0100 Original-Received: from localhost ([::1]:50086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n0jGL-0007Ra-5F for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Dec 2021 07:01:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0jFu-0007Ps-Mm for bug-gnu-emacs@gnu.org; Fri, 24 Dec 2021 07:01:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n0jFu-0004Fh-CD for bug-gnu-emacs@gnu.org; Fri, 24 Dec 2021 07:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n0jFu-0006WF-CJ for bug-gnu-emacs@gnu.org; Fri, 24 Dec 2021 07:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Dec 2021 12:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52773 X-GNU-PR-Package: emacs Original-Received: via spool by 52773-submit@debbugs.gnu.org id=B52773.164034722625009 (code B ref 52773); Fri, 24 Dec 2021 12:01:02 +0000 Original-Received: (at 52773) by debbugs.gnu.org; 24 Dec 2021 12:00:26 +0000 Original-Received: from localhost ([127.0.0.1]:35818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0jFK-0006VJ-17 for submit@debbugs.gnu.org; Fri, 24 Dec 2021 07:00:26 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0jFE-0006V1-S5 for 52773@debbugs.gnu.org; Fri, 24 Dec 2021 07:00:24 -0500 Original-Received: from [2001:470:142:3::e] (port=42478 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0jF9-00046a-1R; Fri, 24 Dec 2021 07:00:15 -0500 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=hdnp8hXyE+nfeMln7fEAZONKu0AjT7a81VMs/wanyhU=; b=dIGJGOw3NzBl GFlQEggpVHhsUwWzpP23MNSNyHI3rKfAtsJ7djirBARfJI7Vuwd3jv6hzyzUdAeA7HpyIntsaWEA1 zD5Eeav7o6X1DK1TOtdsH4KjeFt9Y9cWN3pHWMycwJfi8enRkPSJJvauYe73alFzUGdEVRlJwhY4w JgsW4fKfBEgOySPhVp6a+DIphRWf86+51HPlNI4788Vjxwd1OCKkBdmfPr/ULeU1BkLWTWGHC7ZoY wJllFZo3HsqXFa4YTIXNQUJau7ZJ0EWfCgD4E3xWtFwvbek55wN3knchYzmUX+w96yIIkCS8qd2Ul Ym7xWlYrS8Ti527+0irk6Q==; Original-Received: from [87.69.77.57] (port=1893 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0jF7-00014p-N7; Fri, 24 Dec 2021 07:00:15 -0500 In-Reply-To: (message from Alan Mackenzie on Fri, 24 Dec 2021 11:22:48 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:223042 Archived-At: > Date: Fri, 24 Dec 2021 11:22:48 +0000 > From: Alan Mackenzie > > The cause of the problem is in `locate-file' in files.el. There, if a > ..eln file is found, it's corresponding .el source is looked up in a hash > table, and the .el name returned instead. > > This mechanism was inserted by the following patch: > > commit 3224a443060a5f21bb910064fc06fe4432810355 > Author: Andrea Corallo > Date: Sun Jul 19 10:46:24 2020 +0200 > > Move eln files into dedicated cache directories > > When loading a elc file search for a corresponding eln one into > `comp-eln-load-path' directories and load it if available. > `comp-eln-load-path' contains by default two directory (user and > system one). > > It seems there is some use case for which returning the .el file name in > place of the .eln is appropriate. It isn't appropriate for > locate-library. > > I would suggest moving the hash table mechanism out of locate-file, and > into the other function which calls locate-file, where the substitution > is wanted. If you want this to be fixed on the emacs-28 branch, the above proposal will not fly. So either we will need a special, safer, solution for the release branch, or we will have this solved only on master. (I prefer the former, FWIW.)