From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo de Moraes Serpa Subject: Re: org-wikinodes - is there a limit of processable files/nodes Date: Fri, 21 Sep 2012 11:58:12 -0500 Message-ID: References: <87haqrkbna.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=14dae9340cab31ca1904ca3925d0 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF6YV-000543-3m for emacs-orgmode@gnu.org; Fri, 21 Sep 2012 12:58:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TF6YP-0005Ph-Vp for emacs-orgmode@gnu.org; Fri, 21 Sep 2012 12:58:19 -0400 Received: from mail-ie0-f169.google.com ([209.85.223.169]:39510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF6YP-0005Pc-K7 for emacs-orgmode@gnu.org; Fri, 21 Sep 2012 12:58:13 -0400 Received: by ied10 with SMTP id 10so6886997ied.0 for ; Fri, 21 Sep 2012 09:58:12 -0700 (PDT) In-Reply-To: <87haqrkbna.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: Org Mode --14dae9340cab31ca1904ca3925d0 Content-Type: text/plain; charset=ISO-8859-1 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 wrote: > Hi Marcelo, > > Marcelo de Moraes Serpa 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 > --14dae9340cab31ca1904ca3925d0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Bastien,

Can you nar= row down the problem and describe a simple way to reproduce
it?

Sure, sorry if = I wasn't specific enough.

I have a specific wi= ki/ directory that has ~500 org files. There are an average of ~20 org head= lines 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 t= hose 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 search= ing the current directory's org files for the a file with MyPIMSystem h= eadline (this takes around ~10secs), and even though there exists the org f= ile with the "MyPIMSystem" headline in the wiki/ directory, wikin= odes 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)
=A0= "Return the file for wiki headline TARGET DIRECTORY.
If there is n= o such wiki target, return nil."
=A0 (setq directory (expand-file-n= ame (or directory default-directory)))
=A0 (unless (assoc directory org-wikinodes-directory-targets-cache)
=A0 = =A0 (push (cons directory (org-wikinodes-get-links-for-directory directory)= )
=A0o= rg-wikinodes-directory-targets-cache))
=A0 (cdr (assoc target (cdr (assoc directory
org-wikinodes-directory-targets-c= ache)))))

To this:

=
(defun org-wikinodes-which-file (target &optional dire= ctory)
=A0 "Return the file for wiki headline TARGET DIRECTORY.
If there i= s no such wiki target, return nil."
=A0 (setq directory (expand-fil= e-name "/Users/myself/org/wiki")) ; <=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D here
=A0 (unless (assoc directory org-wikinodes-directory-t= argets-cache)
=A0 =A0 (push (cons directory (org-wikinodes-get-links-for-directory direct= ory))
= =A0org-wikinodes-directory-targets-cache))
=A0 (cdr (assoc target (cdr (= assoc directory
org-wi= kinodes-directory-targets-cache)))))

= Why? Because I have files in other directory levels that I still want to li= nk to the wiki, so basically I want to force all wikilinks to point to node= s in org files that reside in this wiki/ directory only. But this is a simp= le 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 eval= uate the "=A0org-wikinodes-directory-targets-cache" var, instead = of the expected data-structure containing filenames and nodes, I get this:<= /div>

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

=
I've tested with the unmodified "org-wikinodes-which-file&quo= t; func + a "org-wikinodes-scope" setting =3D directory, and I ge= t 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@alte= rn.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 reproduc= e
it?

Thanks,

--
=A0Bastien

--14dae9340cab31ca1904ca3925d0--