Subject: Re: bug#40341: [PATCH] * doc/lispref/os.texi (Session Management): make example homoiconic

From: Eli Zaretskii <[email-masked]>
Date: Tue, 14 Apr 2020 20:54:30 +0300

> From: Noam Postavsky <[email-masked]>
> Date: Tue, 14 Apr 2020 09:52:56 -0400
> Cc: [email-masked]
> 
> > +    (insert (format "%S" '(save-current-buffer
> > +                           (switch-to-buffer "*scratch*")
> > +                           (insert "I am restored"))))
> > +    nil)
> 
> Shouldn't this example also be using set-buffer instead of
> switch-to-buffer?  (Or rather, with-current-buffer instead of
> save-current-buffer + switch-to-buffer.)

It wouldn't hurt to put our money where our mouth is, I agree.