I have .authinfo.gpg set up and working as the authentication mechanism for ERC (with multiple IRC servers) and Gnus (with multiple IMAP servers) using the following in my config:
(require 'auth-source)
(setq
auth-sources '(default
"secrets:session"
"secrets:Login"
"~/.authinfo.gpg"
"~/.authinfo"
"~/.netrc"
)
epa-file-cache-passphrase-for-symmetric-encryption t)
My .authinfo.gpg includes entries like this (sanitized, naturally, and trimmed to just WordPress blog samples):
machine example.com login JohnDoe password "password" port http
machine example2.com login JohnDoeJr password "password2" port http
My org2blog config is:
(use-package org2blog
:defer t
:ensure t
:config
(require 'org2blog-autoloads)
;; (org2blog/wp-use-sourcecode-shortcode ‘t)
(setq
org2blog/wp-confirm-post t
org2blog/wp-blog-alist
'(
("example1"
:url "http://www.example.com/xmlrpc.php"
:username ,(car (auth-source-user-and-password "example.com"))
:password ,(cadr (auth-source-user-and-password "example.com"))
:default-title "Hello, World!"
:default-categories ("Uncategorized")
)
("example2"
:url "http://www.example2.com/xmlrpc.php"
:username ,(car (auth-source-user-and-password "example2.com"))
:password ,(cadr (auth-source-user-and-password "example2.com"))
:default-title "Hello, World!"
:default-categories ("Uncategorized")
))))
Using the above when logging into either, I get
xml-rpc-value-to-xml-list: Wrong type argument: stringp, \,
I've tried variations on the above but can't seem get get it to use .authinfo.gpg. The above error message is returned or I am prompted for my password.
I've used the following references to help me but so far to no avail:
- http://vxlabs.com/2014/05/25/emacs-24-with-prelude-org2blog-and-wordpress/
- http://thewanderingcoder.com/2015/02/publishing-from-org-mode-to-wordpress/
- https://github.com/punchagan/org2blog
I'm running:
- GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) of 2015-03-03 on lm-lvm-tpt430
- Org-mode version 8.2.10 (8.2.10-35-g19a7d6-elpaplus @
/home/username/.emacs.d/elpa/org-plus-contrib-20150316/) - org2blog 20150114.2301 from Melpa