From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Manual suggestions for quit-restore documentation Date: Sun, 05 Mar 2017 11:09:31 +0100 Message-ID: <58BBE3DB.7000000@gmx.at> References: <87varoh5ka.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1488708646 29237 195.159.176.226 (5 Mar 2017 10:10:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 5 Mar 2017 10:10:46 +0000 (UTC) To: Eric Abrahamsen , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 05 11:10:37 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckT7d-0006bO-6Q for ged-emacs-devel@m.gmane.org; Sun, 05 Mar 2017 11:10:37 +0100 Original-Received: from localhost ([::1]:38215 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckT7i-00067s-RD for ged-emacs-devel@m.gmane.org; Sun, 05 Mar 2017 05:10:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckT6u-00067k-TZ for emacs-devel@gnu.org; Sun, 05 Mar 2017 05:09:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckT6r-0006E3-Q3 for emacs-devel@gnu.org; Sun, 05 Mar 2017 05:09:52 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:59369) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ckT6r-0006DD-FF for emacs-devel@gnu.org; Sun, 05 Mar 2017 05:09:49 -0500 Original-Received: from [192.168.1.101] ([213.162.68.21]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MYwyp-1cnxC60eWJ-00Vi5k; Sun, 05 Mar 2017 11:09:37 +0100 In-Reply-To: <87varoh5ka.fsf@ericabrahamsen.net> X-Provags-ID: V03:K0:LX5/nxosOK4Lp1W7fFfStF4/N6q58hO+e/Mg5aBrVTcJfZ7tKc0 gj+zYJpFs3GqCDPX4rBjS6hF59rJMhaa+eM3zFOZ/tBC2PqzEjm07UUx/fIDptWqpGKc5r+ +AwkIfq4mC4Ck+Ozg2zE0M8pj7u8HIGHZ06j/ZhoKjii1l55M4abhYoOdFnk6qiAkXV/RZc yy7Kn7Xsy+Jm5q/F/5yzg== X-UI-Out-Filterresults: notjunk:1;V01:K0:cUi0x6AAQ80=:0zZEngLLBDx1S27Ns7Dzac 4RnBeZ2LHG+meYG418xRgzpNhuOwjs3EKszs50LSc23fnyLstdMkjsYdut/6zdWm02QveBkEN 1tGSB1y+UoIP0tvf41/VM3axqUqYCXmVoj8HPusrR97b+shJne8haF0zZAxf5tHkMlH+EBI/z 3MkNvmI2kQpIrjnWvv+yfFrZpIYVA77sRnUJebt9khlN+M6OqIeG+6BHEB5PByyqrJnXgTYzk JlBLDwCsrLOdaRzW86M3+jE5ic2q7vBbTqmF2qvv+7VWy99k0HKeT8JGzJTOyxixywqH4RrZN erA3kclWb069VBIbvc5k101AmYUchgENC0zCs+UdKO/DKyj5x+q8Llq/uFlnwusOPXjg1rgen 77W8ttndWAy0BQjsaZKbgGunFyiuq7FwkuSi0VbZkML+FQtPpkUYoBE/zCOE9clmzq1VY18Ng aCTQ6iBcQXQaCpWm0J5sTiBBTx65F9r1K8JsQtEscbKrqu79no6igZBJazdYvpWM+kW31fCFD NRRdgxVQAIFBRKWH3l87ObCyPHwaFKs+YPsI/wfin1mraH7TbNwKhjCTiAICOJCFHHub6L3Yi VS6VnRs0jZhl9FnVRqu0zJMo5gVTQBfF+rNvB3wlJsQ0+nJMlzDFgTB+SY/fvokjm51uNgRZ7 8An8WyzSZP4yvCyyQVfPzmveR3ot+1DM+9WxwPKwtDyVbo6BzF07jP0PaHsowqHg8fErI4cr2 xHQTJD09OBdWP9dF+Xed6tlSDO5DTSL47W7VCp7iwP40GOkJrkFl0BdKdYg2xK8fgQJGVc/8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:212762 Archived-At: > I've attached a diff with my edits; if/when some version of this is > eventually approved I can do a proper commit. Thanks. Please install. > I didn't add anything in the Window Parameters section about the first= > two elements of the quit-restore parameter, simply because I don't > understand them well enough. I still think something should be said > there about how they influence quit behavior, though -- this is the > first place that people will look to find out how this works, and the > current docs are very clear about "what", but beg the question of "why= ". Trying to recall. The first element is one of the symbols `window', meaning that the window has been specially created by `display-buffer'; `frame', a separate frame has been created; `same', the window has displayed the same buffer before; or `other', the window showed another buffer before. If the first element is `window', we usually want to delete that window but have to cater for a few special cases: For example, the window might have become the only window on its frame since it was created in which case we cannot simply delete the frame. Or, the user might have switched to another buffer in it in which case calling =E2=80=98quit-wind= ow=E2=80=99 probably should do just nothing. If the first element is `frame', the situation is similar to the former just that we now have to cater for the case that the window is no more the only one on its frame in which case the frame should probably not be deleted. `same' is more tricky: We want to do certain things only if a window always displayed the same buffer. For example, automatic resizing of the *help* window (via =E2=80=98temp-buffer-resize-mode=E2=80=99) should = happen only if that window was created specially for *help* and was subsequently reused for *help* only. If the *help* window was showing another buffer before or in between, no such resizing should occur. `other' signals more or less that the user has restricted the way new pop-up windows/frames can be created and the (typically second on the frame) window was (and probably will be) used for showing another buffer. In this case we usually do not delete the window, even if after a sequence of `quit-window' calls the first buffer ever shown in that window reappeared (we do not remember that much). The second element is either one of the symbols `window' or `frame', or a list whose elements are the buffer shown in the window before, that buffer's window start and window point positions, and the window's height at that time. The values `window' and `frame' for the second element are redundant IIRC. Maybe we could as well leave them nil. Iff the second element is a list, it tells how to show the "other" buffer that was shown in that window before when the window is quit. That's important when that other buffer appears in yet another window at the time of quitting - we may want to restore the old `window-point' and `window-start' position, if possible. martin