From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dave Goel Newsgroups: gmane.emacs.devel Subject: find-file.el bug; checked in a fix. Date: Wed, 05 Dec 2007 17:10:27 -0500 Message-ID: <874pewdc8c.fsf@marie.gnufans.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196912025 848 80.91.229.12 (6 Dec 2007 03:33:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Dec 2007 03:33:45 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 06 04:33:50 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 1J07Uj-0000Rm-Da for ged-emacs-devel@m.gmane.org; Thu, 06 Dec 2007 04:33:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J07US-0003uw-Lz for ged-emacs-devel@m.gmane.org; Wed, 05 Dec 2007 22:33:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J02Sg-00035t-C9 for emacs-devel@gnu.org; Wed, 05 Dec 2007 17:11:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J02Se-00034s-Qg for emacs-devel@gnu.org; Wed, 05 Dec 2007 17:11:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J02Se-00034k-Jf for emacs-devel@gnu.org; Wed, 05 Dec 2007 17:11:20 -0500 Original-Received: from mtao03.charter.net ([209.225.8.188]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J02Se-0000cd-9U for emacs-devel@gnu.org; Wed, 05 Dec 2007 17:11:20 -0500 Original-Received: from aarprv04.charter.net ([10.20.200.74]) by mtao03.charter.net (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20071205221035.FKAR19023.mtao03.charter.net@aarprv04.charter.net> for ; Wed, 5 Dec 2007 17:10:35 -0500 Original-Received: from marie.gnufans.net ([66.168.196.121]) by aarprv04.charter.net with ESMTP id <20071205221035.OTND17353.aarprv04.charter.net@marie.gnufans.net> for ; Wed, 5 Dec 2007 17:10:35 -0500 Original-Received: from deego by marie.gnufans.net with local (Exim 3.36 #1 (Debian)) id 1J02Rn-0004Xu-00 for ; Wed, 05 Dec 2007 17:10:27 -0500 X-Face: #5@=vrmx5t3mZaPY8(mR.n+V#:%4NW7j5A&^}@lGp2rK; CQ4%iH1v'gh/^A)w5*6c&R2(P' 4+seYDq8OK'LPI/C(C^A*w|f*t+8, 'T8b#_0~h3!A7GoVroE[cr0Fb'A0%SdU|Lk@gBV&1vA User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-Chzlrs: 0 X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Wed, 05 Dec 2007 22:33:27 -0500 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:84773 Archived-At: hi Bug in the current cvs: 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. (And, it then fails to find the function f in the incorrectly loaded file.) The problem seems to appear when d1 precedes d in your extended load-path. ---- I have checked in a fix -- The problem is that symbol-function definition for loaded functions does not store the .el suffix. locate-library then searches for all suffixes ("el" "el.gz" "" ) in the load-path. Given this order, it does the right thing - prefer "el" over "" in a *given* directory. However, this will fail if the "" suffix occurs in a different directory which gets examined earlier. 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. The rationale is that it is much more likely that emacs would have learned of that function from a ".el" (or a derivative thereof, like a .elc) rather than a "" file. I have committed this fix. ---- This seems like a pretty non-destructive and local change. `find-library-name', not to be confused by locate-library, is only used in find-file.el. ----- (I am posting here after years. You all know me as D. Goel or Deepak Goel or deego from my older email address which I no longer use actively. I don't want to frob my From: header every time I post here; so I am going to remark about the change here, and leave my From: intact; I should learn about gnus posting styles...) - Deepak Goel