From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen <larsi@gnus.org> Newsgroups: gmane.emacs.bugs Subject: bug#5661: 23.1.92; `find-library-name' should find a loaded library Date: Wed, 27 Apr 2016 23:23:33 +0200 Message-ID: <8760v2u4oa.fsf@gnus.org> References: <D0D99DC7E82F449DAC8687ECF89123D4@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1461792267 22885 80.91.229.3 (27 Apr 2016 21:24:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Apr 2016 21:24:27 +0000 (UTC) Cc: 5661@debbugs.gnu.org To: "Drew Adams" <drew.adams@oracle.com> Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 27 23:24:16 2016 Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org> Envelope-to: geb-bug-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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>) id 1avWwM-0002Jj-TU for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 23:24:11 +0200 Original-Received: from localhost ([::1]:45520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>) id 1avWwM-0003iQ-7A for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 17:24:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1avWwI-0003g1-Kd for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 17:24:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1avWwE-00011s-JE for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 17:24:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1avWwE-00011h-Fp for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 17:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1avWwE-0003Tm-BP for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 17:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen <larsi@gnus.org> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Apr 2016 21:24:02 +0000 Resent-Message-ID: <handler.5661.B5661.146179221813342@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5661 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5661-submit@debbugs.gnu.org id=B5661.146179221813342 (code B ref 5661); Wed, 27 Apr 2016 21:24:02 +0000 Original-Received: (at 5661) by debbugs.gnu.org; 27 Apr 2016 21:23:38 +0000 Original-Received: from localhost ([127.0.0.1]:50826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1avWvp-0003T8-RU for submit@debbugs.gnu.org; Wed, 27 Apr 2016 17:23:38 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:50707) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <larsi@gnus.org>) id 1avWvo-0003Sz-74 for 5661@debbugs.gnu.org; Wed, 27 Apr 2016 17:23:36 -0400 Original-Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <larsi@gnus.org>) id 1avWvl-0003nf-GR; Wed, 27 Apr 2016 23:23:35 +0200 In-Reply-To: <D0D99DC7E82F449DAC8687ECF89123D4@us.oracle.com> (Drew Adams's message of "Sun, 28 Feb 2010 15:11:49 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>, <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/archive/html/bug-gnu-emacs/> List-Post: <mailto:bug-gnu-emacs@gnu.org> List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>, <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe> Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org> Xref: news.gmane.org gmane.emacs.bugs:116989 Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/116989> "Drew Adams" <drew.adams@oracle.com> writes: > Put this code in a new file throw-a.el in a directory that is not in your > `load-path': > > (defun foo () (message "foo")) > (provide 'throw-a) > > In that same directory, do this: > > M-x load-file RET throw-a.el RET > M-x load-library RET find-func RET > M-: (find-library-name "throw-a") RET > > It should find the library (since it was loaded and thus provided), but instead > it raises an error: > > Debugger entered--Lisp error: (error "Can't find library throw-a") > signal(error ("Can't find library throw-a")) > error("Can't find library %s" "throw-a") > find-library-name("throw-a") > eval((find-library-name "throw-a")) > eval-expression((find-library-name "throw-a") nil) > call-interactively(eval-expression nil nil) > > The doc string says nothing about searching only the `load-path'. It's > reasonable to think that this should be able to find the library either by > checking loaded libraries or by searching the `load-path'. That would be nice. But does Emacs have a record of all files it has done `load-file' on somewhere? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no