emacsweblogs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacsweblogs] xml-rpc.el & weblogger.el updated


From: Mark A. Hershberger
Subject: [Emacsweblogs] xml-rpc.el & weblogger.el updated
Date: Wed, 12 Aug 2009 19:47:00 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux)

(Note, I'm using the bzr repository for development and have put a note
in the old CVS repository explaining that it is obsolete.)

I think I've fixed the problems that Ms. Conrad brought to my attention
earlier this week (the weblogger-config-alist wasn't getting set up
properly) and you can now reliably configure a weblog using

    M-x weblogger-setup-weblog RET

and have the configuration available next time you start up Emacs.  You
can configure multiple weblogs in this way and switch between them using

    M-x weblogger-select-configuration RET

By default, the configuration named “default” is used.  If you want
another configuration as the default configuration, you can

    M-x customize-variable RET weblogger-config-name RET

Again, by default weblogger.el does not save passwords in the
weblogger-config-alist, but you can change that with

    M-x customize-variable RET weblogger-save-password RET

If you, like me, hate the idea of un-encrypted passwords laying around,
though, then there is an alternative in Emacs23.

Emacs23 allows you to have an encrypted authinfo file (“~/.authinfo.gpg”
by default).  weblogger.el will look in this file to retrieve passwords
on a per-server basis.  For my wordpress.com weblog I have the following
line in my ~/.authinfo.gpg file:

    machine hexmode.wordpress.com port http login hexmode password PASSWORD

You will want to change the bits as needed, of course.  If, for whatever
reason, you don't mind having unencrypted passwords lying around, then
then ~/.authinfo file will work just as well.

Finally, I tested this using Xemacs21 — which uses the old url.el
library and lacks UTF-8 support.  To get it to work there, I made
several changes in xml-rpc.el to fall back to the ISO-8859-1
coding-system and for the old url.el library.  I did minimal testing —
enough to verify that I could make posts from Xemacs21 — but there are
almost certainly problems as the HTTP headers it sends still claim to
understand UTF-8.

But at least it should work (with bugs) now on Xemacs21 and Emacs21 as
long as you have the old url.el installed.

The changelog entry:

2009-08-12  Mark A. Hershberger  <address@hidden>

        * xml-rpc.el (xml-entity-alist): provide a definition for really
        old versions of xml.el.
        (xml-rpc-use-coding-system): Make unicode variables dependent on
        the existence of utf-8 coding-system.
        Generally allow use of Emacs that don't understand Unicode --
        although the HTTP headers still claim to be UTF-8.  Update
        backwards-compatibility code after testing against XEmacs21.

        * weblogger.el (weblogger-config-name): Make customizable.
        (weblogger-start-edit-entry-hook): Use XEmacs-compatible form.
        (weblogger-select-configuration): Fix bugs and make it more
        reliable.
        (weblogger-setup-weblog): Properly set weblogger-config-alist.
        (weblogger-change-server): Checking for correct types.
        (weblogger-server-username): More type checking.
        (weblogger-server-password): More type checking.  Also, return "" 
instead of nil
        if there is no password set so that the config-alist maintains the
        correct form.

-- 
http://hexmode.com/

Every day, mindful practice.  When the mind is disciplined, then the
Way can work for us.  Otherwise, all we do is talk of the Way; everything
is just words; and the world will know us as its one great fool.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]