From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,RCVD_IN_DNSWL_LOW autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31698 invoked from network); 1 Oct 2020 16:02:46 -0000 Received: from lists1.math.uh.edu (129.7.128.208) by inbox.vuxu.org with ESMTPUTF8; 1 Oct 2020 16:02:46 -0000 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94) (envelope-from ) id 1kO12D-0005X2-1B; Thu, 01 Oct 2020 11:02:21 -0500 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kO127-0005V9-Ps for ding@lists.math.uh.edu; Thu, 01 Oct 2020 11:02:15 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kO125-00Dg2g-RT for ding@lists.math.uh.edu; Thu, 01 Oct 2020 11:02:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=VPE5hIZQGXM2G/47lceaTmjIpfdTae0jFZtUtk9PHY4=; b=ekRWepslprZApqClM/hTW7Mvrk JagM9qKpU5NQ2pOptzseKOtLGJgj4IVF46DhlzH4c60AP4AY7+yPSYnd9gIJNQIh4PI+oyOTe23Ic 6rA7hhNywWvUMwN9zrM8Oggqvue3AJkrFy4/p+L3b2/L3LrP6Q/3AHyo+bHyXMdGN25I=; Received: from ericabrahamsen.net ([52.70.2.18] helo=mail.ericabrahamsen.net) by quimby with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kO11x-0000D7-M2 for ding@gnus.org; Thu, 01 Oct 2020 18:02:09 +0200 Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 67334FA08E; Thu, 1 Oct 2020 16:02:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1601568122; bh=VPE5hIZQGXM2G/47lceaTmjIpfdTae0jFZtUtk9PHY4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=b9sE4WrKs7+Gn6aWsDoh0kdtxQcUqIsi+wmzQwYkx1i1P9Q3BPZV2MNhox4IKLzXM rVtX58GrNDhQceM1/1UlUotCvbCW+D0wCTk2KrGYqGSDem4CINb/tCh5ovyABcwRm3 X8vscXc0CGH1aQwMtMyCk/w4XIulAuE+sHCQrT0g= From: Eric Abrahamsen To: Tim Landscheidt Cc: ding@gnus.org Subject: Re: Constantly having to use `^' for server buffer to close then open server References: <87v9fukscq.fsf@local.lan> <87a6x656jy.fsf@passepartout.tim-landscheidt.de> Date: Thu, 01 Oct 2020 09:02:00 -0700 In-Reply-To: <87a6x656jy.fsf@passepartout.tim-landscheidt.de> (Tim Landscheidt's message of "Thu, 01 Oct 2020 15:06:57 +0000") Message-ID: <87wo0a5407.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-ID: Precedence: bulk Tim Landscheidt writes: > Harry Putnam wrote: > >> [=E2=80=A6] > >> Go to server buffer (`^') find the server. It appears normal and >> running. But I have to click `C' to close it, then `O' to open it. >> The opening part usually takes 10-15 seconds. Then I can go back to >> newsgroup and send my message (if I hurry). If I decide another >> messages is in order then the same process has to be done again. > >> [=E2=80=A6] > >> Seems there might be a bit of code I could call instead of going thru >> the steps in server buffer. > >> Or maybe something more direct to server to keep it alive. > >> Hopefully the cause is some user idiocy or other that can be fixed. > > I know the pain :-) (but it has not been that much of a > problem for more in the recent past). One minor improve- > ment: You do not have to open the server again (with O); > Gnus will do that automatically. Also there is M-c to close > all servers (which, again, is benign as Gnus will automati- > cally open those that it needs to). Over here, M-c is bound to `gnus-group-clear-data', which is a bit of a dangerous function! I think this has been a perennial problem for all of us. I recently added some dbus-related code so that, if you're using a laptop and putting it to sleep, Gnus will close all its servers first, so they get re-opened when the machine wakes. That's not quite the same problem, obviously. I know of two solutions, neither of them perfect. The first is to manually close the server(s) when you suspect they've been open too long. I've gotten in the habit of hitting "z" (gnus-group-suspend) when I haven't touched Gnus for a while. Suspend also clears out windows, which might be overkill. Really all that's necessary is this bit of code: (dolist (elem gnus-opened-servers) (gnus-close-server (car elem))) Or, probably: (gnus-close-server '(nntp "news.gmane.io")) The other solution is to set `nntp-connection-timeout' to a number of seconds. When you try to connect to the server and get no response before those number of seconds, Gnus signals `quit'. This isn't great because 1) you have to wait for the timeout even when it's obvious the connection is dead, and 2) the quit interrupts everything you're doing. It would be better if it gave you a message and skipped the operation, or even better, restarted the operation. NNTP doesn't support any kind of keepalive/ack protocol, from what I gather, so the only other solution would probably be to start a timer from the last successful command response, and then just silently close the connection when the timer is up.=20 > I never researched whether one could (or should) call > gnus-server-close-all-servers from outside the *Server* > buffer. >From a brief look at the code, it seems like it ought to work. I've never tried it either, though. Eric