Hi Bastien,

Can you narrow down the problem and describe a simple way to reproduce
it?

Sure, sorry if I wasn't specific enough.

I have a specific wiki/ directory that has ~500 org files. There are an average of ~20 org headlines per file.

I'm trying to take advantage of org-wikinodes' camelcase linking feature. So, say I have a headlines like this in one of those 500 org files:

* MyPIMSystem

And in another org file in the same wiki/ directory I write:

"... as I do in MyPIMSystem ..."

The MyPIMSystem gets converted to a wikinodes link, and when I click it, considering the wiki cache is nil, wikinodes will start searching the current directory's org files for the a file with MyPIMSystem headline (this takes around ~10secs), and even though there exists the org file with the "MyPIMSystem" headline in the wiki/ directory, wikinodes just doesn't find it, and shows the prompt asking me if I want to create it.

I must also say that I modified the org-wikinodes-which-file function slightly from this:

(defun org-wikinodes-which-file (target &optional directory)
  "Return the file for wiki headline TARGET DIRECTORY.
If there is no such wiki target, return nil."
  (setq directory (expand-file-name (or directory default-directory)))
  (unless (assoc directory org-wikinodes-directory-targets-cache)
    (push (cons directory (org-wikinodes-get-links-for-directory directory))
 org-wikinodes-directory-targets-cache))
  (cdr (assoc target (cdr (assoc directory
org-wikinodes-directory-targets-cache)))))

To this:

(defun org-wikinodes-which-file (target &optional directory)
  "Return the file for wiki headline TARGET DIRECTORY.
If there is no such wiki target, return nil."
  (setq directory (expand-file-name "/Users/myself/org/wiki")) ; <============ here
  (unless (assoc directory org-wikinodes-directory-targets-cache)
    (push (cons directory (org-wikinodes-get-links-for-directory directory))
 org-wikinodes-directory-targets-cache))
  (cdr (assoc target (cdr (assoc directory
org-wikinodes-directory-targets-cache)))))

Why? Because I have files in other directory levels that I still want to link to the wiki, so basically I want to force all wikilinks to point to nodes in org files that reside in this wiki/ directory only. But this is a simple change, I don't think it would cause any kind of issues.

Also, after I try clicking in a wikilink, and the cache is nil, just after this function tries to build the cache, and when I evaluate the " org-wikinodes-directory-targets-cache" var, instead of the expected data-structure containing filenames and nodes, I get this:

(("/Users/myself/wiki"))

I've tested with the unmodified "org-wikinodes-which-file" func + a "org-wikinodes-scope" setting = directory, and I get the same thing. I looks as if the amount of files and data is the problem.

Thanks in advance,

- Marcelo.


On Fri, Sep 21, 2012 at 3:44 AM, Bastien <bzg@altern.org> wrote:
Hi Marcelo,

Marcelo de Moraes Serpa <celoserpa@gmail.com> writes:

> I'm trying to setup org-wikinodes, and I have a directory with
> hundres of org files and each of them has dozens+ nodes. It looks as
> if org-wikinode can't build the wiki cache data-structure for that
> many files/nodes, because it never finds the headlines. Am I missing
> something?

Can you narrow down the problem and describe a simple way to reproduce
it?

Thanks,

--
 Bastien