unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, 39149@debbugs.gnu.org, yyoncho@gmail.com
Subject: bug#39149: 27.0.50; describe-buffer-bindings is calling :filter function in wrong buffer
Date: Sun, 15 Nov 2020 08:08:18 -0800	[thread overview]
Message-ID: <CADwFkmk11-Nez+u5zCS9g5zzsgPqSG2eaU-6jEw7LLm=RHXmeQ@mail.gmail.com> (raw)
In-Reply-To: <83k0umtzv6.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Stefan Kangas <stefankangas@gmail.com>
>> Date: Sat, 14 Nov 2020 16:24:07 -0800
>> Cc: 39149@debbugs.gnu.org
>>
>> a) Add a new argument to describe-map with the original buffer.  Ensure
>>    that the :filter function is run there.
>>
>> b) Change describe-map to return its output as a string.
>
> Unless I'm missing something, b) would be a backward-incompatible
> change, so I don't think we should consider it.

No: `describe-map' was added on master a month ago as a Lisp translation
of the old C function "describe_map".  It has never been exposed to Lisp
directly, but was used internally on the C level by
`substitute-command-keys' and `describe-buffer-bindings'.

What is true is that:

- `substitute-command-keys' has always returned a string.
- `describe-buffer-bindings' has always inserted into the current
  buffer.

Whether we go with option a) or b) shouldn't need to change that.

So we should think carefully about what their interface should be rather
than nail it down to match the old C code.

BTW, while we're on it, I'm not at all sure it would make sense to use
these functions outside of help.el.  I think we might want to consider
renaming `describe-map' to `help--describe-map', and similarly for
`describe-map-tree'.

> If adding an argument is deemed not a good idea, how about binding a
> special variable to convey that information to
> describe-buffer-bindings?

Yes, that could be a third option c).  Personally, I like option b)
better.





  reply	other threads:[~2020-11-15 16:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16  6:59 bug#39149: 27.0.50; describe-buffer-bindings is calling :filter function in wrong buffer yyoncho
2020-10-30 14:23 ` Lars Ingebrigtsen
2020-10-30 16:08   ` yyoncho
2020-10-30 16:16   ` Stefan Kangas
2020-10-30 18:03     ` Basil L. Contovounesios
2020-11-01 14:56       ` Stefan Kangas
2020-11-01 17:01         ` Basil L. Contovounesios
2020-11-01  4:31     ` Stefan Kangas
2020-11-15  0:24   ` Stefan Kangas
2020-11-15 15:15     ` Eli Zaretskii
2020-11-15 16:08       ` Stefan Kangas [this message]
2020-11-15 16:28         ` Eli Zaretskii
2022-04-17 15:37     ` Lars Ingebrigtsen
2022-04-17 16:02       ` Eli Zaretskii
2022-04-17 16:06         ` Lars Ingebrigtsen
2020-10-30 15:16 ` Andreas Schwab
2020-10-30 16:23   ` Stefan Kangas
2020-10-30 16:32     ` yyoncho
2020-10-30 16:46     ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkmk11-Nez+u5zCS9g5zzsgPqSG2eaU-6jEw7LLm=RHXmeQ@mail.gmail.com' \
    --to=stefankangas@gmail.com \
    --cc=39149@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=yyoncho@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).