GNU bug report logs - #5661
23.1.92; `find-library-name' should find a loaded library

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sun, 28 Feb 2010 23:13:02 UTC

Severity: wishlist

Tags: fixed

Fixed in version 26.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Drew Adams" <drew.adams <at> oracle.com>
To: 5661 <at> debbugs.gnu.org
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
`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'.

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.





This bug report was last modified 8 years and 229 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.