yoshinari-nomura / org-octopress

org-mode in octopress
GNU General Public License v3.0
83 stars 16 forks source link

Exporting code is not working #18

Closed i02sopop closed 9 years ago

i02sopop commented 9 years ago

Hi, I'm using org-octopress for a while and everything seems to work well except exporting code to html. For example, I have this on my blog entry:

+BEGIN_SRC sh

$ gem install rake

+END_SRC

And, when I try to publish the post, emacs gives me the next error message:

Publishing file blablabla.org using `org-jekyll-publish-to-html' org-export-execute-babel-code: Wrong type argument: integer-or-marker-p, nil

I've checked the code and I didn't saw anything strange. Did you have any similar error? I'm doing something terribly wrong? If it helps, I have installed also org-jekyll, but it happens without it installed too.

Thanks.

yoshinari-nomura commented 9 years ago

Thanks for the report, but I could not reproduce the error... Since org-jekyll-publish-to-html is not an interactive function, so, I need more precise information what arguments you called the function with.

I could inspect the bug, If you gave me some backtrace by setting dbug-on-error to t.

i02sopop commented 9 years ago

Sorry for the delay, I've been quite bussy lately. The output from the debug is:

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil) org-babel-exp-process-buffer() org-export-execute-babel-code() org-export-as(jekyll nil nil nil (:output-file "/home/i02sopop/desarrollo/octopress/blog/source/_posts/2014-10-18-write-an-octopress-blog-with-emacs.html" :base-directory "~/desarrollo/octopress/blog/source/blog" :publishing-directory "~/desarrollo/octopress/blog/source/_posts" :base-extension "org" :recursive nil :exclude "/[^0-9][^/]+.org$" :publishing-function org-jekyll-publish-to-html :filter-final-output (org-publish-collect-numbering org-publish-collect-index))) org-export-to-file(jekyll "/home/i02sopop/desarrollo/octopress/blog/source/_posts/2014-10-18-write-an-octopress-blog-with-emacs.html" nil nil nil nil (:base-directory "~/desarrollo/octopress/blog/source/blog" :publishing-directory "~/desarrollo/octopress/blog/source/_posts" :base-extension "org" :recursive nil :exclude "/[^0-9][^/]+.org$" :publishing-function org-jekyll-publish-to-html :filter-final-output (org-publish-collect-numbering org-publish-collect-index))) org-publish-org-to(jekyll "/home/i02sopop/desarrollo/octopress/blog/source/blog/2014-10-18-write-an-octopress-blog-with-emacs.org" ".html" (:base-directory "~/desarrollo/octopress/blog/source/blog" :publishing-directory "~/desarrollo/octopress/blog/source/_posts" :base-extension "org" :recursive nil :exclude "/[^0-9][^/]+.org$" :publishing-function org-jekyll-publish-to-html) "/home/i02sopop/desarrollo/octopress/blog/source/_posts/") org-jekyll-publish-to-html((:base-directory "~/desarrollo/octopress/blog/source/blog" :publishing-directory "~/desarrollo/octopress/blog/source/_posts" :base-extension "org" :recursive nil :exclude "/[^0-9][^/]+.org$" :publishing-function org-jekyll-publish-to-html) "/home/i02sopop/desarrollo/octopress/blog/source/blog/2014-10-18-write-an-octopress-blog-with-emacs.org" "/home/i02sopop/desarrollo/octopress/blog/source/_posts/") org-publish-file("/home/i02sopop/desarrollo/octopress/blog/source/blog/2014-10-18-write-an-octopress-blog-with-emacs.org" ("octopress-posts" :base-directory "~/desarrollo/octopress/blog/source/blog" :publishing-directory "~/desarrollo/octopress/blog/source/_posts" :base-extension "org" :recursive nil :exclude "/[^0-9][^/]+.org$" :publishing-function org-jekyll-publish-to-html) t)

[(project) "\306@!\210A\307 \310\"\307 \311\"\307 \312\"\206

org-publish-projects((("octopress" :components ("octopress-posts" "octopress-org")))) org-publish(("octopress" :components ("octopress-posts" "octopress-org")) nil nil)

[(&optional arg) "\306\232\203\n

org-export-dispatch(nil) call-interactively(org-export-dispatch nil nil) command-execute(org-export-dispatch)

yoshinari-nomura commented 9 years ago

Thanks for the report. Hmm... let me check some more,

  1. Your source-block is successfully exported by vanilla org-mode (means w/o org-octopress). For example, type C-c C-e h H (export to HTML as HTML buffer) is successful.
  2. Emacs version and org-mode version
  3. What happens if you add :exports none or :exports code to the source block. See. http://orgmode.org/manual/Exporting-code-blocks.html for details.
i02sopop commented 9 years ago

It was a bug in the org to html export, I've just updated and it's solved. Thanks and sorry for the inconvenience.

yoshinari-nomura commented 9 years ago

OK. happy to hear that. Thanks.