[erlang-questions] sticky_directory

Richard Carlsson richardc@REDACTED
Tue Sep 4 17:58:17 CEST 2007

Doug Edmunds wrote:
> I have the erlang mode working in emacs, but I am no
> emacs expert.
> If I load code then select
> erlang/compile buffer, an erlang buffer opens and
> compiles it file. First time, no problems.
> But *sometimes*, when I make changes, save them, then
> try to recompile in the same erlang buffer,
> I get this error report:
> =ERROR REPORT==== 4-Sep-2007::08:14:41 ===
> Can't load module that resides in sticky dir
> {error,sticky_directory}
> I am not sure what a sticky_directory or how I triggered it.
> Mainly though, how do I get around this without closing
> and reopening emacs?

Some library paths (.../ebin/) are marked "sticky" by the
Erlang emulator, which means that modules whose .beam object files
were originally loaded from those directories are prevented from
being reloaded by mistake (without "unsticking" them explicitly).
You are probably just trying to use a module name that is already
being used for some important system module (lists.erl is an old
favourite). Be glad that it did not load your version instead.

If you want to check whether a module name is already in use,
you can call code:which(Module) from the Erlang shell.


More information about the erlang-questions mailing list