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: [Emacs-diffs] malabarba/package.el-reload-files-on-upgrade 300dbb1 1/2: * emacs-lisp/package.el (package--list-loaded-files): New function Date: Thu, 11 Dec 2014 08:34:30 +0000 Message-ID: References: <20141211001200.20245.22729@vcs.savannah.gnu.org> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1418286894 23018 80.91.229.3 (11 Dec 2014 08:34:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Dec 2014 08:34:54 +0000 (UTC) To: Stefan Monnier , emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 11 09:34:48 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 1XyzCx-0006cf-ON for ged-emacs-devel@m.gmane.org; Thu, 11 Dec 2014 09:34:48 +0100 Original-Received: from localhost ([::1]:49804 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyzCx-0000hQ-29 for ged-emacs-devel@m.gmane.org; Thu, 11 Dec 2014 03:34:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyzCi-0000hG-GV for emacs-devel@gnu.org; Thu, 11 Dec 2014 03:34:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XyzCh-00062o-Ha for emacs-devel@gnu.org; Thu, 11 Dec 2014 03:34:32 -0500 Original-Received: from mail-oi0-x22d.google.com ([2607:f8b0:4003:c06::22d]:34724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyzCh-00062i-Cb for emacs-devel@gnu.org; Thu, 11 Dec 2014 03:34:31 -0500 Original-Received: by mail-oi0-f45.google.com with SMTP id a141so3351303oig.4 for ; Thu, 11 Dec 2014 00:34:30 -0800 (PST) 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:content-type; bh=mtOKvKucC9oM9KBUc0db662HUc+twzNNC7Dotng+EDc=; b=p9V2xxI24JNRcCAgcjiMfoerWB372GLfJp/x3gnB0SxctOeCAElrshRHmKz6mXKXbF Jvmc0oAfETUfn7uJP5IPxeR5GsvjkTiULz+6Frp8bMJ8JsWO+CwCy+thGmNQElcVXtxA qkkXpfkwO7mkCwCyirIuSIc3M9Tm7L9/OEihGZWVBInc5hrnA+ZELiW9fDo/H56z3C32 XfvcomLzIch3SOfgC8EtA8H5uEo0piuJ3JKsYAxahJOXY7bjsiHyQBO0gHgZMjjSnutW PigLHc0VD3aLIAR36QlZ2VJVenpjpo4/4hKKhlwpo7SVhATFtOCG5iLALUDYCEONmkZs +d4w== X-Received: by 10.182.231.135 with SMTP id tg7mr5494893obc.62.1418286870817; Thu, 11 Dec 2014 00:34:30 -0800 (PST) Original-Received: by 10.76.154.106 with HTTP; Thu, 11 Dec 2014 00:34:30 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: cPzFVt7yED2onajLX4jWapgv7V0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::22d 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:179725 Archived-At: Including the list. 2014-12-11 8:33 GMT+00:00 Artur Malabarba : > 2014-12-11 3:15 GMT+00:00 Stefan Monnier : >>> -(defun package-built-in-p (package &optional min-version) >>> - "Return true if PACKAGE is built-in to Emacs. >>> -Optional arg MIN-VERSION, if non-nil, should be a version list >>> -specifying the minimum acceptable version." >>> - (if (package-desc-p package) ;; was built-in and then was converted >>> - (eq 'builtin (package-desc-dir package)) >>> - (let ((bi (assq package package--builtin-versions))) >>> - (cond >>> - (bi (version-list-<= min-version (cdr bi))) >>> - ((remove 0 min-version) nil) >>> - (t >>> - (require 'finder-inf nil t) ; For `package--builtins'. >>> - (assq package package--builtins)))))) >> >> Why remove this function? > > Just to check if you were paying attention... > Sorry about that, I have no idea how it got past me. > >> >>> +(defun package-list-loaded-files (dir) >>> + "List all files in DIR which correspond to loaded features. >>> +Returns the `file-name-base' of each file, sorted by most recently >>> +loaded last." >> >> I don't really like the assumption that package names don't have slash >> in them (this is false for CEDET, for example, and I think that AUCTeX >> also uses names with slash for its style files). >> But I guess it's OK for now. > > The current branch approaches this issue. > `package--list-loaded-files' now returns a recursive list of files, > with their names relative to the given DIR. I felt this was the right > approach, since auctex doesn't add its "style" subdir to the > load-path.