From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <87361vhjxu.fsf@gnus.org> <83k0umtzv6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6389"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 39149@debbugs.gnu.org, yyoncho@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 15 17:09:09 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1keKaS-0001YK-Sx for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 15 Nov 2020 17:09:08 +0100 Original-Received: from localhost ([::1]:50348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keKaR-00020f-VY for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 15 Nov 2020 11:09:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keKaM-00020Q-JA for bug-gnu-emacs@gnu.org; Sun, 15 Nov 2020 11:09:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42464) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1keKaM-0008E0-AC for bug-gnu-emacs@gnu.org; Sun, 15 Nov 2020 11:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1keKaM-0006ft-43 for bug-gnu-emacs@gnu.org; Sun, 15 Nov 2020 11:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Nov 2020 16:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39149 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 39149-submit@debbugs.gnu.org id=B39149.160545650725616 (code B ref 39149); Sun, 15 Nov 2020 16:09:02 +0000 Original-Received: (at 39149) by debbugs.gnu.org; 15 Nov 2020 16:08:27 +0000 Original-Received: from localhost ([127.0.0.1]:54010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keKZn-0006f6-Hd for submit@debbugs.gnu.org; Sun, 15 Nov 2020 11:08:27 -0500 Original-Received: from mail-ed1-f42.google.com ([209.85.208.42]:38348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keKZk-0006er-FJ for 39149@debbugs.gnu.org; Sun, 15 Nov 2020 11:08:25 -0500 Original-Received: by mail-ed1-f42.google.com with SMTP id y4so10362253edy.5 for <39149@debbugs.gnu.org>; Sun, 15 Nov 2020 08:08:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=kXdJ62GmWvNW0/csyfG+3AFgo/X7Jl9VoY/vBgiOOyQ=; b=PkD30xu7kOC/CqIO0lhsCBq46J3i2u5h/zBJQvgGl2EtAWMhBNnMgfpli+cnkXNnow utPU4+c+sYIec6YMZ1hBsA31Izw1jg0ThkzqjQdU8lNWxAetUSkkNp403yVB1IOoRlu7 kX4UziARrR4nsjJyO+MRbw8or1fR1wItOkhAFgfafNx+8LGL7nh9v+PmvLPk3MmHkPDD dlRWl+WbhgrUE1q6RPMVIOtaM0OMVoxhiVD0Bgp0p65MQs1a01NqeJH6wV5nGSF1qRsy AWQfdPllpZYglu9jRe5vD1BkD+SH/zGH7m2qq7HEd3Yt395AOP999tfZxT775un4KHy5 /bMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=kXdJ62GmWvNW0/csyfG+3AFgo/X7Jl9VoY/vBgiOOyQ=; b=p3PVGViEwUwfqNsPNjwlFTq1sQLJqoLPAWV++4F9WylaBbGo/z1imvLlK217rdTMq3 DXlvDNEYwKDFt/mqZ+lQ+81sH/8oHA4cbKgtqnL0mv5Y9C1XfdDKHLcR1Hrs/06+ParD V9S4y65gAXb4viusG35dJBG2evcn+i/H44rfIR3MCLdc6QXwXVuzS6oMzvzxA3eM3j/e r2T12+qvD0Ex65YK2YLculXacIgrBa7Om5D44ecQ0mo9TbXKn4Ev9MUJtEpgjsosFdM8 xGR5/jyO2uOWKd8Q7uYgB0x3sEnVkmT/RFbZAEjww41imz4MRAXxf3izfjs3d9vAwegJ SgWQ== X-Gm-Message-State: AOAM532yDePipkhGtqsWI+l3JA1km6pjLPoa/sW6SZgZDjAXpQNF8wAp dmgbPRNckpbWTYH8mq3Mb+MhZnArieq25Va2j/k= X-Google-Smtp-Source: ABdhPJy1WKW9FDdtVFZVzR6vU13DqVDguFzA4IBRu7AbZpsqW61khaaHlGliJjylez0qjvIz6m8vLVLfoapOikU6g1E= X-Received: by 2002:a50:e443:: with SMTP id e3mr12316040edm.160.1605456498677; Sun, 15 Nov 2020 08:08:18 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 15 Nov 2020 08:08:18 -0800 In-Reply-To: <83k0umtzv6.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193362 Archived-At: Eli Zaretskii writes: >> From: Stefan Kangas >> 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.