From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Is there a plan to record kbd macro as elisp code? Date: Tue, 30 Oct 2007 16:14:11 +0200 Organization: JURTA Message-ID: <87ejfcwxh0.fsf@jurta.org> References: <87y7doxmcw.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193754141 31646 80.91.229.12 (30 Oct 2007 14:22:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Oct 2007 14:22:21 +0000 (UTC) Cc: yzhh , emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 30 15:22:23 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Imrz2-0004X2-JA for ged-emacs-devel@m.gmane.org; Tue, 30 Oct 2007 15:22:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Imryt-0007tq-0q for ged-emacs-devel@m.gmane.org; Tue, 30 Oct 2007 10:22:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Imrxk-0007Ri-IX for emacs-devel@gnu.org; Tue, 30 Oct 2007 10:21:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Imrxh-0007Qg-SB for emacs-devel@gnu.org; Tue, 30 Oct 2007 10:21:00 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Imrxh-0007QU-Lg for emacs-devel@gnu.org; Tue, 30 Oct 2007 10:20:57 -0400 Original-Received: from smtp-out.neti.ee ([194.126.126.39]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Imrxa-0002qX-U4; Tue, 30 Oct 2007 10:20:51 -0400 X-Virus-Scanned: Debian amavisd-new at estpak.ee Original-Received: from Relayhost3.neti.ee (relayhost3.estpak.ee [88.196.174.169]) by MXR-8.estpak.ee (Postfix) with ESMTP id 54E14122970; Tue, 30 Oct 2007 16:20:31 +0200 (EET) Original-Received: from mail.estpak.ee (84-50-157-21-dsl.est.estpak.ee [84.50.157.21]) by Relayhost3.neti.ee (Postfix) with ESMTP id 75C8FC53FD; Tue, 30 Oct 2007 16:20:30 +0200 (EET) In-Reply-To: (Richard Stallman's message of "Mon, 29 Oct 2007 05:21:39 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:82141 > is a kbd macro I recorded for M-x replace-string is -> IS. The > complication is with the TAB completion - it would require total > knowledge about TAB completion to reconstruct the command name - > what edit-kbd-macro doesn't do. > > That is a real issue, which I had not thought about before. This is a > case which is easier to handle if you record the actual arguments. > > On the other hand, just recording the actual value of the argument > is also sometimes wrong. Suppose you mark text in a buffer and > copy it into the minibuffer as part of the macro. The Lisp program > ought to copy the text too. Recording the actual arguments is a useful and clean solution, but trying to emulate the logic of minibuffer processing will produce ugly and complicated Lisp code. -- Juri Linkov http://www.jurta.org/emacs/