unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: Emacs developers <emacs-devel@gnu.org>, Juri Linkov <juri@linkov.net>
Subject: Re: Customize ‘window-state-get/put’
Date: Sat, 12 Oct 2019 12:25:52 -0400	[thread overview]
Message-ID: <B6445868-90D8-48F1-8F45-DD24EDBFA7BB@gmail.com> (raw)
In-Reply-To: <a083f130-c748-efa7-ec1a-d97527cf1867@gmx.at>


> If I'm not mistaken, there are occasions where window.el is the only
> place to handle them.  Think of a state saved somewhere during a
> session that contains references to dead temporary buffers.  To
> resurrect such a state it might be nice to have a function that
> restores these buffers from information stored by 'window-state-get'
> or at least do something reasonable (whatever that is).

Restoring buffer could probably done by the caller of window-state-set. And the caller of window-state-get can save information into window-parameters for later restoration. Restoring buffers outside window-state-put also gives more flexibility, albeit less straightforward. I claim the caller is more flexible when restoring buffers is because it knows more and can keep track of things: what buffer has been displayed, what other windows are displaying, etc. 

> I suppose that, as a rule, placeholder buffers never get killed.  Right?

It is killed (only one placeholder buffer) after calls to window-state-get and window-state-put.

> Fine.  But, I still think that a solution built into the window state
> functions would be more profitable.  And if it's an empty buffer name
> advising 'window-state-put' to look up the associated window's
> parameter list for instrcutions on how to populate that window.

It certainly is nice to have such a feature. Although questioning the necessity, I have no objection to it. 

Yuan


  reply	other threads:[~2019-10-12 16:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-07 16:19 Customize ‘window-state-get/put’ Yuan Fu
2019-10-07 22:01 ` Juri Linkov
2019-10-08  0:13   ` Yuan Fu
2019-10-09 22:31     ` Juri Linkov
2019-10-10  0:35       ` Yuan Fu
2019-10-10 21:54         ` Juri Linkov
2019-10-11  1:38           ` Yuan Fu
2019-10-11  8:18             ` martin rudalics
2019-10-12 16:25               ` Yuan Fu [this message]
2019-10-13  8:17                 ` martin rudalics
2019-10-12 20:58             ` Juri Linkov
2019-10-14  3:39               ` Yuan Fu
2019-10-15 18:14                 ` Juri Linkov
2019-10-08  8:05   ` Eli Zaretskii
2019-10-08  8:45 ` martin rudalics

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=B6445868-90D8-48F1-8F45-DD24EDBFA7BB@gmail.com \
    --to=casouri@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    --cc=rudalics@gmx.at \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).