From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: Manual suggestions for quit-restore documentation Date: Fri, 24 Mar 2017 08:44:50 -0700 Message-ID: <87mvca7k7h.fsf@ericabrahamsen.net> References: <87varoh5ka.fsf@ericabrahamsen.net> <58BBE3DB.7000000@gmx.at> <8737e37ozr.fsf@ericabrahamsen.net> <58D4E0F8.10500@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1490370389 24817 195.159.176.226 (24 Mar 2017 15:46:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 24 Mar 2017 15:46:29 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 24 16:46:24 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 1crRPr-00053h-HY for ged-emacs-devel@m.gmane.org; Fri, 24 Mar 2017 16:46:15 +0100 Original-Received: from localhost ([::1]:33727 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crRPx-0007xB-KJ for ged-emacs-devel@m.gmane.org; Fri, 24 Mar 2017 11:46:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crRPG-0007vm-FQ for emacs-devel@gnu.org; Fri, 24 Mar 2017 11:45:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1crRPD-0000bd-Cv for emacs-devel@gnu.org; Fri, 24 Mar 2017 11:45:38 -0400 Original-Received: from [195.159.176.226] (port=57090 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1crRPD-0000bJ-6f for emacs-devel@gnu.org; Fri, 24 Mar 2017 11:45:35 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1crROt-0007up-LE for emacs-devel@gnu.org; Fri, 24 Mar 2017 16:45:15 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 93 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:tVKzbBe2wZQ0f7xsj4XtbPJUW7Q= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:213301 Archived-At: martin rudalics writes: >> I just don't see how/where the `bury-or-kill' parameter affects the >> handling of the frame, I think it only affects the buffer. But I may >> have "fixed" it until it doesn't make sense :) > > Isn't that via > > (defun quit-restore-window (&optional window bury-or-kill) > ... > ;; Delete WINDOW if possible. > (window--delete window nil (eq bury-or-kill 'kill))) > > and > > (defun window--delete (&optional window dedicated-only kill) > ... > (cond > (kill > (delete-frame frame)) > > or what am I missing? Ah, of course -- I even looked in there, but it didn't click. >> I added a line about 'same as the first element of `quit-restore', but >> it might be wrong. >> >> I didn't add anything new about the 'other symbol. I see it getting set >> in `display-buffer-record-window', but I don't see that it ever gets >> used. > > I suppose it's used here > > (defun quit-restore-window (&optional window bury-or-kill) > ... > ((and (listp (setq quad (nth 1 quit-restore))) > (buffer-live-p (car quad)) > > and it's essential when the window was used for showing an "other" > buffer. Now I'm missing something -- I'm talking about (car quit-restore) -> 'other. Unless I'm really turned around, I don't see that getting checked. >> +however, if it is the only one in its frame. If @var{window} is the >> +only window on its frame and there are other frames on the frame's >> +terminal, the value of the optional argument @var{bury-or-kill} >> +determines how to proceed with the window. If @var{bury-or-kill} >> +equals @code{kill}, the frame is deleted unconditionally. > > Correct IMHO. So what is still unclear about `bury-or-kill'? I think it's fine, I was just confused. I might tweak the wording slightly. >> +possible to set it manually, using the following code when displaying >> +``buffer'' in ``window'': > > Both `buffer' and `window' are arguments so I'd use var{} here. > >> +The final use of @code{set-window-prev-buffers} ensures that a future >> +call to @code{quit-window} will delete the window altogether. >> + > > I'd prefer something like "Setting @code{set-window-prev-buffers} _to > nil_ ensures that a future call to @code{quit-window} _can_ delete the > window altogether." That's still a bit off, as it sounds like we're setting the function name to nil. How about: Setting the window history to nil ensures that a future call to @code{quit-window} can delete the window altogether. Is that clear enough, do you think? >> +window showed another buffer before. The 'frame and 'window elements > > I think we use `frame' and `window' instead of 'frame and 'window. Good, thanks for this and the @var{} tip, I don't have much experience writing texinfo. >> +re-uses the window to display the buffer. > > Would "reuses" be bad English? No, they're both acceptable spellings, "reuses" is fine. Let me know what you think about 'other, and I'll do a proper commit. Eric