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: Wed, 06 Mar 2024 19:57:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>> So when most of the time this list of kept windows will be empty,
>> then maybe better to not call the hook at all?
>
> But earlier you said "Running the hook with an empty list of windows
> makes sense as well."  So it's up to you.

We could leave it called on every set-window-configuration
even with an empty window list, as a general post-hook.

BTW, I didn't test yet what happens when
window-kept-windows-functions is non-nil but does nothing.
Here is what happens:

  Error muted by safe_call: (get-scratch-buffer-create)
  signaled (wrong-type-argument window-live-p #<window 7>)

But maybe this is ok.

>> 3. Very often the message inserted by the patch that I posted
>> are quite useless because they look like this:
>>
>>     This window displayed the buffer #<killed buffer>.
>>
>> This would be much more informative:
>>
>>     This window displayed the buffer *Help*.
>>
>> Maybe 'buffer-last-name' could help to achieve this?
>
> I tried to implement it.  Tested with
>
> (let ((buffer (get-buffer-create "*foo*")))
>   (y-or-n-p (format "current %s last %s"
>                   (buffer-name buffer) (buffer-last-name buffer)))
>   (with-current-buffer buffer
>     (rename-buffer "*bar*"))
>   (y-or-n-p (format "current %s last %s"
>                   (buffer-name buffer) (buffer-last-name buffer)))
>   (kill-buffer buffer)
>   (y-or-n-p (format "current %s last %s"
>                   (buffer-name buffer) (buffer-last-name buffer))))
> [...]
> Have a look at the attached patch.

Thanks.  I tested, and everything works nicely.





reply via email to

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