From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: man/kmacro.texi Date: Fri, 20 Aug 2004 22:54:44 -0500 (CDT) Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <200408210354.i7L3sig04866@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1093060540 8443 80.91.224.253 (21 Aug 2004 03:55:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 21 Aug 2004 03:55:40 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 21 05:55:32 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ByMya-0003RC-00 for ; Sat, 21 Aug 2004 05:55:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ByN2v-0008KV-0a for ged-emacs-devel@m.gmane.org; Sat, 21 Aug 2004 00:00:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1ByN2o-0008Jr-Lz for emacs-devel@gnu.org; Fri, 20 Aug 2004 23:59:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1ByN2o-0008Jf-65 for emacs-devel@gnu.org; Fri, 20 Aug 2004 23:59:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ByN2o-0008Jc-3M for emacs-devel@gnu.org; Fri, 20 Aug 2004 23:59:54 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ByMyB-0004sn-H1 for emacs-devel@gnu.org; Fri, 20 Aug 2004 23:55:07 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id i7L3t6uE013303 for ; Fri, 20 Aug 2004 22:55:07 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id i7L3sig04866; Fri, 20 Aug 2004 22:54:44 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 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 Xref: main.gmane.org gmane.emacs.devel:26363 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26363 Apart from the issues I took care of with my patch, I have the following remarks and questions about man/kmacro.texi: >>From `(emacs)Basic Keyboard Macro': Alternatively, you can use `C-x C-k C-s' to start a keyboard macro, and `C-x C-k C-k...' to end and execute it. `end _and_ execute' makes it sound like the macro will be executed twice, like with `C-x ( C-x e'. This is apparently not the case. No advantage to using this alternate method is given. Is it even worth mentioning? (If yes, it should be reformulated.) >>From `(emacs)Basic Keyboard Macro': The command `C-x C-k r' (`apply-macro-to-region-lines') repeats the last defined keyboard macro on each complete line within the current region. It does this line by line, by moving point to the beginning of the line and then executing the macro. What is a complete line? I would say, a line terminated by a newline _or_ the end of the buffer. For `apply-macro-to-region-lines' it means "terminated by a newline" with no "or". This is ambiguous and should be mentioned _if_ this is intended. But _is_ it intentional? For instance, after marking the entire buffer with `C-x h', `apply-macro-to-region-lines' will apply the last keyboard macro to all lines in the buffer, except the last line, if the buffer does not end in a newline. The entire section `(emacs)Keyboard Macro Counter' is difficult to read. I am pretty sure that it must be very useful for _something_, but it is not obvious what that is. Note that this is part of the _Emacs_ manual, which is supposed to be understandable by beginners. Maybe the entire section could be moved to emacs-xtra or a similar place. Then it could actually be expanded and an example of use could be given. That node could be referenced from the Emacs manual with an @inforef. I would _guess_ that `kmacro-insert-counter' and `kmacro-add-counter' only make sense during execution of a macro, but it would be better if this were clarified. If the material got moved to emacs-xtra or such, one would also have enough room to mention `C-u C-x C-k C-a'. Currently it seems like this would add 4, which is not the case. The command `C-x C-k C-f' (`kmacro-set-format') prompts for the format to use when inserting the macro counter. The default format is `%d'. If you set the counter format before you define a macro, that format is restored before each repetition of the macro. Consequently, any changes you make to the macro counter format while defining a macro are only active for the rest of the macro. This seems to assume that every reader of the Emacs manual is familiar with `format' and knows the alternatives to "%d". If this were emacs-xtra or such, there would be place enough to mention the alternatives that are potentially useful in this context, as well as give references. It is not clear what happens if we do _not_ set the format _before_ defining the macro and set it while defining the macro. Does the default %d get restored before repetition or not? As a last remark, this chapter seems to come rather early in the Emacs manual. Section `(emacs)Save Keyboard Macro' seems to assume a non-trivial level of knowledge about key bindings, like the difference between local and global bindings, whereas the reader may not have any knowledge at all about binding keys at that stage. The material in `(emacs)Save Keyboard Macro', like the entire chapter, originally occurred a lot later in the manual. Sincerely, Luc.