From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: aaermolov@gmail.com Newsgroups: gmane.emacs.devel Subject: Re: HowTo: Detect Laptop waking up from suspend from Emacs Date: Sat, 11 Feb 2017 11:55:09 +0300 Message-ID: <878tpdjedu.fsf@laptoptop.i-did-not-set--mail-host-address--so-tickle-me> References: <22686.27448.427789.633250@gargle.gargle.HOWL> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1486803352 4137 195.159.176.226 (11 Feb 2017 08:55:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Feb 2017 08:55:52 +0000 (UTC) To: raman@google.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 11 09:55:46 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 1ccTT8-0000fg-1x for ged-emacs-devel@m.gmane.org; Sat, 11 Feb 2017 09:55:46 +0100 Original-Received: from localhost ([::1]:47573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccTTD-0003Sg-Fc for ged-emacs-devel@m.gmane.org; Sat, 11 Feb 2017 03:55:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccTSg-0003SY-Rw for emacs-devel@gnu.org; Sat, 11 Feb 2017 03:55:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ccTSd-00043O-Qk for emacs-devel@gnu.org; Sat, 11 Feb 2017 03:55:18 -0500 Original-Received: from mail-lf0-x231.google.com ([2a00:1450:4010:c07::231]:35286) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ccTSd-00042p-JU for emacs-devel@gnu.org; Sat, 11 Feb 2017 03:55:15 -0500 Original-Received: by mail-lf0-x231.google.com with SMTP id n124so32777333lfd.2 for ; Sat, 11 Feb 2017 00:55:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=UvRxia06LnLb21U1qT+H/TPR4Q++aVgoEpvfP7lk/+4=; b=QladpCz8V5C7m2SZd0AlVew/qweAF06pRZIY7XSJj+gT4QNqCHgF2XAwp2C4WIger4 6zu6c+Wfp9ixE+WdNB+b40k7q7maTzwhj25D6RMLxqplKIXwWOT27iAW4HwMliCftm85 8SgOBhAegf3nIRngUta+8oSQEUql7F3pdhx5X5UfozsobFTxNWdGoPR3PVN2IK2lwi/U i/ICmEa1o87sGnoogSUvmmSmveGtpb/cgexjfk5RSEsenzNwSYxKqHGSJVPVziNLfgiA LrUMiu9GLkajelwbFgbUvo1+Qv466kYOmWTHTockkAbN5ZZv0PzYhNPk3lPtdnchOz2L WDNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=UvRxia06LnLb21U1qT+H/TPR4Q++aVgoEpvfP7lk/+4=; b=EVbgiKoixmuHLTczMAPjyQPz2sGKTIPH+FMYG0Pm3BnnZD8Uy4o4xaTmQa/N0Iq/ms jgDLSb84iY9AQBHlgspLrqYI4lYL8bZMEePRDukC8oAUiHuK+FGZto3Uxhhn15ezd6/z CWSUgbFFjvQc8rXpQVi04BsjLNfT7YzNFYFYXS+gv0pB715iFCPWih2ifc4mezjdLFUK Jp0vqNLNOIsp+o0eOL5Qdzo0Yek2hGbNx3LKNoX+Jn65uFoiou9yz1PR/v2zcFr/EuS6 OJBcG0j770X5VEGTzvydFrO5yQpDZDC5DyYVKwBxoXulUr4uBIhOnNezRyj6wKUTUvs4 DI2A== X-Gm-Message-State: AMke39ltB3WA/NZQWIIGpY7CZLc/+/xQgXzCQLTJK1hoScdHfgjdW8FQkUsUu+IYIH2dNw== X-Received: by 10.25.193.145 with SMTP id r139mr4354294lff.73.1486803312604; Sat, 11 Feb 2017 00:55:12 -0800 (PST) Original-Received: from localhost (ppp109-252-44-18.pppoe.spdop.ru. [109.252.44.18]) by smtp.gmail.com with ESMTPSA id j24sm527398lfk.50.2017.02.11.00.55.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 11 Feb 2017 00:55:11 -0800 (PST) In-Reply-To: <22686.27448.427789.633250@gargle.gargle.HOWL> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::231 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:212222 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, depending on your Linux distro you may want to install acpid package (its name may vary), which brings your a bunch of files, presumably in /etc/acpi, which describes ACPI events along with handlers to run on them. Be wary of this functionality have no direct connection with suspending itself, AFAIK. For this you may use pm-utils/hibernate-script. Having all this, you may want to pay attention to lid.sh under /etc/acpi. cheers, Alex raman@google.com writes: > Background: > > I run Emacs as my primary environment -- ie I do everything in Emacs > on Linux. > > So when I open my laptop lid, my laptop wakes up from suspend and > Emacs is where I left off. > > I'd like to set things up so emacs runs a set of actions when the > laptop comes back from suspend -- typically, say 5 seconds after > wake-up. Here, all actions are emacs functions. > > So Q: > > From Emacs --- perhaps an idle-timer, how do I detect when the laptop > returns from suspend? > --=20 > > --=20 > > --=20 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEB3ti1VTUGbnAlLnVmGVYjLx0AQMFAlie0W4ACgkQmGVYjLx0 AQOwKQgAllUoFW39UhIPILqcfTXG8RiYPoD+ijHFRpwQHJPVFfnHXtMAtHmAIi8v T7ZGMvwXj5jkEZW9JuJ4TahjNTbepGP5SA5AOc2P0Tb7mNJp5EOZOx6INqmwSbAC 9WNEc7QkEAepXdb6w2JhTs0KlP5Y0/5Uehc0KDj9nzIvDJA1FgLuOn9rkQVk5ReY QDlY1NGLJeQtu1NqVS2ghjN1Rq5HkI8/NSMVKlvvo01DJiefobIpJYoYqbIhD0p6 Zsjgg+JJ0MayLeBIteZx2nFIfhkGG/iZkozMMfh9MlpFS2GkjWLGc70goQIzr+SH FxEdq4dsges7eBIk/mIXWFuvVXB09Q== =XIWa -----END PGP SIGNATURE----- --=-=-=--