From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler Newsgroups: gmane.emacs.devel Subject: Re: 29.0.60; keymap-local-set and keymap-global-set became less strict Date: Wed, 1 Feb 2023 14:57:16 +0100 Message-ID: <309dee07-e404-4f84-a839-8b99815376f8@daniel-mendler.de> References: <5876987d-2479-f512-5767-218c8c16a909@daniel-mendler.de> <875ycngyji.fsf@gnus.org> <87zg9zvzuc.fsf@gmail.com> <831qna3frm.fsf@gnu.org> <87mt5yogct.fsf@gmail.com> <83y1pi1wz4.fsf@gnu.org> <87ilgmodk4.fsf@gmail.com> <83mt5y1r5u.fsf@gnu.org> <87bkmdo8e4.fsf@gmail.com> <831qn91qo0.fsf@gnu.org> <137753af-777d-2da3-c111-7e2d414633f1@daniel-mendler.de> <83sffpze9h.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22234"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rpluim@gmail.com, larsi@gnus.org, emacs-devel@gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 01 14:58:13 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pNDcq-0005Wh-0W for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Feb 2023 14:58:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNDcE-0006Cj-EJ; Wed, 01 Feb 2023 08:57:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNDcA-0006BT-09 for emacs-devel@gnu.org; Wed, 01 Feb 2023 08:57:30 -0500 Original-Received: from server.qxqx.de ([2a01:4f8:121:346::180] helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNDc5-0002vs-Gp; Wed, 01 Feb 2023 08:57:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6Kz28EM6pTRPqsi4WSSDT7SlVff37X9J7BvfKoHfNnM=; b=SRmPTCLTgdaISN9tBsiVlyzKGH 77csj0A3ofHqQcopsyXlX3RSrflqpcHlg+sx8lkL+0SRHX0vqDsMEkMeywFInaO3Q7SkNqNj5ta3U g4XGXIAO/eZPIvtlgXzJfnKRSnXIPyWXLrE7AYTB7eU/aV5t/YH8bZYRd6Ant/K5N11w=; Content-Language: en-US In-Reply-To: <83sffpze9h.fsf@gnu.org> Received-SPF: pass client-ip=2a01:4f8:121:346::180; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302862 Archived-At: On 2/1/23 14:50, Eli Zaretskii wrote: > So? A malevolent enough programmer could replace > keymap-global/local-set with an implementation that performs the > conversion unconditionally, so the danger of someone hanging > themselves with the rope Emacs gives them always exists. This > function is supposed to help those who _want_ such problems to be > caught, it isn't supposed to make Emacs a high-security prison, > because that's simply impossible in Emacs. Of course everything is possible. But that's not my point here. The keymap.el API is a newly designed API, so please let's design it in a clean way, where we don't have meaningless arguments. My suggestion is to go with one of these three solutions: - Use `call-interactively-p' - Use Stefan's proposal of a separate function `keymap--read' which is called in the interactive form. - Use Stefan's other proposal to allow vectors for all keymap functions consistently. This way we don't have to jump through hoops here. >> Why can you not just move the whole conversion business into the >> `interactive' form? This means we cannot use a string as interactive >> form but we have to implement our own `keymap--read` function which is >> then used like this: `(interactive (list (keymap--read ...) ...))`. It >> is not as concise as the string form but would avoid any problems. > > Excuse me, but that's the tail wagging the dog. Please be reasonable, > we want a change that is simple and safe enough to go into Emacs 29, > because currently those functions are completely useless as > interactive commands, and we want them to become the mainstay of > binding keys interactively. I think the patch proposed before was fairly reasonable, and could be even improved with a separate `keymap--read' function as Stefan proposed. It is less intrusive than the patch which has been proposed now with the additional INTERACTIVE argument, which modifies the interface. Adding an argument is a more intrusive change. >> As better alternative we could also go with Stefan's proposal to allow >> vectors as arguments in the first place. > > Over Lars's disagreement? I don't want to do that, with all due > respect to Stefan, certainly not on emacs-29. Okay, that's fine with me. I am fine with both allowing vectors and not allowing vectors. But I am not fine with making a mess out of an API which have been designed newly from the ground. Daniel