From: Martin Rohde <martin.rohde@gmx.de>
Subject: Re: 'g' in the group buffer still very slow
Date: Fri, 13 Dec 2002 16:41:39 +0100 [thread overview]
Message-ID: <87isxydiz0.fsf@gmx.de> (raw)
In-Reply-To: <84smx3o4ck.fsf@lucy.cs.uni-dortmund.de> (kai.grossjohann@uni-duisburg.de's message of "Thu, 12 Dec 2002 12:37:31 +0100")
[-- Attachment #1: Type: text/plain, Size: 1960 bytes --]
On Day 54 of The Aftermath 3168, Kai Großjohann wrote:
> Martin Rohde <martin.rohde@gmx.de> 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?
>
> It is necessary to test it every time you connect to a server, because...
>
>> 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.
>>
>> (It isn't possible to set nntp-open-connection-function for each
>> server differently, is it?)
>
> it *is* possible to set nntp-open-connection-function differently for
> each server. That's the whole point, actually.
>
> You can put the definition in the server parameters, like this:
>
> (add-to-list 'gnus-secondary-select-methods
> '(nntp "servername"
> (nntp-address "host.name.of.server")
> (nntp-open-connection-function nntp-open-telnet-stream)
> ...other.nntp-open-telnet.settings...))
Oops. Sorry, then Kevin was right, nntp-delete-echo has to be
buffer-local.
I fixed the cleaning of the server-buffer after sending "MyNOOP"
like you suggested and it works, but I like the version of Kevin
very much. In my opinion it works just as well as testing for an
echo in nntp-open-connection, but saves code and time.
Hm, but it is right to refer to nntp-open-connection-function
globally, isn't it? It is connection-dependend, too, but I just
found it as a global variable...(That's why I thought, that it
would be independent...)
If so, here is yet another try:
[-- Attachment #2: nntp.el.diff --]
[-- Type: text/plain, Size: 3191 bytes --]
--- nntp.el.old 2002-12-13 16:10:35.000000000 +0100
+++ nntp.el 2002-12-13 16:30:41.000000000 +0100
@@ -218,6 +218,7 @@
(defvar nntp-process-to-buffer nil)
(defvar nntp-process-callback nil)
(defvar nntp-process-decode nil)
+(defvar nntp-process-delete-echo nil)
(defvar nntp-process-start-point nil)
(defvar nntp-inside-change-function nil)
(defvoo nntp-last-command-time nil)
@@ -411,14 +412,15 @@
(unless (or wait-for
(equal nntp-open-connection-function
'nntp-open-network-stream))
- (nntp-accept-response)
(save-excursion
(set-buffer buffer)
- (goto-char pos)
- (if (looking-at (regexp-quote command))
- (delete-region pos (progn (forward-line 1)
- (gnus-point-at-bol))))
- )))
+ (when nntp-process-delete-echo
+ (nntp-accept-response)
+ (goto-char pos)
+ (if (setq nntp-process-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))))
@@ -435,15 +437,18 @@
nntp-server-buffer
wait-for nnheader-callback-function)
;; If nothing to wait for, still remove possibly echo'ed commands
- (unless wait-for
- (nntp-accept-response)
+ (unless (or wait-for
+ (equal nntp-open-connection-function
+ 'nntp-open-network-stream))
(save-excursion
(set-buffer buffer)
- (goto-char pos)
- (if (looking-at (regexp-quote command))
- (delete-region pos (progn (forward-line 1)
- (gnus-point-at-bol))))
- )))
+ (when nntp-process-delete-echo
+ (nntp-accept-response)
+ (goto-char pos)
+ (if (setq nntp-process-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))))
@@ -465,14 +470,18 @@
nntp-server-buffer
wait-for nnheader-callback-function t)
;; If nothing to wait for, still remove possibly echo'ed commands
- (unless wait-for
- (nntp-accept-response)
+ (unless (or wait-for
+ (equal nntp-open-connection-function
+ 'nntp-open-network-stream))
(save-excursion
- (set-buffer buffer)
- (goto-char pos)
- (if (looking-at (regexp-quote command))
- (delete-region pos (progn (forward-line 1) (gnus-point-at-bol))))
- )))
+ (set-buffer buffer)
+ (when nntp-process-delete-echo
+ (nntp-accept-response)
+ (goto-char pos)
+ (if (setq nntp-process-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))))
@@ -1048,6 +1057,7 @@
(set (make-local-variable 'nntp-process-to-buffer) nil)
(set (make-local-variable 'nntp-process-start-point) nil)
(set (make-local-variable 'nntp-process-decode) nil)
+ (set (make-local-variable 'nntp-process-delete-echo) t)
(current-buffer)))
(defun nntp-open-connection (buffer)
next prev parent reply other threads:[~2002-12-13 15:41 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-21 20:16 Sebastian D.B. Krause
2002-07-26 12:45 ` Simon Josefsson
2002-07-26 12:52 ` Kai Großjohann
2002-12-08 18:00 ` Sebastian D.B. Krause
2002-12-08 19:45 ` Kai Großjohann
2002-12-08 20:28 ` Sebastian D.B. Krause
2002-12-08 23:33 ` Martin Rohde
2002-12-09 7:49 ` Kai Großjohann
2002-12-09 14:02 ` Martin Rohde
2002-12-09 17:22 ` Kai Großjohann
2002-12-09 22:38 ` Martin Rohde
2002-12-10 18:30 ` Martin Rohde
2002-12-11 4:13 ` kgreiner
2002-12-11 20:05 ` Martin Rohde
2002-12-11 21:09 ` kgreiner
2002-12-12 11:37 ` Kai Großjohann
2002-12-13 15:41 ` Martin Rohde [this message]
2002-12-13 16:24 ` Kai Großjohann
2002-12-13 17:18 ` Martin Rohde
2002-12-14 12:52 ` Kai Großjohann
2002-12-14 14:11 ` Martin Rohde
2002-12-11 8:21 ` Kai Großjohann
2002-12-09 8:36 ` Kai Großjohann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87isxydiz0.fsf@gmx.de \
--to=martin.rohde@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).