From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: "grouping" buffers Date: Sun, 31 May 2020 14:21:16 +0700 Message-ID: References: <20200528005856.6bc0869e@jcubic> <38d5c557-715d-43b2-ae02-d0f73c3f3600@default> <5C48EC33-AB2C-4131-AF5F-2BF6D376EC2D@traduction-libre.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="20805"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs mailing list To: Jean-Christophe Helary Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 31 09:21:51 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jfII3-0005Kb-Bo for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 31 May 2020 09:21:51 +0200 Original-Received: from localhost ([::1]:42660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfII2-0003Ng-E1 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 31 May 2020 03:21:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfIHi-0003NL-V7 for help-gnu-emacs@gnu.org; Sun, 31 May 2020 03:21:30 -0400 Original-Received: from mail-vs1-xe2d.google.com ([2607:f8b0:4864:20::e2d]:32922) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfIHh-0006a2-P4 for help-gnu-emacs@gnu.org; Sun, 31 May 2020 03:21:30 -0400 Original-Received: by mail-vs1-xe2d.google.com with SMTP id o2so1002956vsr.0 for ; Sun, 31 May 2020 00:21:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=okx0DCp8AGE8AbhzfTz5B4MOJ4oFkM2j5B/SOSBXS84=; b=obz9aD86lefEyF9YszTcVrowamH2FUGFmDp3ahO+whzbSNmZqCqiii/llHg6abYK9x 13VMmDifz0/6k0TDBqqfoBv5/uA2Dx+LYkm4222WOc1yYXWRF52vff1KhtkLDeS5lvB2 LfOkoQ74EI8D6UVKv3Y5mPcAh/P7vW1QSBRCkbxHQ00JY73en975EBrHJKQxofpZve8f dl+HIr1X+88UYrA61Yvd/ePnRutsapKKyCDf3QOc6oi6SFKiSfvq7/sJg6h/6b1qqdXK 1xZjK6CYO2eEjFEjLKfTtffBAQA7AoQQuWQoWGXCdRvgq6AxqnydPCY/eKduxyv8tdS9 OVQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=okx0DCp8AGE8AbhzfTz5B4MOJ4oFkM2j5B/SOSBXS84=; b=qIUoRnLlhK5ArORpnddk8XeiWVEpKtm7f4AYZP1S64WukLOIm2zlZvUFkZc1LRlcY7 n0mLEc4x8j6ZMhcMEzUreE/R/mTTMuZS3RwIzh91lyUoZpF5ZoSvgTF1546og4Vr/EJ6 u6oJv7C47y57CHFNkGndDMLteDF8bB87DMSuDeNI4LcGGhYL7R6JCphNML3JI4lsHwzf Su88pZU9AxLyJJXKfNdl5jQFOoan6EEv6If5yk6c0e0/WEEBl7vDUDfx4qh1UUdf3T8P y6lJPW3xZTXrxsiV0fnlbW8u1xJQsM7HKjkaypATulHwHnKNkYSQa57jRdUXk74yEjV/ lXSg== X-Gm-Message-State: AOAM533op+ejq9Tb9QE02R6kFJ8Byg6+mZdxAhGaYL5Uqp+DO+4XXHdT WJMLy8vpSqFLqHJfekChdvlWnEchS6R0S6t1D20= X-Google-Smtp-Source: ABdhPJzbXaWHtDlVfVbji7Oqzl9sdDOnNtzwldgWEmPEgJz3jtFU7qcpRTjDPSmWyjgU+/gyLxQxArqxQPk/otMpKZ8= X-Received: by 2002:a67:e947:: with SMTP id p7mr10603844vso.199.1590909687663; Sun, 31 May 2020 00:21:27 -0700 (PDT) In-Reply-To: <5C48EC33-AB2C-4131-AF5F-2BF6D376EC2D@traduction-libre.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::e2d; envelope-from=yurivkhan@gmail.com; helo=mail-vs1-xe2d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:123202 Archived-At: On Sun, 31 May 2020 at 12:03, Jean-Christophe Helary wrote: > > Every frame has a name parameter; this serves as the default for the fr= ame title which window systems typically display at the top of the frame. Y= ou can specify a name explicitly by setting the name frame property. > > I don't know how to "set the name frame property". But there is probably = a place in the elisp manual that says how to do that. I did this: (set-frame-parameter nil 'name "Hello World!") and the title of my WM window that displays the current Emacs frame changed. Of course this made it less convenient: now it displays a static string, whereas previously, per my =E2=80=98frame-title-format=E2=80= =99 configuration, it displayed the unsaved status and name of the buffer in the currently selected window in that frame: =E2=80=A2README.md =E2=80= =93 Emacs. So yes: > > Normally you don=E2=80=99t specify the name explicitly[=E2=80=A6] > Since in macos 1 frame =3D 1 window =3D 1 buffer, I can write something l= ike "set contents of document (read "buffer") of front window (read "frame"= ) to [whatever]" > > But that was just an example of how frames are easy to manipulate and acc= ess out of the box in macos/applescript. That is a consequence of that simple model (1 frame =3D 1 window =3D 1 buffer). In Emacs, the model is more complex, so you have to say =E2=80=9Ct= he buffer shown in the selected window of the current frame=E2=80=9D. Fortunately, that is abbreviated to =E2=80=9Cthe buffer shown in the curren= tly selected window=E2=80=9D, and that to =E2=80=9Cthe current buffer=E2=80=9D,= and that is represented by passing nil to pretty much every function that accepts a buffer argument. Alternatively, you can refer to individual buffers, windows, and frames, most easily by using the values of (current-buffer), (selected-window), and (selected-frame). Also there are functions to explore the frame/window/buffer structure, and the function (get-buffer BUFFER-OR-NAME) to get a buffer by name. It=E2=80=99s harder to talk about names of windows and frames because these things are ephemeral. If in your workflow you need a frame that you control, you arrange for your code to create it and stash the reference into a private variable, then refer to the frame via that variable.