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: Sat, 12 Oct 2019 23:58:35 +0300 Organization: LINKOV.NET Message-ID: <877e59bs04.fsf@mail.linkov.net> References: <87sgo4kyfp.fsf@mail.linkov.net> <87lfttbo70.fsf@mail.linkov.net> <874l0gqna8.fsf@mail.linkov.net> 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="65273"; 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 Sat Oct 12 23:32: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 1iJP0J-000GqV-Qh for ged-emacs-devel@m.gmane.org; Sat, 12 Oct 2019 23:32:48 +0200 Original-Received: from localhost ([::1]:36178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJP0I-0004TP-L5 for ged-emacs-devel@m.gmane.org; Sat, 12 Oct 2019 17:32:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34971) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJP07-0004QP-8O for emacs-devel@gnu.org; Sat, 12 Oct 2019 17:32:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJP05-0006zf-UZ for emacs-devel@gnu.org; Sat, 12 Oct 2019 17:32:34 -0400 Original-Received: from antelope.elm.relay.mailchannels.net ([23.83.212.4]:11897) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iJP05-0006yC-Lc for emacs-devel@gnu.org; Sat, 12 Oct 2019 17:32: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 83A76E086B; Sat, 12 Oct 2019 21:32:31 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a3.g.dreamhost.com (100-96-87-223.trex.outbound.svc.cluster.local [100.96.87.223]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 251BDE072A; Sat, 12 Oct 2019 21:32:31 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a3.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); Sat, 12 Oct 2019 21:32:31 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Oafish-Stupid: 7677046d5329b89d_1570915951353_2753180836 X-MC-Loop-Signature: 1570915951353:3296667705 X-MC-Ingress-Time: 1570915951353 Original-Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id D71A48430D; Sat, 12 Oct 2019 14:32: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=PcTYvc fu9oJyswr+FgmXK+LNtas=; b=Scgqn+lVgcjy8q34DqErxlGJVs7SEU5XFV7U+A TUTFfcWEsEyXvzSwIUHHbxOIenGwlxf5YaMUEsRTeNFjKHKkSLGO6ctO6K9MHqo0 46M+uz4qw1DMvHURvlM2Tbho8wTUBlLsLBDEZyR6Fi39+S6nDPKlOwFtb/Ya1e/H xOEiI= Original-Received: from mail.jurta.org (m91-129-105-34.cust.tele2.ee [91.129.105.34]) (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id 55E728430C; Sat, 12 Oct 2019 14:32:23 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a3 In-Reply-To: (Yuan Fu's message of "Thu, 10 Oct 2019 21:38:09 -0400") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrieejgdduiedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddthedrfeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrfeegpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheptggrshhouhhrihesghhmrghilhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.212.4 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:240933 Archived-At: > After thinking about your suggestion, I start to believe my experiment > isn=E2=80=99t the best approach (to solve the problem you mentioned abo= ve and > the problem I mentioned about gdb-mi). For your problem, since there ar= e > tmp buffers that are not in any window, window.el clearly isn=E2=80=99t= the > right place to handle them. I think desktop.el should handle them. And = I > guess that=E2=80=99s what you meant. Indeed, gdb-mi and desktop could work the same way: 1. before or after calling window-state-get save another data structure with buffer names from on all windows and information how to restore them; 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. > 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 =E2=80=9Ctmp buffer was here=E2= =80=9D.