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 18694 invoked from network); 1 May 2020 09:48:00 -0000 Received: from lists1.math.uh.edu (129.7.128.208) by inbox.vuxu.org with ESMTPUTF8; 1 May 2020 09:48:00 -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 1jUSGC-0001FX-Lt; Fri, 01 May 2020 04:47:08 -0500 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1jUSG9-0001Cr-6T for ding@lists.math.uh.edu; Fri, 01 May 2020 04:47:05 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1jUSG5-0002NL-EV for ding@lists.math.uh.edu; Fri, 01 May 2020 04:47:05 -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=+cv377fjXgnpE5NMkjOO0SguRhAuQ6UQiBcLTfJP6NM=; b=dg+69OxPvA5mq9am+4dq4DivV1 aav5CW/cg6WSc+Xttezpu+1gGDsHNmcAPnXKovJCFIJZS2u3AygKrCUY+Q5bqbwZxQ/OGi1oS1U8Y awtOQev8uJN1cZWHwJvBkeoToO9G6iubBgruiZAqA84DI44LaBs9LYykBUQy7zUKOSuo=; 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 1jUSFv-00080C-BV; Fri, 01 May 2020 11:46:55 +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=+cv377fjXgnpE5NMkjOO0SguRhAuQ6UQiBcLTfJP6NM=; b=PqITcWGjq3rZM3QLKjSUxpalb aLJ/jgzKkeWESuMT5SXAdS9l9AzZCav9LYIE+Rcezh1iDcmVKweASvF9SQbGAAhxivO8/WrSyer58 S3Sm22R9iQqtrNS1CPZVgxBryEJJlCV9Zt1lFJKs1ORvLHm7as7sJHfJmrUMLnOVFdD27jPrOeUrz 7BejWzo63u5gbPdQPrg+DXLTBH23UwKT/ll9CcuVqK0YmtwnpV9d/Eiwc0ADx4LWktpAqzGPCd9p6 nHD5CJQgugoC+CPDyNY2JKUW1GnALI3DVOTOtXf/jOnMVoBGZzaX21sWgel5CWc5Yq+yNvnJ5wif7 CIdD0DHCA==; 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 1jUSFt-0003yw-AX; Fri, 01 May 2020 11:46:49 +0200 From: David Engster To: Lars Ingebrigtsen Cc: Eric Abrahamsen , ding@gnus.org Subject: Re: new wifi connection = nntp timeout = Emacs restart? In-Reply-To: <87y2qcy2vb.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 01 May 2020 01:23:36 +0200") 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> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) Date: Fri, 01 May 2020 11:46:48 +0200 Message-ID: <87mu6sc7hz.fsf@randomsample> MIME-Version: 1.0 Content-Type: text/plain List-ID: Precedence: bulk > Eric Abrahamsen writes: > >> Oh I see. I was assuming that adding connection closing to >> nnimap-keepalive would make the NOOP-prepend mechanism unnecessary. >> Seems like we'd only need one of the two, so long as whatever it was >> came with teeth (closing the connection). > > nnimap-keepalive-connection-drop doesn't help with the common "I just > woke my laptop up and now `g' hangs" situation. Another possiblity: Instead of trying to detect dead connections, let's try to get notified when networking has changed and react accordingly. I think this is what those "apps" do on mobiles? On GNU/Linux my guess is the lowest common denominator nowadays for doing stuff like this is systemd and DBus? It's actually surprisingly easy to do this in Emacs if you know what to fill in: (require 'dbus) (defun my-dbus-handler (interface-name values novals) (message "Change registered on: %s" interface-name) (message "Changed values: %s" (prin1-to-string values)) (message "Changed without value: %s" (prin1-to-string novals))) (dbus-register-signal :system "org.freedesktop.systemd1" "/org/freedesktop/systemd1/unit/networking_2eservice" "org.freedesktop.DBus.Properties" "PropertiesChanged" 'my-dbus-handler) Now do "systemctl restart networking.service" and watch all these spiffy messages. This is on Debian 10, I'm hoping it's at least similar on other systems? You can inspect this stuff with 'busctl', for instance: busctl tree org.freedesktop.systemd1 busctl introspect org.freedesktop.systemd1 /org/freedesktop/systemd1/unit/networking_2eservice I have no idea if this is "The Best Way", probably not. Also, I'm not seeing anything on resuming, but maybe there's another path for that...? Or maybe I'm not letting my laptop sleep long enough? -David