From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: attaching to a running emacs process under linux? Date: Wed, 16 Jan 2008 21:24:21 +0200 Message-ID: References: <32dcc1d9-f51c-49b1-9dc2-e2727ac6aa6c@q77g2000hsh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1200511512 11186 80.91.229.12 (16 Jan 2008 19:25:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Jan 2008 19:25:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 16 20:25:29 2008 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 1JFDtA-0008Ld-OL for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Jan 2008 20:25:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JFDsl-0005kn-Qj for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Jan 2008 14:25:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JFDs5-0005bW-GJ for help-gnu-emacs@gnu.org; Wed, 16 Jan 2008 14:24:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JFDs3-0005aq-LE for help-gnu-emacs@gnu.org; Wed, 16 Jan 2008 14:24:20 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JFDs3-0005ak-Fe for help-gnu-emacs@gnu.org; Wed, 16 Jan 2008 14:24:19 -0500 Original-Received: from romy.inter.net.il ([213.8.233.24]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JFDs3-0003lr-35 for help-gnu-emacs@gnu.org; Wed, 16 Jan 2008 14:24:19 -0500 Original-Received: from HOME-C4E4A596F7 (IGLD-84-228-249-38.inter.net.il [84.228.249.38]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id JXV03510 (AUTH halo1); Wed, 16 Jan 2008 21:24:00 +0200 (IST) In-reply-to: <32dcc1d9-f51c-49b1-9dc2-e2727ac6aa6c@q77g2000hsh.googlegroups.com> (message from ivowel on Tue, 15 Jan 2008 18:18:18 -0800 (PST)) X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) 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:50761 Archived-At: > From: ivowel > Date: Tue, 15 Jan 2008 18:18:18 -0800 (PST) > > > is there a way to send a shell signal to ask emacs nicely to save all > its open buffers? I sometimes forget to save my buffers, then go > somewhere else and ssh into the original machine, just to find that > emacs still has my unsaved changes. Read about sigusr1 and sigusr2 events in the "Misc Events" node of the ELisp manual. You will need to write some Lisp in your ~/.emacs to bind these events to some function that calls save-some-buffers or some such. If worse comes to worst, you can always send SIGTERM to Emacs: Emacs always auto-saves before it terminates in an abnormal fashion.