From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: why is site-lisp placed before the default load path? Date: Mon, 01 Aug 2016 19:39:42 +0300 Message-ID: <83bn1co33l.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine X-Trace: blaine.gmane.org 1470069771 20423 195.159.176.226 (1 Aug 2016 16:42:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 1 Aug 2016 16:42:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alex Dunn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 01 18:42:47 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUGIh-00052G-2B for ged-emacs-devel@m.gmane.org; Mon, 01 Aug 2016 18:42:47 +0200 Original-Received: from localhost ([::1]:51748 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUGId-0006kQ-Ly for ged-emacs-devel@m.gmane.org; Mon, 01 Aug 2016 12:42:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUGG2-0005Tj-Gm for emacs-devel@gnu.org; Mon, 01 Aug 2016 12:40:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUGFz-0006zH-2h for emacs-devel@gnu.org; Mon, 01 Aug 2016 12:40:02 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUGFy-0006zD-VO; Mon, 01 Aug 2016 12:39:59 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1586 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bUGFy-0004Eu-82; Mon, 01 Aug 2016 12:39:58 -0400 In-reply-to: (message from Alex Dunn on Mon, 1 Aug 2016 09:24:34 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:206317 Archived-At: > From: Alex Dunn > Date: Mon, 1 Aug 2016 09:24:34 -0700 > > Right now, `init_lread` in lread.c creates the initial load path by concatenating PATH_SITELOADSEARCH and > PATH_LOADSEARCH, in that order. Since subdirs.el searches recursively and adds everything to the > load-path, if I install (for example), realgud into site-lisp, things break because a number of Emacs' own > libraries are shadowed by realgud's language and utility modules: > - https://github.com/realgud/realgud/tree/master/realgud/common > - https://github.com/realgud/realgud/tree/master/realgud/lang > > Looking through the code history, this order has been deliberately maintained for well over a decade, but > what's the reason for letting core libraries be overridden like this? It's precisely so that users could have their local versions loaded in preference to the bundled ones, I think. If realgud somehow causes trouble due to this, the problem should be solved there, IMO.