* Re: [Emacs-diffs] malabarba/package.el-reload-files-on-upgrade 300dbb1 1/2: * emacs-lisp/package.el (package--list-loaded-files): New function [not found] ` <E1XyrMO-0005Hb-Rx@vcs.savannah.gnu.org> @ 2014-12-11 3:15 ` Stefan Monnier [not found] ` <CAAdUY-KmGHmVmoqH-hwSafd2v+EA3JnFijYb=QSyHsYASr0Trg@mail.gmail.com> 0 siblings, 1 reply; 2+ messages in thread From: Stefan Monnier @ 2014-12-11 3:15 UTC (permalink / raw) To: emacs-devel; +Cc: Artur Malabarba > -(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? > +(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. > + (mapcar (lambda (x) (let* ((path (file-name-sans-extension > + (file-truename > + (find-library-name (file-name-base x))))) We follow the convention to only use "path" to mean a list of directories such as $PATH, load-path, and things like that. I.e. "/foo/bar/baz" is a *file* name, not a "path". Stefan ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <CAAdUY-KmGHmVmoqH-hwSafd2v+EA3JnFijYb=QSyHsYASr0Trg@mail.gmail.com>]
* Re: [Emacs-diffs] malabarba/package.el-reload-files-on-upgrade 300dbb1 1/2: * emacs-lisp/package.el (package--list-loaded-files): New function [not found] ` <CAAdUY-KmGHmVmoqH-hwSafd2v+EA3JnFijYb=QSyHsYASr0Trg@mail.gmail.com> @ 2014-12-11 8:34 ` Artur Malabarba 0 siblings, 0 replies; 2+ messages in thread From: Artur Malabarba @ 2014-12-11 8:34 UTC (permalink / raw) To: Stefan Monnier, emacs-devel Including the list. 2014-12-11 8:33 GMT+00:00 Artur Malabarba <bruce.connor.am@gmail.com>: > 2014-12-11 3:15 GMT+00:00 Stefan Monnier <monnier@iro.umontreal.ca>: >>> -(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. ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-11 8:34 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20141211001200.20245.22729@vcs.savannah.gnu.org> [not found] ` <E1XyrMO-0005Hb-Rx@vcs.savannah.gnu.org> 2014-12-11 3:15 ` [Emacs-diffs] malabarba/package.el-reload-files-on-upgrade 300dbb1 1/2: * emacs-lisp/package.el (package--list-loaded-files): New function Stefan Monnier [not found] ` <CAAdUY-KmGHmVmoqH-hwSafd2v+EA3JnFijYb=QSyHsYASr0Trg@mail.gmail.com> 2014-12-11 8:34 ` Artur Malabarba
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.