unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: aaermolov@gmail.com
To: raman@google.com, emacs-devel@gnu.org
Subject: Re: HowTo: Detect Laptop waking up from suspend from Emacs
Date: Sat, 11 Feb 2017 11:55:09 +0300	[thread overview]
Message-ID: <878tpdjedu.fsf@laptoptop.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <22686.27448.427789.633250@gargle.gargle.HOWL>

[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]

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?
> -- 
>
> -- 
>
> -- 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2017-02-11  8:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11  1:39 HowTo: Detect Laptop waking up from suspend from Emacs raman
2017-02-11  8:55 ` aaermolov [this message]
2017-02-11  9:10 ` Michael Albinus
2017-02-11 16:28   ` raman
2017-02-11 16:40     ` Michael Albinus
2017-02-11 17:32       ` raman
2017-02-11 18:51         ` Michael Albinus
2017-02-11 20:56           ` raman
2017-02-13 17:50           ` T.V Raman
2017-02-13 19:02             ` Michael Albinus
2017-02-13 19:05               ` T.V Raman
2017-02-11 14:54 ` Stefan Huchler
2017-02-11 17:50 ` Tom Tromey
2017-02-11 20:57   ` raman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878tpdjedu.fsf@laptoptop.i-did-not-set--mail-host-address--so-tickle-me \
    --to=aaermolov@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=raman@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).