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, 02 Nov 2007 22:45:25 +0200 Organization: JURTA Message-ID: <87k5p05qsy.fsf@jurta.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1194036725 24443 80.91.229.12 (2 Nov 2007 20:52:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Nov 2007 20:52:05 +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 21:52:07 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 1Io3Uh-00078B-Lr for ged-emacs-devel@m.gmane.org; Fri, 02 Nov 2007 21:51:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Io3UX-0004rn-Ik for ged-emacs-devel@m.gmane.org; Fri, 02 Nov 2007 16:51:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Io3TL-0003zu-QW for emacs-devel@gnu.org; Fri, 02 Nov 2007 16:50:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Io3TK-0003yW-BO for emacs-devel@gnu.org; Fri, 02 Nov 2007 16:50:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Io3TJ-0003yJ-Oe for emacs-devel@gnu.org; Fri, 02 Nov 2007 16:50:29 -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 1Io3TJ-0001ZK-5x for emacs-devel@gnu.org; Fri, 02 Nov 2007 16:50:29 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by MXR-5.estpak.ee (Postfix) with ESMTP id 823DD15DC74; Fri, 2 Nov 2007 22:50:27 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at estpak.ee Original-Received: from smtp-out.neti.ee ([127.0.0.1]) by localhost (MXR-5.estpak.ee [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u32pXIjvYRlp; Fri, 2 Nov 2007 22:50:22 +0200 (EET) Original-Received: from Relayhost2.neti.ee (Relayhost2 [88.196.174.142]) by MXR-5.estpak.ee (Postfix) with ESMTP id BF53F168108; Fri, 2 Nov 2007 22:50:22 +0200 (EET) Original-Received: from mail.estpak.ee (84-50-157-21-dsl.est.estpak.ee [84.50.157.21]) by Relayhost2.neti.ee (Postfix) with ESMTP id C45B11EC9FD; Fri, 2 Nov 2007 22:50:22 +0200 (EET) 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-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:82372 Archived-At: > To get good isearch recording I used isearch internal information (a stack > of intermidiate states left on isearch-exit). This looks a bad practice > since it's prone to isearch implementation changes. > > But the situation is: it cannot be done without knowledge about it's > internals. Recording every isearch command does not work because many of > them do not have args (i.e. they've not been designed to be recorded). And > any attempt to transform them to be shorter relies on isearch > implementation. The "isearch state stack " is just another kind of interal > knowledge and I choose it for simplicity. > > 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 think it is enough to convert the isearch exit event with the last search string to the calls of search-forward, search-backward, re-search-forward and re-search-backward. -- Juri Linkov http://www.jurta.org/emacs/