From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Window configurations Date: Tue, 04 May 2010 19:12:20 +0300 Organization: JURTA Message-ID: <87bpcv1wvt.fsf@mail.jurta.org> References: <4BB4CF6B.2000007@alice.it> <87vdbhgqgd.fsf@mail.jurta.org> <828BB36311A84C43B96D1F2A559DACAE@us.oracle.com> <87d3xo662u.fsf@mail.jurta.org> <69D40D69CC6F4982A8E91D8D8F0F494F@us.oracle.com> <87r5m4hz39.fsf@mail.jurta.org> <4BD40821.70808@gmx.at> <87zl0rtmqy.fsf@mail.jurta.org> <871vdu6qn5.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1273036084 25193 80.91.229.12 (5 May 2010 05:08:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 5 May 2010 05:08:04 +0000 (UTC) Cc: martin rudalics , Emacs To: Ken Hori Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 05 07:08:03 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O9Wq2-0007eg-Sv for ged-emacs-devel@m.gmane.org; Wed, 05 May 2010 07:08:03 +0200 Original-Received: from localhost ([127.0.0.1]:35933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9Wq2-0005ef-9f for ged-emacs-devel@m.gmane.org; Wed, 05 May 2010 01:08:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9Ktk-00024p-9u for emacs-devel@gnu.org; Tue, 04 May 2010 12:23:04 -0400 Original-Received: from [140.186.70.92] (port=41107 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9Kth-00022p-O6 for emacs-devel@gnu.org; Tue, 04 May 2010 12:23:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9Ktc-00087d-1X for emacs-devel@gnu.org; Tue, 04 May 2010 12:23:01 -0400 Original-Received: from smtp-out1.starman.ee ([85.253.0.3]:49339 helo=mx1.starman.ee) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9Ktb-00087R-PD for emacs-devel@gnu.org; Tue, 04 May 2010 12:22:56 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.30.129.cable.starman.ee [82.131.30.129]) by mx1.starman.ee (Postfix) with ESMTP id 84B173F4104; Tue, 4 May 2010 19:22:53 +0300 (EEST) In-Reply-To: (Ken Hori's message of "Sun, 2 May 2010 20:31:56 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:124516 Archived-At: > My point was that you wound't be able to open a file without > knowing buffer-file-name once emacs gets closed. In particular, > if a window-configuration-sexp doesn't contain such a thing as > buffer-file-name, you wound't be able to reconstruct > >> (setq buffer1 (find-file-noselect "")) > > since gets lost upon exit. Of course you can > store for each file buffer "somewhere", but I > thought the point of having window-configuration-sexp's is to > save that kind of extra work and provide a canonical way of > restoring frame states. The point of set-window-configuration-from-sexp is to restore the configuration of windows, not to duplicate the functionality of desktop.el. > I was hoping that ideally emacs would hold buffer-file-name's in > the sexp and let the user specify a "buffer-recovery-function" to > recover a frame state as well as buffers, so that, hypothetically, > > (restore-window-configuration-from-sexp > a-window-configuration-sexp 'live-p #'find-file-noselect) > > would restore buffers as well as a window configuration. It is the purpose of desktop.el to save and restore buffers. It provides a special "hook" `desktop-save-buffer' where packages can save their buffer info to be able to restore them later. If you don't want to use desktop.el, perhaps you could take a look at bookmark.el. -- Juri Linkov http://www.jurta.org/emacs/