From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Save on losing focus in Emacs Date: Sun, 01 Jul 2007 22:53:53 +0200 Organization: University Koblenz-Landau Campus Koblenz Message-ID: <87ved33kwu.fsf@baldur.tsdh.de> References: <1183296351.525348.241650@k29g2000hsd.googlegroups.com> <93lke0b30s.fsf@freenet.de> <1183312602.898349.319670@q69g2000hsb.googlegroups.com> <85fy47zxwb.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1183326109 16470 80.91.229.12 (1 Jul 2007 21:41:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 1 Jul 2007 21:41:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 01 23:41:47 2007 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I57At-0003Bg-4F for geh-help-gnu-emacs@m.gmane.org; Sun, 01 Jul 2007 23:41:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I57As-0001dH-Ns for geh-help-gnu-emacs@m.gmane.org; Sun, 01 Jul 2007 17:41:42 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!oleane.net!oleane!news.in2p3.fr!in2p3.fr!kanaga.switch.ch!switch.ch!news.belwue.de!news.uni-kl.de!cache.uni-koblenz.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-NNTP-Posting-Host: dslb-084-063-019-184.pools.arcor-ip.net Original-X-Trace: cache.uni-koblenz.de 1183323235 29417 84.63.19.184 (1 Jul 2007 20:53:55 GMT) Original-X-Complaints-To: news@cache.uni-koblenz.de Original-NNTP-Posting-Date: Sun, 1 Jul 2007 20:53:55 +0000 (UTC) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAD1BMVEW2mhnYvEn26qD+/vbC t5CEWCLiAAAACXBIWXMAAAsSAAALEgHS3X78AAAATnRFWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYA CmV4aWYKICAgICAgMjAKNDU3ODY5NjYwMDAwNGQ0ZDAwMmEwMDAwMDAwODAwMDAwMDAwMDAwMAqJ uBZbAAAACXZwQWcAAAAwAAAAMADO7oxXAAABkElEQVQ4y3WTDZLCIAyFQ08A6AFK0gNowgG6de9/ pn2Bau22ZRyF+ZKXX8lOjqZs1K9i+gUmStKAxmzTsjlECtwBEUfKb1CJKDvQkfwEWUFZCsD0shpi I8MbZAWoQWNI+KS3S2VhACaolwSAXzGkUD0ok7q4liwID4vFJAGEG1DIorDV4pGmXBCKka7GJPb0 ItwlIMHsHkJQMftlPKQQIVDA+wmAXgi70pg5pTyiGwC5t2SCw0LBOHNJ3oDH2sQf2CciETXNMLKx A82IhtCtbV6kQsJfT+aYuJB8+jtIA/OQiK3QNpDUgZeMtDYA7QZQl0fsUn6rK4heE+I36+WFvnMH paVobYJ6l5Ztr0M+IlgQr0vMvlKRPj0X5R1oDuXmXnICpDV9B6ooeugX//oCs2ry8dlzDyCASd2O HtNg2CC/jbwDMybYd24PoMSx8HugG3gMUoZtIhuYuRV3ANXX8XUCvIBRjkDjDStgR1CD/PuDrmDM dg7i6xwclVZQDkoriHwB7nYBlgugcgXsSurk/AEJvb3wF7X09QAAABp6VFh0anBlZzpjb2xvcnNw YWNlAAB42jMCAAAzADOJOCM1AAAAJnpUWHRqcGVnOnNhbXBsaW5nLWZhY3RvcgAAeNozqjDSMaww BGEAEYMC6T2XL08AAAAASUVORK5CYII= User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:VEJMXLm00UxQxWGSjeZ23t8f70s= Original-Xref: shelby.stanford.edu gnu.emacs.help:149829 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:45417 Archived-At: David Kastrup writes: Hi David, > Try advising the following function, [...] > handle-switch-frame is an interactive built-in function in `C source code'. > It is bound to . > (handle-switch-frame EVENT) I tried it, but it only works if I switch from one emacs frame to another emacs frame. ,----[ ~/.emacs ] | (defadvice handle-switch-frame (before save-some-buffers-advice activate) | "Save all file buffers if emacs looses focus." | (save-some-buffers t)) `---- The OP wants emacs to save all files when switching to other applications like a browser (that's not an emacs browser in another frame). Any ideas? Bye, Tassilo -- No person, no idea, and no religion deserves to be illegal to insult, not even the Church of Emacs. (Richard M. Stallman)