emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] export problem


From: Nick Dokos
Subject: Re: [Orgmode] export problem
Date: Thu, 22 Apr 2010 23:36:42 -0400

charles snyder <address@hidden> wrote:

> Thanks Nick!
> 
Glad to help!

> On 2 different machines,
> I got a "no match" when I tried C-h f org-export-as-freemind <RET>
> and when I followed your instructions:
> 
> M-x load-library <RET> org-freemind <RET>
> followed by C-c C-e m
> 
> It worked!
> 
> so, when I added:
> 
> (load-library "C:/Users/clsnyder/Documents/org-6.33/lisp/org-freemind") to my 
> .emacs, it works!
> 
> but I have no clue why it stopped working and why I need to add this when the 
> line above it in .emacs is:
> 
> (add-to-list 'load-path "C:/Users/clsnyder/Documents/org-6.33/lisp")
> 

The add-to-list just tells emacs where to find the files that it needs to load.
Because of it, you should be able to load org-freemind using just

        (load-library "org-freemind")

The loading itself can be done in various ways: explicitly as shown above, or
implicitly through the autoload mechanism.

In my case, I load org-install.el (in my .emacs). org-install.el contains the 
following:

(autoload 'org-export-as-freemind "org-freemind" "\
Not documented

\(fn ARG &optional HIDDEN EXT-PLIST TO-BUFFER BODY-ONLY PUB-DIR)" t nil)

so that when org-export-as-freemind is called, the autoload loads 
org-freemind.el (or
org-freemind.elc if the compiled file exists), that defines the function and the
call succeeds.

At least, that's how it *should* work. You could do a little detective work in 
your
setup to see how things are initialized and why it did not work.

One hint is that after the autoload is done but before you call the function,
if you say

   C-h f org-export-as-freemind <RET>

it will say

,----
| org-export-as-freemind is an interactive autoloaded Lisp function in
| `org-freemind.el'.
| 
| (org-export-as-freemind ARG &optional HIDDEN EXT-PLIST TO-BUFFER
| BODY-ONLY PUB-DIR)
| 
| Not documented
`----

After you call the function once (which completes the loading),

   C-h f org-export-as-freemind <RET>

will say something else:

,----
| org-export-as-freemind is an interactive compiled Lisp function in
| `org-freemind.el'.
| 
| (org-export-as-freemind ARG &optional HIDDEN EXT-PLIST TO-BUFFER
| BODY-ONLY PUB-DIR)
| 
| Not documented.
`----

Of course, in your case, emacs didn't know the function at all, so the
autoload never happened: either you are not loading org-install.el or
org-install.el does not contain the autoload form.

HTH,
Nick








reply via email to

[Prev in Thread] Current Thread [Next in Thread]