From: pillule <pillule@riseup.net>
To: Tim Johnson <tim@akwebsoft.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Visiting buffers programmatically
Date: Fri, 11 Jun 2021 01:31:57 +0200 [thread overview]
Message-ID: <87k0n1nuvu.fsf@riseup.net> (raw)
In-Reply-To: <5fc2e0a6-470e-0ebc-fe81-9eea2dd7fa5f@akwebsoft.com>
Tim Johnson <tim@akwebsoft.com> writes:
> GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0)
> of 2021-06-04 ubuntu 20.04
>
> I would like to write three simple elisp routines that would each visit one of:
> *scratch*, *messages* and *shell*
>
> For *messages* I would only be reading or copying text.
> For *scratch* and *shell* I would be modifying those buffers.
>
> which elisp function is best for each of
> these buffers?
>
> Would it be switch-to-buffer, display-buffer, set-buffer or something else.?
> Thanks
Do you need to see the window displaying the buffer ?
If not you can use 'set-buffer' or the macro 'with-current-buffer' that call it.
The others options are meant to display a buffer and not for batch processing.
--
next prev parent reply other threads:[~2021-06-10 23:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 21:17 Visiting buffers programmatically Tim Johnson
2021-06-10 23:31 ` pillule [this message]
2021-06-11 0:12 ` Tim Johnson
2021-06-11 0:17 ` pillule
2021-06-11 0:32 ` Tim Johnson
2021-06-11 0:47 ` Jean Louis
2021-06-11 0:51 ` Jean Louis
2021-06-11 17:27 ` Tim Johnson
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k0n1nuvu.fsf@riseup.net \
--to=pillule@riseup.net \
--cc=help-gnu-emacs@gnu.org \
--cc=tim@akwebsoft.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.