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

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

bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook


From: Basil L. Contovounesios
Subject: bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook
Date: Mon, 30 Nov 2020 20:33:01 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

martin rudalics <rudalics@gmx.at> writes:

>> Should we expose a getter or setter for this buffer member, or is that
>> opening ourselves up to abuse?
>
> I'm not sure.  But if we do that, we can get rid of the rest: We'd just
> generate the new buffer and set/reset its hook inhibitor afterwards.

Not necessarily, because Fget_buffer_create still has to run the hook
before returning the buffer.

>>> And also tell us why 'buffer-list-update-hook' would be still needed now
>>> that we have 'window-selection-change-functions'.
>>
>> I've yet to look into these hooks and their precise semantics, but are
>> you suggesting that one might obsolete the other, in which case we
>> should deprecate the old one?
>
> People usually don't care about the buffer lists, they always wanted to
> run a hook when a window got selected in a more permanent fashion.  At
> the time of adding 'buffer-list-update-hook', I thought that it
> fulfilled some of the criteria wanted for a 'select-window-hook' and
> added text in that sense to the manual.  So if you care about the buffer
> lists, 'buffer-list-update-hook' is the one to use.  If you care about
> window selection, 'window-selection-change-functions' is the one.

Thanks, then it sounds to me like there's nothing to be done, other than
recommend the right hook for the right job.  Right?

-- 
Basil





reply via email to

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