[Top][All Lists]

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

Re: Setting mode to a temporary buffer

From: Stefan Monnier
Subject: Re: Setting mode to a temporary buffer
Date: Thu, 25 Aug 2022 09:35:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>     (with-current-buffer bfname (org-mode))
>     (pop-to-buffer bfname)))

`pop-to-buffer` and its friends obey `display-buffer-alist` which can
specify different behaviors depending on the buffer's state such as its
contents and its major mode.

So it's much better to set the major mode before calling `pop-to-buffer`
(like you've done above) than the reverse.


reply via email to

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