From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: "load-file" surreptitiously pushes directories onto load-path. Date: 9 Apr 2007 09:53:40 +0200 Message-ID: <20070408221024.GA1395@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1176105276 14164 80.91.229.12 (9 Apr 2007 07:54:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 9 Apr 2007 07:54:36 +0000 (UTC) To: emacs-devel@acm.muc.de Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 09 09:53:55 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 1HaohF-0003yR-4K for ged-emacs-devel@m.gmane.org; Mon, 09 Apr 2007 09:53:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Haol1-0006zH-GU for ged-emacs-devel@m.gmane.org; Mon, 09 Apr 2007 03:57:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Haoky-0006rr-7w for emacs-devel@gnu.org; Mon, 09 Apr 2007 03:57:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Haokx-0006nd-DC for emacs-devel@gnu.org; Mon, 09 Apr 2007 03:57:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Haokx-0006nN-9N for emacs-devel@gnu.org; Mon, 09 Apr 2007 03:57:43 -0400 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Haoh8-0003PS-9Q for emacs-devel@gnu.org; Mon, 09 Apr 2007 03:53:46 -0400 Original-Received: (qmail 73280 invoked by uid 3782); 9 Apr 2007 07:53:40 -0000 Original-Received: from acm.muc.de (p54a3f648.dip.t-dialin.net [84.163.246.72]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Mon, 09 Apr 2007 09:53:39 +0200 Original-Received: (qmail 2025 invoked by uid 1000); 9 Apr 2007 09:13:05 -0000 Resent-Date: Mon, 9 Apr 2007 10:13:05 +0100 Resent-Message-ID: <20070409091305.GA1065@muc.de> Resent-To: emacs-devel@gnu.org Original-Date: Sun, 8 Apr 2007 23:10:24 +0100 Content-Disposition: inline User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) Resent-From: Alan Mackenzie X-Primary-Address: acm@muc.de X-detected-kernel: FreeBSD 4.6-4.9 Resent-Date: Mon, 09 Apr 2007 03:57:43 -0400 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:69216 Archived-At: Hi, Emacs! Start a modern Emacs with # emacs -Q In *scratch*, do C-u M-: load-path Follow this up with M-x load-file ~/cc-mode-5.31.n/tests/000tests.elc and repeat C-u M-: load-path It will be seen that load-file has pushed the element "/home/acm/cc-mode-5.31.n" onto the front of load-path. This is surely a bug. And even if it's not, it ought to be! I think it's a serious bug. It can lead hackers to testing code which is in a different directory from what they think. It has done exactly that to me for an extended period. I've had a quick look through the Elisp manual, without finding this behaviour described. As a matter of interest, this bug is in Emacs 21. It is very old. I might try and track it down tomorrow. -- Alan Mackenzie (Ittersbach, Germany).