From: Christopher Dimech <dimech@gmx.com>
To: Christopher Dimech <dimech@gmx.com>
Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Writing text to a dedicated buffer
Date: Sun, 2 May 2021 15:25:07 +0200 [thread overview]
Message-ID: <trinity-1f80a056-a6f7-4b43-9e24-a3516d826457-1619961907806@3c-app-mailcom-bs08> (raw)
In-Reply-To: <trinity-8b3fffea-8625-415f-8193-a0d036b6f633-1619959709762@3c-app-mailcom-bs08>
I have done the writing to a dedicated buffer as follows,
using "gungadin-bufr-insert" for writing to the Gungadin buffer.
-------- 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" <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))) )
>
>
>
next prev parent reply other threads:[~2021-05-02 13:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-02 12:48 Writing text to a dedicated buffer Christopher Dimech
2021-05-02 13:05 ` Christopher Dimech
2021-05-02 17:08 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-02 13:25 ` Christopher Dimech [this message]
2021-05-02 14:23 ` Joost Kremers
2021-05-02 17:06 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-04 13:07 ` Filipp Gunbin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-1f80a056-a6f7-4b43-9e24-a3516d826457-1619961907806@3c-app-mailcom-bs08 \
--to=dimech@gmx.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).