From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: raman Newsgroups: gmane.emacs.devel Subject: Re: HowTo: Detect Laptop waking up from suspend from Emacs Date: Sat, 11 Feb 2017 12:57:54 -0800 Message-ID: References: <22686.27448.427789.633250@gargle.gargle.HOWL> <8760kg4nxr.fsf@tromey.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1486846720 26209 195.159.176.226 (11 Feb 2017 20:58:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Feb 2017 20:58:40 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Tom Tromey Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 11 21:58:33 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccekZ-0006LR-Qy for ged-emacs-devel@m.gmane.org; Sat, 11 Feb 2017 21:58:31 +0100 Original-Received: from localhost ([::1]:49540 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccekf-0004sS-5G for ged-emacs-devel@m.gmane.org; Sat, 11 Feb 2017 15:58:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccek5-0004sJ-4x for emacs-devel@gnu.org; Sat, 11 Feb 2017 15:58:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ccek2-0008Ee-3n for emacs-devel@gnu.org; Sat, 11 Feb 2017 15:58:01 -0500 Original-Received: from mail-pf0-x234.google.com ([2607:f8b0:400e:c00::234]:33465) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ccek1-0008EW-U9 for emacs-devel@gnu.org; Sat, 11 Feb 2017 15:57:58 -0500 Original-Received: by mail-pf0-x234.google.com with SMTP id c73so14356156pfb.0 for ; Sat, 11 Feb 2017 12:57:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=03HqFwQCqz/iq/3lhq6xBE6RrhGafxBaf4CR5L9MFYQ=; b=fWgQJeBz5UMNKnghyzMvWlupjv+lMRapl/4rTLR+1r+TV+y4BsCWGIrn76oEWe4j1C q+tTYR2Fl14Gpaf21L10CY5qfhiVEVVgZg7c0hVAdyjaVAg7FGFBkG2bH9utcJ1CM6QT AkM38pSFNKPrw0XN1AA6/LSe94Qfqx1v1iGR7+d4ko6gRI9Kxz/67nJciNE0BM3p8agU J2ooUzbwYgii+4SDB9Rnzga+9rbyyZeSfR0Kw0vSA3LGv6RAiVT0tdCM3FW9/4NDUWHT R+YQhNRKCJr/wVTwZaOWrcdCfrzyff4xTkVwsaNWevPUZu4peCBZunV+z0bpOkp/ecHn PXIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=03HqFwQCqz/iq/3lhq6xBE6RrhGafxBaf4CR5L9MFYQ=; b=kNTCwlqKpNmbgvzejwyd1lHWhYq3RGdRyLA+esIA3F8ZIHGL1cG8wM9y+y6Px2mNUC ykwV735yZ0itzQWD0w8GzIF7f3zM6ARVoUw015TNbi0XaszjGnil9MiztOPmw3+6/nWZ lcY4QpXySuw6sWzLu+87ojUmKRAWbdAq4T8vDOuDGuYILsyM06fbVH+XFyrv5s8NqCTV P9WR2sYVowrkS4VqPYv7FtPaz1NwqMlspKed5gws84TaHhe4GtN5N1ZP1hWBRtEgQJhJ 8jy93fxhpeT20UtXQBtIjZ4Y6Ui34Sh+dXGzZFhMv4XEOIrOBVUXm6Qn/7aSRJWlKk0r MvIw== X-Gm-Message-State: AMke39lBMNjSVwvm+JXH7jF2+tFeKH9tOXntOSnH6mdMEMuZy17iPZALIhiYcfxb3I8tjMgQ X-Received: by 10.98.155.155 with SMTP id e27mr17483877pfk.140.1486846676439; Sat, 11 Feb 2017 12:57:56 -0800 (PST) Original-Received: from raman-glaptop2 (c-73-170-121-60.hsd1.ca.comcast.net. [73.170.121.60]) by smtp.gmail.com with ESMTPSA id y21sm6272396pgh.52.2017.02.11.12.57.55 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 11 Feb 2017 12:57:55 -0800 (PST) In-Reply-To: <8760kg4nxr.fsf@tromey.com> (Tom Tromey's message of "Sat, 11 Feb 2017 10:50:08 -0700") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212246 Archived-At: Tom Tromey writes: Looking at this now -- I was using a quick hack called nm.el that I had discovered a few years ago on the net. Speaking of network-manager, I have longed to get enwc to work on my Ubuntu laptop --- I have never succeeded in using it to setup a wifi network from scratch. Looking at your code now >>>>>> "raman" == raman writes: > > raman> I'd like to set things up so emacs runs a set of actions when the > raman> laptop comes back from suspend -- typically, say 5 seconds after > raman> wake-up. Here, all actions are emacs functions. > > Note that if you're specifically interested in being notified when the > network comes back up, there is a different way to do this with dbus. > See: > > https://github.com/tromey/emacs-network-manager > > Tom --