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: recording-elisp.el - try recording commands as elisp code Date: Fri, 2 Nov 2007 01:01:39 +0200 (EET) Message-ID: <49248.83.178.59.207.1193958099.squirrel@webmail.jurta.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1193958152 30375 80.91.229.12 (1 Nov 2007 23:02:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 1 Nov 2007 23:02:32 +0000 (UTC) Cc: emacs-devel@gnu.org To: yezonghui@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 02 00:02:34 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 1Inj3S-0000dr-0k for ged-emacs-devel@m.gmane.org; Fri, 02 Nov 2007 00:02:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Inj3H-0004SL-Ty for ged-emacs-devel@m.gmane.org; Thu, 01 Nov 2007 19:02:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Inj3E-0004Oj-Lt for emacs-devel@gnu.org; Thu, 01 Nov 2007 19:02:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Inj3D-0004MA-MX for emacs-devel@gnu.org; Thu, 01 Nov 2007 19:02:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Inj3D-0004Ls-J9 for emacs-devel@gnu.org; Thu, 01 Nov 2007 19:02:11 -0400 Original-Received: from dreamhostlb1.dreamhost.com ([208.97.187.133] helo=webmail4.sd.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Inj3D-0002f1-8q for emacs-devel@gnu.org; Thu, 01 Nov 2007 19:02:11 -0400 Original-Received: from webmail.jurta.org (localhost [127.0.0.1]) by webmail4.sd.dreamhost.com (Postfix) with ESMTP id 951D53024A; Thu, 1 Nov 2007 16:01:39 -0700 (PDT) Original-Received: from 83.178.59.207 (SquirrelMail authenticated user jurta@jurta.org) by webmail.jurta.org with HTTP; Fri, 2 Nov 2007 01:01:39 +0200 (EET) In-Reply-To: User-Agent: SquirrelMail/1.4.10a 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:82326 Archived-At: > This recording.el is maybe some useful results from our discussion on > recording kbd macro as elisp results. I'm now posting it not because it= is > perfectly usable, but to trigger some ideas on improvements. Thanks. > I started from a patch Juri gave to me. In his code there are modificat= ions > in the C code and in kmacro.el and isearch.el. I recognize that the C c= ode > patch is a must to get command args, and left them as is. I think I should install my C patch that adds a new variable this-command= -args. This will allow you to continue freely implementing this feature. > But I think it is better to implement the recording outside other elisp > source. So I pulled his code out of those el files and wrote > recording-elisp.el. I also made further modifications to handle isearch > commands better. I suggest you to give a shorter name to this package (e.g. record-lisp.el= ) and to use the same prefix for all function and variable names. > If anybody is interested to give it a try. it is quite simple: M-x > start-recording-commands, do something, M-x end-recording-commands, and > then M-x insert-recorded-commands into current buffer. It's fine that you implement separate commands to record Lisp commands with their arguments since actually this feature is not dependent on keyboard macros. But I think `C-x (' and `C-x )' still should record Lisp commands too, because these keybindings are convenient to start and end recording of command sequences, even though they record different things: one feature records a keyboard macro, and another - Lisp code. --=20 Juri Linkov http://www.jurta.org/emacs/