Subject: bug#33458: 27.0.50; dired loses position when reverted from outside place

From: Juri Linkov <[email-masked]>
Date: Mon, 24 Dec 2018 01:47:36 +0200

>> No.  But we can provide a function like 'buffers-in-dead-windows' that
>> takes a configuration (or a list of configurations) as argument and
>> returns a list of dead windows that whould show that buffer if they
>> were restored.
>
> I called it 'buffer-windows-from-configuration'.  Please have a look.

Thanks, but I expected it to be more configurable, i.e. to also look 
at prev/next-buffers in a saved configuration when needed, etc.

This could be achieved with a complete export of the saved
configuration to a Lisp structure.

If you think this is too big task, then a simpler solution is
just to create such metadata structure before the configuration
is saved, and save it along with the configuration.  I already do
this by saving a writable window state parallelly with saving
a window configuration.  What I mean that in a package that
saves window configurations, maintain such a list:

((window-configuration-1 writable-window-state-1 metadata-1)
 (window-configuration-2 writable-window-state-2 metadata-2)
 ...)

where metadata could contain a list of buffers from windows
and from prev/next buffers, and everything else required by
application logic.