From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 24 06:22:55 2021 Received: (at submit) by debbugs.gnu.org; 24 Dec 2021 11:22:55 +0000 Received: from localhost ([127.0.0.1]:35789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0if1-0005N0-GC for submit@debbugs.gnu.org; Fri, 24 Dec 2021 06:22:55 -0500 Received: from lists.gnu.org ([209.51.188.17]:58192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0if0-0005Mt-3I for submit@debbugs.gnu.org; Fri, 24 Dec 2021 06:22:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0iez-0007ZR-U9 for bug-gnu-emacs@gnu.org; Fri, 24 Dec 2021 06:22:53 -0500 Received: from colin.muc.de ([193.149.48.1]:20750 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1n0iex-0008T4-RE for bug-gnu-emacs@gnu.org; Fri, 24 Dec 2021 06:22:53 -0500 Received: (qmail 40162 invoked by uid 3782); 24 Dec 2021 11:22:49 -0000 Received: from acm.muc.de (p4fe1590f.dip0.t-ipconnect.de [79.225.89.15]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 24 Dec 2021 12:22:49 +0100 Received: (qmail 11521 invoked by uid 1000); 24 Dec 2021 11:22:48 -0000 Date: Fri, 24 Dec 2021 11:22:48 +0000 To: bug-gnu-emacs@gnu.org Subject: Master and (probably) emacs-28: locate-library hides .eln files. Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) Hello, Emacs and Andrea. With a native compiled recent master branch, do: emacs -Q M-x locate-library files The result in the echo area is something like: Library is file ~/emacs/emacs.git/sub-master-5/lisp/files.el ^^^ .. This is wrong. The Emacs is _NOT_ running uncompiled Lisp, it's running native compiled files. The reply should be a file name ending in ".eln". This problem is surely also in the emacs-28 branch. ######################################################################### 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. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 24 07:00:26 2021 Received: (at 52773) by debbugs.gnu.org; 24 Dec 2021 12:00:26 +0000 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 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 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==; 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 Date: Fri, 24 Dec 2021 14:00:21 +0200 Message-Id: <83o856rz56.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: (message from Alan Mackenzie on Fri, 24 Dec 2021 11:22:48 +0000) Subject: Re: bug#52773: Master and (probably) emacs-28: locate-library hides .eln files. References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52773 Cc: 52773@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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.) From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 24 07:10:00 2021 Received: (at 52773) by debbugs.gnu.org; 24 Dec 2021 12:10:00 +0000 Received: from localhost ([127.0.0.1]:35826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0jOa-0006iz-As for submit@debbugs.gnu.org; Fri, 24 Dec 2021 07:10:00 -0500 Received: from quimby.gnus.org ([95.216.78.240]:41604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0jOY-0006im-5i for 52773@debbugs.gnu.org; Fri, 24 Dec 2021 07:09:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Vcb7I6BAYCXm45xbiiIUB0A3SG+osSQTvKPCuA7V7+8=; b=lN7hlqUFFJF8QUaLVcHCGcapxf Ava10HBulBnOcsfz+9mUgUBsJDfRcjLq6vSCLVKBxxB3rAVRPnP4p5xb5WwHhO5UhBFNqaPG5XnMy 852aogVuQ7h1iMr5S6Go3jWeHRds5PtjSBDrT13yPD1eaxZOoMbhJkeJB4W/LrDIDLkM=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n0jOP-00039d-DC; Fri, 24 Dec 2021 13:09:51 +0100 From: Lars Ingebrigtsen To: Alan Mackenzie Subject: Re: bug#52773: Master and (probably) emacs-28: locate-library hides .eln files. References: Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEWEe3xBPkHPysn/ //+UbCDrAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+UMGAwIODPBeRIAAAFfSURBVCjPTdDNasJAEAfw vyGWmJOVWHo0QiHMU6RSwXoq4l48aelBfIoYgkhOUtqLp02osJ2n7H5ZnEOWH7MzOxkMhY4ZTHQg FhUOUYYwI4ZYXfLDmRErNiheT2ei485gUXQGp22lYo2lQG/AZQI2eEPvM1ag2mCB3mMyg2LbIIxm aR6yvbYKojydRK3LQK67ufQYH7H/qEdji6wYdtZxMy8NGCmINRTEnIsRGm7sOBqIQmrIoq3i4zt3 xi4j4/2Om4kHVMAy8BgXJ5KuhpnKiiR7cHBZEZODEvfPO557DHqb7Y8eReiX1UM+nAZXiJfvt/6d xyZdhkhg8fuULYEksgiGamW3raGoSu3eDUqSUyDvJxqqBAudCUODGjxDFNmalsE1e5R60krBQW+c 9WbgQdwqqTI3gf5JeeHENdChP2VhMw78j/oW7EFXSI/2FlLd1tx0++p3qc8jh2RpjvgPND7nsIdk gQ0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMTItMjRUMTI6MDg6NTYrMDA6MDDP3sxSAAAAJXRF WHRkYXRlOm1vZGlmeQAyMDIxLTEyLTI0VDEyOjA4OjU2KzAwOjAwvoN07gAAAABJRU5ErkJggg== X-Now-Playing: The Beatles's _Revolver_: "Got To Get You Into My Life" Date: Fri, 24 Dec 2021 13:09:39 +0100 In-Reply-To: (Alan Mackenzie's message of "Fri, 24 Dec 2021 11:22:48 +0000") Message-ID: <87fsqi2oho.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alan Mackenzie writes: > 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. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52773 Cc: 52773@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Alan Mackenzie writes: > 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 also breaks loadhist, but in a different way -- see bug#51308. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 24 08:18:20 2021 Received: (at 52773) by debbugs.gnu.org; 24 Dec 2021 13:18:20 +0000 Received: from localhost ([127.0.0.1]:35863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0kSh-000287-Vp for submit@debbugs.gnu.org; Fri, 24 Dec 2021 08:18:20 -0500 Received: from mx.sdf.org ([205.166.94.24]:55835) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0kSd-00027x-An for 52773@debbugs.gnu.org; Fri, 24 Dec 2021 08:18:18 -0500 Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 1BODIDNl015502 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Fri, 24 Dec 2021 13:18:14 GMT From: Andrea Corallo To: Alan Mackenzie Subject: Re: bug#52773: Master and (probably) emacs-28: locate-library hides .eln files. References: Date: Fri, 24 Dec 2021 13:18:13 +0000 In-Reply-To: (Alan Mackenzie's message of "Fri, 24 Dec 2021 11:22:48 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 52773 Cc: 52773@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Alan Mackenzie writes: > Hello, Emacs and Andrea. > > With a native compiled recent master branch, do: > > emacs -Q > M-x locate-library files > > The result in the echo area is something like: > > > Library is file ~/emacs/emacs.git/sub-master-5/lisp/files.el > ^^^ > > .. This is wrong. The Emacs is _NOT_ running uncompiled Lisp, it's > running native compiled files. The reply should be a file name ending > in ".eln". > > This problem is surely also in the emacs-28 branch. > > ######################################################################### > > 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. [resending as the mail was rejected by bug-gnu-emacs@debbugs.gnu.org] Hi Alan, The trouble in this area is that `locate-library' might be used by existing programs to obtain the source file (.elc files are tipically in the same directory where the corresponding .el are). This was the big trouble also for `load-file-name' and that's why we had to add `load-true-file-name', all other solution caused unacceptable incompatibilities with existing software. AFAIR `locate-library' had the same exact issue. Best Regards Andrea From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 24 16:03:29 2021 Received: (at 52773) by debbugs.gnu.org; 24 Dec 2021 21:03:29 +0000 Received: from localhost ([127.0.0.1]:38132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0rir-0001vU-Hy for submit@debbugs.gnu.org; Fri, 24 Dec 2021 16:03:29 -0500 Received: from colin.muc.de ([193.149.48.1]:36427 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1n0rin-0001vD-Kt for 52773@debbugs.gnu.org; Fri, 24 Dec 2021 16:03:28 -0500 Received: (qmail 58030 invoked by uid 3782); 24 Dec 2021 21:03:18 -0000 Received: from acm.muc.de (p4fe1590f.dip0.t-ipconnect.de [79.225.89.15]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 24 Dec 2021 22:03:18 +0100 Received: (qmail 2356 invoked by uid 1000); 24 Dec 2021 21:03:17 -0000 Date: Fri, 24 Dec 2021 21:03:17 +0000 To: Andrea Corallo Subject: Re: bug#52773: Master and (probably) emacs-28: locate-library hides .eln files. Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 52773 Cc: 52773@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Andrea. On Fri, Dec 24, 2021 at 13:18:13 +0000, Andrea Corallo wrote: > Alan Mackenzie writes: > > Hello, Emacs and Andrea. > > With a native compiled recent master branch, do: > > emacs -Q > > M-x locate-library files > > The result in the echo area is something like: > > Library is file ~/emacs/emacs.git/sub-master-5/lisp/files.el > > ^^^ > > .. This is wrong. The Emacs is _NOT_ running uncompiled Lisp, it's > > running native compiled files. The reply should be a file name ending > > in ".eln". > > This problem is surely also in the emacs-28 branch. > > ######################################################################### > > 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. > [resending as the mail was rejected by bug-gnu-emacs@debbugs.gnu.org] Apologies for the non-sensical address. > Hi Alan, > The trouble in this area is that `locate-library' might be used by > existing programs to obtain the source file (.elc files are tipically in > the same directory where the corresponding .el are). Are you saying that programs obtain the path of the .elc file, then expect to get the source file by removing the "c" at the end? Possibly something similar for .eln files? > This was the big trouble also for `load-file-name' and that's why we had > to add `load-true-file-name', all other solution caused unacceptable > incompatibilities with existing software. But it's broken locate-library. The doc string states clearly that this function "show[s] the PRECISE file name of Emacs library LIBRARY". Currently, the function doesn't do this. This was a nuisance for me yesterday and today, when I was trying to find out whether a particular Lisp file was .el, .elc, or .eln. I needed to use the workaround of C-h v on load-history. > AFAIR `locate-library' had the same exact issue. > Best Regards > Andrea -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 25 05:43:57 2021 Received: (at 52773) by debbugs.gnu.org; 25 Dec 2021 10:43:58 +0000 Received: from localhost ([127.0.0.1]:38547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n14Wr-0007VT-N0 for submit@debbugs.gnu.org; Sat, 25 Dec 2021 05:43:57 -0500 Received: from mx.sdf.org ([205.166.94.24]:64960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n14Wn-0007VJ-V7 for 52773@debbugs.gnu.org; Sat, 25 Dec 2021 05:43:56 -0500 Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 1BPAhp3r021522 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Sat, 25 Dec 2021 10:43:52 GMT From: Andrea Corallo To: Alan Mackenzie Subject: Re: bug#52773: Master and (probably) emacs-28: locate-library hides .eln files. References: Date: Sat, 25 Dec 2021 10:43:51 +0000 In-Reply-To: (Alan Mackenzie's message of "Fri, 24 Dec 2021 21:03:17 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 52773 Cc: 52773@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Alan Mackenzie writes: [...] >> Hi Alan, > >> The trouble in this area is that `locate-library' might be used by >> existing programs to obtain the source file (.elc files are tipically in >> the same directory where the corresponding .el are). > > Are you saying that programs obtain the path of the .elc file, then > expect to get the source file by removing the "c" at the end? Precisely. Despite what the docstring says we have to deal with the existing software on the field. IIRC at the time after a number of bug reports was deemed that minimizing incompatibilities and making the native-compiler as much transparent as possible was priority. One option would be to update the docstring and add a second function to return the true value similarly to what we did with `load-true-file-name'. The other option is of course what you've suggested. Thanks! Andrea From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 25 06:25:29 2021 Received: (at 52773) by debbugs.gnu.org; 25 Dec 2021 11:25:29 +0000 Received: from localhost ([127.0.0.1]:38564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n15B3-0000aM-06 for submit@debbugs.gnu.org; Sat, 25 Dec 2021 06:25:29 -0500 Received: from colin.muc.de ([193.149.48.1]:59504 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1n15B0-0000a2-Mr for 52773@debbugs.gnu.org; Sat, 25 Dec 2021 06:25:27 -0500 Received: (qmail 40649 invoked by uid 3782); 25 Dec 2021 11:25:19 -0000 Received: from acm.muc.de (p2e5d51cf.dip0.t-ipconnect.de [46.93.81.207]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 25 Dec 2021 12:25:19 +0100 Received: (qmail 14788 invoked by uid 1000); 25 Dec 2021 11:25:19 -0000 Date: Sat, 25 Dec 2021 11:25:19 +0000 To: Andrea Corallo Subject: Re: bug#52773: Master and (probably) emacs-28: locate-library hides .eln files. Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 52773 Cc: 52773@debbugs.gnu.org, acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Andrea. On Sat, Dec 25, 2021 at 10:43:51 +0000, Andrea Corallo wrote: > Alan Mackenzie writes: > [...] > >> Hi Alan, > >> The trouble in this area is that `locate-library' might be used by > >> existing programs to obtain the source file (.elc files are tipically in > >> the same directory where the corresponding .el are). > > Are you saying that programs obtain the path of the .elc file, then > > expect to get the source file by removing the "c" at the end? > Precisely. > Despite what the docstring says we have to deal with the existing > software on the field. IIRC at the time after a number of bug reports > was deemed that minimizing incompatibilities and making the > native-compiler as much transparent as possible was priority. > One option would be to update the docstring and add a second function to > return the true value similarly to what we did with > `load-true-file-name'. > The other option is of course what you've suggested. Another option would be to print the true library name when INTERACTIVE-CALL (an argument) is non-nil. Or we could add yet another &optional argument. The doc string needs fixing whatever we do, I think. None of this feels very satisfactory, but Emacs is nearly 50 years old. ;-) > Thanks! > Andrea -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 25 06:46:48 2021 Received: (at 52773) by debbugs.gnu.org; 25 Dec 2021 11:46:48 +0000 Received: from localhost ([127.0.0.1]:38579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n15Vg-0001Ip-Bf for submit@debbugs.gnu.org; Sat, 25 Dec 2021 06:46:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n15Vd-0001IS-4d for 52773@debbugs.gnu.org; Sat, 25 Dec 2021 06:46:46 -0500 Received: from [2001:470:142:3::e] (port=47586 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 1n15VX-0006hT-3n; Sat, 25 Dec 2021 06:46:39 -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=ptAjRAzExWdUUsw++ImU66QFAXgfLVBDXyGhKdIgrY0=; b=ZfmYZoLTQyx+ 29AI//dgjhJdsuTJofldWqY4KNdZ3720qRgfICuDZH7SJLAzxKMD0HCbjGmQzSEtEWSPcnOcOr60v HXaZVPxrE02AxRlvBYm6CAtHQwW62II40PuP7mio+mT34bmbsWHQ8SqyJE5HidstnBH90msJnK3hV 5QqBc9f3Um1ssCVX2Zr8mK6uT9L3tbcPoNkEEPzaqFSGxy/OkfERvpaXX1DGuScSC2eJsC2OGNNAB jnJNRNFTXL9SMYLVv1aktX8UIXQ7N5aUxyAjEon8BjHdHTYslomlOVAEwHNvkQpYPL33uwtC7DP2/ ziYuDD42Xt+UTRyYLz/LAA==; Received: from [87.69.77.57] (port=3651 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 1n15VX-00011b-12; Sat, 25 Dec 2021 06:46:39 -0500 Date: Sat, 25 Dec 2021 13:46:50 +0200 Message-Id: <83k0fsrjo5.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: (message from Alan Mackenzie on Sat, 25 Dec 2021 11:25:19 +0000) Subject: Re: bug#52773: Master and (probably) emacs-28: locate-library hides .eln files. References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52773 Cc: 52773@debbugs.gnu.org, akrl@sdf.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sat, 25 Dec 2021 11:25:19 +0000 > From: Alan Mackenzie > Cc: 52773@debbugs.gnu.org, acm@muc.de > > Another option would be to print the true library name when > INTERACTIVE-CALL (an argument) is non-nil. Or we could add yet another > &optional argument. Better do both: add another argument that the interactive call will set.