From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Customize =?utf-8?Q?=E2=80=98window-state-get=2Fput=E2=80=99?= Date: Tue, 15 Oct 2019 21:14:08 +0300 Organization: LINKOV.NET Message-ID: <8736fuszhb.fsf@mail.linkov.net> References: <87sgo4kyfp.fsf@mail.linkov.net> <87lfttbo70.fsf@mail.linkov.net> <874l0gqna8.fsf@mail.linkov.net> <877e59bs04.fsf@mail.linkov.net> <0037B8CB-A95F-4720-BCFA-CED72AB94107@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="184211"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: Emacs developers To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 15 20:18:48 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iKRPE-000llg-CC for ged-emacs-devel@m.gmane.org; Tue, 15 Oct 2019 20:18:48 +0200 Original-Received: from localhost ([::1]:55906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKRPD-0003XT-2y for ged-emacs-devel@m.gmane.org; Tue, 15 Oct 2019 14:18:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59070) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKRP0-0003SO-AW for emacs-devel@gnu.org; Tue, 15 Oct 2019 14:18:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKROz-00087J-9h for emacs-devel@gnu.org; Tue, 15 Oct 2019 14:18:34 -0400 Original-Received: from dragonfly.birch.relay.mailchannels.net ([23.83.209.51]:37194) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iKROz-00086k-0z for emacs-devel@gnu.org; Tue, 15 Oct 2019 14:18:33 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 9053E1A1E74; Tue, 15 Oct 2019 18:18:31 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a64.g.dreamhost.com (100-96-14-204.trex.outbound.svc.cluster.local [100.96.14.204]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 154581A1B00; Tue, 15 Oct 2019 18:18:31 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a64.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Tue, 15 Oct 2019 18:18:31 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Abortive-Invention: 41c533387822f391_1571163511289_2306591566 X-MC-Loop-Signature: 1571163511289:3020706820 X-MC-Ingress-Time: 1571163511289 Original-Received: from pdx1-sub0-mail-a64.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a64.g.dreamhost.com (Postfix) with ESMTP id F39257FDA7; Tue, 15 Oct 2019 11:18:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=linkov.net; bh=fYGNWJ kbAgHASEnIc5g4b6EX29w=; b=E3K8hovJjOL/n0mMKQPMUxb3myyDeCkHLAdtHW X5Dmy/1STS3qYF6W0XRoO4ud6nqlb/B/xzBRe6/FYY3NXz/OI67E/JvUs1ULXro5 cwPtJAlp3IU4z0qkvjDGVlNFFEDQLYUSsscAhjYR2ioZpA7JkZ+nA67GtoLsnzgf TfK3g= Original-Received: from mail.jurta.org (m91-129-98-153.cust.tele2.ee [91.129.98.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a64.g.dreamhost.com (Postfix) with ESMTPSA id 7F77C7FDBD; Tue, 15 Oct 2019 11:18:23 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a64 In-Reply-To: <0037B8CB-A95F-4720-BCFA-CED72AB94107@gmail.com> (Yuan Fu's message of "Sun, 13 Oct 2019 23:39:06 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.209.51 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241059 Archived-At: >> By placeholder do you mean some default text contents to show when >> tmp buffer is not restored? Something like =E2=80=9Ctmp buffer was he= re=E2=80=9D. > > 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 a= nd > 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=E2=80=99 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 kille= d, 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 =E2=80=9Ckilled buffer was here=E2=80=9D and a butt= on to restore it: in case of file buffers it could call 'find-file'.