unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* invalid function
@ 2007-11-07 21:35 Nikola Skoric
  2007-11-08  0:29 ` Johan Bockgård
  0 siblings, 1 reply; 2+ messages in thread
From: Nikola Skoric @ 2007-11-07 21:35 UTC (permalink / raw)
  To: help-gnu-emacs

I have following code in script.el:

#!/usr/bin/emacs --script
(fset 'goto-nav-panel
   "\C-s<!--Navigation Panel-->\C-a")

(get-buffer-create "node5.html")
(set-buffer "node5.html")
(goto-nav-panel)

Executing it gives me this:

nick@rilmir:~/diplomski/html/diplomski$ ./script.el 
Loading 00debian-vars...
Loading /etc/emacs-snapshot/site-start.d/50auctex.el (source)...
Loading /usr/share/emacs/22.0.91/site-lisp/auctex.el (source)...
Loading /usr/share/emacs/22.0.91/site-lisp/preview-latex.el
(source)...
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Skipping dictionaries-common setup for emacs-snapshot
Loading /etc/emacs/site-start.d/50php-elisp.el (source)...
Invalid function: goto-nav-panel

I really tried to figure out why, but I just can't get it. This seems
to be the proper way to use a keyboard macro, but it just won't
work. What did I get wrong?

-- 
"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams"

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

* Re: invalid function
  2007-11-07 21:35 invalid function Nikola Skoric
@ 2007-11-08  0:29 ` Johan Bockgård
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Bockgård @ 2007-11-08  0:29 UTC (permalink / raw)
  To: help-gnu-emacs

Nikola Skoric <nick-news@net4u.hr> writes:

> (fset 'goto-nav-panel
>    "\C-s<!--Navigation Panel-->\C-a")
>
> (get-buffer-create "node5.html")
> (set-buffer "node5.html")
> (goto-nav-panel)

A string is not a function (though it is a command). Try
`execute-kbd-macro' (or `command-execute'). (Or write a proper Lisp
function.)

-- 
Johan Bockgård

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

end of thread, other threads:[~2007-11-08  0:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-07 21:35 invalid function Nikola Skoric
2007-11-08  0:29 ` Johan Bockgård

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).