emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marcelo de Moraes Serpa <celoserpa@gmail.com>
To: Bastien <bzg@altern.org>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: org-wikinodes - is there a limit of processable files/nodes
Date: Fri, 21 Sep 2012 11:58:12 -0500	[thread overview]
Message-ID: <CACHMzOF121LCqARWLK95U6c11euhZzgsomrT94o=LN9OtwtGUA@mail.gmail.com> (raw)
In-Reply-To: <87haqrkbna.fsf@bzg.ath.cx>

[-- Attachment #1: Type: text/plain, Size: 3463 bytes --]

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
>

[-- Attachment #2: Type: text/html, Size: 5431 bytes --]

  reply	other threads:[~2012-09-21 16:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-20 22:54 org-wikinodes - is there a limit of processable files/nodes Marcelo de Moraes Serpa
2012-09-21  8:44 ` Bastien
2012-09-21 16:58   ` Marcelo de Moraes Serpa [this message]
2012-09-22  7:21     ` Bastien
2012-09-22 14:19       ` Marcelo de Moraes Serpa
2012-09-22 16:35         ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACHMzOF121LCqARWLK95U6c11euhZzgsomrT94o=LN9OtwtGUA@mail.gmail.com' \
    --to=celoserpa@gmail.com \
    --cc=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).