From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Monnier 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> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tu1hd-0008TW-3k for emacs-orgmode@gnu.org; Sat, 12 Jan 2013 09:04:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tu1ha-0003Tf-8a for emacs-orgmode@gnu.org; Sat, 12 Jan 2013 09:04:53 -0500 Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-Message-ID: In-Reply-To: <87hamm8qze.fsf@bzg.ath.cx> (Bastien's message of "Sat, 12 Jan 2013 14:34:29 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: Achim Gratz , 10125@debbugs.gnu.org >>>> 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