bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#68235: 29.1.90; Switching tabs stops following process output in sel


From: Juri Linkov
Subject: bug#68235: 29.1.90; Switching tabs stops following process output in selected window
Date: Thu, 15 Feb 2024 09:34:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>> Is 'keep-windows' doable for 'window-state-put' as well?
>
> I attach a patch that adds a fourth argument to 'window-state-put'.  It
> and a new 'set-window-configuration' now use a new function I called
> 'marker-last-position' that returns the last position of a marker even
> after its buffer was killed.

Thanks, I tested, and both hooks work nicely.

One problem is that whether to run the hook is defined by the fourth argument.
This means that it a user needs to use the hook, there is no way to change
the fourth argument of the existing function calls in core commands.

Maybe better to keep windows when the hook is not empty?
I.e. something like this for 'window--state-put-2':

  (when window-state-put-keep-window-functions
    ...
    (push (list window old-buffer-or-name start-pos point-pos)
          window-state-put-kept-windows))

> I added a new hook called 'window-state-put-keep-window-functions' with
> the same arguments as 'post-set-window-configuration-functions'.  Maybe
> people wanted to keep them apart.  If you think the hook should be also
> run when there are no "kept" windows, we can do that as well.

Running the hook with an empty list of windows makes sense as well.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]