From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Session management patch, please comment. Date: Wed, 20 Feb 2002 15:13:32 -0700 (MST) Message-ID: <200202202213.g1KMDWN13533@aztec.santafe.edu> References: <200202171911.UAA02993@gaffa.gaia.swipnet.se> <200202190637.g1J6b6E15641@santafe.santafe.edu> <3C72B1AF.6090202@mbox200.swipnet.se> Reply-To: rms@gnu.org NNTP-Posting-Host: quimby2.netfonds.no X-Trace: quimby2.netfonds.no 1014243459 3830 195.204.10.66 (20 Feb 2002 22:17:39 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 20 Feb 2002 22:17:39 GMT Cc: emacs-devel@gnu.org Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16df3S-0000zg-00 for ; Wed, 20 Feb 2002 23:17:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16df2e-00011u-00; Wed, 20 Feb 2002 17:16:48 -0500 Original-Received: from pele.santafe.edu ([192.12.12.119]) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16dezW-0000dC-00; Wed, 20 Feb 2002 17:13:35 -0500 Original-Received: from aztec.santafe.edu (aztec [192.12.12.49]) by pele.santafe.edu (8.11.6+Sun/8.9.3) with ESMTP id g1KMDZu21332; Wed, 20 Feb 2002 15:13:35 -0700 (MST) Original-Received: (from rms@localhost) by aztec.santafe.edu (8.10.2+Sun/8.9.3) id g1KMDWN13533; Wed, 20 Feb 2002 15:13:32 -0700 (MST) X-Authentication-Warning: aztec.santafe.edu: rms set sender to rms@aztec using -f Original-To: Jan.Djarv@mbox200.swipnet.se In-reply-to: <3C72B1AF.6090202@mbox200.swipnet.se> (Jan.Djarv@mbox200.swipnet.se) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: quimby.gnus.org gmane.emacs.devel:1368 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1368 Well, actually I didn't even want this function, but I could not find another way to call C from lisp. It is not meant to be "external", rather a link between the C part and the lisp part of the session management code. It is a good idea to document it clearly anyway, even though it is not meant for general use. The doc string can say "Don't call this yourself." "End interaction as a response to save_yourself. A session manager can tell Emacs that the window system is shutting down by sending Emacs a save_yourself message. Emacs then executes functions in `save-yourself-hook'. After that, this function shall be called to inform the session manager that it can continue or abort shutting down the window system. If the argument CANCEL is non-nil, Emacs will tell the session manager to cancel the shutdown." That is good, except for "this function shall be called", which is vague. What code is supposed to call this function? How about this (a bit long perhaps): "The previous session id Emacs got from session manager. If Emacs is running on a window system that has a session manager, the session manager gives Emacs a session id. It is feasible for Emacs lisp code to use the session id to save configuration in, for example, a file with a file name based on the session id... That is good. The idea was that as functions in save-yourself-hook are executing, they might interact with the user, for instance pop up a dialog. That dialog can have the possibility to cancel the whole window system shutdown. If the lisp code wants to do that, it shall set this variable to something non-nil. Please document that clearly (but don't use "shall"). _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel