X-Loop: help-debbugs@HIDDEN Subject: bug#67700: 29.1; Minor keymap- commands documention issues Resent-From: Howard Melman <hmelman@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 07 Dec 2023 21:55:01 +0000 Resent-Message-ID: <handler.67700.B.170198605417742 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 67700 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 67700 <at> debbugs.gnu.org X-Debbugs-Original-To: GNU Emacs <bug-gnu-emacs@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.170198605417742 (code B ref -1); Thu, 07 Dec 2023 21:55:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Dec 2023 21:54:14 +0000 Received: from localhost ([127.0.0.1]:43279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rBMJy-0004c6-9N for submit <at> debbugs.gnu.org; Thu, 07 Dec 2023 16:54:14 -0500 Received: from lists.gnu.org ([2001:470:142::17]:37988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <hmelman@HIDDEN>) id 1rBMJs-0004bg-Uy for submit <at> debbugs.gnu.org; Thu, 07 Dec 2023 16:54:13 -0500 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 <hmelman@HIDDEN>) id 1rBMJa-0004Ov-R2 for bug-gnu-emacs@HIDDEN; Thu, 07 Dec 2023 16:53:50 -0500 Received: from mail-yw1-x1130.google.com ([2607:f8b0:4864:20::1130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <hmelman@HIDDEN>) id 1rBMJZ-0006yw-BG for bug-gnu-emacs@HIDDEN; Thu, 07 Dec 2023 16:53:50 -0500 Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-5b383b4184fso12087077b3.1 for <bug-gnu-emacs@HIDDEN>; Thu, 07 Dec 2023 13:53:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701986026; x=1702590826; darn=gnu.org; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=RGQIdosTCtsTEXCLR1cYpW95dLj++u69fKYWl9zENjY=; b=e/HpvPG4g2k0a5byj59Dxkv+Cou/yab2F5jWmqn/2n4pyHtXCZAZji3X0+w0x6SQh0 f2b35IJpj3bk8vEaXA5UjdMz8xpMhBz2Famd6+QKNLXZicR4aYYBZeYNMCJj3ufemjRj cGng4YRIBcu08PgU0rQF4AlPLtaDqX5HIlh51v1ek/PNUlaC0nPLi0wMC+ZAmRygK46z 8Y51FWj4sNW18ZW2k1TDIVn/Avnw/OmGAN9AYf6rxT540bgX5YYImWLF0ZWBlPYzvsZE tL1BxHWFR1Qc4fkZ3ZzyF+mCljdIsJHLerL2nPOQ5X8Slpc2zeBkgZSvDeqq/VetQasU C8rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701986026; x=1702590826; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RGQIdosTCtsTEXCLR1cYpW95dLj++u69fKYWl9zENjY=; b=TlKUT7N9CYIqcvO6l0q57MYqx4gNnoyq9p2ajRowXwgOCxSTX2sDS/fjeWTJj1D/lz 6JgA7LR2f8lOpOOzlq6ir/LIy49qNOcQP63fxKKiSS63O4X+i80LR9Mye/6YKpUmuZLd fHpMYsCy1ndXpG5qlSkz9p0YbMjLavF+IfcscOShhT7badEcJyq0SXIWCSoPzkSue/Yn OyizuxAHBYWDt0h7Zjyp7YQvwnP6VStHOVlTqqIF+cQSe0gY7DmP/SDwF0nlt0O1PPHo +gPpBpGpfdntBlmXn4RBBNua8EQxo2YYcXT1h8kv4kCufeW5dc8fXoPgTP7c36qDPr24 B3ew== X-Gm-Message-State: AOJu0YzIeqaQtC7vHzyU8ef/mpSG6eWuvAcnGdqGEWWvPwpRTTIDFL7/ r8EZKTPMPMHMV45Oujh570ee8Un+7Ag= X-Google-Smtp-Source: AGHT+IFz94fEPmkZzT2tszQ6R5xqIb/wxsfhjKGPwPEhnTSt7c9kXWwMFtLHxhNgfyedhfPNCQnYbQ== X-Received: by 2002:a81:9f11:0:b0:5d7:1940:7d8f with SMTP id s17-20020a819f11000000b005d719407d8fmr2919271ywn.102.1701986026278; Thu, 07 Dec 2023 13:53:46 -0800 (PST) Received: from smtpclient.apple (pool-108-26-231-137.bstnma.fios.verizon.net. [108.26.231.137]) by smtp.gmail.com with ESMTPSA id p15-20020a0cf68f000000b0066d12d1351fsm226650qvn.143.2023.12.07.13.53.45 for <bug-gnu-emacs@HIDDEN> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2023 13:53:45 -0800 (PST) From: Howard Melman <hmelman@HIDDEN> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Message-Id: <5320A546-FCE6-4131-B3F9-AFC8513D034D@HIDDEN> Date: Thu, 7 Dec 2023 16:53:34 -0500 X-Mailer: Apple Mail (2.3731.700.6) Received-SPF: pass client-ip=2607:f8b0:4864:20::1130; envelope-from=hmelman@HIDDEN; helo=mail-yw1-x1130.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) Is there an advantage to calls to keymap-set (and keymap-global-set) using #' for the command definition? IIUC it is a compiler hint that the symbol is a function. Most examples in the emacs manual (e.g., 50.3.6 Rebinding Keys in Your Init File) just use ' not #', but the 50.3.7 Modifier Keys section says: (keymap-global-set "C-S-n" #'previous-line) Grepping the emacs sources shows both styles are used in code. If #' is preferred with the keymap commands, the examples should use it and if not, IMHO it's worth mentioning in the manual that using #' is unnecessary as this was a common question of newbies copying config snippets before the keymap commands. Also, I found the following idiom useful in my init for defining several bindings at once in an existing map: (define-keymap :keymap (current-global-map) "M-u" #'upcase-dwim ; was upcase-word "M-l" #'downcase-dwim ; was downcase-word "M-/" #'hippie-expand ; was dabbrev-expand "M-$" #'lookup-word-at-point) I didn't see anywhere in the emacs manual on keybinding customization an example of how to define multiple bindings at once in the same keymap. This terse style is IMHO cleaner than repeated calls to keymap-global-set. When reading the docs on the new keymap commands, how to do this on an existing keymap wasn't obvious to me. It is mentioned in the elisp manual but just in the description of :keymap which is the 3rd keyword in a list of 6, without any example. I think it would be useful to have an example of doing this some place (maybe section 50.3.6 in the emacs manual); that is calling define-keymap with :keymap and perhaps specifically using (current-global-map) as that wasn't on my radar before either. In GNU Emacs 29.1 (build 1, x86_64-apple-darwin21.6.0, Carbon Version 165 AppKit 2113.6) of 2023-08-08 built on Mac-1691500888998.local -- Howard
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Howard Melman <hmelman@HIDDEN> Subject: bug#67700: Acknowledgement (29.1; Minor keymap- commands documention issues) Message-ID: <handler.67700.B.170198605417742.ack <at> debbugs.gnu.org> References: <5320A546-FCE6-4131-B3F9-AFC8513D034D@HIDDEN> X-Gnu-PR-Message: ack 67700 X-Gnu-PR-Package: emacs Reply-To: 67700 <at> debbugs.gnu.org Date: Thu, 07 Dec 2023 21:55:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 67700 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 67700: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D67700 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#67700: 29.1; Minor keymap- commands documention issues Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 08 Dec 2023 06:28:01 +0000 Resent-Message-ID: <handler.67700.B67700.170201685627505 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 67700 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Howard Melman <hmelman@HIDDEN> Cc: 67700 <at> debbugs.gnu.org Received: via spool by 67700-submit <at> debbugs.gnu.org id=B67700.170201685627505 (code B ref 67700); Fri, 08 Dec 2023 06:28:01 +0000 Received: (at 67700) by debbugs.gnu.org; 8 Dec 2023 06:27:36 +0000 Received: from localhost ([127.0.0.1]:43642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rBUKl-00079V-9b for submit <at> debbugs.gnu.org; Fri, 08 Dec 2023 01:27:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33472) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1rBUKj-00079H-G2 for 67700 <at> debbugs.gnu.org; Fri, 08 Dec 2023 01:27:33 -0500 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 <eliz@HIDDEN>) id 1rBUKR-0006Za-C8; Fri, 08 Dec 2023 01:27:15 -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=xKTfMOApw1rjuPe1bn0ybjdjIg6FzJL7itW7IiteAco=; b=anJXEMM8VR8m eCi6FBykaK61Y8yb9dA0+vO7aHHHUMtVliTJQuMe/EgDIYocBAUhFYnJPs86sZxzuwUxoW1/vEjPX sfVpIZVGj1C3haYBr96QeMjy8dDtbpRFBw8LzVQAJnsLpf4VIrzUPN5YDU+qPcQwoYpByB4A0PYjf jNPKCETn4bmcPfO0nC5J6tIgIeQyPnbJ+Ck+tQJOOqBzRtOVq8MK/3gkIg7Y8k0YldCL9rVN7iWL/ GU1ArMFL1VeS/5ezIm+UdOyPTdYlwmh/N7n16W/Y7frM75/y1XBZtDl5UrupNXHhkkCJ5dtK4iyn4 s5kfyfgfqIel9vI2ZANhIQ==; Date: Fri, 08 Dec 2023 08:27:29 +0200 Message-Id: <83msul1a5q.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <5320A546-FCE6-4131-B3F9-AFC8513D034D@HIDDEN> (message from Howard Melman on Thu, 7 Dec 2023 16:53:34 -0500) References: <5320A546-FCE6-4131-B3F9-AFC8513D034D@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Howard Melman <hmelman@HIDDEN> > Date: Thu, 7 Dec 2023 16:53:34 -0500 > > Is there an advantage to calls to keymap-set (and > keymap-global-set) using #' for the command definition? > IIUC it is a compiler hint that the symbol is a > function. Most examples in the emacs manual (e.g., 50.3.6 > Rebinding Keys in Your Init File) just use ' not #', but the > 50.3.7 Modifier Keys section says: > > (keymap-global-set "C-S-n" #'previous-line) > > Grepping the emacs sources shows both styles are used in > code. If #' is preferred with the keymap commands, the > examples should use it and if not, IMHO it's worth > mentioning in the manual that using #' is unnecessary as > this was a common question of newbies copying config > snippets before the keymap commands. > > > Also, I found the following idiom useful in my init for > defining several bindings at once in an existing map: > > (define-keymap :keymap (current-global-map) > "M-u" #'upcase-dwim ; was upcase-word > "M-l" #'downcase-dwim ; was downcase-word > "M-/" #'hippie-expand ; was dabbrev-expand > "M-$" #'lookup-word-at-point) > > I didn't see anywhere in the emacs manual on keybinding > customization an example of how to define multiple bindings > at once in the same keymap. This terse style is IMHO > cleaner than repeated calls to keymap-global-set. > > When reading the docs on the new keymap commands, how to do > this on an existing keymap wasn't obvious to me. It is > mentioned in the elisp manual but just in the description of > :keymap which is the 3rd keyword in a list of 6, without any > example. > > I think it would be useful to have an example of doing this > some place (maybe section 50.3.6 in the emacs manual); that > is calling define-keymap with :keymap and perhaps > specifically using (current-global-map) as that wasn't on my > radar before either. Thanks. Patches for the manual to improve these parts will be very welcome.
Received: (at control) by debbugs.gnu.org; 22 Dec 2023 15:00:58 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 22 10:00:58 2023 Received: from localhost ([127.0.0.1]:47574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rGh1G-0006Fw-Cf for submit <at> debbugs.gnu.org; Fri, 22 Dec 2023 10:00:58 -0500 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:51546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1rGh1E-00062P-Er for control <at> debbugs.gnu.org; Fri, 22 Dec 2023 10:00:56 -0500 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-54cb4fa667bso2436339a12.3 for <control <at> debbugs.gnu.org>; Fri, 22 Dec 2023 07:00:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703257246; x=1703862046; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=VBgtKDBRwkdGORmN1+tbRoulpntVMsow2wsyEavcMWw=; b=CkKFuC9X0Uxxd859qT4I1Wl3yvb6wvLCpgI6oV8rlLWOy8c2MypcgQelFONL0Wknmv ilk+GnBHEZAyZf89arAdkOekhsxxCw66bxonk/N5WldnaZW2ohsemgWzerhnL1CC/hs7 iY3srom2orZZhSdqs4RDu2if9RTXpCmsY3k4NyrOoiCQ9tpHlmfXsx4K6kMJ8ubbHcIZ rBCkmmcAo/teg5IOn7Az4yzTi8ulf856OTI1dViLCTs77yJpxSWKEUhRtXziByBdXZRG OZ208AvL6Q04mtpjsnbC5WpAOZWmmMPn39hiYXw1RjnhmrmEIN7xGaAcr19hD1ZJ1aSs PmQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703257246; x=1703862046; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=VBgtKDBRwkdGORmN1+tbRoulpntVMsow2wsyEavcMWw=; b=L70rUW50Ml2PVUK1jQ/BEjS/MbWF+SH0SYCbrUKb6rj70uKwN444A0PczePgMvkMHV A/6zzNaAMu6KKL/Bh6P7iPrcKFbepeuXjQJi47QqJ/Pv1Cwm2FKujCFSCX3REJYgCHWb j2Bx+xgTtoJimONmLbZWxaqd/1XLTbl2AjPUm3OB3FonwzlLB4/Ms3w9ym+9UhILuEMf uKwI7NvdGQrlOe+rQbP+1baIy6jkfGLc3myzBLXYwyk/kgbbQw5t4GTwUghNtBI0Lroi S7MZ7jz8mHW6goRR+hrCYHL1AqTKveboRyXYNfzQwvDjRY3cVGtcYkV2aFco02Sbx2oO 50EQ== X-Gm-Message-State: AOJu0YzjgyTc6mAY+hJ2mba5oZRIkEch/zNm+sI5CtJTtu9QH5Zm6Has n/Omw8uCNOkUDcme/sDQZIyJCgK+DoXBbL0aFIhK0wmdCgGIPQ== X-Google-Smtp-Source: AGHT+IHkCczxC66mwEMnuh/zkiOB/A6H0j8atTyn3Xi1fv0YIKOSKfeToX5WErk70nVnDT0j2bTGP5icNs9dTgUskvo= X-Received: by 2002:a50:a414:0:b0:54c:4837:8b6e with SMTP id u20-20020a50a414000000b0054c48378b6emr764691edb.60.1703257246014; Fri, 22 Dec 2023 07:00:46 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 22 Dec 2023 07:00:45 -0800 From: Stefan Kangas <stefankangas@HIDDEN> MIME-Version: 1.0 Date: Fri, 22 Dec 2023 07:00:45 -0800 Message-ID: <CADwFkmmYef0PKHQv68z7c9U+QrE86WeTxwP5etbYXA7b_WT13w@HIDDEN> Subject: control message for bug #67700 To: control <at> debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) severity 67700 minor quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.