[Top][All Lists]

[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: Drew Adams
Subject: bug#5661: 23.1.92; `find-library-name' should find a loaded library
Date: Sun, 28 Feb 2010 15:11:49 -0800

emacs -Q

Put this code in a new file throw-a.el in a directory that is not in your

(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")
  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'.

Consider, for example, using `finder-commentary' after having loaded the library
using `load-file' but not having the library in the `load-path'. The library is
known to the current session, but Emacs isn't smart enough to find it.

reply via email to

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