From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Le Wang Newsgroups: gmane.emacs.devel Subject: Re: when to call provide, first or last? Date: Mon, 27 Feb 2012 21:32:28 +0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d043438ac3df40e04b9f224b7 X-Trace: dough.gmane.org 1330349561 9908 80.91.229.3 (27 Feb 2012 13:32:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Feb 2012 13:32:41 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 27 14:32:39 2012 Return-path: Envelope-to: ged-emacs-devel@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 1S20gw-0005r6-Lt for ged-emacs-devel@m.gmane.org; Mon, 27 Feb 2012 14:32:38 +0100 Original-Received: from localhost ([::1]:58298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S20gw-0000ZP-9I for ged-emacs-devel@m.gmane.org; Mon, 27 Feb 2012 08:32:38 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S20gp-0000Y0-07 for emacs-devel@gnu.org; Mon, 27 Feb 2012 08:32:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S20gn-0004Wo-HH for emacs-devel@gnu.org; Mon, 27 Feb 2012 08:32:30 -0500 Original-Received: from mail-wi0-f169.google.com ([209.85.212.169]:43488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S20gn-0004Wd-9x for emacs-devel@gnu.org; Mon, 27 Feb 2012 08:32:29 -0500 Original-Received: by wibhj13 with SMTP id hj13so3727534wib.0 for ; Mon, 27 Feb 2012 05:32:28 -0800 (PST) Received-SPF: pass (google.com: domain of l26wang@gmail.com designates 10.180.78.130 as permitted sender) client-ip=10.180.78.130; Authentication-Results: mr.google.com; spf=pass (google.com: domain of l26wang@gmail.com designates 10.180.78.130 as permitted sender) smtp.mail=l26wang@gmail.com; dkim=pass header.i=l26wang@gmail.com Original-Received: from mr.google.com ([10.180.78.130]) by 10.180.78.130 with SMTP id b2mr18909627wix.1.1330349548315 (num_hops = 1); Mon, 27 Feb 2012 05:32:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Mm3LcQixqYD5T+s3SKsNojz/QlFQxpslixUhQJqjBsU=; b=J2UN0iBbz4jAkkHH6O61xWlD2ILlrNhbdhNkZPjPKIpKPEiKeBSpUh7pL4S/SIEvwv lmayM0WYWaZM3rhqSWSRC2ozFUU78pmogS6PCD3Esqk14oQ/l9khYzWIFgcBqBdjWLWD wAYGqlG6GpNbvwq0FI3evZcZuAT+aCINl5TKo= Original-Received: by 10.180.78.130 with SMTP id b2mr14939266wix.1.1330349548106; Mon, 27 Feb 2012 05:32:28 -0800 (PST) Original-Received: by 10.216.29.130 with HTTP; Mon, 27 Feb 2012 05:32:28 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.212.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:148813 Archived-At: --f46d043438ac3df40e04b9f224b7 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Feb 27, 2012 at 9:25 PM, Juanma Barranquero wrote: > On Mon, Feb 27, 2012 at 14:08, Le Wang wrote: > > >> What happens next? You have broken code, and you're either looking at > the > >> backtrace or you get a ding. How is this a problem? > > The problem is that you can miss the error, and also that (require > 'my-feature) will "work" afterwards. > So what? You have broken code. Bad things happened, and Emacs is in a bad state either way. Are you going to fix the bug and try the require again? If so, then you probably know enough to know that you should use load now. If not you're screwed already. Go file a bug. > > It's better to put it at the end and be sure that having the feature > means that everything went OK. > That's not what provide means. From the manual, http://www.gnu.org/software/emacs/manual/html_node/elisp/Named-Features.html : This function announces that feature is now loaded, or being loaded, into the current Emacs session. NOTE: "or being loaded" > Juanma > -- Le --f46d043438ac3df40e04b9f224b7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, Feb 27, 2012 at 9:25 PM, Juanma Barranquero <<= a href=3D"mailto:lekktu@gmail.com">lekktu@gmail.com> wrote:
On Mon, Feb 27, 2012 at 14:08, Le Wang <l26wang@gmail.com> wrote:

>> What happens next?=A0 You have broken code, and you're either = looking at the
>> backtrace or you get a ding.=A0 How is this a problem?

The problem is that you can miss the error, and also that (require 'my-feature) will "work" afterwards.
So what?=A0 You have broken code.=A0 Bad things happened, and Emacs is in = a bad state either way.

Are you going to fix the bug and try the req= uire again?=A0 If so, then you probably know enough to know that you should= use load now.=A0 If not you're screwed already.=A0 Go file a bug.
=A0

It's better to put it at the end and be sure that having the feature means that everything went OK.

That's not what provide means= .=A0 From the manual, http://www.gnu.org/software/emacs/manua= l/html_node/elisp/Named-Features.html:

This function announces that feature is now loaded, or being loaded, into the current Emacs session.

NOTE: "or being loade= d"

=A0
<= span class=3D"HOEnZb"> =A0 =A0 Juanma



--
Le
--f46d043438ac3df40e04b9f224b7--