From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: RE: Checking if frame has only one visible buffer Date: Sun, 22 Nov 2020 00:07:04 +0100 Message-ID: References: <389a9b58-736d-4b38-a5ba-5921272925ef@default> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20044"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 22 00:09:23 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 1kgc0R-000579-9v for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 22 Nov 2020 00:09:23 +0100 Original-Received: from localhost ([::1]:34496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgc0P-0000Ej-Cu for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 21 Nov 2020 18:09:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgbyN-0000EJ-Nt for help-gnu-emacs@gnu.org; Sat, 21 Nov 2020 18:07:17 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:58515) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgbyJ-0000zP-TF for help-gnu-emacs@gnu.org; Sat, 21 Nov 2020 18:07:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1606000024; bh=ZZDMQWN63n0snR9xxW5NeCNB3PISwTnEvVgEwqEcWzc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=UKYviJ8D8Ny2AmYBOADIbvTq7pfxXGE6ZI98fS6Zi2nP30gewpapZ8SnBur00VP0t ul51RiQ1Ufz6nmhtzIO7hDiggIIGM6BVF0/B53y2hQGQbpgnvnEHNl+1I8Xvx5CiF1 J4V0enq9uo2DOQzW9O/Uojm0bekPQs1/Z/wINQRM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs11.server.lan [172.19.170.179]) (via HTTP); Sun, 22 Nov 2020 00:07:04 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <389a9b58-736d-4b38-a5ba-5921272925ef@default> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:D4HrD+2vjhQG8/y09Ur91wUUIuFlkRpg+kjCIMCKgx45hqk6STkQ7TlQbu2U/wwZhiR8w fRGHygoqRZO8qRJedQTm67sjfsf7MOu0qxkJpfDn9e2Q1b4/D3cJsTXwZbgPj0smzFYg0kNP0Ka+ HrSqg2NUyYBoah+UHdTR0oEYdvp7YnQBzCWmFamdhcuIYgWDnIwenqEpbnocZR7s8ESW99iRtaIZ Jp08SkeuiMH2bXakxGMbViYD2aICmFCShC13EWhWHF3D16gE+o2h1VuxAMs2cDM0ZCnZoEMfTMWa g8= X-UI-Out-Filterresults: notjunk:1;V03:K0:aTJ0B0aEXM0=:wUqIf7c9Gruw5TlThd1O+i O0EOnZ9jnQp52iOh26NSL+VzzT+InzlbsaDc+vf/k7OSMshhBMdOs8xifqmI6aAZYuW/ryB/o YCiU3LUN/f3jZ/ZAnvt0xrPdglLPCfqQhZec+tNdY4QcautPsLhWGGZZ9HSlpwcvAabPZLMf8 71nY4CTW7ANY+71UdjckwjuPDrX1aukj68X1yqovBHtn1oEtjAapJIVVg0T9yOjl6TV2qU30L D5ii+f0E4UhY0VdcdBVbSDfqVk7dXmB6lOvUWKzWqzgAotjB936uCzvMILbiJHVa8cU/E0rn9 NnbGaRIVwTBQ+KSqsQO9+rqplFmG2P09GVZ69VDMvhkQNfnEOqjQ8pD0tzqG48uguTYEKai0K HAD9cvn0mm5Ey+eptedx/p6wb000KZBiPuU6xDMStRwQejD75Mi9s9u/DtdXahYbhbT5Tvj2F HO7PQuie3D/Bff2/3Dtap1eKL4ASGtBZ0BncbdwVtzO3HOCMNYfGRhv2bwBpe0rlFsoF5SYMu xrjaUvV3vijlF7DACEkLw5cDmACq/rdlDQnDXicLkXs29fHsrZX6ButvV1WtSXclz+HO9d+gp dxz/uCUYU0lPc= Received-SPF: pass client-ip=212.227.17.20; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no 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:125459 Archived-At: > Sent: Saturday, November 21, 2020 at 11:29 PM > From: "Drew Adams" > To: "Christopher Dimech" , "Help Gnu Emacs" > Subject: RE: Checking if frame has only one visible buffer > > > Am writing some elisp code and want to check if there is just one > > visible buffer in frame. > > Does `one-window-p' do what you want? It does. How can I improve on the code below? (defun fullscr-cycle () "Toggles Fullscreen Mode for a Gungadin Buffer" (interactive) (if (eq (frame-parameter nil 'fullscreen) 'fullboth) (progn (if (one-window-p) (progn (gungadin-buffer 0) (disable-fullscr)) (disable-fullscr))) (progn (if (one-window-p) (progn (gungadin-buffer) (enable-fullscr)) (enable-fullscr))) ) ) > ___ > > For discovery purposes (and other understanding), > it helps to assimilate the Emacs jargon. A buffer > need not be displayed. If displayed, it's shown > in a window. And a window is in a frame. > > If you know you're looking for a function that > involves windows, then `M-x apropos window' will > help. If you're thinking of a buffer then it > won't help you find `one-window-p'. >