From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: yzhh Newsgroups: gmane.emacs.devel Subject: Re: Is there a plan to record kbd macro as elisp code? Date: Mon, 29 Oct 2007 05:20:09 +0000 (UTC) Message-ID: References: <87wst8uub5.fsf@kfs-lx.testafd.dk> <87ve8qyk4r.fsf@kfs-lx.testafd.dk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1193635231 10775 80.91.229.12 (29 Oct 2007 05:20:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Oct 2007 05:20:31 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 29 06:20:33 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 1ImN3A-0006mX-US for ged-emacs-devel@m.gmane.org; Mon, 29 Oct 2007 06:20:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ImN31-0000Gt-Jv for ged-emacs-devel@m.gmane.org; Mon, 29 Oct 2007 01:20:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ImN2x-0000G4-R7 for emacs-devel@gnu.org; Mon, 29 Oct 2007 01:20:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ImN2w-0000Fo-As for emacs-devel@gnu.org; Mon, 29 Oct 2007 01:20:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ImN2w-0000Fl-4F for emacs-devel@gnu.org; Mon, 29 Oct 2007 01:20:18 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ImN2v-00016x-Jv for emacs-devel@gnu.org; Mon, 29 Oct 2007 01:20:17 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1ImN2s-0003mn-BT for emacs-devel@gnu.org; Mon, 29 Oct 2007 05:20:14 +0000 Original-Received: from 211.90.238.185 ([211.90.238.185]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Oct 2007 05:20:14 +0000 Original-Received: from yezonghui by 211.90.238.185 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Oct 2007 05:20:14 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 25 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 211.90.238.185 (Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.8.1.6) Gecko/20070723 Iceweasel/2.0.0.6 (Debian-2.0.0.6-0etch1+lenny1)) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:82027 Archived-At: Kim F. Storm cua.dk> writes: > IMO, the only real solution is to record the elisp code while recording > the keyboard macro - as it is possible to cather for changes in > the mark-active state and insert suitable set-mark commands etc. I agree. > Still, I fail to see the real need for the functionality. > > It may be ok as a way to get a starting point for an editing command, > but only very trivial functions can be written that way anyway - and > they are just as well written and saved as a series of keystrokes as > they do now. These are some benefits I thought of: 1. When modifying these trivial functions, non-sequential control flow (conditional branches and loops) are available for elisp code, but not for keystrokes. In such cases a user who's familiar with elisp grammar but not with emacs command names/args is well served by recorded elisp code. 2. Trivial functions in the form of elisp code is more suitable for sharing with others - it's not dependent on the keymaps. (Not everyone use standard key bindings and many have added bindings here and there.)