From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#10125: RFE: require and load-path-shadowing Date: Fri, 11 Jan 2013 11:56:07 -0500 Message-ID: References: <87sj68eogm.fsf@Rainer.invalid> <87wqvjd7qa.fsf@Rainer.invalid> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1357923428 26537 80.91.229.3 (11 Jan 2013 16:57:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Jan 2013 16:57:08 +0000 (UTC) Cc: 10125@debbugs.gnu.org To: Achim Gratz Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 11 17:57:25 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tthv3-0006vh-0v for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jan 2013 17:57:25 +0100 Original-Received: from localhost ([::1]:34305 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tthun-0003XW-43 for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jan 2013 11:57:09 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:58684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tthue-0003Fj-VI for bug-gnu-emacs@gnu.org; Fri, 11 Jan 2013 11:57:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tthuc-00079S-VM for bug-gnu-emacs@gnu.org; Fri, 11 Jan 2013 11:57:00 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50256) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TthuY-000781-Qi; Fri, 11 Jan 2013 11:56:54 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tthuf-0000Ud-Sn; Fri, 11 Jan 2013 11:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, emacs-orgmode@gnu.org Resent-Date: Fri, 11 Jan 2013 16:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10125 X-GNU-PR-Package: emacs,org-mode X-GNU-PR-Keywords: Original-Received: via spool by 10125-submit@debbugs.gnu.org id=B10125.13579233841842 (code B ref 10125); Fri, 11 Jan 2013 16:57:01 +0000 Original-Received: (at 10125) by debbugs.gnu.org; 11 Jan 2013 16:56:24 +0000 Original-Received: from localhost ([127.0.0.1]:55719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tthu4-0000Te-2p for submit@debbugs.gnu.org; Fri, 11 Jan 2013 11:56:24 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:9561) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tthu2-0000TS-2W for 10125@debbugs.gnu.org; Fri, 11 Jan 2013 11:56:22 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtsGAG6Zu09MCpYP/2dsb2JhbABEgXuDMq5kgQiCFQEBBAEjMyMFCwsODAIYDgICFBgNJC6HbgWnDpJ7gSaOCoEUA4hCmnGBWIMH X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="212309278" Original-Received: from 76-10-150-15.dsl.teksavvy.com (HELO pastel.home) ([76.10.150.15]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 11 Jan 2013 11:56:08 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 1A1BF59441; Fri, 11 Jan 2013 11:56:07 -0500 (EST) In-Reply-To: <87wqvjd7qa.fsf@Rainer.invalid> (Achim Gratz's message of "Fri, 11 Jan 2013 17:06:53 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:69615 Archived-At: >> I guess we could fork Emacs early on and keep this second process >> around as a "process from which to generate new clean slates". > I've been thinking about something like this for a while=E2=80=A6 if it w= orked > at least as well as starting a new Emacs instance on all platforms, I'd > favor this approach. IIUC "fork" is not really an option for w32. >> I suggested a quick&dirty solution: >>> > E.g. we could add to bytecomp.el the ability to force `require' to >>> > reload a package if it's not already loaded from the file that >>> > locate-library returns. >> I still think it's not a bad option. > Would an advice work in this situation (given that require is a > primitive)? Yes, this subroutine is never directly called from C, so placing an advice should work just fine. > If yes, I'd like to give it a try over the weekend. If not, I don't > really see why require, more specifically the part that checks > features needs to be a primitive, so maybe it could be moved partly > to elisp. AFAICT the only part of `require' which can't be written in Elisp right now is the part that handles Vautoload_queue because that variable is not exposed to Elisp (IIRC this variable is used to undo the effects of a partially loaded file when the load bumps into an error midway through; FWIW I'm not convinced this feature works reliably nowadays). >> I don't see why that would introduce a difficulty. > As long as the package is properly namespaced, why not allow for > removing all definitions pertaining to that entire namespace (features, > autoloads, definitions, =E2=80=A6)? We could try that, as well, but it would only work for those packages that are "properly namespaced" (and there's no way to detect that AFAIK). Along the same lines, we could try to use unload-feature. Stefan