From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#60859: [PATCH] Remove reference to the kbd function from documentation Date: Tue, 17 Jan 2023 18:16:54 +0100 Message-ID: <87mt6haxo9.fsf@gmail.com> References: <87pmbeivcl.fsf@panoramix.zarniwoop.org> <83ilh64juj.fsf@gnu.org> <87o7qyo3nc.fsf@panoramix.zarniwoop.org> <83cz7e4dve.fsf@gnu.org> <87edrt6y4p.fsf@panoramix.zarniwoop.org> <875yd5ciqs.fsf@gmail.com> <87fsc9jg6p.fsf@panoramix.zarniwoop.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28546"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60859@debbugs.gnu.org To: Panagiotis Koutsourakis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 17 18:18:21 2023 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 1pHpbI-0007GF-S2 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Jan 2023 18:18:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHpb2-0005fG-HI; Tue, 17 Jan 2023 12:18:04 -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 1pHpb0-0005eY-LN for bug-gnu-emacs@gnu.org; Tue, 17 Jan 2023 12:18:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pHpb0-0005oM-CT for bug-gnu-emacs@gnu.org; Tue, 17 Jan 2023 12:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pHpb0-00025j-2w for bug-gnu-emacs@gnu.org; Tue, 17 Jan 2023 12:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Jan 2023 17:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60859 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 60859-submit@debbugs.gnu.org id=B60859.16739758247969 (code B ref 60859); Tue, 17 Jan 2023 17:18:02 +0000 Original-Received: (at 60859) by debbugs.gnu.org; 17 Jan 2023 17:17:04 +0000 Original-Received: from localhost ([127.0.0.1]:38111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHpa4-00024T-7G for submit@debbugs.gnu.org; Tue, 17 Jan 2023 12:17:04 -0500 Original-Received: from mail-wm1-f48.google.com ([209.85.128.48]:42921) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHpa1-00023s-4n for 60859@debbugs.gnu.org; Tue, 17 Jan 2023 12:17:02 -0500 Original-Received: by mail-wm1-f48.google.com with SMTP id f25-20020a1c6a19000000b003da221fbf48so8715759wmc.1 for <60859@debbugs.gnu.org>; Tue, 17 Jan 2023 09:17:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=uRiCSDz+dtdl8EZAD4EziAPIKISWol28wbg63tiGvvU=; b=Ishusrr0DKegixMyaZZ9+qjzKAjgtqN0ggE9VedMNOWkdCW2p9DADU940U5tdUewxr K9NhHiKuUbhk1buQvVop/lePD3w7kWF32uShIdnuilaZbIJEG1F3wm/Amjn9KCFmjG8/ FrpSE/iGXl77rn3tpX/GyeJeezqXorQbpgrA30WmgxVq2sUMX6ovpi2J41AWL0yo0CgO HLelrkXU2/uajipXjCk7GNuxc7udpMkk6Htq5CWcY2RZFeXVg6JaWYQ5vUO20uufoX3G bkFAzVvLmLe4eVCYucITwo2zJPXi8tRsaTZDoerVS9yF+cVb60y+IHT7gk1Zw6maMK0h LgHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uRiCSDz+dtdl8EZAD4EziAPIKISWol28wbg63tiGvvU=; b=2hyPC7O4IUuxeBYzcLWfoO4X1Bjx1fIcgzXkMmM6EvUVj6xnBMKBoyno6uXxWh8Xnt zEYeRYJPDGyYDDShEEYR9FKr1gk91ffWFTpo5EAdoo4vZqXjCPDvOGeDAEtuJ82mTR4j 3CSxFPKZMfngbSJN5nsb6cRS6XrHTUr2rPzsVpV9trQnpMBL9L0LBZ1AhQ7JzEPUXMH1 xgtPBKUqQLyfcFPzYh2QdbuB3WM5EmWKcN33/sNmT0XQZBtPrL8vAQ7E16KApK6Xtq6U WfoRgYkziDnCO9X/cwO/8CWVaCiSMTDwKaivPwsl2xSK7hZ9pmv+3upJmJSr9y1LV2Fp rW5g== X-Gm-Message-State: AFqh2kqkFxQ2vDP231KP3+tLmuk2NXNY+wWb3JgW6wq4rbAm4rSP9NST 8CDc8JsvF4NfSWY7DIaOl8AF1qt5A4s= X-Google-Smtp-Source: AMrXdXvbGiOTK23K0hoihJ5ov1WQrO9DNEto0GQ01QYsxVW+OTf0yZcgy8eqsTz+70yajXpZQw2CqQ== X-Received: by 2002:a05:600c:3596:b0:3da:1357:4ca2 with SMTP id p22-20020a05600c359600b003da13574ca2mr3886736wmq.11.1673975815182; Tue, 17 Jan 2023 09:16:55 -0800 (PST) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id u2-20020a05600c210200b003d98f92692fsm15707126wml.17.2023.01.17.09.16.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 09:16:54 -0800 (PST) In-Reply-To: <87fsc9jg6p.fsf@panoramix.zarniwoop.org> (Panagiotis Koutsourakis's message of "Tue, 17 Jan 2023 18:09:50 +0200") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253565 Archived-At: >>>>> On Tue, 17 Jan 2023 18:09:50 +0200, Panagiotis Koutsourakis said: Panagiotis> The current situation is that the explanation refers to "kbd" as an easy Panagiotis> way to write a key binding, but the code example has changed and makes Panagiotis> no reference to it. right >> >> How about >> >> --begin-- >> There are several syntaxes that can be used to specify the binding, >> but the simplest and most consistent is the one accepted by >> @code{kbd}, which is basically a series of characters separated by >> spaces. Keys with modifiers can be specified by prepending the >> modifier, such as @samp{C-} for Control, or @samp{M-} for Meta. For >> example, to bind @samp{C-x} followed by @samp{a}, use >> >> @example >> kbd("C-x a") >> @end example >> --end-- Panagiotis> This goes into some detail for a currently deprecated way to bind keys Panagiotis> (or at least that's what the current lisp reference manual says). Panagiotis> So, to recap: Panagiotis> 1. I think currently there is a documentation bug: "kbd" is mentioned in Panagiotis> text but not used in the example immediately following it. yes Panagiotis> 2. Other documentation sources (emacs lisp reference manual in emacs-29 Panagiotis> branch) explicitly state that the preferred way to bind keys in emacs 29 Panagiotis> is using "the syntax supported by 'key-valid-p'" and that "[the old Panagiotis> functions] should not be used in new code." (section 23.13 of elisp Panagiotis> reference in emacs-29) yes Panagiotis> So, assuming that we want the documentation as a whole to be consistent, Panagiotis> I see two ways forward: either we eliminate or reduce the importance of Panagiotis> the old functions in the user manual, or we remove the effective Panagiotis> deprecation of the old functions in the emacs lisp reference manual and Panagiotis> expand on the use of 'kbd', 'global-set-key' and 'define-key'. Panagiotis> What do you think? The syntax accepted by the new functions is that of `kbd', so as long as that syntax is explained somewhere I guess we can remove references to `kbd' itself. Robert --