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: Sat, 12 Jan 2013 09:03:44 -0500 Message-ID: References: <87sj68eogm.fsf@Rainer.invalid> <87wqvjd7qa.fsf@Rainer.invalid> <87bocvcx9f.fsf__44551.6247455545$1357934081$gmane$org@Rainer.invalid> <87ip72n1v7.fsf@Rainer.invalid> <87hamm8qze.fsf@bzg.ath.cx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1357999514 28853 80.91.229.3 (12 Jan 2013 14:05:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Jan 2013 14:05:14 +0000 (UTC) Cc: Achim Gratz , 10125@debbugs.gnu.org To: Bastien Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 12 15:05:31 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 1Tu1i8-0001yS-Vm for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Jan 2013 15:05:25 +0100 Original-Received: from localhost ([::1]:51992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tu1hs-0000QA-L1 for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Jan 2013 09:05:08 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tu1hn-0000D1-Kl for bug-gnu-emacs@gnu.org; Sat, 12 Jan 2013 09:05:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tu1hh-0003aH-KN for bug-gnu-emacs@gnu.org; Sat, 12 Jan 2013 09:05:03 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tu1ha-0003Tb-5V; Sat, 12 Jan 2013 09:04:50 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tu1hm-0007Jx-7E; Sat, 12 Jan 2013 09:05:02 -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: Sat, 12 Jan 2013 14:05:02 +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.135799944628072 (code B ref 10125); Sat, 12 Jan 2013 14:05:02 +0000 Original-Received: (at 10125) by debbugs.gnu.org; 12 Jan 2013 14:04:06 +0000 Original-Received: from localhost ([127.0.0.1]:56447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tu1gr-0007Ij-Gt for submit@debbugs.gnu.org; Sat, 12 Jan 2013 09:04:05 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:40103) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tu1gp-0007IE-Ce for 10125@debbugs.gnu.org; Sat, 12 Jan 2013 09:04:03 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtkGAG6Zu09FpZpV/2dsb2JhbABEgXuyFoEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA4hCmnGBWIMH X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="212361141" Original-Received: from 69-165-154-85.dsl.teksavvy.com (HELO pastel.home) ([69.165.154.85]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 12 Jan 2013 09:03:44 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 8E025592A5; Sat, 12 Jan 2013 09:03:44 -0500 (EST) In-Reply-To: <87hamm8qze.fsf@bzg.ath.cx> (Bastien's message of "Sat, 12 Jan 2013 14:34:29 +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:69657 Archived-At: >>>> Yes, this subroutine is never directly called from C, so placing an >>>> advice should work just fine. > I thought coding conventions prevented advising primitives? Nothing prevents advising primitive functions (advising special forms is another matter altogether). But primitive functions can be called from C directly (rather than via looking up the symbols' function cell) in which case the advice will be ignored. > I does not look clean to advise `require' here, just for Org. It's just an experiment (AFAIK). >> "Check whether a required feature has been shadowed by changing >> `load-path' after it has been loaded and reload that feature from >> current load-path in this case." > I don't understand why we need this. For the case where Org is installed via package.el rather than by manually downloading and following some installation instructions. > For package manager, a slightly more general version of the above (not > conditionalized on the feature starting with "org" or "ob") could be > used around the package compilation. I haven't yet tried this, though. Maybe the better way to do it is for package.el to compare the set of files of the new package, with the set of currently loaded `features' and unload the intersection. Stefan