From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: Elpa packages and macro dependencies. Date: Mon, 20 Oct 2014 21:25:01 +0100 Message-ID: References: <87h9yz5d9h.fsf@yahoo.fr> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b33d8fe5d9c700505e08241 X-Trace: ger.gmane.org 1413836711 20056 80.91.229.3 (20 Oct 2014 20:25:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Oct 2014 20:25:11 +0000 (UTC) Cc: Nicolas Richard , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 20 22:25:09 2014 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 1XgJVt-0004lQ-OA for ged-emacs-devel@m.gmane.org; Mon, 20 Oct 2014 22:25:09 +0200 Original-Received: from localhost ([::1]:46700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgJVt-00025W-A4 for ged-emacs-devel@m.gmane.org; Mon, 20 Oct 2014 16:25:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgJVo-00023J-30 for emacs-devel@gnu.org; Mon, 20 Oct 2014 16:25:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgJVm-0004sF-Fp for emacs-devel@gnu.org; Mon, 20 Oct 2014 16:25:04 -0400 Original-Received: from mail-oi0-x22a.google.com ([2607:f8b0:4003:c06::22a]:58467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgJVm-0004r5-AW for emacs-devel@gnu.org; Mon, 20 Oct 2014 16:25:02 -0400 Original-Received: by mail-oi0-f42.google.com with SMTP id a141so4376621oig.1 for ; Mon, 20 Oct 2014 13:25:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=TWqY2jlutJCaZSVikJ7kZHrPKndCA039CqvEdbe6wew=; b=E47iZOyviRqEq4ttF4Hgctc+3gHlDDGReFx8ldXQkbNdaYMUFVQN3xw95O4oSvNMNK DpsKuCILPp83/nDBgQep3kfkohWkNJhmexYtMwehPseF/B6mLzFVqhFaAEUdARnMTpyJ 5D+oi1qqLBK8A9Z4gXCbqz6ZP1zTfuxR0tQVvDYeJiUiwyScmvNkqYiBbhcBsgS36vqk SZFKfrBy+BekfR3qUVJ2ATnoo/Zmw5X/9NBJnAfsQdBNDVsyv9NNU5gh7hgCg4xZs0M7 Z95Gz5fONqyIZxNg19zd82YIfJI5Ts4BuMjtzgirYT4ObDs/4g2TNRSLyQAJli0STDoK sxAg== X-Received: by 10.60.76.198 with SMTP id m6mr25383007oew.12.1413836701537; Mon, 20 Oct 2014 13:25:01 -0700 (PDT) Original-Received: by 10.76.1.137 with HTTP; Mon, 20 Oct 2014 13:25:01 -0700 (PDT) Original-Received: by 10.76.1.137 with HTTP; Mon, 20 Oct 2014 13:25:01 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: KfxdD_Xfr0TS7uuDjx7ZDLIYWAA X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::22a 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:175612 Archived-At: --047d7b33d8fe5d9c700505e08241 Content-Type: text/plain; charset=UTF-8 > > (with-demoted-errors > > (load (expand-file-name autoload-name pkg-dir) nil t) > > ;; Call `load' on all files in `pkg-dir' which correspond to > > ;; provided features. Skip autoloads file since we already > > ;; evaluated it above. > > (mapcar (lambda (file) (load (expand-file-name file pkg-dir) nil t)) > > ;; The autoloads file is usually not a feature, but better stay safe. > > (remove autoload-name (package-list-loaded-files pkg-dir)))) > > Pretty hackish, but it might work. For what it's worth, it doesn't look too hackish to me. Emacs already works under the assumption that features correspond to filenames and that filenames are unique. We're just building on that assumption. > We might also want to force the `autoload' calls in autoload-name to > replace the existing definitions with autoloads. Maybe I misunderstood your earlier e-mail, but didn't you show that autoloads updated just fine with regular loading? --047d7b33d8fe5d9c700505e08241 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

> > (with-demoted-errors
> >=C2=A0 =C2=A0(load (expand-file-name autoload-name pkg-dir) nil t)=
> >=C2=A0 =C2=A0;; Call `load' on all files in `pkg-dir' whic= h correspond to
> >=C2=A0 =C2=A0;; provided features. Skip autoloads file since we al= ready
> >=C2=A0 =C2=A0;; evaluated it above.
> >=C2=A0 =C2=A0(mapcar (lambda (file) (load (expand-file-name file p= kg-dir) nil t))
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; The autoloads file is = usually not a feature, but better stay safe.
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(remove autoload-name (pa= ckage-list-loaded-files pkg-dir))))
>
> Pretty hackish, but it might work.

For what it's worth, it doesn't look too hackish to = me.
Emacs already works under the assumption that features correspond to
filenames and that filenames are unique. We're just building on that as= sumption.

> We might also want to force the `autoload' calls in= autoload-name to
> replace the existing definitions with autoloads.

Maybe I misunderstood your earlier e-mail, but didn't yo= u show that autoloads updated just fine with regular loading?

--047d7b33d8fe5d9c700505e08241--