From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Lift {global,local}-key-binding to Lisp Date: Fri, 15 Jan 2021 15:24:09 +0200 Message-ID: <11389fbf-d937-e081-0a4a-bcb149defdf5@yandex.ru> References: <83zh1cbpua.fsf@gnu.org> <00a56206-80a0-c2c5-5247-d6be21fea5c0@yandex.ru> <83turi9ywk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6052"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: stefan@marxist.se, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 15 14:48:34 2021 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 1l0PSr-0001Ty-MZ for ged-emacs-devel@m.gmane-mx.org; Fri, 15 Jan 2021 14:48:33 +0100 Original-Received: from localhost ([::1]:56826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0PSq-00031k-Kq for ged-emacs-devel@m.gmane-mx.org; Fri, 15 Jan 2021 08:48:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0P5O-0008Po-GM for emacs-devel@gnu.org; Fri, 15 Jan 2021 08:24:18 -0500 Original-Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:35053) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0P5M-00043e-Az; Fri, 15 Jan 2021 08:24:17 -0500 Original-Received: by mail-ed1-x534.google.com with SMTP id u19so9517161edx.2; Fri, 15 Jan 2021 05:24:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=QXS1JbKPZw3pDXMNPhocRbdrYqY43Ine5vtWWpnuJpY=; b=WpmpcwN/vHpJJyqcKJb3BYa2AHkY/K0uVLSzckrc3F0Ym+ejfSGjmOubpshN9HYgKH sv12iIFVajsVPa6VJz/QBtN6Ge3cqS32WQoREJ+z5QlbOBZrEZxwyCJknDJ0uLAEjr/z lNNa6ZPDks0hmNszzejDpq3f0cxSPi5bEqQ/RHzLa0ya/CJD22FSmHVNIgT3HRyOK3V3 9DGYjr4ux3O8NnlJthAbJ2H0LaRnbF5/vIEt76UcNALgfUMg6WHICNV5BjmqkiV+u2Cd kT5i2MhG4UEcZySwkwmECJYmVHOUCuPaHS+0lDb+qpbKdij4A2p/sDTQcoz7pqMNikyE obnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QXS1JbKPZw3pDXMNPhocRbdrYqY43Ine5vtWWpnuJpY=; b=EeRjeUTlZfSMCR8En9St1mruyoqagGQzXxt7s52SgTK04k92BlAq/Clyxajyc/E+lj ticQ71t7kt7zdQEOchXCUoNLqXslpDr/wzfWGSRNnE1h2bASWZUqGdMsor/Jm8vz5ABy OHcZBmliOy8lclF8jTFk99mv4bmsdjWf/AQw5QFvSXaElFW7is42dT0j+FJL5zqrmvCh wGbfwWP/7heheaTtk18iCMY12mKYo7w3aJX8MeW71w0eumenKACgzTJhWWai6xvVNSyb IorOJMiUdixz/36NX9iYP7lHx48bIQEfrMJUsG1WGlOag/2g2GPIEB5EZHg8PhiMwSv7 xqMg== X-Gm-Message-State: AOAM532Y6O0IRVHRcc1bwZ6LAEpw4Uf1zwJfjG3gp8se7p75mwf9jj+A Lh/h4/oT66KYl8PrHX4cuQ06cN/4YI8= X-Google-Smtp-Source: ABdhPJz7sD7FmdgzX41WsnbJ/I5skD/EDSv2+qIMqLmdRTcSyaiad97EVejzkvIH24+1jyPFKUgo8g== X-Received: by 2002:a05:6402:b2f:: with SMTP id bo15mr9605304edb.220.1610717053647; Fri, 15 Jan 2021 05:24:13 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id o13sm3677004edr.94.2021.01.15.05.24.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Jan 2021 05:24:12 -0800 (PST) In-Reply-To: <83turi9ywk.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=raaahh@gmail.com; helo=mail-ed1-x534.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:263076 Archived-At: On 15.01.2021 14:18, Eli Zaretskii wrote: >> Consider that, when a piece of code is implemented in Lisp, it's easier >> for us "mere mortals" to find it, read, understand and debug it. Even >> more so when it comes to people outside of emacs-devel. >> >> So as a result you should end up answering fewer questions about it. > > I invite you to have a look at the C implementation of these two > functions, and then explain to me how the original code was any harder > for "mere mortals" to understand, let alone trigger some questions. It is, though of course the function is short. As such, the arguments both for and against this change are relatively weak. Surely you won't have many troubles because of this move either. So both you and others in this thread are really arguing on principle. Except for Stefan, who already did the work and wrote a couple of tests (which, in the unlikely chance of failing, would be easier to debug in Lisp), and tested the change manually, I'm sure. I dig the argument about a certain loss of organization (keymap.c => simple.el), but that can be fixed in Lisp too, when/if we get more such functions. Oscars's argument about these two functions having already been written in "would-rather-be-doing-this-on-Lisp" mindset is sensible too. > Once again, we need to address this on a case by case basis; an > abstract principle will fail to lead to wise, balanced decisions. We need to have some guidelines, though, in order to avoid arguing about every such commit. Until now, the common thinking has been "we want to have more code in Lisp, for its readability, discoverability and debuggability advantages except for cases where it would make Emacs slower/less stable/etc". Also consider that Debian with its packaging makes reading the Lisp sources considerably easier than C sources. Same goes for builds on other platforms, I imagine, probably to an even larger extent (Debian does separate the Lisp sources to a package you have to install additionally).