From billw@wolfram.com Thu Aug 15 04:11:41 2002 From: billw@wolfram.com (Bill White) Date: Wed, 14 Aug 2002 22:11:41 -0500 Subject: [mt-el] xemacsism: set-keymap-name Message-ID: mt-mode-map uses an xemacs-specific function, set-keymap-name: (defvar mt-mode-map (let ((map (make-sparse-keymap))) (set-keymap-name map 'mt-mode-map) (define-key map "\C-c\C-c" 'weblog-submit-post) (define-key map "\C-c\C-s" 'weblog-submit-publish) (define-key map "\C-c\C-p" 'weblog-submit-no-publish) (define-key map "\C-c\C-e" 'weblog-edit-post-at-point) map)) I'm not really up on the way to code around this to make it work for Emacs (cause it's pretty late at night :-), but here's a workaround in the current Emacs (sql.el): (defvar sql-interactive-mode-map (let ((map (make-sparse-keymap))) (if (functionp 'set-keymap-parent) (set-keymap-parent map comint-mode-map); Emacs (set-keymap-parents map (list comint-mode-map))); XEmacs (if (functionp 'set-keymap-name) (set-keymap-name map 'sql-interactive-mode-map)); XEmacs (define-key map (kbd "C-j") 'sql-accumulate-and-indent) (define-key map (kbd "C-c C-w") 'sql-copy-column) (define-key map (kbd "O") 'sql-magic-go) (define-key map (kbd "o") 'sql-magic-go) (define-key map (kbd ";") 'sql-magic-semicolon) map) "Mode map used for `sql-interactive-mode'. Based on `comint-mode-map'.") I'm using GNU Emacs 21.3.50.1 (i586-pc-linux-gnu, X toolkit) of 2002-06-28 on seton Thanks - bw -- Bill White Office: 5N-X30 Documentation Programmer Phone: 217-398-0700 x 234 Wolfram Research Fax: 217-398-0747 http://members.wri.com/billw Office hours: 4am-noon Mon-Wed, Fri From mt-el@marginalia.org Thu Aug 15 04:42:02 2002 From: mt-el@marginalia.org (Bill Stilwell) Date: 14 Aug 2002 20:42:02 -0700 Subject: [mt-el] xemacsism: set-keymap-name In-Reply-To: References: Message-ID: <8765yciy9h.fsf@telus.net> Bill White writes: > mt-mode-map uses an xemacs-specific function, set-keymap-name: > > (defvar mt-mode-map > (let ((map (make-sparse-keymap))) > (set-keymap-name map 'mt-mode-map) > (define-key map "\C-c\C-c" 'weblog-submit-post) > (define-key map "\C-c\C-s" 'weblog-submit-publish) > (define-key map "\C-c\C-p" 'weblog-submit-no-publish) > (define-key map "\C-c\C-e" 'weblog-edit-post-at-point) > map)) Ach, I knew I'd get bitten by something like this. Thanks for the workaround suggestion, I'll look into this and hopefully have a decent solution soon. I should also install emacs. :-) Thanks again, -b -- Bill Stilwell bill@marginalia.org It's all margins. Oh, just read my weblog: http://www.marginalia.org From mt-el@marginalia.org Thu Aug 15 20:44:47 2002 From: mt-el@marginalia.org (Shawn Ledbetter) Date: Thu, 15 Aug 2002 12:44:47 -0700 Subject: [mt-el] problems with mwa-new-post/mwa-get-post and xml-rpc return value Message-ID: <20020815194447.GA18851@thoughtenvelope.com> I'm attempting to post a new entry with mt.el First, a (require 'cl) needs to be somewhere for Emacs21 folks AFAICT, otherwise just about all the xml-rpc caaddr's and cdaddr's fail. Also in weblog-refresh-buffer, the mwa-get-post call is being passed what a bad post-id. The post-id returned from mwa-new-post is ((0 . "Server") nil), which doesn't look like a post-id at all. I'm assuming this is the answer coming back from a function in mt-xml-rpc, which I haven't looked at yet. backtrace: xml-rpc-value-to-xml-list((0 . "Server")) xml-rpc-value-to-xml-list(((0 . "Server") nil)) xml-rpc-method-call-async(nil "http://www.shawnledbetter.com/mt/mt-xmlrpc.cgi" metaWeblog\.getPost (((0 . "Server") nil) "shawn" "xxxxx")) xml-rpc-method-call("http://www.shawnledbetter.com/mt/mt-xmlrpc.cgi" metaWeblog\.getPost ((0 . "Server") nil) "shawn" "xxxxx") mwa-get-post(((0 . "Server") nil)) weblog-refresh-buffer(((0 . "Server") nil)) weblog-submit-post() call-interactively(weblog-submit-post) This is with the new mt.el and mt-xml-rpc in emacs21 -sml From mt-el@marginalia.org Thu Aug 15 22:33:40 2002 From: mt-el@marginalia.org (Bill Stilwell) Date: 15 Aug 2002 14:33:40 -0700 Subject: [mt-el] problems with mwa-new-post/mwa-get-post and xml-rpc return value In-Reply-To: <20020815194447.GA18851@thoughtenvelope.com> References: <20020815194447.GA18851@thoughtenvelope.com> Message-ID: <87d6sjg62z.fsf@telus.net> Shawn Ledbetter writes: > I'm attempting to post a new entry with mt.el > > First, a (require 'cl) needs to be somewhere for Emacs21 folks AFAICT, > otherwise just about all the xml-rpc caaddr's and cdaddr's fail. Ah, thanks for the pointer. I'll add this to the documentation. > Also in weblog-refresh-buffer, the mwa-get-post call is being passed what a > bad post-id. The post-id returned from mwa-new-post is ((0 . "Server") > nil), which doesn't look like a post-id at all. I'm assuming this is > the answer coming back from a function in mt-xml-rpc, which I haven't > looked at yet. > > backtrace: > xml-rpc-value-to-xml-list((0 . "Server")) > xml-rpc-value-to-xml-list(((0 . "Server") nil)) > xml-rpc-method-call-async(nil "http://www.shawnledbetter.com/mt/mt-xmlrpc.cgi" metaWeblog\.getPost (((0 . "Server") nil) "shawn" "xxxxx")) > xml-rpc-method-call("http://www.shawnledbetter.com/mt/mt-xmlrpc.cgi" metaWeblog\.getPost ((0 . "Server") nil) "shawn" "xxxxx") > mwa-get-post(((0 . "Server") nil)) > weblog-refresh-buffer(((0 . "Server") nil)) > weblog-submit-post() > call-interactively(weblog-submit-post) > > This is with the new mt.el and mt-xml-rpc in emacs21 > > -sml Hmm, this error seems to be coming from your server, or at least the errors I've seen have been like that. Are the posts successfuly showing up on your weblog? I installed emacs21 last night, but I haven't had a chance to thoroughly go over things. I'll be doing that this evening. I updated the mt.el code recently to address some problems I was experiencing, although they weren't like what you mentioned. Could you download again and try again? Thanks, Bill -- Bill Stilwell bill@marginalia.org It's all margins. Oh, just read my weblog: http://www.marginalia.org From mt-el@marginalia.org Thu Aug 15 22:58:27 2002 From: mt-el@marginalia.org (Shawn Ledbetter) Date: Thu, 15 Aug 2002 14:58:27 -0700 Subject: [mt-el] problems with mwa-new-post/mwa-get-post and xml-rpc return value In-Reply-To: <87d6sjg62z.fsf@telus.net> References: <20020815194447.GA18851@thoughtenvelope.com> <87d6sjg62z.fsf@telus.net> Message-ID: <20020815215827.GA20490@thoughtenvelope.com> On Thu, Aug 15, 2002 at 02:33:40PM -0700, Bill Stilwell wrote: > > backtrace: > > xml-rpc-value-to-xml-list((0 . "Server")) > > xml-rpc-value-to-xml-list(((0 . "Server") nil)) > > xml-rpc-method-call-async(nil "http://www.shawnledbetter.com/mt/mt-xmlrpc.cgi" metaWeblog\.getPost (((0 . "Server") nil) "shawn" "xxxxx")) > > xml-rpc-method-call("http://www.shawnledbetter.com/mt/mt-xmlrpc.cgi" metaWeblog\.getPost ((0 . "Server") nil) "shawn" "xxxxx") > > mwa-get-post(((0 . "Server") nil)) > > weblog-refresh-buffer(((0 . "Server") nil)) > > weblog-submit-post() > > call-interactively(weblog-submit-post) > > > > This is with the new mt.el and mt-xml-rpc in emacs21 > > > > -sml > > Hmm, this error seems to be coming from your server, or at least the > errors I've seen have been like that. Are the posts successfuly > showing up on your weblog? No, they're not. Lemme try some stuff behind the scenes and make sure by MT installation is correct and all, basically try the xml-rpc calls by hand. I haven't had any problems so far with posting via MT or its bookmarklet. > I installed emacs21 last night, but I haven't had a chance to > thoroughly go over things. I'll be doing that this evening. Well, I just started using emacs21, basically because my .emacs.el file still has plenty of 20.x-isms in it and I haven't gotten around to completely updating it. > I updated the mt.el code recently to address some problems I was > experiencing, although they weren't like what you mentioned. Could you > download again and try again? Sure thing. Will try again later tonight. Thanks. -sml From mt-el@marginalia.org Fri Aug 16 06:08:30 2002 From: mt-el@marginalia.org (Shawn Ledbetter) Date: Thu, 15 Aug 2002 22:08:30 -0700 Subject: [mt-el] problems with mwa-new-post/mwa-get-post and xml-rpc return value In-Reply-To: <20020815215827.GA20490@thoughtenvelope.com> References: <20020815194447.GA18851@thoughtenvelope.com> <87d6sjg62z.fsf@telus.net> <20020815215827.GA20490@thoughtenvelope.com> Message-ID: <20020816050830.GA32291@thoughtenvelope.com> Doh! Nevermind, password typo. Works for me now. Is it just my setup or does the actual XML-RPC call take a really long time in Emacs? So much so I cancelled it and submitted again; surprise, a duplicate entry :) Oh yeah, I had to change a (delete-backward-char) call to (delete-backward-char 1). Another Xemacs/Emacs I think. Any idea about how to add in the trackback links? I didn't really see anything like that in the XML-RPC docs for MT. Also, my edit link that I usually have when I've posted via my bookmarklet before (using the EditEntryLink plugin) doesn't appear on my mt.el submitted posts. -sml From mt-el@marginalia.org Fri Aug 16 08:32:54 2002 From: mt-el@marginalia.org (Bill Stilwell) Date: Fri, 16 Aug 2002 00:32:54 -0700 Subject: [mt-el] problems with mwa-new-post/mwa-get-post and xml-rpc return value In-Reply-To: <20020816050830.GA32291@thoughtenvelope.com> (Shawn Ledbetter's message of "Thu, 15 Aug 2002 22:08:30 -0700") References: <20020815194447.GA18851@thoughtenvelope.com> <87d6sjg62z.fsf@telus.net> <20020815215827.GA20490@thoughtenvelope.com> <20020816050830.GA32291@thoughtenvelope.com> Message-ID: <87u1lvi7h5.fsf@telus.net> Shawn Ledbetter writes: > Doh! Nevermind, password typo. Works for me now. Is it just my setup > or does the actual XML-RPC call take a really long time in Emacs? So > much so I cancelled it and submitted again; surprise, a duplicate entry > :) Yeah, I've noticed that too with emacs - it completes the post, but seems to hang on returning. I'm still looking into it. > Oh yeah, I had to change a (delete-backward-char) call to > (delete-backward-char 1). Another Xemacs/Emacs I think. Already fixed :-). I should have a new version on my website tomorrow (Friday) morning. The little differences between x/emacs can really bite you in the ass. > Any idea about how to add in the trackback links? I didn't really see > anything like that in the XML-RPC docs for MT. Also, my edit link > that I usually have when I've posted via my bookmarklet before (using > the EditEntryLink plugin) doesn't appear on my mt.el submitted posts. Hmm. I have no idea what that is, so I'll have to just promise to do some research. :-) Pretty much same deal with the trackback links. Thanks, -b -- Bill Stilwell bill@marginalia.org It's all margins. Oh, just read my weblog: http://www.marginalia.org From mt-el@marginalia.org Sat Aug 17 04:52:44 2002 From: mt-el@marginalia.org (Bill Stilwell) Date: Fri, 16 Aug 2002 20:52:44 -0700 Subject: [mt-el] mt.el 'not a complete failure on emacs' release Message-ID: <878z36i1kj.fsf@telus.net> Hello testers! I've just posted new code at: http://www.marginalia.org/code/mt.el http://www.marginalia.org/code/mt-xml-rpc.el The exciting thing is that things seems to work on emacs. I finally nuked the bug in mt-xml-rpc that was causing emacs to hang when posting. Setting categories is also enabled in this release. It's still a bit fragile - if categories aren't already set on a post, things will fail, for example. However, the basics are there if you want to play around with it. Some feedback on the UI would be greatly appreciated. Have fun! -b PS - After this notice, I'll probably only send notices of new code to mt-el@marginalia.org, so if you want to keep up on the exciting world of mt.el, please subscribe! -- Bill Stilwell bill@marginalia.org It's all margins. Oh, just read my weblog: http://www.marginalia.org From mt-el@marginalia.org Sat Aug 17 06:31:28 2002 From: mt-el@marginalia.org (Bill Stilwell) Date: Fri, 16 Aug 2002 22:31:28 -0700 Subject: [mt-el] new update Message-ID: <87it2arqz3.fsf@telus.net> Hello all, There's another update to the usual files. This addresses what happens when a post doesn't have any categories - it was failing before because the empty list returned by MT was causing an error within the xml-rpc code. I'll take a look next at what happens when you don't have any categories, but that seems a less likely proposition. Next up after that is having posts saved in draft form so you can set categories and then publish the complete post. After that I better start getting feature requests or bug reports, or I might be tempted to think about a wide release. :-) Cheers, -b -- Bill Stilwell bill@marginalia.org It's all margins. Oh, just read my weblog: http://www.marginalia.org From mt-el@marginalia.org Sat Aug 17 07:23:16 2002 From: mt-el@marginalia.org (Bill Stilwell) Date: Fri, 16 Aug 2002 23:23:16 -0700 Subject: [mt-el] 'keep bill away from the coffee' release Message-ID: <87elcyrokr.fsf@telus.net> Changes: - implemented blogger.getUsersBlogs, in order to get the name of the weblog being posted to. Uses this label the post buffer, e.g.: *weblog post 797 (TESTING)* I'm open to suggestions for different wording for this. My modeline is starting to get crowded. I suppose it could be at the top of the buffer, along with the Post Id: line. I dunno. - added weblog-new-post-hook, so I can do this in my .emacs: (defun xmms-get-song () (with-temp-buffer (insert (shell-command-to-string "cat /tmp/xmms-info")) (goto-char (point-min)) (if (re-search-forward "^Title:[ \t]+\\(.*\\)$" nil t) (match-string 1)))) (defun xmms-insert-song () (interactive) (if (setq title (xmms-get-song)) (insert (concat "Currently listening to: " title ".")))) (defun new-post () (save-excursion (goto-char (point-max)) (xmms-insert-song))) (setq weblog-new-post-hook 'new-post) Enjoy, -b -- Bill Stilwell bill@marginalia.org It's all margins. Oh, just read my weblog: http://www.marginalia.org From mt-el@marginalia.org Tue Aug 20 06:26:10 2002 From: mt-el@marginalia.org (Bill Stilwell) Date: Mon, 19 Aug 2002 22:26:10 -0700 Subject: [mt-el] new release Message-ID: <87fzxaje31.fsf@telus.net> Hello all! I've posted a new version of mt.el to: http://www.marginalia.org/code/mt.el mt-xml-rpc.el is unchanged with this release. The changes in mt on this release are: - added switch weblog command (weblog-switch-weblog), which is really just a convenience for me when testing. :-) At some point, I've got a TODO to make this work with weblog names instead of ids. - made retrieve posts command accept a prefix argument as per description - setting categories now splits the window, which is a little nicer imo. When you save the categories, the category window is killed. - can set categories from post listing window. Another thing just for me. :-) - if it's a new post, user is prompted if they want to set categories on it. This is still not a perfect solution, as a post needs to be saved again with publish on in order for category settings to take effect on a weblog. I'm still working out a good way for this flow to happen, but this is better than nothing. Barring a brown-paper-bag release, this will likely be the last release for about a week, as I'm heading out for a short vacation far, far away from any computers. Cheers, Bill -- Bill Stilwell bill@marginalia.org It's all margins. Oh, just read my weblog: http://www.marginalia.org From mt-el@marginalia.org Wed Aug 21 07:13:23 2002 From: mt-el@marginalia.org (Bill Stilwell) Date: Tue, 20 Aug 2002 23:13:23 -0700 Subject: [mt-el] brown paper bag release... Message-ID: <87sn1891to.fsf@telus.net> Hey, I goofed with an if statement, and bad things happened. Those bad things are now fixed. Upgrading is recommended. :-) http://www.marginalia.org/code/mt.el -b -- Bill Stilwell bill@marginalia.org It's all margins. Oh, just read my weblog: http://www.marginalia.org