unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Save on losing focus in Emacs
Date: Sun, 01 Jul 2007 22:12:20 +0200	[thread overview]
Message-ID: <85fy47zxwb.fsf@lola.goethe.zz> (raw)
In-Reply-To: 1183312602.898349.319670@q69g2000hsb.googlegroups.com

Sergey Pariev <spariev@gmail.com> writes:

> Thanks for the answer.
> Yes, I see, of course, I can type 'C-x s' all the time. But the whole
> idea is to have buffers saved automagically every time I leave Emacs
> and save myself from typing there keystrokes - it may look like a
> small detail, but believe me, it's extremely convinient when doing,
> for example, web development, when you frequently switch to browser to
> check the results of your changes.

Try advising the following function, or binding yourself to
switch-frame.

handle-switch-frame is an interactive built-in function in `C source code'.
It is bound to <switch-frame>.
(handle-switch-frame EVENT)

Handle a switch-frame event EVENT.
Switch-frame events are usually bound to this function.
A switch-frame event tells Emacs that the window manager has requested
that the user's events be directed to the frame mentioned in the event.
This function selects the selected window of the frame of EVENT.

If EVENT is frame object, handle it as if it were a switch-frame event
to that frame.

[back]


-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2007-07-01 20:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-01 13:25 Save on losing focus in Emacs Sergey Pariev
2007-07-01 14:40 ` Emilio Lopes
2007-07-01 17:56   ` Sergey Pariev
2007-07-01 20:12     ` David Kastrup [this message]
2007-07-01 20:53       ` Tassilo Horn
2007-07-02  9:02         ` Tim X
2007-07-02  9:41           ` Tassilo Horn
2007-07-02 15:01             ` Why doesn't Emacs have a horizontal scroll bar? brianjiang
2007-07-02 15:58               ` Peter Dyballa
2007-07-02 16:25                 ` Lennart Borgman (gmail)
2007-07-02 17:53                   ` Peter Dyballa
     [not found]                 ` <mailman.2967.1183393563.32220.help-gnu-emacs@gnu.org>
2007-07-02 16:49                   ` Pascal Bourguignon
2007-07-03 20:51                     ` Dieter Wilhelm
     [not found]                     ` <mailman.3029.1183495887.32220.help-gnu-emacs@gnu.org>
2007-07-03 22:16                       ` David Kastrup
2007-07-03 22:45                         ` David Kastrup
2007-07-04  5:58                         ` Dieter Wilhelm
     [not found]                         ` <mailman.3044.1183528715.32220.help-gnu-emacs@gnu.org>
2007-07-04 17:16                           ` David Kastrup
2007-07-05  6:37                     ` Andreas Röhler
2007-07-05  7:11                     ` Gordon Beaton
2007-07-05  7:56                       ` Peter Dyballa
2007-07-02 19:04             ` Save on losing focus in Emacs Sergey Pariev

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=85fy47zxwb.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).