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:57:29 +0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d04430662b5a65d04b9f27d0b X-Trace: dough.gmane.org 1330351073 22154 80.91.229.3 (27 Feb 2012 13:57:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Feb 2012 13:57:53 +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:57:53 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 1S215H-0003aS-Nf for ged-emacs-devel@m.gmane.org; Mon, 27 Feb 2012 14:57:47 +0100 Original-Received: from localhost ([::1]:49433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S215H-00018Z-Ba for ged-emacs-devel@m.gmane.org; Mon, 27 Feb 2012 08:57:47 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S215A-00018K-8S for emacs-devel@gnu.org; Mon, 27 Feb 2012 08:57:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2150-0000RZ-JT for emacs-devel@gnu.org; Mon, 27 Feb 2012 08:57:40 -0500 Original-Received: from mail-wi0-f169.google.com ([209.85.212.169]:37814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2150-0000RM-8j for emacs-devel@gnu.org; Mon, 27 Feb 2012 08:57:30 -0500 Original-Received: by wibhj13 with SMTP id hj13so3748327wib.0 for ; Mon, 27 Feb 2012 05:57:29 -0800 (PST) Received-SPF: pass (google.com: domain of l26wang@gmail.com designates 10.180.101.72 as permitted sender) client-ip=10.180.101.72; Authentication-Results: mr.google.com; spf=pass (google.com: domain of l26wang@gmail.com designates 10.180.101.72 as permitted sender) smtp.mail=l26wang@gmail.com; dkim=pass header.i=l26wang@gmail.com Original-Received: from mr.google.com ([10.180.101.72]) by 10.180.101.72 with SMTP id fe8mr28414650wib.4.1330351049203 (num_hops = 1); Mon, 27 Feb 2012 05:57:29 -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=w80zsNprGVbZy1Kt0v01J32/dMS51Ypwy8tjelNWZdE=; b=M4t8KfKZhVvhZO5+mKKH2pTxKxzqT/w6EuN9nrNQJeqkyev3hYXlXhK6HpjaCQb7Xi NAZBe3Nex+cuCxm8S6KFH6b2hwXDOqtFoKwIZLcnqusGiuY7CYlomukuAnLMcl+zJUS8 Mat7DC1EzLpFZ2LtHeNXlo20b7RBXzteh+aj0= Original-Received: by 10.180.101.72 with SMTP id fe8mr22561519wib.4.1330351049123; Mon, 27 Feb 2012 05:57:29 -0800 (PST) Original-Received: by 10.216.29.130 with HTTP; Mon, 27 Feb 2012 05:57:29 -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:148817 Archived-At: --f46d04430662b5a65d04b9f27d0b Content-Type: text/plain; charset=ISO-8859-1 On Mon, Feb 27, 2012 at 9:44 PM, Juanma Barranquero wrote: > On Mon, Feb 27, 2012 at 14:32, Le Wang wrote: > > > So what? You have broken code. Bad things happened, and Emacs is in a > bad > > state either way. > > No, sorry. One package failing to load does not necessarily leave > "Emacs in a bad state", at least not in theory. That's why > ignore-errors, condition-case and (require x nil t) exist, for > example. > So predictable exceptions are handled by those functions already. But now things are just borked. > Your way makes a bit more difficult to detect the problem, and a bit > more likely that it will be missed and subsequent requires fail > without warning. > This is a valid point. But, hey, it's your code, put it whenever you think it's right. > Sure. I'm just trying to clarify what the idiomatic way to use it is. Maybe a summary of this discussion should be in the manual? > > This function announces that feature is now loaded, or being loaded, > into the current Emacs session. > > > > NOTE: "or being loaded" > > Right. And using your method, you can have a feature that does not > mean that the code is loaded or being loaded. > > Juanma > -- Le --f46d04430662b5a65d04b9f27d0b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, Feb 27, 2012 at 9:44 PM, Juanma Barranquero <<= a href=3D"mailto:lekktu@gmail.com">lekktu@gmail.com> wrote:
On Mon, Feb 27, 2012 at 14:32, Le Wang <l26wang@gmail.com> wrote:

> So what?=A0 You have broken code.=A0 Bad things happened, and Emacs is= in a bad
> state either way.

No, sorry. One package failing to load does not necessarily leave
"Emacs in a bad state", at least not in theory. That's why ignore-errors, condition-case and (require x nil t) exist, for
example.

So predictable exceptions are handled by = those functions already.=A0 But now things are just borked.
=A0
Your way makes a bit more difficult to detect the problem, and a bit
more likely that it will be missed and subsequent requires fail
without warning.
=A0
This is a valid point.=A0
=
But, hey, it's your code, put it whenever you think it's right.
=

Sure.=A0 I'm just trying = to clarify what the idiomatic way to use it is.=A0 Maybe a summary of this = discussion should be in the manual?
=A0
> This function announces that feature is now loaded, or being loaded, i= nto the current Emacs session.
>
> NOTE: "or being loaded"

Right. And using your method, you can have a feature that does not mean that the code is loaded or being loaded.

=A0 =A0 Juanma



--
Le
--f46d04430662b5a65d04b9f27d0b--