Subject: bug#68235: 29.1.90; Switching tabs stops following process output in selected window

From: Juri Linkov <[email-masked]>
Date: Sun, 07 Jan 2024 18:49:36 +0200

> In either case I doubt that the 'set-window-configuration' code does
> anything wrong here.  IIRC there were problems in the dired buffer
> reverting code, namely that it did not preserve the position of point
> reasonably and you tried to handle that via 'wc-point'.

The dired revert is a separate problem unrelated to this bug report.
But still we need to remove this ad-hoc condition:

            (when (and (markerp wc-point)
                       (marker-buffer wc-point)
                       ;; FIXME: After dired-revert, marker relocates to 1.
                       ;; window-configuration restores point to global point
                       ;; in this dired buffer, not to its window point,
                       ;; but this is slightly better than 1.
                       ;; Maybe better to save dired-filename in each window?
                       (not (eq 1 (marker-position wc-point))))
              (goto-char wc-point))

Checking for (not (eq 1 (marker-position wc-point)))
is the wrong thing to do because it also affects non-dired buffers.

But I have no idea how to handle dired revert that moves the marker
to the top of the buffer.  Adding special-handling for dired here
also doesn't look right.

Maybe it's possible to mark the marker as invalidated after reverting?
Then could check for the invalidated status here.