Categories
Blogging Emacs

Blogging from Emacs

As an Emacs user who spends most of my day in this editor, I've always felt a disconnect when it comes to blogging. I have to leave my comfortable editing environment, log into WordPress through a browser, deal with the web interface, and hope I don't lose my work if the browser crashes or my connection drops.

More importantly, I'm an occasional blogger who often gets ideas while working, but I feel uncomfortable opening my blog's admin panel during work hours. It's too visible, too distracting, and frankly looks unprofessional even if I'm on a break.

I've found the perfect solution: weblogger-mode for Emacs. Now I can draft, edit, and publish blog posts entirely from within Emacs, making blogging feel like just another part of my development workflow.

What is weblogger-mode?

Weblogger-mode is an Emacs mode that provides a complete interface for blogging platforms that support XML-RPC (like WordPress, Blogger, and Movable Type). It lets you manage your entire blogging workflow without leaving Emacs:

  • Draft posts in your familiar editing environment
  • Use all your Emacs editing power (search, replace, macros, etc.)
  • Edit existing posts
  • Manage multiple blogs
  • Publish or save as draft
  • Work offline and publish later

Setting Up weblogger-mode

Installation

First, download weblogger.el from the Emacs Lisp Archive and place it in your Emacs load path. Add this to your .emacs configuration:

(require 'weblogger)

WordPress Configuration

You need to configure your WordPress blog credentials. Add this to your .emacs:

(setq weblogger-config-alist
      '(("wordpress"
         ("user" . "your-username")
         ("pass" . "your-password")
         ("server-url" . "http://yourblog.com/xmlrpc.php")
         ("weblog" . "1"))))

Important: Make sure XML-RPC is enabled in your WordPress settings (Settings → Writing → Remote Publishing).

Blogging Workflow

Starting a New Post

To start blogging, run:

M-x weblogger-start-entry

This creates a new buffer where you can write your post. The buffer uses a simple format:

Title: Your Post Title Here
Keywords: tag1, tag2, tag3
Categories: Category1, Category2

Your post content goes here. Write in plain text or HTML.

Writing and Editing

Now you're in your familiar Emacs environment. Use all your regular editing commands:

  • C-s / C-r for search
  • M-% for find and replace
  • Your custom keybindings and macros
  • Your preferred text completion
  • Spell checking with ispell/flyspell

Publishing

When you're ready to publish:

  • C-c C-c – Publish the post
  • C-c C-d – Save as draft
  • C-c C-k – Cancel editing

Editing Existing Posts

To edit an existing post:

M-x weblogger-fetch-entries

This shows a list of your recent posts. Navigate to the one you want to edit, press Enter, make your changes, and publish with C-c C-c.

Why This Works for Me

Seamless workflow: I don't have to context-switch to a browser. Writing a blog post feels like editing any other document.

Offline drafting: I can write posts during my commute or anywhere, then publish when I have connectivity.

Version control: Since posts are just text files before publishing, I can keep them in Git if I want to track changes.

Familiar tools: All my Emacs muscle memory applies. No learning a new editor interface.

Less obvious: When I'm drafting during work, it just looks like I'm editing a text file. No obvious blog admin interface on screen.

Power editing: Need to change all instances of a term across your post? M-% and done. Want to restructure with keyboard macros? Go ahead. Try doing that in a web textarea.

Technical Details

For those interested, this post was prepared and published using:

  • Emacs 23 on RHEL 5.1
  • weblogger-mode 1.4
  • WordPress 2.9 XML-RPC interface

Conclusion

If you're an Emacs user who blogs occasionally, weblogger-mode is a game-changer. It brings blogging into your natural workflow instead of forcing you to adapt to a web interface. The initial setup takes a few minutes, but the productivity gain is worth it.

I can now capture blog ideas as they come, draft them in my spare moments, and publish without leaving my editor. For an Emacs enthusiast, it doesn't get better than this. Last modified: 2010-04-10 WordPress ID: 569

By Shishir Sharma

Shishir Sharma is a Software Engineering Leader, husband, and father based in Ottawa, Canada. A hacker and biker at heart, and has built a career as a visionary mentor and relentless problem solver.

With a leadership pedigree that includes LinkedIn, Shopify, and Zoom, Shishir excels at scaling high-impact teams and systems. He possesses a native-level mastery of JavaScript, Ruby, Python, PHP, and C/C++, moving seamlessly between modern web stacks and low-level architecture.

A dedicated member of the tech community, he serves as a moderator at LUG-Jaipur. When he’s not leading engineering teams or exploring new technologies, you’ll find him on the open road on his bike, catching an action movie, or immersed in high-stakes FPS games.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.