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: Wed, 05 May 2010 21:05:09 +0300 Organization: JURTA Message-ID: <87vdb2qo82.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> <87bpcv1wvt.fsf@mail.jurta.org> <4BE13828.2030609@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1273098618 7718 80.91.229.12 (5 May 2010 22:30:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 5 May 2010 22:30:18 +0000 (UTC) Cc: Ken Hori , Emacs To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 06 00:30:16 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 1O9n6b-0004Hm-2w for ged-emacs-devel@m.gmane.org; Thu, 06 May 2010 00:30:13 +0200 Original-Received: from localhost ([127.0.0.1]:44017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9n6a-0002Br-DJ for ged-emacs-devel@m.gmane.org; Wed, 05 May 2010 18:30:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9jZn-0006RO-5p for emacs-devel@gnu.org; Wed, 05 May 2010 14:44:07 -0400 Original-Received: from [140.186.70.92] (port=53306 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9j7H-0006PT-R2 for emacs-devel@gnu.org; Wed, 05 May 2010 14:14:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9j7B-00016h-NJ for emacs-devel@gnu.org; Wed, 05 May 2010 14:14:36 -0400 Original-Received: from smtp-out1.starman.ee ([85.253.0.3]:53728 helo=mx1.starman.ee) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9j7A-00015p-MC for emacs-devel@gnu.org; Wed, 05 May 2010 14:14:33 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.29.84.cable.starman.ee [82.131.29.84]) by mx1.starman.ee (Postfix) with ESMTP id 8441A3F4127; Wed, 5 May 2010 21:14:26 +0300 (EEST) In-Reply-To: <4BE13828.2030609@gmx.at> (martin rudalics's message of "Wed, 05 May 2010 11:19:36 +0200") 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:124557 Archived-At: > But when (1) a `save-window-excursion' restores the saved > configuration and (2) it has to restore a former eldoc-window that was > deleted within the body of `save-window-excursion', I get the first > buffer from `buffer-list' shown in that window which is > downright silly. I agree that displaying a random buffer (that happens to be the first in `buffer-list') is silly. This problem becomes more evident when switching window configuration using tabs. Let's summarize options we have to display when the buffer saved in a window configuration is gone: 0. Display the first buffer from `buffer-list'. Yes, this is silly. 1. Add a bookmark record (that may include `buffer-file-name' and other additional data from packages via `bookmark-make-record-function') to the window parameters in the window-configuration structure. After restoring the window configuration, try to regenerate it. I think this is a bad idea, because when the user deletes the buffer, and after switching to another window configuration this buffer automagically comes back, it would be annoying. 2. Delete the buffer's window after restoring the saved window configuration. Do you see any problem with doing this in `set-window-configuration' instead of `window-configuration-change-hook'? 3. Delete the buffer's window in the saved window configuration before restoring it. This looks good if it won't break other windows in the same window configuration. 4. Display some warning message in a temporary buffer in the restored window. This is good too. It keeps the original window configuration unchanged, and provides information about the deleted buffers. -- Juri Linkov http://www.jurta.org/emacs/