From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Window configurations Date: Mon, 14 Jun 2010 19:05:48 +0200 Message-ID: <4C16616C.2070101@gmx.at> References: <4BB4CF6B.2000007@alice.it> <87zl0rtmqy.fsf@mail.jurta.org> <871vdu6qn5.fsf@mail.jurta.org> <87bpcv1wvt.fsf@mail.jurta.org> <4BE13828.2030609@gmx.at> <87vdb2qo82.fsf@mail.jurta.org> <4BE27C17.3030005@gmx.at> <87vdav4vx5.fsf@mail.jurta.org> <4BE900E7.3090402@gmx.at> <87r5liqv8f.fsf@mail.jurta.org> <4BEA74DC.2060103@gmx.at> <87y6fns8qo.fsf@mail.jurta.org> <4BECF4D6.9030707@gmx.at> <87632na2af.fsf@mail.jurta.org> <4C03F1B5.8040708@gmx.at> <4C04D1BF.9070902@gmx.at> <4C052F8C.8030208@gmx.at> <87sk56sg6x.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1276535329 8791 80.91.229.12 (14 Jun 2010 17:08:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 14 Jun 2010 17:08:49 +0000 (UTC) Cc: Stefan Monnier , Emacs To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 14 19:08:48 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 1OOD9T-0007Kd-Lm for ged-emacs-devel@m.gmane.org; Mon, 14 Jun 2010 19:08:48 +0200 Original-Received: from localhost ([127.0.0.1]:41606 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOD9R-0006Ph-Uz for ged-emacs-devel@m.gmane.org; Mon, 14 Jun 2010 13:08:46 -0400 Original-Received: from [140.186.70.92] (port=57910 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOD6j-0004BG-Kc for emacs-devel@gnu.org; Mon, 14 Jun 2010 13:05:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOD6i-0000be-D2 for emacs-devel@gnu.org; Mon, 14 Jun 2010 13:05:57 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:53113) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OOD6h-0000as-JB for emacs-devel@gnu.org; Mon, 14 Jun 2010 13:05:56 -0400 Original-Received: (qmail invoked by alias); 14 Jun 2010 17:05:52 -0000 Original-Received: from 62-47-33-149.adsl.highway.telekom.at (EHLO [62.47.33.149]) [62.47.33.149] by mail.gmx.net (mp036) with SMTP; 14 Jun 2010 19:05:52 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18VHnI9D0wVdiQxk5hDhIkGyrb9pebUVvicEEu1kV mnsQfHckQ4bU5i User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <87sk56sg6x.fsf@mail.jurta.org> X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:125919 Archived-At: >>> So you're saying that C-x k's heuristic should be to try and restore >>> the previous window state? I guess that could make sense, yes. >> I was saying that _if_ we want to fix the behavior to handle Juri's >> case, we'd have to call `other-buffer' with VISIBLE_OK non-nil (or >> something the like). > > I think changing the argument VISIBLE_OK won't help. The existing > calls of `other-buffer' (where VISIBLE_OK is nil) should keep the > current behavior of `other-buffer' that prefers not visible buffers > to visible buffers (when the window-local buffer-list is empty). Sorry, I don't get you here. Reconsider your earlier example: ------------------------------------------------------------------------ 2. Another example - visit the same buffer in two windows, and put point at different positions of the same buffer. +---------+---------+ | | | | dired 1 | dired 1 | | | | | | | +---------+---------+ Now view a file in the first window, and quit: `v q'. The window configuration is correctly restored (without using `set-window-configuration') - good. Now do the same without `view-mode': `RET C-x k'. Instead of the original buffer, some random buffer is displayed in this window. ------------------------------------------------------------------------ Doing C-x k currently winds up calling replace_buffer_in_all_windows (buffer); which calls Fother_buffer (w->buffer, Qnil, w->frame) so a visible buffer will not be put into that window. martin