From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/7376 Path: main.gmane.org!not-for-mail From: Sudish Joseph Newsgroups: gmane.emacs.gnus.general Subject: Patch for async fetch munging articles bug Date: 31 Jul 1996 03:44:36 -0400 Sender: sj@mindspring.com Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.69) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035147697 7029 80.91.224.250 (20 Oct 2002 21:01:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:01:37 +0000 (UTC) Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.7.5/8.6.9) with SMTP id AAA04139 for ; Wed, 31 Jul 1996 00:54:58 -0700 Original-Received: from atreides.erehwon.org (sj@user-168-121-167-78.dialup.mindspring.com [168.121.167.78]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Wed, 31 Jul 1996 09:40:17 +0200 Original-Received: (from sj@localhost) by atreides.erehwon.org (8.7.5/8.7.3) id DAA00897; Wed, 31 Jul 1996 03:44:37 -0400 Original-To: ding@ifi.uio.no In-Reply-To: Sudish Joseph's message of 30 Jul 1996 23:35:48 -0400 Original-Lines: 62 X-Mailer: Red Gnus v0.1/XEmacs 19.14 Xref: main.gmane.org gmane.emacs.gnus.general:7376 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:7376 Sudish Joseph writes: > Update: the gnus-async stuff seems to get confused as to which o/p > belongs to which command. I'm getting articles containing NNTP o/p as > well as empty article buffers. Here's what I think is a fix for this. I say "think" coz it's like the 10th "fix" or so, each prior one having failed to me "thinking" it was correct. You have been warned. The problem is basically in #'nntp-process-filter, which assumes that by searching -backwards- from the end for the wait-for'ed string, it won't skip over other instances of the same string. However, multiple replies can pour in by the time that filter kicks in. (I'm not too sure about that last statement, it only seems to happen for the very first group you visit.) Fixing this seemed too hard, since one would have to tag replies in some fashion to ensure that they're handed over to the correct callback function. So I fixed it in gnus-async, where you generate the callback. (Very cool code, Lars.) There's still some weirdness left here, I think. My brain, uh, seat cushion is fried, though, so I'm not digging further tonight. This was a b*tch to debug -- edebug craps out on backquoted forms inside of defuns and is a total lose for those cool callbacks you're generating. -Sudish PS: For a gnus-reopen-all-connections command, does it suffice to delete all process buffers in nntp-connection-alist? I'd really like to have this available since I use a demand dialer to manage my connection. Wed Jul 31 03:09:23 1996 Sudish Joseph * gnus-async.el (gnus-async-prefetch-article): Search forward for end of article from saved marker; multiple articles (and even nntp reply codes) may be present in the async buffer. Signal failures in filters via explicit 'message or they'll be trapped and lost. --- gnus-async.el Wed Jul 31 03:19:54 1996 +++ gnus-async.el Wed Jul 31 03:19:54 1996 @@ -101,8 +101,12 @@ `(lambda (arg) (save-excursion (gnus-async-set-prefetch-buffer) + (goto-char ,mark) + (unless (re-search-forward "\r\n\\.\r\n" nil t) + (message "bogon in gnus-async-prefetch-article!") + (ding)) (push (list ',(intern (format "%s-%d" group article)) - ,mark (set-marker (make-marker) (point-max)) + ,mark (set-marker (make-marker) (point)) ,group ,article) gnus-async-article-alist) (when (gnus-buffer-live-p ,summary)