> But I wonder what could be a proper solution? I still have no idea how to avoid double call of display-buffer, but at least here is the patch that avoids creating two tabs. It creates a new tab only for the first call of display-buffer, and resets display-buffer-overriding-action afterwards: