* org-wikinodes - is there a limit of processable files/nodes
@ 2012-09-20 22:54 Marcelo de Moraes Serpa
2012-09-21 8:44 ` Bastien
0 siblings, 1 reply; 6+ messages in thread
From: Marcelo de Moraes Serpa @ 2012-09-20 22:54 UTC (permalink / raw
To: Org Mode
[-- Attachment #1: Type: text/plain, Size: 321 bytes --]
Hi list,
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?
Thanks in advance,
- Marcelo.
[-- Attachment #2: Type: text/html, Size: 404 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: org-wikinodes - is there a limit of processable files/nodes
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
0 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2012-09-21 8:44 UTC (permalink / raw
To: Marcelo de Moraes Serpa; +Cc: Org Mode
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: org-wikinodes - is there a limit of processable files/nodes
2012-09-21 8:44 ` Bastien
@ 2012-09-21 16:58 ` Marcelo de Moraes Serpa
2012-09-22 7:21 ` Bastien
0 siblings, 1 reply; 6+ messages in thread
From: Marcelo de Moraes Serpa @ 2012-09-21 16:58 UTC (permalink / raw
To: Bastien; +Cc: Org Mode
[-- 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 --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: org-wikinodes - is there a limit of processable files/nodes
2012-09-21 16:58 ` Marcelo de Moraes Serpa
@ 2012-09-22 7:21 ` Bastien
2012-09-22 14:19 ` Marcelo de Moraes Serpa
0 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2012-09-22 7:21 UTC (permalink / raw
To: Marcelo de Moraes Serpa; +Cc: Org Mode
Hi Marcelo,
Marcelo de Moraes Serpa <celoserpa@gmail.com> writes:
> 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.
I just pushed some changes in org-wikinodes.el, maybe they will solve
your problem. Let me know.
Thanks,
--
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: org-wikinodes - is there a limit of processable files/nodes
2012-09-22 7:21 ` Bastien
@ 2012-09-22 14:19 ` Marcelo de Moraes Serpa
2012-09-22 16:35 ` Bastien
0 siblings, 1 reply; 6+ messages in thread
From: Marcelo de Moraes Serpa @ 2012-09-22 14:19 UTC (permalink / raw
To: Bastien; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 1405 bytes --]
Hi Bastien,
Working now, thanks a lot! What was that change about?
One last question:
How can I have a wikilink in a headline? When I write a CamelCased link in
an org headline, it doesn't get converted to a link automatically, probably
because headlines are the nodes and that might cause a deadlock loop? Is
there a way to force a wikilink (to another wikinode) in a headline? (I've
tried enclosing in [[]] but it doesn't seem to create a wikinode link, only
a regular org link).
Also, a suggestion: I think an additional value for the scope setting could
be created called "list of directories", where you could force a specific
directory(ies) where you keep your wiki org files. Right now, I'm doing
that by modifying the function as I stated in the previous message. I might
do that if I have the time, but I fear breaking something else, as my elisp
skills are still quite basic.
Cheers,
Marcelo.
On Sat, Sep 22, 2012 at 2:21 AM, Bastien <bzg@altern.org> wrote:
> Hi Marcelo,
>
> Marcelo de Moraes Serpa <celoserpa@gmail.com> writes:
>
> > 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.
>
> I just pushed some changes in org-wikinodes.el, maybe they will solve
> your problem. Let me know.
>
> Thanks,
>
> --
> Bastien
>
[-- Attachment #2: Type: text/html, Size: 2045 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: org-wikinodes - is there a limit of processable files/nodes
2012-09-22 14:19 ` Marcelo de Moraes Serpa
@ 2012-09-22 16:35 ` Bastien
0 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2012-09-22 16:35 UTC (permalink / raw
To: Marcelo de Moraes Serpa; +Cc: Org Mode
Hi Marcelo,
Marcelo de Moraes Serpa <celoserpa@gmail.com> writes:
> How can I have a wikilink in a headline?
I think you cannot, as the goal of a wikilink is to jump to a headline.
> When I write a CamelCased
> link in an org headline, it doesn't get converted to a link
> automatically, probably because headlines are the nodes and that
> might cause a deadlock loop?
Indeed.
> Is there a way to force a wikilink (to
> another wikinode) in a headline? (I've tried enclosing in [[]] but it
> doesn't seem to create a wikinode link, only a regular org link).
I don't know if Carsten is using org-wikinodes.el (?) but I'm pretty
sure you can start hacking it. A nice playground for discovering both
lisp and Org!
> Also, a suggestion: I think an additional value for the scope setting
> could be created called "list of directories", where you could force
> a specific directory(ies) where you keep your wiki org files. Right
> now, I'm doing that by modifying the function as I stated in the
> previous message. I might do that if I have the time, but I fear
> breaking something else, as my elisp skills are still quite basic.
A nice little feature to add, it should not be difficult.
Let us know how it goes!
--
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-09-22 16:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-09-22 7:21 ` Bastien
2012-09-22 14:19 ` Marcelo de Moraes Serpa
2012-09-22 16:35 ` Bastien
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.