help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing text to a dedicated buffer


From: Christopher Dimech
Subject: Re: Writing text to a dedicated buffer
Date: Sun, 2 May 2021 15:05:00 +0200

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" <dimech@gmx.com>
> To: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> 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))) )
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]