From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/48156 Path: main.gmane.org!not-for-mail From: kgreiner@xpediantsolutions.com Newsgroups: gmane.emacs.gnus.general Subject: Re: 'g' in the group buffer still very slow Date: Wed, 11 Dec 2002 15:09:31 -0600 Sender: owner-ding@hpc.uh.edu Message-ID: References: <87heisn8f4.fsf@sdbk.de> <87d6ocmlux.fsf@sdbk.de> <84adjg8fbd.fsf@lucy.cs.uni-dortmund.de> <87wumk5bmq.fsf@gmx.de> <84k7ijaaz2.fsf@lucy.cs.uni-dortmund.de> <87hedn2su2.fsf@gmx.de> <84of7vxg2t.fsf@lucy.cs.uni-dortmund.de> <87el8qlswk.fsf@gmx.de> <878yyxsp4m.fsf@gmx.de> <873cp4s4m4.fsf@gmx.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1039641180 7280 80.91.224.249 (11 Dec 2002 21:13:00 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 11 Dec 2002 21:13:00 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18MEA7-0001tF-00 for ; Wed, 11 Dec 2002 22:12:59 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18ME7Q-0005xD-00; Wed, 11 Dec 2002 15:10:12 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 11 Dec 2002 15:11:00 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@[209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id PAA04990 for ; Wed, 11 Dec 2002 15:10:40 -0600 (CST) Original-Received: (qmail 761 invoked by alias); 11 Dec 2002 21:09:37 -0000 Original-Received: (qmail 756 invoked from network); 11 Dec 2002 21:09:36 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 11 Dec 2002 21:09:36 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 18MEHq-0000SK-00 for ; Wed, 11 Dec 2002 22:20:58 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 85 Original-NNTP-Posting-Host: h-66-134-21-50.hstqtx02.covad.net Original-X-Trace: quimby.gnus.org 1039641658 1755 66.134.21.50 (11 Dec 2002 21:20:58 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 11 Dec 2002 21:20:58 GMT User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-msvc-nt5.1.2600) Cancel-Lock: sha1:OpP0oCn/oLM4rcto25TvENKJkBc= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:48156 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:48156 Martin Rohde writes: > On Day 53 of The Aftermath 3168, kgreiner@xpediantsolutions.com wrote: >> I believe that nntp-delete-echo should be made buffer local as setting >> this globally may break configurations that use secondary nntp >> servers. > > I think, that the echo depends on your local configuration, because > it is /telnet/, that is sending these echos and not the server. > Ok, then it is not necessary to test it every time you connect to a > server, but when should this be done instead? You're correct. I was thinking that the echo came from the server rather than the transport. But since you asked, why not test the value in nntp-send-command? What if nntp-send-command looked like this? (defvar nntp-delete-echo t) (defsubst nntp-send-command (wait-for &rest strings) "Send STRINGS to server and wait until WAIT-FOR returns." (when (and (not nnheader-callback-function) (not nntp-inhibit-output)) (save-excursion (set-buffer nntp-server-buffer) (erase-buffer))) (let* ((command (mapconcat 'identity strings " ")) (process (nntp-find-connection nntp-server-buffer)) (buffer (and process (process-buffer process))) (pos (and buffer (with-current-buffer buffer (point))))) (if process (prog1 (nntp-retrieve-data command nntp-address nntp-port-number nntp-server-buffer wait-for nnheader-callback-function) ;; If nothing to wait for, still remove possibly echo'ed commands. ;; We don't have echos if nntp-open-connection-function ;; is `nntp-open-network-stream', so we skip this in that case. (when (and (not wait-for) nntp-delete-echo) (nntp-accept-response) (save-excursion (set-buffer buffer) (goto-char pos) (if (setq nntp-delete-echo (looking-at (regexp-quote command))) (delete-region pos (progn (forward-line 1) (gnus-point-at-bol)))) ))) (nnheader-report 'nntp "Couldn't open connection to %s." nntp-address)))) Of course, you'd have to do the same in nntp-send-command-nodelete and nntp-send-command-and-decode. So the first time any of these functions are called, the delete echo code is called. That code calls looking-at to confirm that the echo actually occurred. The difference is that we now assume that, if the current command did not echo, then no future command will echo (i.e. the value returned by looking-at is stored in nntp-delete-echo so, once looking-at returns nil, you'll never call looking-at again to change that value.) BTW, this is entirely untested so you'll have to decide if you are interested in trying it. > > But implementing this would be no problem, so if I am wrong and > there are situations, where the servers could echo something, too, > tell me. None that I'm aware of. > > (It isn't possible to set nntp-open-connection-function for each > server differently, is it?) That's correct, nntp-open-connection-function is set globally. > >> Kevin > > Martin Kevin