From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: How to restore the layout? Date: Fri, 5 Jul 2013 17:26:53 +0200 Message-ID: References: <51C5AA68.4000204@alice.it> <83fvw2g44j.fsf@gnu.org> <51CE9B05.1090202@gmx.at> <51CFFBED.7090400@gmx.at> <51D02AB0.5070103@gmx.at> <51D5DE14.4090507@alice.it> <51D600D8.90801@alice.it> <51D67990.3090800@gmx.at> <51D6D1E1.10902@alice.it> <51D6E480.80407@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1373038061 23035 80.91.229.3 (5 Jul 2013 15:27:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Jul 2013 15:27:41 +0000 (UTC) Cc: Emacs developers , Angelo Graziosi To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 05 17:27:42 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Uv7v9-0005S4-6X for ged-emacs-devel@m.gmane.org; Fri, 05 Jul 2013 17:27:39 +0200 Original-Received: from localhost ([::1]:47201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uv7v8-0004Bc-Oa for ged-emacs-devel@m.gmane.org; Fri, 05 Jul 2013 11:27:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uv7v5-00048a-70 for emacs-devel@gnu.org; Fri, 05 Jul 2013 11:27:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uv7v3-0006nt-Rg for emacs-devel@gnu.org; Fri, 05 Jul 2013 11:27:35 -0400 Original-Received: from mail-ie0-x234.google.com ([2607:f8b0:4001:c03::234]:41664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uv7v3-0006nc-Mu for emacs-devel@gnu.org; Fri, 05 Jul 2013 11:27:33 -0400 Original-Received: by mail-ie0-f180.google.com with SMTP id f4so5496650iea.39 for ; Fri, 05 Jul 2013 08:27:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=Aaf49L3afLTtpJ9aLaBX0+3Wk6c5W+qksOqgk2kCiT4=; b=CbdQ8CqTbeKSo3HDInaOUAU19/BsU3rrG/7lD6p/821BaI+e1o9EUp+eGYb5HC3BUh nCFqgo8ZjY89n63w+H/zz4sLWulrkrRtlDoOcsBrx3pm07dI84EybjnCXAHRLA1O5ESj /E11nbuTdi+gqYwtDSbAemBxRYUxuK13EQy841+5O1cQZFYHr1K1g5YzMlujKNrGUlKs CPuxGKgX9H/Wfx9/V66loD2fHkYFesyRUtN/nm81DgGPfY5m0/VtNGfq2PI24EJOj60V PeICEcHQOD9EPyqAOBcpLb9p8Synnnr9HhA+np76siHAtU/igIzSfymj1Xl/5W8UBPhL hz5Q== X-Received: by 10.50.122.65 with SMTP id lq1mr4849079igb.11.1373038053137; Fri, 05 Jul 2013 08:27:33 -0700 (PDT) Original-Received: by 10.64.250.7 with HTTP; Fri, 5 Jul 2013 08:26:53 -0700 (PDT) In-Reply-To: <51D6E480.80407@gmx.at> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:161596 Archived-At: On Fri, Jul 5, 2013 at 5:21 PM, martin rudalics wrote: > `window-state-put' doesn't know anything about files. It simply expects > the window's buffer to be there. Of course. > But we can easily replace > > (set-window-buffer window (get-buffer-create (car state))) > > by, for example, > > (set-window-buffer window (or (get-buffer (car state)) > (get-buffer-create "*scratch*"))) > > If we saved and restored window-local buffer lists, we could show the > previous buffer on that window's list instead. That (restoring buffer lists) would be better, but still it is possible that no previous buffer can be found, so creating *scratch* or defaulting to something else will still be required. > Two remarks: I never heard about `get-buffer-create' creating any files > or directories. I think Angelo was just a bit sloppy with his terminology. > And, `window-state-put' reuses the name of the window's > buffer from the other session. So if you have a buffer "foo" in the old > session and a completely different buffer "foo" in the new session, it > will show that other buffer instead. As it should. If the user plays such games, let her do it. J