yoshinari-nomura / org-octopress

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

Can't export succesfully #5

Closed gabriel4649 closed 11 years ago

gabriel4649 commented 11 years ago

When I try to export nothing happens. I looked at the messages buffer and saw the following: car: End of file during parsing. A part from that I don't have any clues of what is going on. Your help would be greatly appreciated.

yoshinari-nomura commented 11 years ago

Thanks for your report. Excuse me, I don't have enough information to inspect your problem.

Can I assume that you are using org-mode 8.02 or later, and you have successfully exported other org files to html by org-mode itself before trying org-octopress? org-octopress is very sensitive to the version of org-mode.

If you still have the problem, please let me know the exact error message by using gist or so. for Example:

  1. insert this line at the top .emacs and restart emacs: (setq debug-on-error t)
  2. Upload the content of *Backtrace* buffer to gist.

Thanks in advance.

gabriel4649 commented 11 years ago

This is my org version: Org-mode version 8.0.3 (8.0.3-27-g53784e-elpa @ /home/climatewarrior/.emacs.d/elpa/org-20130603/)

When I have org-octopress installed HTML export stops working, otherwise it works fine. This is the compile log for org-octopress

Leaving directory `/home/climatewarrior/.emacs.d/elpa/org-mac-link-grabber-20130514.1519'

Compiling file /home/climatewarrior/.emacs.d/elpa/org-mac-link-grabber-20130514.1519/org-mac-link-grabber-pkg.el at Sun Jun  9 01:00:48 2013
Entering directory `/home/climatewarrior/.emacs.d/elpa/org-mac-link-grabber-20130514.1519/'

Compiling file /home/climatewarrior/.emacs.d/elpa/org-mac-link-grabber-20130514.1519/org-mac-link-grabber.el at Sun Jun  9 01:00:48 2013

In omlg-grab-link:
org-mac-link-grabber.el:171:15:Warning: (lambda (descriptor) ...) quoted with
    ' rather than with #'
org-mac-link-grabber.el:176:49:Warning: (lambda (descriptor) ...) quoted with
    ' rather than with #'

Compiling no file at Sun Jun  9 01:00:49 2013
Leaving directory `/home/climatewarrior/.emacs.d/elpa/orglue-20130420.2330'

Compiling file /home/climatewarrior/.emacs.d/elpa/orglue-20130420.2330/orglue-anything-config.el at Sun Jun  9 01:00:49 2013
Entering directory `/home/climatewarrior/.emacs.d/elpa/orglue-20130420.2330/'
orglue-anything-config.el:1:1:Warning: `flet' is an obsolete macro (as of
    24.3); use either `cl-flet' or `cl-letf'.

Compiling file /home/climatewarrior/.emacs.d/elpa/orglue-20130420.2330/orglue-pkg.el at Sun Jun  9 01:00:49 2013

Compiling file /home/climatewarrior/.emacs.d/elpa/orglue-20130420.2330/orglue-publish.el at Sun Jun  9 01:00:49 2013

Compiling file /home/climatewarrior/.emacs.d/elpa/orglue-20130420.2330/orglue.el at Sun Jun  9 01:00:49 2013

In orglue-ns-insert-file:
orglue.el:173:35:Warning: reference to free variable `ns-input-file'
orglue.el:174:30:Warning: assignment to free variable `ns-input-file'

In orglue-ns-insert-text:
orglue.el:188:41:Warning: reference to free variable `ns-input-text'

In orglue-convert-file-to-org-link:
orglue.el:288:78:Warning: `format' called with 4 args to fill 3 format
    field(s)

In orglue-convert-text-to-org-link:
orglue.el:293:32:Warning: reference to free variable `ns-input-text'

In end of data:
orglue.el:339:1:Warning: the following functions are not known to be defined:
    org-table-current-column, org-table-get, org-table-put,
    org-default-export-plist, org-infile-export-plist,
    org-export-region-as-html

Compiling no file at Sun Jun  9 01:00:49 2013
Leaving directory `/home/climatewarrior/.emacs.d/elpa/org-octopress-20130527.2347'

