From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: 29.0.60; keymap-local-set and keymap-global-set became less strict Date: Wed, 01 Feb 2023 19:30:18 +0200 Message-ID: <83mt5xz42d.fsf@gnu.org> 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> <309dee07-e404-4f84-a839-8b99815376f8@daniel-mendler.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20721"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rpluim@gmail.com, larsi@gnus.org, emacs-devel@gnu.org, monnier@iro.umontreal.ca To: Daniel Mendler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 01 18:31:03 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 1pNGwo-0005CH-EZ for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Feb 2023 18:31:02 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNGwD-0005Yq-KS; Wed, 01 Feb 2023 12:30:25 -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 1pNGwC-0005Yi-Mz for emacs-devel@gnu.org; Wed, 01 Feb 2023 12:30:24 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNGw9-00083q-83; Wed, 01 Feb 2023 12:30:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mbdmqUvF3V+xK6x0xVEoxk+OlYuca7HjgorJ8ezILV0=; b=dWAT+rYN5kBR 3tft0fB8VuBH2x3m107HHFZ02vLT2KzCCf25BPQKHuQ5H8FXHlYs9VUqlNrdCuJjZGvk4H29+EWMT svZKuxzufK9kXjPa41PA5VAYE2+Qb5qbTkhyYh7pY3XIur0cOaaSsQplvQ0e6Ed3URV4OQjj2cg46 cSgY72gcqG5rPaUJNzv3qo2nsFuV0zlGV7Hg4OA9pflMuwqwpfiIViwjE/dvseyYacAT71LW9mQQ7 3fGXlsjZVM8JaxyphFiMyVvoEdTtXMjG/H0ihjFvfNmkwetC9TlVU4E+JY7r6IxL606xE5RNnugH0 iepMHADyTR7DG37r+29JQw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNGw7-0003ur-Iz; Wed, 01 Feb 2023 12:30:21 -0500 In-Reply-To: <309dee07-e404-4f84-a839-8b99815376f8@daniel-mendler.de> (message from Daniel Mendler on Wed, 1 Feb 2023 14:57:16 +0100) 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:302869 Archived-At: > Date: Wed, 1 Feb 2023 14:57:16 +0100 > Cc: rpluim@gmail.com, larsi@gnus.org, emacs-devel@gnu.org, > monnier@iro.umontreal.ca > From: Daniel Mendler > > 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. The advertised API wouldn't change. We don't expect anyone to use the additional argument in non-interactive invocation. We can use advertised-calling-convention declaration to hide that argument from documented interfaces. I'm also okay with using called-interactively-p, but I thought for once we should do what we preach. (And whoever wants to circumvent called-interactively-p can always use call-interactively anyway.) But if people dislike the method that we ourselves document as the preferred one, I can live with the second best. > >> 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. Not from my POV. The patch was complex, was using a different interfaces (which surely will bring some unintended surprises, like any read-WHATEVER API used to read input), and relying on obscure options like cursor-in-echo-area that evidently is not used much in these cases (or else the bug with cursor positioning on TTY frames would have been reported long ago). From where I stand, it's antithesis of safe changes close to pretest. > I am not fine with making a mess out of an API which have been > designed newly from the ground. We are not messing anything, see above. These are all accepted, documented, and recommended techniques. I get it that you don't like them, but the documentation clearly indicates that your opinions on this are not shared by the project.