From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: find-file.el bug; checked in a fix. Date: Fri, 07 Dec 2007 12:18:37 -0500 Message-ID: References: <874pewdc8c.fsf@marie.gnufans.net> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1197048081 10333 80.91.229.12 (7 Dec 2007 17:21:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Dec 2007 17:21:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dave Goel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 07 18:21:30 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J0gtB-0001Vp-KI for ged-emacs-devel@m.gmane.org; Fri, 07 Dec 2007 18:21:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J0gsu-0008JE-JX for ged-emacs-devel@m.gmane.org; Fri, 07 Dec 2007 12:21:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J0gqW-0007N4-2m for emacs-devel@gnu.org; Fri, 07 Dec 2007 12:18:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J0gqU-0007Lx-9E for emacs-devel@gnu.org; Fri, 07 Dec 2007 12:18:39 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J0gqU-0007Lp-02 for emacs-devel@gnu.org; Fri, 07 Dec 2007 12:18:38 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J0gqT-0000k9-OO for emacs-devel@gnu.org; Fri, 07 Dec 2007 12:18:37 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1J0gqT-0000ju-5K; Fri, 07 Dec 2007 12:18:37 -0500 In-reply-to: <874pewdc8c.fsf@marie.gnufans.net> (message from Dave Goel on Wed, 05 Dec 2007 17:10:27 -0500) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:84836 Archived-At: If a function f is autoloaded from a file a.el in a directory d, and if there also exists an executable file called a in a directory d1, then calling find-function on f shows the file a instead of a.el. Does it actually matter that the file `a' is executable? The problem seems to appear when d1 precedes d in your extended load-path. Why is the file `a' present in a directory in the `load-path'? Usually the directories in `load-path' just contain Lisp files. Was the file `a' put in those directories for a good reason or was it there by mistake? The problem is that symbol-function definition for loaded functions does not store the .el suffix. This is done for a good reason -- so if the function was defined in foo.elc.gz, you can find foo.el, foo.el.gz, or whatever is there. I believe that an appropriate solution is to simply make `find-library-name' search for the (".el" ".el.gz") files first in the load-path. Only if it does not succeed look for the other suffixes. That might be a good solution. I do not feel sure of it, though. Another solution that might be more thoroughly correct is to retain some of the info about the suffix that was actually loaded; specifically, to figure out what suffix the source file _should_ have had, and then load only that. This might be more thoroughly correct, but it is also more risky. So maybe your fix is the better choice. Does anyone else have an opinion about this? Meanwhile, I would like to know the specifics of the real test case you encountered. What were the REAL names, and why was the executable file in a directory in load-path?