all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: emacs-devel@acm.muc.de
Subject: "load-file" surreptitiously pushes directories onto load-path.
Date: 9 Apr 2007 09:53:40 +0200	[thread overview]
Message-ID: <20070408221024.GA1395@muc.de> (raw)

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).

             reply	other threads:[~2007-04-09  7:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-09  7:53 Alan Mackenzie [this message]
     [not found] ` <17946.90.547705.72200@farnswood.snap.net.nz>
2007-04-09 10:16   ` "load-file" surreptitiously pushes directories onto load-path Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070408221024.GA1395@muc.de \
    --to=acm@muc.de \
    --cc=emacs-devel@acm.muc.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.