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: Writing text to a dedicated buffer Date: Sun, 2 May 2021 15:25:07 +0200 Message-ID: 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="27478"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: Christopher Dimech Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 02 15:25:36 2021 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 1ldC6J-00073H-J8 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 02 May 2021 15:25:35 +0200 Original-Received: from localhost ([::1]:33626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldC6I-0005jY-Ly for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 02 May 2021 09:25:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldC5w-0005iz-PY for help-gnu-emacs@gnu.org; Sun, 02 May 2021 09:25:12 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:54695) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldC5u-0007r5-Is for help-gnu-emacs@gnu.org; Sun, 02 May 2021 09:25:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619961908; bh=hgUzHb5awc52MX+yczucjwbHaxkmAegrAgXy2dAmupE=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=jwYpXEGXbaraVTG4pfwxGZwQM1Vb3EoBkCzCo7NAPzUPUiHiGHU3vLxtqMGbdZeOK KGRO+5qg4YWRc/EqpzNsbkMkPs5wxrYdYAJLXF/NJUPwxW0PbQwzLBdLxSULbZAOVC jyWTUDyM6n6XgnVBHLFeT5KtpYL5wKBYrxeoTFYk= 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-bs08.server.lan [172.19.170.176]) (via HTTP); Sun, 2 May 2021 15:25:07 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:otkBp/FOMhlqR751HTTZZeSEVoPyEg7AWwC/wlB92W16LlgGCooxl5t5O1qVRvGucOp41 yCirKAK7hwTg4n0ip3ibt/djbnZ7BwHkWxoSg4z3YH3dRZZWPoi/yat5AEThy/rOVd5wbedYyE4Y eAnwEVrt//umyOX+evJbXEze36AUT9I3UI7nsaWQ6shC5uz4ZZDdGSESElebmesFHw7gs0usvciK j9epto47CXYv7K1d5+GuAcwy3ei7fQdUgtQgJDXCe+cVu9/eQw0yl+KiZ9TmBMAmVxImmMHXn3ty w4= X-UI-Out-Filterresults: notjunk:1;V03:K0:FLa7OIHmTM8=:fCUyWm/9zUflucWi4m/0jm +jrHXLyB6uxEvdlmXEIFo3WwPoObLUYF3D0OHZTaI5DAHviueJlu7LamFNkyYNGxkijeAc3kD V6Mp3curjLG0cpKilusrSi33EZq0AjaDr9jW3fkB2g+B+vSm5xSDhFyfs+cbovxuDYFLZ3nj6 Ykti+o0ASbVB05ZXbFqJenzcVPMuepmsSjT1RBgkYHPOOXKDIS7fF9M665K9ez5lxlp3KqD2h Gt58EfkR/vqAInXpMwYN5sFOdq8tb6JylI3clwpmE3tLOGCiNZtuaIrabNz0/1LU4sXeDAc+j SRHY7SKn9HFqezURj6jM7OScV5X84OLPiD1HRa9F5/1w7TUAoKbbVojTey17VB8Xg0AEPgqCq Lw9ROzSXA4QcPVDjqgd6b4vJjgHMb95+R+ez/HfVdGICOOST/UGuKTq8J2C7Y7JL9zed6jT6N BJDC94kVZ0x97xx1mFMxOgyvb6d3vkhiTTCzCcHjR2bFB1Dut7HTRUVgyCoZ8Dxz3L6PsOX2E XbBKEoyyyEczj+MQosbSCVnJkdp9jxREuDb+PGk7bDSZDKVjgbn7RZrm5Fv6XXT6KXGxSXVSS Dw5BgOecEcUj89s1ShlO/bGmGbJXoT+vzgsExriGMeS0+wVsN5hTNfCSSO+fHMofFDmXEF5HI 5lNVXKeAtfF8/l5z7LYxjxRsFXOmeP5gDFW+nfN4onRJjvmWvxvE6Ud5jkl3ZPVBaWhuTZdsV 66ovw690N/DUqCAErLns+KV0pE44U0QwQEdAIPd1jxcSQ8elapUPWLgDYJZIP/zR4/gApHnI Received-SPF: pass client-ip=212.227.15.15; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:129330 Archived-At: I have done the writing to a dedicated buffer as follows, using "gungadin-bufr-insert" for writing to the Gungadin buffer. =2D------- code -------- (setq gungadin-bufr (generate-new-buffer "*Gungadin*")) (defvar gungadin-guidance-message "C-h f flight\n") (defun gungadin-guidance-message () "Displays embedded rudimentary help for gungadin in a dedicated buffer.= " (message "%s" gungadin-guidance-message) (let (($out-buffer (get-buffer-create "*Gungadin*"))) (with-current-buffer $out-buffer (insert "\nGungadin\n\n") (insert "Gungadin is part of Behistun, a Gnu Package.\n\n") (insert "Gungadin 1.0 of 2017-05-02\n") (insert "Copyright (C) 2017 Christopher Dimech\n\n") (insert "Author: Christopher Dimech\n\n") (insert gungadin-guidance-message) (pop-to-buffer $out-buffer))) ) ;; (switch-to-buffer GdBfr) (defun gungadin-bufr-insert (format-string) "Display a message at the bottom of the Gungadin Buffer." (set-buffer gungadin-bufr) (with-current-buffer gungadin-bufr (insert format-string)) ) (gungadin-guidance-message) (gungadin-bufr-insert "***** TEST") > Sent: Monday, May 03, 2021 at 12:48 AM > From: "Christopher Dimech" > To: "Help Gnu Emacs" > Subject: Writing text to a dedicated buffer > > I am writing text to a package dedicated buffer. Is this the way to > go about doing that. Or are there neater ways? > > > (defun gungadin-guidance-message () > "Displays embedded rudimentary help for gungadin. > Gungadin forms part of Behistun, a Gnu Package." > > (let ((out-buffer (get-buffer-create "*Gungadin*"))) > (with-current-buffer out-buffer > (insert "\nGungadin\n\n") > (insert "Gungadin is part of Behistun, a Gnu Package.\n\n") > (insert "Gungadin 1.0 of 2017-05-02") > (insert "\nCopyright (C) 2017 Christopher Dimech\n") > (insert "\nAuthor: Christopher Dimech") > > (insert gungadin-guidance-message) > (pop-to-buffer out-buffer))) ) > > >