Subject: bug#33871: 27.0.50; Revert Dired window saved in window configuration

From: martin rudalics <[email-masked]>
Date: Tue, 9 Apr 2024 11:05:08 +0200

> With 'with-selected-window' the code was so simple: just one call
 > 'with-selected-window' and no special handling needed.  But
 > without 'with-selected-window' the code became more complicated
 > and error-prone.  I just found another place that needed to use
 > the window's buffer, and fixed it.  I don't know maybe
 > 'with-selected-window' was not too bad?  Or it has other problems?

In my experience 'with-selected-window' is bad because any functions its
body calls cannot tell whether the selected window is the "real selected
window" and its buffer the "real current buffer" at that time.  A
typical example is 'mode-line-format': users who wanted to paint the
mode line of the selected window in some special way could not do that
because they could not tell whether that window was the real selected
one.  If such issues are of no concern, use 'with-selected-window'.

martin