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:05:00 +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="25500"; 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:06:20 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 1ldBng-0006WS-HI for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 02 May 2021 15:06:20 +0200 Original-Received: from localhost ([::1]:53404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldBnf-0001J6-L7 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 02 May 2021 09:06:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldBmS-0001GF-Qu for help-gnu-emacs@gnu.org; Sun, 02 May 2021 09:05:04 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:56793) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldBmQ-0004Cu-OH for help-gnu-emacs@gnu.org; Sun, 02 May 2021 09:05:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619960701; bh=qCe1+XQSmd1L6WoDgAGrBQ6s/WUjGaS2mOZXmHcD+uw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=YO0p1hnXSb8FvHKYKye88FcXTse7pYyBd9viOFuNfpOnNDk9igdND27T1BH+KEJr5 Qn/zntOLEl+lUy/zSUgoWIFvr8R/z7uj4ohy2lvpAUL7xw1Hd5K7hjKSmnrmWKESLh QCDgoO5UuELiJV8aALpopCcX+IDA95h7Qb7S5zKA= 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:05:00 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:M8BIYAq3wMsbBpnKd7CXmB48QoiyINdpD34jWAi+b/lLUq1+FMAS8FhLMmrdPIBpJfoKS tFAXpNmzSJikurJrsav1K6ciI7eM9QRWNB3W7OFXK/9hdS7ZG+mNLEzqSWcFb4A2+oFmNejWPNvM S2LlTq2Ze979jGa6Z94xVUL9x68KxzvQoYYN625W9LKqhKG52OaZrHdqVHTng9dvAsb/cUWPbvij kheFoKPvZ/EuuAIn9DjZD+2bc1iLrc69+HA2ZmuOHQ5L4NpRvymO+9I6ts25KcgYwjU8hgFOjp2y T8= X-UI-Out-Filterresults: notjunk:1;V03:K0:MiVjDpI5/mE=:ojW6qOnD2Y6hQ5JIdJaDNp FzgCHrnf7t/c/YP7MR1f4nf6XIr8K7LdL8UCDescfxfrlj0zSxX3Pk71f9kvvoifkxdJcVvMS dQMivz+Ia1XKrEpBuzjGw6uA7ZP2Ho1QGBiUNA13XPdxXpVueMNyLTsYr+ucIqT6wRK1fsq9V Md7jgm7eI49aA1gXmkcfBQo7x4xj8m/BkMueT0y+YPhmTHqqO9VF/gxQfIXSOJoVJNLJovVVB EtRUn3CfCiuVG+TPPut8BYdTdNpz70bTBFpyZy+2rv30jN/0bM+s7NmUMqsoRzAG/kZVwLCk+ ZJbom7ytxRxyRiWmThNNhPVfBtVoemTTvzM+AB3yl9/Q7zxWpDCjmRKJPcIy0QVzgV55SwGSy 801pwfRMEvmrlQhRUVDw5j5I+QoJMaFcI5sqYEaI4HXSEMfdQATKbQD4bda+ll1SUo5GnJKv/ BiRorMpsg+7oUVLlSiA8cXS9zSbbLvPp6emE7c5P7NwckZeMI4fnmi+4go3OEeS4a8fNnYPcI 3l2N2CQcHGFXB1hUt7x+FcIpnSnh6rplIFJtR8ixdiUI/O9KAqUU57XuOz+iZa9VCc1JEKjAy GTuhxo7NPjIvAhHarKgK7GD9+SJ7qDPTQPk4Ero/2+AO13bEKef8chWeiU7UU+E7Z6GXGV/s0 8e438pHqyE6WysU2qOqJYKSLEM54OE8z2KwTVAmmQpeaTjYJY8dVKCy1CdponhAzSqgKzNnXk H5XAKPvwXkGD0lBY7uHcwwUP9U7vTyfmy3casoilp7yr2LwiAqPAJovfzcck9k3/kmLWU8Fa Received-SPF: pass client-ip=212.227.15.19; 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:129329 Archived-At: I would like to write more things to the created buffer from other functions. Not so sure if it is good to call get-buffer-create on the created buffer every time I want to write to it. Is there some good scheme for writing to a user defined buffer from various elisp files? > 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))) ) > > >