Closed novoid closed 7 years ago
Found a temporary solution and proposed a pull request. Before the fix you can temporarily fix this yourself.
I can confirm, nocaoper's quick fix is working, but:
there is a typo in the replace-commands, they should read:
replace "first x" by "nth 0 x" replace "second x" by "nth 1 x"
No, this did not fix my issue.
I digged deeper and as far as I understand, the issue is here:
(defun org-mind-map-write-tags (h el)
"Use H as the hash-map of colors and takes an element EL and extracts the title and tags. Then, formats the titles and tags so as to be usable within DOT's graphviz language."
(let* ((wrapped-title (org-mind-map-wrap-lines (org-element-property :title el)))
(title (replace-regexp-in-string "&" "&" title nil t))
(color (org-element-property :OMM-COLOR el))
[...]
The title
used in the replace-regexp-in-string
is not defined and therefore empty.
The corresponding line in the GitHub file looks different:
(title (replace-regexp-in-string "&" "&" wrapped-title nil t))
This is when I decided to update the whole repository to the current status.
After starting from scratch with the new version, I now get:
split-string: Wrong type argument: stringp, nil
I am not going to create a different issue for this.
Do you get the error everytime you run org-mind-map, even on the very basic sample files?
I think, for analysis purposes, we should differ two cases:
In the second case I just started to strip down the problematic files until I find the very line that causes the error. I found, for example, that a file crashes when there is an URL with trailing "/" at the end. I suppose, there are a couple of things that will crash a file, so there is some work ahead.
But the simple files should work by now!
Oh shout thanks for pointing that out! I did made a mistake when trying to define first and second.
I can confirm that example-1.org.pdf
and example-1.org.pdf
get generated.
So it seems to be an issue with my rather large Org-mode files.
I got issues when generating the mind-map only for the current sub-tree of the current org-mode file. In those cases, additional buffers gets opened with paths that look like URLs I included in my Org-mode file. Same holds when I use org-mind-map-write-current-tree
even when the URL is in a separate tree. So there is something strange going on.
Does the issue raise an error, if yes it would be interesting to include a small demo file as reference :). I used M-x toggle-debug-on-error to rapidly close on the fix.
Here you are:
# -*- mode: org; coding: utf-8; -*-
* heading 1
* Heading 2
* Heading 3
- [[http://www.iso27001security.com/][ISO27k infosec management standards]]
** Sub-heading 3a
@novoid: Ah, this is exactly the problem with the trailing "/", for which I opened new issue #15 !
Remove the trailing "/" after http://www.iso27001security.com/ and the file should work.
Okay, I'll wait for this fix. Thanks for your help!
When I setup org-mind-map (git clone from github, include in load-path, load with use-package + :loadpath) and invoke
M-x org-mind-map-write
I get:let*: Symbol’s value as variable is void: title
and no PDF file is generated.