all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#5661: 23.1.92; `find-library-name' should find a loaded library
@ 2010-02-28 23:11 Drew Adams
  2016-04-27 21:23 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2010-02-28 23:11 UTC (permalink / raw)
  To: 5661

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.







^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-01 16:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-28 23:11 bug#5661: 23.1.92; `find-library-name' should find a loaded library Drew Adams
2016-04-27 21:23 ` Lars Ingebrigtsen
2016-04-27 21:28   ` Drew Adams
2016-04-27 21:37     ` Lars Ingebrigtsen
2016-05-01 16:39       ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.