From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Sebastien Vauban" Newsgroups: gmane.emacs.help Subject: Re: Show who is requiring Date: Mon, 19 Nov 2012 17:13:31 +0100 Organization: Sebastien Vauban Message-ID: <804nkl7eqc.fsf@somewhere.org> References: <80d2zd87t0.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1353341751 28332 80.91.229.3 (19 Nov 2012 16:15:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Nov 2012 16:15:51 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Mon Nov 19 17:16:01 2012 Return-path: Envelope-to: geh-help-gnu-emacs@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 1TaU0K-0001ss-Qu for geh-help-gnu-emacs@m.gmane.org; Mon, 19 Nov 2012 17:15:24 +0100 Original-Received: from localhost ([::1]:51575 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaU0A-0005c3-CR for geh-help-gnu-emacs@m.gmane.org; Mon, 19 Nov 2012 11:15:14 -0500 Original-Path: usenet.stanford.edu!goblin2!goblin.stu.neva.ru!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Injection-Info: mx04.eternal-september.org; posting-host="368fa3c7dc5c1bbe516391bd65bd1ab2"; logging-data="12273"; mail-complaints-to="abuse-VVbKFVtnif8H+i2N2EyTrmui9UKz+5OX@public.gmane.org"; posting-account="U2FsdGVkX19gqK6V4pxCyyd587ZXrD6I" User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (windows-nt) X-Archive: encrypt Cancel-Lock: sha1:xmaYvXtL3uiJ5uST+0QNEiW9DnA= sha1:qvBe8UYu2qBhySwYz/TpPN+MWl8= X-Url: Under construction... Original-Xref: usenet.stanford.edu gnu.emacs.help:195471 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:87794 Archived-At: Hello Stefan and all, Stefan Monnier wrote: >>> > I tried using (current-buffer) to get the name of the "source" package >>> > (i.e., the one which makes the `require' request), but that's >>> > wrong. Any idea how to get the name of the "caller" package? >>> >>> IIUC you want load-file-name. >> >> How does this report the names of files that require another package? > > IIUC he has put an advice on `require', so in this advice, `load-file-name' > should contain the name of the code that's calling the `require'. >From your description, that's exactly what I'm after. I'll test and report. My ultimate goal is to generate a Dotty graph of "who required who" among the different packages I'm directly, or indirectly, requiring. So, I need to output relations such as: a.el -> b.el b.el -> c.el b.el -> d.el ... Thanks to Drew and to Thien-Thi to point me to `load-history' as well... Quite complex to read, and not exactly the same, but clearly useful. Best regards, Seb -- Sebastien Vauban