From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nathaniel Flath Newsgroups: gmane.emacs.devel Subject: Should require and provide be symmetrical? Date: Tue, 9 Feb 2010 20:29:07 -0500 Message-ID: <5e3a506e1002091729u3d70ed8bt2350c57b5d480f14@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=000e0cd11a0eef01ae047f34f521 X-Trace: ger.gmane.org 1265765367 2917 80.91.229.12 (10 Feb 2010 01:29:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Feb 2010 01:29:27 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 10 02:29:19 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nf1OI-0006gy-R4 for ged-emacs-devel@m.gmane.org; Wed, 10 Feb 2010 02:29:19 +0100 Original-Received: from localhost ([127.0.0.1]:39266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nf1OI-0006Vx-6w for ged-emacs-devel@m.gmane.org; Tue, 09 Feb 2010 20:29:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nf1OB-0006Vs-MP for emacs-devel@gnu.org; Tue, 09 Feb 2010 20:29:11 -0500 Original-Received: from [199.232.76.173] (port=55851 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nf1OA-0006Vk-1W for emacs-devel@gnu.org; Tue, 09 Feb 2010 20:29:10 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nf1O9-0006kI-Co for emacs-devel@gnu.org; Tue, 09 Feb 2010 20:29:09 -0500 Original-Received: from mail-px0-f191.google.com ([209.85.216.191]:55604) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nf1O9-0006kC-2g for emacs-devel@gnu.org; Tue, 09 Feb 2010 20:29:09 -0500 Original-Received: by pxi29 with SMTP id 29so417315pxi.1 for ; Tue, 09 Feb 2010 17:29:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=VTSDrEo/tX0pyLuSkseLms+hJ5CxCQMPHf/t2ZSUdRw=; b=eMWVRxAKY0PznEJAL/GrPFLbmLRXI3UgDYiRs7G4K5Z+mNfX48zLGALwKZiRXK1d7M Pau796oxTOTtK+iQ+6H1sNU109YRfk11eU/nV/MiJLHUm/xRbGqB9vrVWQ4AdGPMv/dI fqPj7W3XCizC5bJNf5WL/hTPdo/L3NVIAIALc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Cf2e9XBXKZ8ka+CSY2pUxgA5nvsou2RNpaLKV/a4oCPH52gOPdH4gnsCt9u+N53fxZ vBq/X12XKvgM0Gcqrgs0P0eLmHzN52COqYyITVT+GjR6r4oozX2q/kqrm7CtGTCgqhSG OPl2vZmUKdXayneACEoKkoYxKRCtPU/UzjcL4= Original-Received: by 10.141.13.14 with SMTP id q14mr6142638rvi.255.1265765347950; Tue, 09 Feb 2010 17:29:07 -0800 (PST) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:121042 Archived-At: --000e0cd11a0eef01ae047f34f521 Content-Type: text/plain; charset=ISO-8859-1 I came across a problem with require and provide that seems rather counterintuitive, although it is implicit in the documentaiton. If one file provides a feature with (provide 'feature) and another requires it, there is no guarantee that that specific file is loaded, even if no other file calls (provide 'feature). I ran into this whil splitting up my personal configuration - I was attempting to mirror the packages I was loading, so for example org.el in my directory would contain customizations for org-mode. However, in this file, a (require 'org) would cause an infinite require error, as it tried to load itself instead of the org.el in emacs. Should this behaviour be changed, or is there a reason for it? Thanks, Nathaniel Flath --000e0cd11a0eef01ae047f34f521 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I came across a problem with require and provide that seems rather counterintuitive, although it is implicit in the documentaiton.=A0 If one file provides a feature with (provide 'feature) and another requires it, there is no guarantee that that specific file is loaded, even if no other file calls (provide 'feature).=A0 I ran into this whil splitting = up my personal configuration - I was attempting to mirror the packages I was loading, so for example org.el in my directory would contain customizations for org-mode.=A0 However, in this file, a (require 'org) would cause an infinite require error, as it tried to load itself instead of the org.el in emacs.=A0 Should this behaviour be changed, or is there a reason for it?

Thanks,
Nathaniel Flath --000e0cd11a0eef01ae047f34f521--