From: Yuan Fu <casouri@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Customize ‘window-state-get/put’
Date: Sun, 13 Oct 2019 23:39:06 -0400 [thread overview]
Message-ID: <0037B8CB-A95F-4720-BCFA-CED72AB94107@gmail.com> (raw)
In-Reply-To: <877e59bs04.fsf@mail.linkov.net>
> 2. before calling window-state-put create these buffers with the
> saved buffer names, so window-state-put will restore windows with the
> same buffer names.
What I did is restore these buffer /after/ window-state-put. Because the information I needed is stored in window parameters.
>
>> I go through each window and replace the buffers in them with
>> placeholder buffers and store the buffer type (breakpoint, register,
>> etc) in a window parameter.
>
> By placeholder do you mean some default text contents to show when
> tmp buffer is not restored? Something like “tmp buffer was here”.
I mean a dummy buffer for window-state-get to save. This buffer is not visible to the user in theory: I create it and put it in every window and call window-state-get, then swap back buffers and remove this placeholder. Then before window-state-put create this buffer, and window-state-put will put it in every window. Once I restored every windows’ buffer from their window parameter, I can kill the placeholder. The sole purpose of the placeholder is for window-state-get/put to have /something/ to save/display.
Yuan
next prev parent reply other threads:[~2019-10-14 3:39 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
2019-10-13 8:17 ` martin rudalics
2019-10-12 20:58 ` Juri Linkov
2019-10-14 3:39 ` Yuan Fu [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0037B8CB-A95F-4720-BCFA-CED72AB94107@gmail.com \
--to=casouri@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=juri@linkov.net \
/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.