This is a test post from org2blog

| emacs

After I moved from Emacs Planner to Org-mode, I missed the ability to quickly publish my notes from my personal information manager. A backlink on my blog led me to punchagan's org2blog, which I'm using to create this test post.

I'd like to eventually be able to publish subtrees instead of starting new posts or publishing the entire page. This is a pretty good start, though.

You can view 20 comments or e-mail me at sacha@sachachua.com.

20 comments

Joel J. Adamson

2010-07-19T17:22:10Z

I'm going to try this out. For my longer posts I write them in Org-mode and then export to xhtml, then trim the tags to post it on Wordpress. Thanks for letting me know about this.

Thanks for trying it out.
And the quick patch!

Also, thanks for bearing with the newbie code. :-)

Great stuff!

I keep getting this message: "No heading - Posts. Create? (y or n)"

What does it mean?

Anders: Do you have a headline above your entry, like so?

* Your heading goes here

Your blog post body goes here

It looks like that message gets printed out when you're not actually in an Org subtree.

Thanks for replying!

I tried to decipher org2blog.el, but I'm not really familiar with lisp. Basically I just place the cursor at the star in:

* Something
Some text

and do M-x org2blog-post-subtree. So I guess I am in an org subtree?

Just a quick check of the basics: you're in an org-mode file, right? (You should see Org in your modeline.)

Try M-x org2blog-new-entry and see if you can get things work there first. C-c d posts a draft, C-c p publishes a post.

Yep, I'm using org-mode (but not org2blog-mode).

org2blog-new-entry works fine. It doesn't ask anything in the minibuffer and successfully posts to wordpress.

org2blog-post-subtree also successfully manages to post, but complains about the heading stuff and also asks for a filename for saving the entry. Weird..

Hey Anders,

Org2blog has the feature of keeping track of which subtrees you have posted, etc. Look at the variable org2blog-track-posts variable and the track-posts property in org2blog-blog-alist.

Basically, it is asking if you want to create the heading \Posts\ in your track file, under which all your posts will be saved. You could disable this, by setting org2blog-track-posts to nil

Hope that Helps,

Oh! =) Thanks for weighing in, punchagan!

I'm new to this part of org2blog myself, so I'm glad punchagan stepped in before I confused things further.

Thanks!

Using (setq org2blog-track-posts nil) works.

However, adding a :track-posts nil to the alist gives the error:
org2blog-save-details: Wrong type argument: stringp, nil

Sacha, my pleasure. :)

Anders, glad that it works. But, I'm unable to reproduce the problem with adding a :track-posts. Are you using the latest version of org2blog? Can you help me reproduce the problem?

Thanks,

I'm using org-mode v7.3 and the newest org2blog from git + emacs 23.2.1

My setup is just:

(setq org2blog-blog-alist
'(("wordpress"
:url "http://www.somethingother.c..."
:username "admin"
:default-title "Untitled"
:default-categories ("Foor" "Bar")
:tags-as-categories t
:track-posts nil
:wp-latex t
:wp-code t
))
)

and I post using org2blog-post-subtree.

Anders,
This should be fixed now. :)

Sacha,
sorry for transforming your blog into an issue tracker. :P

I just tested it, and it works great.

Thanks again and happy holidays to you both :)

hi, i use org2blog . after i use M-x org2blog/wp-post-buffer-and-publish , i kill the buffer and it prompt me save and track posted in the ~/org/.org2blog.org, but the :POST_ID: in the :PROPERTIES: drawer is blank. Could you tell me how to setup it correctly? thx.

When you use the post-buffer* commands, it posts your buffer. So, a variable #+POST_ID is added at the top of your file. This will not set the POST_ID variable in the PROPERTIES drawer. The property in the PROPERTIES drawer is set only when you post the corresponding subtree (using org2blog/wp-post-subtree*)

Hope that helps

thank you very much. :)
and after i using org2blog/wp-post-subtree* , there is another problem. i add PROPERTIES drawers as following. after i post to my blog, the category is only the *Org2blog* one.(my blog has the Org2blog and Misc category) i also try :CATEGORY: Org2blog,Misc and :CATEGORY: "Org2blog" "Misc" , both them prompt me add new category.
:PROPERTIES:
:CATEGORY: Org2blog
:CATEGORY: Misc
:PERMALINK: slug4test
:ID: o2b:15bc5db9-8aad0e-86f2-76baef853633
:POST_ID: 18021
:END:

I have not been using this feature, and I just saw that they were expected to be colon(:) separated instead of comma (,) separated. I've pushed a fix, now. Also, made the README more elaborate.

yeah. colon(:) is correct . thank you very much.

unfortunately, i meet another annoying problem.

when i used to use #+begin_src.. or #+begin_html.. , in the blog it shows correct result.

But now is always output [sourcecode language="text" light="true"] (defun) [/sourcecode] *or* [sourcecode] ls -l [/sourcecode] similar . why the [sourcecode][/soucecode] appear? any hints please?

and in the orgmode whe i export .html file , it output quite correct
(defun)

similary,

it's quite annoying. thank you for your reply again,dear ms.

oh i see.
i setup the

:wp-code

in org2blog/wp-blog-alist variable and i don't know its affect.

thank you again , dear. :)