Compiling file /home/climatewarrior/.emacs.d/elpa/org-octopress-20130527.2347/org-octopress-pkg.el at Sun Jun  9 01:00:49 2013
Entering directory `/home/climatewarrior/.emacs.d/elpa/org-octopress-20130527.2347/'

Compiling file /home/climatewarrior/.emacs.d/elpa/org-octopress-20130527.2347/org-octopress.el at Sun Jun  9 01:00:49 2013

Compiling file /home/climatewarrior/.emacs.d/elpa/org-octopress-20130527.2347/ox-jekyll.el at Sun Jun  9 01:00:50 2013

I enabled debug-on-error like you said but I'm not getting any back traces, all I get is the ominous End of File during Parsing :/

Thank so much for replying so quickly. Let me know how else can I help.

gabriel4649 commented 11 years ago

I'm also seeing this on the messages buffer: org-export--parse-option-keyword: End of file during parsing

yoshinari-nomura commented 11 years ago

Thanks for your cooperation.

Hmm... please let me confirm some more..

I wonder C-c C-e h H is still working even though org-octopress is installed. If so, please check these operations:

  1. When you type C-c C-e h H in a org-file buffer, you get *Org HTML Export* buffer arise.
  2. When you type C-c C-e j H in the same org-file buffer, you get *Org Jekyll HTML Export* buffer, which has YAML front matter in the top of buffer.
yoshinari-nomura commented 11 years ago

It appears similar to your symptom: http://lists.gnu.org/archive/html/emacs-orgmode/2007-08/msg00307.html

Please check your OPTIONS does not have incomplete statements.

gabriel4649 commented 11 years ago

Ok! It did seem to be related to the OPTIONS. I have the following:

+SETUPFILE: ~/coding/octopress/setupfile.org

In setupfile.org I had the contents of the setupfile-sample.org. Once I emptied that file Org HTML Export and Org Jekylll HTML Export started working once again. After that I tried:

C-c C-e P x octopess

but i still wasn't doing anything.

Then I tried:

C-c C-e P x octopess-posts

and it did successfully create a post file.

What should I put in the setup file? Should I use octopress or octopress-posts? It seems we are getting closer :) Thanks a lot for your time and help.

yoshinari-nomura commented 11 years ago

Thanks for your patience. Yes, we are getting closer :)

But, it's curious... I use exactly the same file with setup-sample.org successfully. I'm using Mac and Emacs 24.3. If you have time, please start from empty file, add line by line until encounter the problem.

Question about octopress or octopress-post seems to be another problem. Publish target octopress is an alias to invoke octopress-posts and octopress-org in sequence. octopress-posts is what you want. octopress-org is supposed to export other non-blog org files in octopress directory. For example, if you want to compose octopress/source/welcome.html from octopress/source/welcome.org, target octopress-org will help. However, octopress should work for you even if you only want octopress-posts.

As you may know, org-mode is a part of Emacs, so, if you installed the latest org-mode afterward by yourself, the old org-mode in vanilla Emacs might get in your way. In that case, things would be very confused. Please make sure you had wiped the old org-mode elisp.

OK, for the comprehensive check, please let me show if you don't mind:

  1. your org-octopress settings
  2. your octopress directory tree
  3. content of your blog-article buffer just before you invoke C-c C-e P x octopress
  4. *Messages* buffer just after you invoke C-c C-e P x octopress

Thank you again. I wanna fly to your desk-side :)

gabriel4649 commented 11 years ago

Hello!

Well, this has been pretty weird. I starting re-adding the lines to the config file like you said and I didn't found any problems. Now I'm successfully publishing using octopress-posts using your set-sample.org file. I don't know what else happened or what changed. Although, I uninstalled and installed everything related to org-mode several times so somewhere in there things might have changed. Here is the post I'm working with right now:

#+TITLE: This is test
#+DATE: 2013-06-10
#+SETUPFILE: ~/coding/octopress/setupfile.org
#+JEKYLL_LAYOUT: post
#+JEKYLL_CATEGORIES:
#+JEKYLL_PUBLISHED: true

* This is just a test

{{{more}}}

My org-octopress settings like I said are your just your defaults. After running C-c C-e P x octopress the *Messages* buffer doesn't spit out anything. But if I run C-c C-e P x octopress-posts I get either:

Skipping unmodified file /home/climatewarrior/coding/octopress/source/blog/2013-06-08-hello-world!.org

or

Publishing file /home/climatewarrior/coding/octopress/source/blog/2013-06-10-this-is-test.org using `org-jekyll-publish-to-html'
Saving file /home/climatewarrior/coding/octopress/source/_posts/2013-06-10-this-is-test.html...
Wrote /home/climatewarrior/coding/octopress/source/_posts/2013-06-10-this-is-test.html

As for the mixed installation problem, according to this I should be ok. So really everything is now working except for invoking C-c C-e P x octopress.

P.S. I know that this is a labor of love. I wanted to say that I appreciate so much that you have put so much time into helping me and supporting this software. I hope that later in the future I will be able to give back to one or your projects or at least give back to the community in some way.

yoshinari-nomura commented 11 years ago

Thanks for your good report. I'm now very happy to hear that my code is running well in your box.

This article will be a good report for other people those who try to use org-octopress as a complement to lack of my document :)

Enjoy!

yoshinari-nomura commented 11 years ago

Oh, sorry I missed your word except for the invoking...

I've reopen the issue.

yoshinari-nomura commented 11 years ago

Hi, may I restart our trek?

Can you check the value of org-publish-project-alist? In *scratch* buffer, you can eval org-publish-project-alist.

Here is my case:

org-publish-project-alist

