From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: New session management patch. Date: 28 Feb 2002 16:36:50 +0100 Message-ID: <5xofi91uul.fsf@kfs2.cua.dk> References: <200202262249.XAA20211@gaffa.gaia.swipnet.se> <200202270551.g1R5p6k17632@aztec.santafe.edu> NNTP-Posting-Host: quimby2.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: quimby2.netfonds.no 1014910865 32311 195.204.10.66 (28 Feb 2002 15:41:05 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 28 Feb 2002 15:41:05 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 16gSg4-0008P3-00 for ; Thu, 28 Feb 2002 16:41:04 +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 16gSbU-00058R-00; Thu, 28 Feb 2002 10:36:20 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by fencepost.gnu.org with smtp (Exim 3.33 #1 (Debian)) id 16gSaw-00056g-00 for ; Thu, 28 Feb 2002 10:35:46 -0500 Original-Received: from kfs2.cua.dk.cua.dk (kfs2.local.filanet.dk [192.168.1.182]) by mail.filanet.dk (Postfix) with SMTP id 895347C035; Thu, 28 Feb 2002 15:35:44 +0000 (GMT) Original-To: Jan.Djarv@mbox200.swipnet.se In-Reply-To: <200202270551.g1R5p6k17632@aztec.santafe.edu> Original-Lines: 49 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 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:1637 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1637 "Jan D." writes: > ... > > I have incorporated your ideas almost verbatim, Your remark about the > problem of restore is well put. Also a default filename makes it > easier for functions to save state. > I think your patch is in very good shape now. RMS already commented on a few things, but other than that, there are only minor things I would like to suggest you change: 1) Maybe you should use [.]emacs-session.%s for the save file name rather than just [.]emacs.%s 2) The first line of the doc-string for emacs-session-save could be a little more generic, as the functionality is explained in the text, i.e. change: "Run the `emacs-save-session-functions' when window system is closing. into something like "This function is called when the window system wants emacs to terminate. If this function returns non-nil, the window system shutdown is cancelled. > But I haven't made variables for functions emacs-session-save and > emacs-session-restore. I figured that anyone can redefine the > functions if they so wish. > That is ok. Other parts of emacs "core" already calls lisp level functions in the same way. Richard Stallman writes: > + if (proglen+len+1 <= MAXPATHLEN) > + { > + char maybe[MAXPATHLEN+1]; > > That is an arbitrary limit, so please remove it. openp avoids having > such a limit. alloca is your friend :-) -- Kim F. Storm http://www.cua.dk _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel