From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: =?utf-8?Q?Re=3A_Customize_=E2=80=98window-state-get/put=E2=80=99?= Date: Sat, 12 Oct 2019 12:25:52 -0400 Message-ID: References: <87sgo4kyfp.fsf@mail.linkov.net> <87lfttbo70.fsf@mail.linkov.net> <874l0gqna8.fsf@mail.linkov.net> Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3594.4.19\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="156974"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Emacs developers , Juri Linkov To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 12 18:26:06 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 1iJKDW-000ehE-1t for ged-emacs-devel@m.gmane.org; Sat, 12 Oct 2019 18:26:06 +0200 Original-Received: from localhost ([::1]:34780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJKDU-00065L-Mg for ged-emacs-devel@m.gmane.org; Sat, 12 Oct 2019 12:26:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58651) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJKDO-00061e-3d for emacs-devel@gnu.org; Sat, 12 Oct 2019 12:25:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJKDM-0007S5-QP for emacs-devel@gnu.org; Sat, 12 Oct 2019 12:25:58 -0400 Original-Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]:39874) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iJKDM-0007Rn-MY for emacs-devel@gnu.org; Sat, 12 Oct 2019 12:25:56 -0400 Original-Received: by mail-qk1-x731.google.com with SMTP id 4so11815031qki.6 for ; Sat, 12 Oct 2019 09:25:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=udjM67mkVbShPf8ttqcOrQVpjhrCs8TNWAyYraZ5rD4=; b=ZqEAE3SrXiSD+rNSpHHYJvEFVroOyewutV2iH+5QM3L43Ptx0ry5PAxx6UEwGBxORU KpEUa1MjSucXeh/POI4XM98P+3CJOZ0W4cmkBwuR2v3zeosO97lKcp5gp/OeF1BAy58G WakvpAU4Q0WXC4TCcxu6T7SKbOH3BvVvMIgM2lDYd8BAzqon+CRO6Qs/lzi/7n96KG1U B0D3KoR3l6qsYvAknaKscAYOsoY+QJ8wRFxl15+OhezRmWiglV9DtMSbnlqOO7LE3rdc zeFYl3DJJXltPMLQLsBxViiObWErhQ6KhwaVflTJ6uDGEUdGuren5iDgNlPE1jxfsw+o 4hFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=udjM67mkVbShPf8ttqcOrQVpjhrCs8TNWAyYraZ5rD4=; b=Wzl0heCbzB8anPjiRckAbV61pv+ZxR3Cd19LOQ/pVGHtxEF81VCkOgeemu9I27Rb8/ li4R/uid5Yim3suCO818OqeeTdY/lj38TlvIQgo78opV3ydTQnCqt+gDgtvZ+ZfqO67M 8Kr6lfaLtBAPAY3iFKePXMP4AE2v2gmuEaZ+4+2kixJhME3VwxUmU20gnFeOBaZKp4ry 9WLxsw2KHsVjhpO5Tc9MBreD53O9Qtp9P3LCSM92qqirVAg9YboOy5CfvcdJAGShU4aO 6SdpNPq7av21Eg4AKciecn8Oh7RQKFVigqFL50/Ji39Qk+WD9vovxNd814pzsMwlg9rO GDAQ== X-Gm-Message-State: APjAAAVxgyhlqwRU0cwyy7YzT2pVmVq0tzm+ogKX6qSZie+Cg92wtHUA l/GoEIdmIsP+IoesoqGT0R8= X-Google-Smtp-Source: APXvYqxaitkwrGkmRxq3JjJJxdR67G0J3WR+fIEgllvIENz3ZF5LzEgxl2Sj8FJmwjcY77lb3WWN+w== X-Received: by 2002:ae9:e508:: with SMTP id w8mr20823808qkf.131.1570897555504; Sat, 12 Oct 2019 09:25:55 -0700 (PDT) Original-Received: from [104.39.222.73] ([104.39.222.73]) by smtp.gmail.com with ESMTPSA id j17sm5566462qki.99.2019.10.12.09.25.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Oct 2019 09:25:54 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3594.4.19) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::731 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:240928 Archived-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.=20 > 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.=20 Yuan=