(("octopress" :components ("octopress-posts" "octopress-org"))
 ("octopress-posts"
   :base-directory "~/prj/private/octopress/source/blog"
   :publishing-directory "~/prj/private/octopress/source/_posts"
   :base-extension "org"
   :recursive nil
   :exclude "/[^0-9][^/]+\\.org$"
   :publishing-function org-jekyll-publish-to-html)
 ("octopress-org"
   :base-directory "~/prj/private/octopress/source"
   :publishing-directory "~/prj/private/octopress/source"
   :base-extension "org"
   :exclude "[0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9]-.*\\.org$"
   :recursive t
   :publishing-function org-jekyll-publish-to-html)
 ("octopress-static"
   :base-directory "~/prj/private/octopress/source"
   :publishing-directory "~/prj/private/octopress/source"
   :base-extension ".*"
   :exclude "\\.org$"
   :recursive t
   :publishing-function org-publish-attachment))

Also, I want to know

  1. your literal settings of org-octopress;
  2. your octopress directory tree.

In some past cases, I noticed that setting a symbolic link as a target directory caused some problems. So, I recommend trying to set some non-symlink absolute path as the target directory. Tilde '~' also could be a trigger of the problem.

gabriel4649 commented 11 years ago

Hello! Oh, don't worry about that, haha and yeah I'm sure ready to continue.

These are my settings:

;; Octopress stuff
(require 'org-octopress)
(setq org-octopress-directory-top       "/home/climatewarrior/coding/octopress/source")
(setq org-octopress-directory-posts     "/home/climatewarrior/coding/octopress/source/_posts")
(setq org-octopress-directory-org-top   "/home/climatewarrior/coding/octopress/source")
(setq org-octopress-directory-org-posts "/home/climatewarrior/coding/octopress/source/blog")
(setq org-octopress-setup-file          "/home/climatewarrior/coding/octopress/setupfile.org")

This is what I get when I eval the variable:

org-publish-project-alist is a variable defined in `ox-publish.el'.
Its value is nil

You can see my octopress directory here: https://github.com/climatewarrior/blog

I guess that ``org-publish-project-alist being nil is definitely a problem.

Domo arigato!! ;)

yoshinari-nomura commented 11 years ago

org-publish-project-alist is dynamically assigned on each publishing action. So, you have to check the value after each publishing; C-c C-e P x octopress and C-c C-e P x octopress-posts.

gabriel4649 commented 11 years ago
(("octopress" :components
  ("octopress-posts" "octopress-org"))
 ("octopress-posts" 
  :base-directory "/home/climatewarrior/coding/octopress/source/blog" 
  :publishing-directory "/home/climatewarrior/coding/octopress/source/_posts" 
  :base-extension "org" :recursive nil :exclude "/[^0-9][^/]+\\.org$" 
  :publishing-function org-jekyll-publish-to-html)
 ("octopress-org" 
  :base-directory "/home/climatewarrior/coding/octopress/source" 
  :publishing-directory "/home/climatewarrior/coding/octopress/source" 
  :base-extension "org" :exclude "[0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9]-.*\\.org$" 
  :recursive t :publishing-function org-jekyll-publish-to-html)
 ("octopress-static" 
  :base-directory "/home/climatewarrior/coding/octopress/source" 
  :publishing-directory "/home/climatewarrior/coding/octopress/source" 
  :base-extension ".*" :exclude "\\.org$" 
  :recursive t 
  :publishing-function org-publish-attachment))

Ok, so this is what I got after running C-c C-e P x octopress

yoshinari-nomura commented 11 years ago

Hmm... buddy, I've got a feeling we're stuck. I think I have to build the same environment with yours.

Please let me know your OS, Emacs version. How did you install your Emacs, org-mode, and org-octopress? using package sysem? or by hand?

gabriel4649 commented 11 years ago

Hi!! The functionality is working so really this is just a minor problem. I don't want you to spend so much time on this. If I ever manage to fix it I'll post the solution here. I will look into it when I have some free time.

yoshinari-nomura commented 11 years ago

OK, thanks.

I hope you enjoy org-octopress.

gabriel4649 commented 11 years ago

I am!! Really love being able to do my blogging with org-mode :)

On Thu, Jun 20, 2013 at 6:53 PM, Yoshinari Nomura notifications@github.comwrote:

OK, thanks.

I hope you enjoy org-octopress.

— Reply to this email directly or view it on GitHubhttps://github.com/yoshinari-nomura/org-octopress/issues/5#issuecomment-19788797 .

kongluoxing commented 9 years ago

I got the same error, and I finally find what's going wrong! right: #+OPTIONS: author:Kong Luoxing wrong: #+OPTIONS: author: Kong Luoxing

It said that you can't put whitespace after author: , please check for that.

yoshinari-nomura commented 9 years ago

@kongluoxing, thanks! That's a good lesson for other people.