bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5661: 23.1.92; `find-library-name' should find a loaded library


From: Lars Ingebrigtsen
Subject: bug#5661: 23.1.92; `find-library-name' should find a loaded library
Date: Wed, 27 Apr 2016 23:23:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

"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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]