org2blog is licensed under GPLv3
Download org2blog from github
git clone http://github.com/punchagan/org2blog.git
Add the org2blog directory to your load path and then add
(setq load-path (cons "~/.emacs.d/org2blog/" load-path)) (require 'org2blog)
to your dot emacs.
- org2blog depends on xml-rpc available at Launchpad. Add it to your load-path before using org2blog.
- Make sure you have the latest org-mode installed. org2blog may not work with older versions of org.
Defining your blog setup
Note - This setup works only for org2blog version >=0.3. For lower versions of org2blog check an README from the commit e37126eec24ffdd785d2
You can (should) tell org2blog where your blogs are and optionally
specify different values for some options. This is done by
customising the variable
(setq org2blog/wp-blog-alist '(("wordpress" :url "http://username.wordpress.com/xmlrpc.php" :username "username" :default-title "Hello World" :default-categories ("org2blog" "emacs") :tags-as-categories nil) ("my-blog" :url "http://username.server.com/xmlrpc.php" :username "admin")))
This defines two blogs identified by the terms
The variables in the
plist set for each blog over-ride the
global values of the corresponding variables.
are mandatory variables. Others are optional. If you customize the
org2blog/wp-blog-alist there is detail information about the
meaning of each property.
If you use only categories, set the org2blog/wp-use-tags-as-categories variable.
(setq org2blog/wp-use-tags-as-categories t)
If you wish to be asked for confirmation before publishing a post,
set the variable
To browse or customize other variables use the customize group function.
M-x customize-group org2blog RET
Use M-x org2blog/wp-login. This function ask you for the name of one of the blogs you have configured in the org2blog/wp-blog-alist variable described above and will ask for your password. The counterpart of this function is M-x org2blog/wp-logout, which will log you out of the active blog.
Writing a new post
Use M-x org2blog/wp-new-entry.
- Tags and Categories are comma or space separated values. Completion (for both) is triggered using C-c t. If a new category is used you will be prompted before adding it.
- The excerpt for a post can be written as
- The parent for a page can be specified using
#+PARENT.\ C-c t again provides completion for the page name.
|post buffer as draft||C-c d||M-x org2blog/wp-post-buffer|
|publish buffer||C-c p||C-u M-x org2blog/wp-post-buffer|
|post buffer as page draft||C-c D||M-x org2blog/wp-post-buffer-as-page|
|publish buffer as page||C-c P||C-u M-x org2blog/wp-post-buffer-as-page|
Post your existing org-files too
#+DATE, to your file. (All of these are Optional)
- Add a
#+POSTIDto edit an existing post.
- Post buffer using the function names, as above.
Posting a subtree
- Use M-x org2blog/wp-post-subtree.
- Tags of the subtree will be used for tags. Other properties can be set using a property drawer.
Delete an entry or a page
- If you are in the buffer of the entry/page, with
#+POSTIDpresent on the page, use :
M-x org2blog/wp-delete-entry or M-x org2blog/wp-delete-page
- If you want to delete a particular post (whose post-id is
known) from any buffer, use
C-u post-id M-x org2blog/wp-delete-entry.
Similarly, for a page.
Enabling org2blog mode (defines key-bindings)
- use M-x org2blog/wp-mode.
This defines the following the key-bindings:
C-c p publish buffer C-c d post as draft C-c t complete tag or parent page name
In-line images and linked images with file:// urls (e.g.,
[[file:///path.to.jpeg][this is an image link]] will be uploaded to
the media library and the links will be updated. Captions and
attributes as defined in org-mode will be preserved, but at
present these attributes are not saved with the image to the
library itself. [Information about uploaded files are added as a
comment to the post itself, to prevent repeated uploads, but this
isn’t as stable as I would like it.]
- You may want to look at the Export options and HTML export sections of the org-manual.
- If you wish to post to blogger from org-mode, look at -
- If you have an issue/bug/feature request, use the issue tracker on git or drop a mail to punchagan+org2blog[at]gmail[dot]com.
- If you haven’t found a bug/issue, but have tried out and/or are using org2blog to post to your blog, post me a line on how you use it and on what blog. I’d love to hear from you!
- Now, that org2blog does have a bunch of users, I’d like to keep track of the blogs it’s being used on. :) Feel free to add your site to the list of sites using org2blog, on the wiki at github.