From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/64992 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: closing all inactive server connections Date: Mon, 30 Jul 2007 11:39:59 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1185810112 27992 80.91.229.12 (30 Jul 2007 15:41:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 30 Jul 2007 15:41:52 +0000 (UTC) Cc: ding@gnus.org To: Katsumi Yamaoka Original-X-From: ding-owner+M13502@lists.math.uh.edu Mon Jul 30 17:41:46 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1IFXNQ-0003b0-IA for ding-account@gmane.org; Mon, 30 Jul 2007 17:41:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1IFXMR-0005El-Ey; Mon, 30 Jul 2007 10:40:43 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1IFXMP-0005EM-QR for ding@lists.math.uh.edu; Mon, 30 Jul 2007 10:40:41 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1IFXMJ-00061f-K0 for ding@lists.math.uh.edu; Mon, 30 Jul 2007 10:40:41 -0500 Original-Received: from blockstar.com ([170.224.69.95] helo=mail.blockstar.com) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1IFXMI-0006ii-00 for ; Mon, 30 Jul 2007 17:40:34 +0200 Original-Received: from tzz.local (unknown [69.25.70.4]) by mail.blockstar.com (Postfix) with ESMTP id BCF283F8421; Mon, 30 Jul 2007 08:46:27 -0700 (PDT) X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Followup-To: Katsumi Yamaoka , ding@gnus.org In-Reply-To: (Katsumi Yamaoka's message of "Mon, 30 Jul 2007 15:22:50 +0900") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (darwin) X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:64992 Archived-At: On Mon, 30 Jul 2007 15:22:50 +0900 Katsumi Yamaoka wrote: >>>>>> Ted Zlatanov wrote: >> On Fri, 27 Jul 2007 13:06:14 -0400 Ted Zlatanov wrote: TZ> Here's a version of gnus-server-close-all-servers that works on all the TZ> server in the buffer. I preserved the old (buggy I think) behavior with TZ> the `some' parameter. Can I commit this change? It works for me. >> I had to revise the function, apparently I need both lists. >> (defun gnus-server-close-all-servers () >> "Close all servers." >> (interactive) >> (let ((servers (append >> gnus-inserted-opened-servers >> gnus-server-alist))) >> (dolist (server servers) >> (gnus-server-close-server (car server))))) >> I tested this on several Gnus setups and it seems OK. KY> I can agree to this change if it is really helpful to you. But KY> you still need to type `C-g' for almost servers when the VPN is KY> disconnected, don't you? Even so, is it really helpful to you? KY> I don't have a problem like yours and don't know how to reproduce KY> it without VPN, so don't know how to solve it so far. Yes, I need C-g, but I don't need to 1) go to each opened server 2) press C 3) press C-g (repeat 3-4 times for each foreign server that's hung) now I just 1) M-c 2) press C-g for whatever hangs. Much better user experience. Of course, avoiding the C-g would be even better; my other question in the original e-mail was if I can tell Emacs all these connections are truly dead so Gnus doesn't hang trying to close them. KY> In addition, isn't it unnecessary to use `let'? I mean: KY> (defun gnus-server-close-all-servers () KY> "Close all servers." KY> (interactive) KY> (dolist (server gnus-inserted-opened-servers) KY> (gnus-server-close-server (car server))) KY> (dolist (server gnus-server-alist) KY> (gnus-server-close-server (car server)))) KY> or KY> (defun gnus-server-close-all-servers () KY> "Close all servers." KY> (interactive) KY> (dolist (server (append gnus-inserted-opened-servers gnus-server-alist)) KY> (gnus-server-close-server (car server)))) I was debugging, so the variable was handy. I am OK with your version. TZ> Unfortunately there were tabs in the gnus-srvr.el file (aren't we TZ> supposed to use untabify?) so the patch comes out too long. KY> I cannot understand what you want to do. gnus-srvr.el in the CVS KY> trunk uses tabs for the indentations that require eight or more KY> characters width (except for only one line). The reason the patch KY> is big should be that you, some program or other untabified them. KY> Do you think that it should be applied to all the Gnus sources? KY> I don't agree. IMO, whoever changes the Gnus sources should use KY> the default value for the `indent-tabs-mode' variable. I was told by Lars a while ago to use untabify on Gnus commits, so I do as a general rule. That's what I mean by my question "aren't we supposed to use untabify?" I didn't know the convention had changed, that's all. I'm happy to stick with whatever is the current convention. Let me know if you want me to commit the change, or if you'll commit your version instead. Thanks Ted