all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Yuan Fu <casouri@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Customize ‘window-state-get/put’
Date: Tue, 15 Oct 2019 21:14:08 +0300	[thread overview]
Message-ID: <8736fuszhb.fsf@mail.linkov.net> (raw)
In-Reply-To: <0037B8CB-A95F-4720-BCFA-CED72AB94107@gmail.com> (Yuan Fu's message of "Sun, 13 Oct 2019 23:39:06 -0400")

>> 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.

Yes, this is a good solution for gdb-mi.

As for the desktop, we need to find a solution what to show in a saved
window when the file was deleted before restoring the saved file buffer.

Or maybe this problem is not specific to the desktop: even during the
same session, when a buffer (saved in the window configuration) was killed,
then restoring this window configuration just removes the window where
this buffer was before.  Often this has surprising effect.

What is the alternative?  Maybe to show an empty buffer in its previous
window with text like “killed buffer was here” and a button to restore it:
in case of file buffers it could call 'find-file'.



  reply	other threads:[~2019-10-15 18:14 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
2019-10-15 18:14                 ` Juri Linkov [this message]
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=8736fuszhb.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=casouri@gmail.com \
    --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.