GNU bug report logs - #39149
27.0.50; describe-buffer-bindings is calling :filter function in wrong buffer

Previous Next

Package: emacs;

Reported by: yyoncho <yyoncho <at> gmail.com>

Date: Thu, 16 Jan 2020 07:00:02 UTC

Severity: normal

Found in version 27.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 39149 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, yyoncho <yyoncho <at> gmail.com>
Cc: 39149 <at> debbugs.gnu.org
Subject: Re: bug#39149: 27.0.50; describe-buffer-bindings is calling :filter
 function in wrong buffer
Date: Fri, 30 Oct 2020 16:16:35 +0000
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> yyoncho <yyoncho <at> gmail.com> writes:
>
>> To reproduce (eval in scratch buffer)
>> (define-key global-map (kbd "C-c C-l r")
>>   `(menu-item "2" switch-to-buffer
>>               :filter ,(lambda (cmd)
>>                          (print (format "Called in %s" (current-buffer)))
>>                          cmd)))
>> (with-temp-buffer
>>   (with-output-to-string
>>     (describe-buffer-bindings (get-buffer "*scratch*") [3 12] t)))
>>
>> This outputs:
>>
>> \"Called in  *temp*\"
>
> I tried this recipe, but I'm not getting the :filter function called at
> all.  Do you have a recipe, starting from "emacs -Q", that reproduces
> this bug?
>
> And your report didn't include the data about the version generated by
> report-emacs-bug, so it's hard to guess whether bug is only on some
> specific system.

I can reproduce the above on Emacs 26.3, but not on master.

Note that there might have been changes here with the merge of
scratch/substitute-command-keys.  I tried hard to not introduce any
regressions or even changes in behavior with that branch, but I might
have failed to include the above bug...

What is the result output here?  Here, the last form evaluates to this
on master:

"
Global Bindings Starting With C-c C-l:
key             binding
---             -------


Function key map translations Starting With C-c C-l:
key             binding
---             -------

"

Is this correct?  Should it do anything else in addition that it
currently does not?




This bug report was last modified 3 years and 96 days ago.

Previous Next


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