As I described on my previous post, I use org2blog as the blogging package to post to WordPress. I have the following block on my .emacs file.

(require 'org2blog-autoloads) (require 'netrc) (require 'auth-source) (let (credentials) (add-to-list 'auth-sources "~/.authinfo") (setq credentials (auth-source-user-and-password "arenzana.org")) (setq org2blog/wp-blog-alist `(("arenzanaorg" :url "https://arenzana.org/xmlrpc.php" :username ,(car credentials) :password ,(cadr credentials) :default-title "Hello World" :default-categories ("emacs") :tags-as-categories nil)))) (setq org2blog/wp-use-sourcecode-shortcode nil) ;; removed light="true" (setq org2blog/wp-sourcecode-default-params nil) ;; target language needs to be in here (setq org2blog/wp-sourcecode-langs '("actionscript3" "bash" "coldfusion" "cpp" "csharp" "css" "delphi" "erlang" "fsharp" "diff" "groovy" "javascript" "java" "javafx" "matlab" "objc" "perl" "php" "text" "powershell" "python" "ruby" "scala" "sql" "vb" "xml" "go" "sh" "emacs-lisp" "lisp" "lua")) ;; this will use emacs syntax higlighting in your #+BEGIN_SRC ;; <language> <your-code> #+END_SRC code blocks. (setq org-src-fontify-natively t)

Naturally, I don’t post my credentials as part of my .emacs since I keep it under version control. Instead, I store it under ${HOME}/.authinfo.gpg like this:

machine arenzana.org login admin password "mypassword"

These credentials are called when loading the netrc package and auth-source .