[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Manual suggestions for quit-restore documentation

From: martin rudalics
Subject: Re: Manual suggestions for quit-restore documentation
Date: Sun, 05 Mar 2017 11:09:38 +0100

> If Marcin ends up patching `display-buffer-record-window' to un-set
> buffer history when appropriate, I think it would also be worth
> mentioning that function in the docs, as the go-to function for setting
> the quit-restore parameter.

I'm afraid it won't work as I already noticed earlier: If we just use

   (set-window-prev-buffers window nil)

   (set-window-buffer window buffer)

then with ‘display-buffer-pop-up-window’ the ‘set-window-buffer’ will
record the buffer shown in that window due to ‘split-window’ as the
previous buffer and quitting that window will not delete it but try to
show the buffer put there by ‘split-window’ instead.

So the canonical order to do things is

   (display-buffer-record-window type window buffer)

   (set-window-buffer window buffer)

   (set-window-prev-buffers window nil)

So when you document this, then please mention that if someone wants to
use ‘display-buffer-record-window’ in her code, then in the `window'
case she manually has to clear the list of previous buffers as well
(it's not strictly necessary in the `frame' case but it won't harm


reply via email to

[Prev in Thread] Current Thread [Next in Thread]