all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-devel@gnu.org
Subject: Re: Manual suggestions for quit-restore documentation
Date: Fri, 24 Mar 2017 08:44:50 -0700	[thread overview]
Message-ID: <87mvca7k7h.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 58D4E0F8.10500@gmx.at

martin rudalics <rudalics@gmx.at> 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




  reply	other threads:[~2017-03-24 15:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-05  1:32 Manual suggestions for quit-restore documentation Eric Abrahamsen
2017-03-05  2:14 ` Drew Adams
2017-03-05  4:37   ` Eric Abrahamsen
2017-03-05  4:39     ` Eric Abrahamsen
2017-03-05 10:09     ` martin rudalics
2017-03-05 10:09 ` martin rudalics
2017-03-05 17:24   ` Eric Abrahamsen
2017-03-23 19:49   ` Eric Abrahamsen
2017-03-24  9:03     ` martin rudalics
2017-03-24 15:44       ` Eric Abrahamsen [this message]
2017-03-24 18:52         ` martin rudalics
2017-03-24 19:17           ` Eric Abrahamsen
2017-03-25  9:24             ` martin rudalics
2017-03-25 16:57               ` Eric Abrahamsen
2017-03-26  8:39                 ` martin rudalics
2017-03-26 14:49                   ` Eli Zaretskii
2017-03-26 15:33                     ` Eric Abrahamsen
2017-03-26 16:27                       ` Eli Zaretskii
2017-03-26 23:40                         ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvca7k7h.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.