From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Re: New buffer not showing up in Emacs Buffers Menubar Date: Tue, 24 Sep 2024 09:41:59 +0200 Message-ID: <87ldzhmraw.fsf@gmx.net> References: 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="5824"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Heime via Users list for the GNU Emacs text editor To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 24 09:42:52 2024 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 1st0CB-0001NM-GF for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 24 Sep 2024 09:42:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1st0BY-0002Si-RH; Tue, 24 Sep 2024 03:42:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1st0BW-0002SP-5v for help-gnu-emacs@gnu.org; Tue, 24 Sep 2024 03:42:10 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1st0BS-0005AK-EV for help-gnu-emacs@gnu.org; Tue, 24 Sep 2024 03:42:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1727163720; x=1727768520; i=stephen.berman@gmx.net; bh=6xByRz6M/YDHxDpWsbQO4BqWpqr75cGDoCNryPv7Nxw=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=bXmahoLux/XjCqGWtRUDCu8B18IwjM3pDade+yR1+PBm+727wehWdy7ayoSBQ766 /pnTsJS9fFedzdlrKtXkSKSO6OnSJKBlN8sN/DrTJ6tm/CbY0IPBEFmJ86sSjD0rW GWn40lRgf5FgpBN5HjCRDVKqIIROw6KUVXds1Or/PxEoWNLk9LkCmURt+I3sIokNC 4yQVa/5I5Q0e3dr0KGfPgRewJ9QyUG4yB/ibuhK8f6DsfFe+YsfDSkdHAbkV7S816 Jgo0VDa0X7D0UkfUMZYD5oSz1wHxOc+ugu8DtGhy8m1Ot0haLSC8unnI46wWEnoWX 0ejxxBKbcXwxTP7nQg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfssd ([88.130.48.98]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MsHru-1s3uxm1NEI-011dKe; Tue, 24 Sep 2024 09:42:00 +0200 In-Reply-To: (Heime's message of "Mon, 23 Sep 2024 22:25:17 +0000") X-Provags-ID: V03:K1:GdNwnENlJ5lppz+C8ehegzkCoAW+SLkABTkDt+TfDKCgLxETeYD 1l1CtR1G5weQEhRsPj+DQI1oExjoNy/AtzT32+8nvoamhxeeH/7mLRYYp0048Cef4n8L3RE yyQNv1e7fhASN4uBeK0hZ+WQ3BKIXyy+B8YmyjvOT4s5V7wQ5UQRO5dngVSikcIKlg1Sy7o pvEl+X9FeRffB0u/WZgiA== UI-OutboundReport: notjunk:1;M01:P0:XcQvUiSBiKw=;oaFxDcIGqIfUlXOsMhryDgjZrfS 9f92KLuOOVDunVomPT1EGGY/c1Q3eBncpRAPtywJT/GmbCmCUUr42mzxi45Z+tUDmZ9PlHoiL YpZuBKaENpCyjLZot1pri/e9tasNhILwQWn/JZy3StrryxwOEIroTMug9IOwtljmPtwMkC8bp J9zmBqhYUT9+K2Yt/H12qs7BCwlIcyS1BmXoC1lnGoVASXGbPLQS82ysG1CuHjWe2PSYJEMNI klCEnW9pMfkVwnk/8ARULd7ueHqovM5Z9VQLtsULdx4npoqvRN4GJ42ItjDOZL2D9A8K8XpsF 3dA0LxU3JC0HAsuocvzjDGXSL61iGJe52Zk3DyoaQC7lkvfT/BjW9VoRH2bC/zS2FFCc9Mwia G3nWesysEYiV+yFsnHOE5cVo6ciKkTjbYCdhBD9l/1qIE6YJ17HBW883mG4YbnyqXlqptVWlN S1oeVBb9u76I7NGe7EbSrdgp3YYx7p+JexpMjgm2gemUO430AfNwbZYyG+6N5rEUS84dnDAO9 tep2b9kVcpve2LoTNWz/6aSf3Ft0EgjxkMJo/MlOLWdMVBUDJLPO0tlWcDtcilK9j44dVhPAm ZCx1lkKFCDZyONHpHKIup4/hnZNt1KU2R4eADASNOlBX+j8z/1H4+I3WnyePZN/vqiWNgQXIU YeGGbu7VPJ/NzlsTlfggkh9NfXCzKyQAmV+UteHnPwUJDb6RviHXLbBsp6CFAMG7OMvRcGw0Z 1Bli+cVi6ueT6L75sugMAjfb33KIii3mq+Gtz5Cnd67+C8J89m6SzKWNg9ZpQ44crLFGdV/L Received-SPF: pass client-ip=212.227.17.22; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -36 X-Spam_score: -3.7 X-Spam_bar: --- X-Spam_report: (-3.7 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.928, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148048 Archived-At: On Mon, 23 Sep 2024 22:25:17 +0000 Heime wrote: > Why do I need to call (switch-to-buffer dbuffer) to see the buffer made ? > > Without it I never see the BFRN buffer in the Emacs Buffers Menubar.=20=20 > > > (defun print-alist (alist &optional bfrn) > "Print Associateed List ALIST to the buffer BFRN." > > (let* ( (bfname (or bfrn "ALIST")) > (dbuffer (get-buffer-create (concat "=F0=92=86=B3 " bfname))) ) > > (with-current-buffer dbuffer > (face-remap-add-relative 'default :background "blue") > > (insert "\n ALIST \n\n") > > (dolist (entry alist) > > (let* ( (key (car entry) ) > (value (cdr entry) ) > (start (point)) ) > > ;; Insert key > (insert (format " =E2=94=81 %-8s" key)) > > ;; Colourise key > (add-text-properties start (point) > `(face (:foreground "green"))) > > ;; Insert associated value > (insert (format "\n %s\n" value)) )) ) > > ;; Finally, display the buffer > (switch-to-buffer dbuffer) )) When I comment out `(switch-to-buffer dbuffer)' and evaluate the defun in emacs -Q, I see "=F0=92=86=B3 ALIST" in the Buffers menu. Steve Berman