Marius Hofert <marius.hof...@math.ethz.ch> wrote:

> Thanks for the explanation. Is there also an equivalent solution by just 
> adjusting .emacs?
> 
>  

If you are going to use emacs extensively, you probably should read the
emacs reference manual and maybe the emacs lisp introduction as
well.

M-x foo RET is entirely equivalent to evaluating

(foo)

which is a call to function foo. (foo) is the more general mechanism: it
works for any lisp function, M-x foo works iff foo is a command (aka an
"interactive" function). The form (foo) can be added to .emacs.

load-library is a command that takes an argument: the name of the library
to load. See its doc string for details. M-x load-library RET diary RET
is entirely equivalent to evaluating

(load-library "diary")

This calls the function load-library with the string argument "diary".
This form can be added to .emacs. Alternatively, you can use the
require form that I posted:

(require 'diary)

Note that load-library takes a string as argument, whereas require takes
a symbol.

Nick


> On 2011-11-08, at 23:33 , Jambunathan K wrote:
> 
> >> Debugger entered--Lisp error: (void-function diary-anniversary)
> > 
> > There is a universal solution to this problem
> > 
> > M-x load-library RET diary TAB
> > 
> > and choose which of the options make most sense or try each one of them
> > in turn.
> > 
> > Note that in the above load-library you are using "diary" because it is
> > the "prefix" of function (or variable) which reported as void.
> > 
> > The load-library call unvoids the void things.
> > 
> > 
> > 
> 

Reply via email to