From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Doc of keyboard macros Date: Mon, 24 Sep 2018 12:36:35 -0400 Message-ID: References: <835zyuc457.fsf@gnu.org> <834leec2s2.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1537807185 12583 195.159.176.226 (24 Sep 2018 16:39:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 24 Sep 2018 16:39:45 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 24 18:39:41 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4Ttd-0003AB-FG for ged-emacs-devel@m.gmane.org; Mon, 24 Sep 2018 18:39:41 +0200 Original-Received: from localhost ([::1]:46077 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4Tvj-0002gU-PD for ged-emacs-devel@m.gmane.org; Mon, 24 Sep 2018 12:41:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4TvX-0002ZX-Hj for emacs-devel@gnu.org; Mon, 24 Sep 2018 12:41:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4Tqo-00064t-TZ for emacs-devel@gnu.org; Mon, 24 Sep 2018 12:36:51 -0400 Original-Received: from [195.159.176.226] (port=37297 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g4Tqo-0005zR-Kw for emacs-devel@gnu.org; Mon, 24 Sep 2018 12:36:46 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1g4Toe-0005YR-Uh for emacs-devel@gnu.org; Mon, 24 Sep 2018 18:34:32 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 78 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:0YU4jZvl3i5I/a99cW3K6x7Q27o= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:230024 Archived-At: >> . You are breaking the manual's style when describing commands: we >> always start with a list of the commands with short descriptions, >> and follow that by the detailed descriptions. Not sure exactly in which way I broke with that convention. Does it mean that I should move the "details" (like the C-u/C-uC-u and the F4-vs-C-xe discussion) to after the table? [ Yes, I admit ashamedly that I'm still not really familiar with Emacs's manual's style. ] >> . I don't understand the rationale for removing the "C-u" and >> "C-u C-u" sequences from the short list. What is the purpose of >> that? Because I found it clunky/inconvenient to "repeat" the "@kbd{C-x (} or @key{F3}" in the form of @kbd{C-u C-u C-x (} or @kbd{C-u C-u @key{F3}} so I preferred to move the C-u/C-uC-u discussion elsewhere. Now that I think a bit more about it, I actually wonder why we bother discussing this C-u business so early in the "Basic Keyboard Macro". I personally never found this of much use: of all the times that I need to modify the previous macro, the proportion where it can be done by appending to it seems vanishingly small. > Oh, and one more nit: there's no need to use the likes of > > @item @kbd{C-x (} or @key{F3} > > (which also required you to switch from "@table @kbd" to @asis), you > could use @itemx instead: > > @item @key{F3} > @itemx C-x ( Oh, cool! So how 'bout the simpler patch below instead, Stefan PS: BTW, I think I figured why I can't easily use F3/F4 (nor F2) on my systems: I have enabled the "mousekeys" option via setxkbmap (this is for my old Thinkpad X30 whose mouse buttons don't work any more ;-) Oddly enough on the machine on which I tried it earlier this results in those keys doing nothing at all, but on the machine I'm currently using, they correctly emulate mouse buttons. diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi index dac41fdb87..914bb68890 100644 --- a/doc/emacs/kmacro.texi +++ b/doc/emacs/kmacro.texi @@ -48,15 +48,19 @@ Basic Keyboard Macro @section Basic Use @table @kbd +@item C-x ( @item @key{F3} Start defining a keyboard macro (@code{kmacro-start-macro-or-insert-counter}). +@item C-x e @item @key{F4} If a keyboard macro is being defined, end the definition; otherwise, execute the most recent keyboard macro (@code{kmacro-end-or-call-macro}). +@item C-u C-x ( @item C-u @key{F3} Re-execute last keyboard macro, then append keys to its definition. +@item C-u C-u C-x ( @item C-u C-u @key{F3} Append keys to the last keyboard macro without re-executing it. @item C-x C-k r