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


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Juri Linkov <juri <at> linkov.net>
Cc: daniel.c.mccarthy <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>, 68235 <at> debbugs.gnu.org
Subject: bug#68235: 29.1.90; Switching tabs stops following process output in selected window
Date: Thu, 25 Jan 2024 10:39:51 +0100
[Message part 1 (text/plain, inline)]
> When I instrumented the function 'foo', it entered edebug
> between 'y-or-n-p' in
>
>    (y-or-n-p "Configuration saved ...")
>    (delete-other-windows window)
>    (kill-buffer buffer)
>    (y-or-n-p "Configuration reset ...")
>
> So I supposed that maybe from 'delete-other-windows' and 'kill-buffer',
> but now I understand this is because exiting the minibuffer from
> 'y-or-n-p' calls 'set-window-configuration'.

Unless 'read-minibuffer-restore-windows' is nil.  Saving and restoring
the configuration with 'y-or-n-p' makes no sense because in practice the
user cannot change the configuration while 'y-or-n-p' is in progress.

>> We could add a new field to the buffer structure and a function
>> say 'buffer-last-name' which would return the last name a buffer had
>> before it was renamed: nil for a new buffer, the old name before the
>> last 'rename-buffer' and the last buffer name for a dead buffer.
>
> Looks nice.

I attach a patch.

>> And always think about what to propose when a new buffer with the same
>> name has been created meanwhile.
>
> Something using uniquify could help.

Maybe.  Here I had problems with uniquify not always restoring the base
name of a buffer when I killed the last other buffer with the same base
name.  Maybe the fault is all mine.

>> 'kill-buffer' calls reset_buffer_local_variables which scans the local
>> variables alist of the buffer and resets all values to their default
>> values.  Giving the variable either a 'permanent-local' property or
>> binding the default value to the buffer local value around 'kill-buffer'
>> could work around that but I'd rather try to save this (and other buffer
>> local values) in a separate alist for buffers stored in a configuration.
>
> To save revert-buffer-functions like saving positions of dired files
> in window parameters?

For example, yes.

martin
[buffer-last-name.diff (text/x-patch, attachment)]

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

Previous Next


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