From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Andrea Vettorello" Newsgroups: gmane.emacs.help Subject: X and EmacsClient Date: Fri, 18 May 2007 14:39:45 +0200 Message-ID: <7d5440240705180539x19b9d3e3sd3e801740ed29b57@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1179492008 17509 80.91.229.12 (18 May 2007 12:40:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 18 May 2007 12:40:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 18 14:40:07 2007 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 1Hp1ka-0001ZG-0W for geh-help-gnu-emacs@m.gmane.org; Fri, 18 May 2007 14:40:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hp1sm-0002Vv-BO for geh-help-gnu-emacs@m.gmane.org; Fri, 18 May 2007 08:48:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hp1sY-0002Vn-OH for help-gnu-emacs@gnu.org; Fri, 18 May 2007 08:48:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hp1sX-0002VY-3Z for help-gnu-emacs@gnu.org; Fri, 18 May 2007 08:48:18 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hp1sW-0002VV-SU for help-gnu-emacs@gnu.org; Fri, 18 May 2007 08:48:16 -0400 Original-Received: from an-out-0708.google.com ([209.85.132.250]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hp1kJ-0001bX-Fv for help-gnu-emacs@gnu.org; Fri, 18 May 2007 08:39:47 -0400 Original-Received: by an-out-0708.google.com with SMTP id c17so266190anc for ; Fri, 18 May 2007 05:39:46 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=GT3OmQWrwTHjRExNn9kzZAgVUbPXmC9Wy9tQdGGpmZMukcYQLqopJkBNNC6MbhRDpmB+SgO+LDci0IhpZznw1I5pKFtuMPrDxBpauIjvepsXG1fk6q+I4fOA5jmDsH+Ajf8Y2QhpLmojsEinvdle/UZiKACnhFX4mr2VMZf72Qk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=R4n/tuMtOIDICHcxFQvPQDBMkOyYNmY+mR2xLr3SkpYi0rbBhxbfpjCfwIFH5U+nE+gKytf8fqHcR5xNQ2hQ7sA/sud2My5/w+1w9KRMQtKltTccY45XZA6Ep9/Ibty9ofLaLTF3z+1my11ScIAHWECBtuOTkmzjNGIK5gjvlW4= Original-Received: by 10.100.138.2 with SMTP id l2mr1027636and.1179491985698; Fri, 18 May 2007 05:39:45 -0700 (PDT) Original-Received: by 10.100.35.20 with HTTP; Fri, 18 May 2007 05:39:45 -0700 (PDT) Content-Disposition: inline X-detected-kernel: Linux 2.6 (newer, 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:44137 Archived-At: I would like to run the "server-edit" command when clicking with the mouse to the close button of the eventually EmacsClient's opened frame, i.e. the window close button using the X parlance. I've looked on the Emacs documentation but i'm not sure i've understand completely the "delete-frame" event described in "Miscellaneous System Events". Do i need to intercept the "delete-frame" event or it's enough to add my functions on the "delete-frame-functions" variable? BTW i'm using a Debian Emacs 22.xx, seems delete-frame-hook is deprecated. I've tried to add "server-edit" to the "delete-frame-functions" variable and seems to work but i suspect it's a little clunky, as i've noted (not fatal) error messages. I think the "delete-frame" in "server-done-hook" isn't good either. The feeling is i'm doing a big mess. Could someone suggest a proper way? -- Andrea