[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Visiting buffers programmatically
From: |
pillule |
Subject: |
Re: Visiting buffers programmatically |
Date: |
Fri, 11 Jun 2021 01:31:57 +0200 |
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.
--