I used to have a working set-up of org2blog. Somewhere along the way, it got borked. I couldn’t login. I tried fixing it a few times, but I couldn’t get the problem resolved. Today, I finally got org2blog working. Key piece is setting the gnutls-algorithm-priority.
Use the instructions at the org2blog site:
Do everything it says, such as install the dependencies, create a ~/.netrc file with wordpress as the machine name, and so forth. After creating .netrc, limit access by doing: $ chmod 600 ~/.netrc. Then, replace the blog credentials .emacs code with the following:
;; With Emacs 27.1, the following line borked configuration again, remove
;; (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
;;; org2blog hydra hooks (defun my/org2blog/wp-mode-hook-fn () (local-set-key (kbd "M-9") #'org2blog/wp-hydra/body) (local-set-key (kbd "M-0") #'org2blog/wp-complete-category)) (add-hook 'org2blog/wp-mode-hook #'my/org2blog/wp-mode-hook-fn)
;;; org2blog authentication (require 'auth-source) (let (credentials) (add-to-list 'auth-sources "~/.netrc") (setq credentials (auth-source-user-and-password "wordpress")) (setq org2blog/wp-blog-alist `(("blogname" :url "https://blogname.wordpress.com/xmlrpc.php" :username ,(car credentials) :password ,(cadr credentials) :default-title "Insert title" :default-categories ("comments") :tags-as-categories nil))))
(setq org-src-fontify-natively t)
I posted this using org2blog with this configuration.