GNU bug report logs - #34765
26.1; with-temp-buffer should not run buffer-list-update-hook

Previous Next

Package: emacs;

Reported by: Alexander Miller <alexanderm <at> web.de>

Date: Tue, 5 Mar 2019 22:58:02 UTC

Severity: normal

Tags: fixed

Found in version 26.1

Fixed in version 28.1

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 34765 <at> debbugs.gnu.org, alexanderm <at> web.de, Lars Ingebrigtsen <larsi <at> gnus.org>, Eli Zaretskii <eliz <at> gnu.org>, monnier <at> IRO.UMontreal.CA
Subject: bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook
Date: Mon, 30 Nov 2020 20:33:01 +0000
martin rudalics <rudalics <at> 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




This bug report was last modified 4 years and 153 days ago.

Previous Next


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