GNU bug report logs - #68235
29.1.90; Switching tabs stops following process output in selected window

Previous Next

Package: emacs;

Reported by: Dan McCarthy <daniel.c.mccarthy <at> gmail.com>

Date: Wed, 3 Jan 2024 20:49:02 UTC

Severity: normal

Found in version 29.1.90

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 68235 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: martin rudalics <rudalics <at> gmx.at>
Cc: daniel.c.mccarthy <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>,
 68235 <at> debbugs.gnu.org
Subject: Re: bug#68235: 29.1.90; Switching tabs stops following process
 output in selected window
Date: Sat, 06 Jan 2024 19:36:25 +0200
>>> Everything works nicely, and point follows the output,
>>> when this code is removed from 'tab-bar-select-tab':
>>>
>>>    ;; set-window-configuration does not restore the value of
>>>    ;; point in the current buffer, so restore it separately.
>>>    (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))
>>
>> Maybe we should make exceptions in buffers like *completions*?
>>
>> In general, restoring point is a good idea.
>>
>>> The problem is that I still can't figure out in what cases point should be
>>> restored manually.
>>
>> When the buffer was shown in another window, I think.  Martin might
>> have a definite answer.
>
> I think the snippet above should be executed iff the buffer's
> 'window-point-insertion-type' is nil.

window-point-insertion-type is nil by default, but I'd definitely want
point to follow the output, that means not using the snippet above.

OTOH, this snippet can't be removed because it supports tab-local point.
For example, open the same buffer in two tabs and move point to another
place.  Like with window-point, the position of point in tabs should be
preserved as well.  So probably we need to add special-casing for comint
buffers to follow the output.

But could you explain why such special-casing is not needed for
non-selected windows?  How set-window-configuration does the right
thing for points in non-selected windows to follow the output?
Maybe it's possible to do the same with point in the selected window?




This bug report was last modified 1 year and 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.