From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 19859 invoked from network); 2 May 2020 10:21:27 -0000 Received: from lists1.math.uh.edu (129.7.128.208) by inbox.vuxu.org with ESMTPUTF8; 2 May 2020 10:21:27 -0000 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.92.3) (envelope-from ) id 1jUpGF-0006uW-De; Sat, 02 May 2020 05:20:43 -0500 Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1jUpGA-0006rc-Nl for ding@lists.math.uh.edu; Sat, 02 May 2020 05:20:38 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx1.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1jUpG9-0005W3-98 for ding@lists.math.uh.edu; Sat, 02 May 2020 05:20:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=946PD6Ty1JZse6vwLUm4jw3KRvqurCESa9hFIxZFz2g=; b=sSAPNdbOqQtYxd/8kAIKTkIfw7 fWVBpwVMyFl9GN+KHUqO5Zhjk2RDl0tW0u7BE36SbqsI1Ct0AujbsNjsQ8wym6Wrr7Q7KzZ6MgMJj wiVYTRKD4AD+Ze0+Udg6lybYdBQfqE8dUOOIwuxzdABp1QnE+jrKllM48LO7/0rU48ms=; Received: from zplane.randomsample.de ([2a03:4000:42:1a1:9400:eeff:feb4:c8a0]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUpFv-0001Wk-S3; Sat, 02 May 2020 12:20:32 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding: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=946PD6Ty1JZse6vwLUm4jw3KRvqurCESa9hFIxZFz2g=; b=jrELZZ+MvtRVFlJbClpx9fQV5 Cppo6nC4ItFde455CkQuhXSHfUt1JIa/sEfw5LjkowM2HLL3WfX+3hB23s3lGE31C50z6k2aGTfwd ObZkXOguc8bslhjb3FMPWIjdu7d23qY+eu0UBCeX5wdjuiTXxqt/wUZzgA2Cwuk3+EJGGEwyiGx7y Wrd5sAnQmqrlBW2J/5VF2wJnPF02/c12ayuJIBf9GBK5Oo829EAqET1BfNu3V0geQZy+zGbea9qye L5p1hKriR70jj4IT8ufKW55R+j9gFMWkJeUIRVHuru3YVt1HJ38NIPXnVOm6c7/n8XG7pFpZO+7hs r8ssOZ6dg==; Received: from ip5f5abaee.dynamic.kabel-deutschland.de ([95.90.186.238] helo=void) by zplane.randomsample.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUpFt-0007lr-5c; Sat, 02 May 2020 12:20:21 +0200 From: David Engster To: Eric Abrahamsen Cc: Lars Ingebrigtsen , ding@gnus.org Subject: Re: new wifi connection = nntp timeout = Emacs restart? In-Reply-To: <874ksz89c3.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Fri, 01 May 2020 17:33:00 -0700") References: <87sgh3coxn.fsf@ericabrahamsen.net> <87o8rogew7.fsf@barthel.ch> <87zhb7mlf0.fsf@ericabrahamsen.net> <87a72t35ng.fsf@gnus.org> <87sggkeuvr.fsf@ericabrahamsen.net> <874kt01w30.fsf@gnus.org> <87r1w4boft.fsf@ericabrahamsen.net> <877dxwzjz6.fsf@gnus.org> <87mu6sbntb.fsf@ericabrahamsen.net> <87368kziq4.fsf@gnus.org> <87h7x0bm8p.fsf@ericabrahamsen.net> <87y2qcy2vb.fsf@gnus.org> <87mu6sc7hz.fsf@randomsample> <87imhgc58s.fsf@randomsample> <87sggja7hv.fsf@ericabrahamsen.net> <87d07ncrb3.fsf@randomsample> <874ksz89c3.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) Date: Sat, 02 May 2020 12:20:20 +0200 Message-ID: <878siad4ez.fsf@randomsample> MIME-Version: 1.0 Content-Type: text/plain List-ID: Precedence: bulk > David Engster writes: > >>> Hey, that's pretty handy! Just FYI, the function name is quoted >>> unnecessarily >> >> Oops... >> >>> and sleep-start is actually nil when it's going to sleep, >>> who knows why. >> >> Uhm, not for me. I just tested again to make sure. On sleep it is 't', >> on wakup it is nil. This is also the documented behavior: > > Huh, the first time I tried it, it only seemed to fire on wakeup (giving > me a nil). And I forgot that `gnus-close-all-servers' doesn't actually > redisplay the *Server* buffer, so was confusing myself. Yes, I noticed this as well. There's `gnus-close-server' and there's `gnus-server-close-server', and the latter does a bit more, like setting the server's status to 'closed' and updating the server buffer. I don't think it matters for the connection, though, it's just confusing. > On wakeup all my nnimap servers were denied, but I'm sure it's just a > matter of messing with it sufficiently. I'll try this for a while and see how it goes. I think this could be expanded, like for instance checking for 'State' of NetworkManager before trying to open servers that require an active connection. For the record, this is what I'm using now: (require 'dbus) (defun my-go-to-sleep-handler (sleep-start) (when sleep-start (message "Gnus: Machine going to sleep, closing connections") (gnus-close-all-servers))) (dbus-register-signal :system "org.freedesktop.login1" "/org/freedesktop/login1" "org.freedesktop.login1.Manager" "PrepareForSleep" 'my-go-to-sleep-handler) (defun my-network-state-handler (name change-vals change-novals) (let ((state (assoc "State" change-vals))) (when (and state (= (caadr state) 30)) (message "Gnus: Networking going down, closing servers.") (gnus-close-all-servers)))) (dbus-register-signal :system "org.freedesktop.Networkmanager" "/org/freedesktop/NetworkManager" "org.freedesktop.DBus.Properties" "PropertiesChanged" 'my-network-state-handler) -David