[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting mode to a temporary buffer
From: |
uzibalqa |
Subject: |
Re: Setting mode to a temporary buffer |
Date: |
Thu, 25 Aug 2022 10:43:57 +0000 |
------- Original Message -------
On Thursday, August 25th, 2022 at 9:28 AM, Jean Louis <bugs@gnu.support> wrote:
> * uzibalqa uzibalqa@proton.me [2022-08-25 09:33]:
>
> > I am using the following function to write a message to a temporary buffer.
> > To set the mode
> > of the buffer I call (with-current-buffer bfname (org-mode)). Another
> > alternative is to
> > add (org-mode) after (pop-to-buffer bfname).
> >
> > switch-to-buffer uses pop-to-buffer under the hood. What is the way to do
> > this? Use
> > (pop-to-buffer bfname) followed by (org-mode)?
>
>
> If it works, why not? Does it work?
>
> --
> Jean
Works both ways. But, if a function ultimately uses another one, it would be
better
to use the one that is ultimately used. Avoids debugging complexity.