caiorss/org-wiki

Issue with org-wiki-paste-image

schuach opened this issue · 2 comments

First I have to say that I like your package very much! I hope to see it on MELPA soon.

I've been experiencing issues with org-wiki-paste-image . I always have to enter the whole path to the file, because in helm not the org-wiki-location but the location of my emacs-binaries is prepended to dir. For example when I try to paste an image to index.org, the helm-promt for the filename looks like this:
wrong_path

I do think I have a fix though. It works for me, but I am not a programmer, so I can't tell if it's a very good one: The docstring of read-file-name says, that one should provide an absolute directory name for DIR. In line 793 of org-wiki.el, dir is only passed the name of the directory, not the whole path. I have modified the line to:

   `(file (read-file-name "Image: " (concat org-wiki-location "/" dir))))`

Now read-file-name sees the full directory name and it works for me.

Would it make sense for you to make that change to org-wiki.el?

Thanks and best regards,
Stefan

Ok. I've fixed it. Check out this new release. Thanks for the bug report.

Work fine now, thank you!