From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: recording-elisp.el - try recording commands as elisp code Date: Fri, 02 Nov 2007 17:28:01 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1194038901 31371 80.91.229.12 (2 Nov 2007 21:28:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Nov 2007 21:28:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: yzhh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 02 22:28:24 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 1Io43w-00086A-P2 for ged-emacs-devel@m.gmane.org; Fri, 02 Nov 2007 22:28:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Io43m-0004ep-Hy for ged-emacs-devel@m.gmane.org; Fri, 02 Nov 2007 17:28:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Io43j-0004dd-KZ for emacs-devel@gnu.org; Fri, 02 Nov 2007 17:28:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Io43j-0004ci-2D for emacs-devel@gnu.org; Fri, 02 Nov 2007 17:28:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Io43i-0004cf-Q3 for emacs-devel@gnu.org; Fri, 02 Nov 2007 17:28:06 -0400 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Io43i-0007B4-OJ for emacs-devel@gnu.org; Fri, 02 Nov 2007 17:28:06 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id C24C62CF199; Fri, 2 Nov 2007 17:28:05 -0400 (EDT) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 9AF4E3FE0; Fri, 2 Nov 2007 17:28:01 -0400 (EDT) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 87D256CA9D; Fri, 2 Nov 2007 17:28:01 -0400 (EDT) In-Reply-To: (yzhh's message of "Fri, 02 Nov 2007 14:14:05 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:82373 Archived-At: > It's quite contradictory. If I give up relying on internals the recorded > result looks bad. If I insist this style there are other isearch-alike > commands waiting - I simply can not and should not handle them all. I suspect that this kind of problem is going to re-appear in various other forms for other commands. I think the right way to do it is to provide "hooks" in record-lisp which isearch can then use to explain what it does. E.g. record-lisp could check the last command's `record-lisp-cleanup-function' symbol and if set call it to clean up the last few commands. Isearch could then set this property on `isearch-exit'. Well, to tell you the truth, I have no idea what I'm talking about, so the suggestion probably isn't workable as is, but hopefully it gives you an idea of how to cleanly interface the two packages. Stefan