From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Aaron S. Hawley" Newsgroups: gmane.emacs.help Subject: Re: Keyboard macro with Isearch Date: Sat, 29 Oct 2005 11:45:25 -0400 (EDT) Organization: University of Vermont Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1130600823 23693 80.91.229.2 (29 Oct 2005 15:47:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 29 Oct 2005 15:47:03 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 29 17:47:00 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EVsuM-0003BC-4m for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Oct 2005 17:46:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVsuK-0006qr-Ky for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Oct 2005 11:46:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EVste-0006et-0q for help-gnu-emacs@gnu.org; Sat, 29 Oct 2005 11:45:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EVstb-0006cb-Gz for help-gnu-emacs@gnu.org; Sat, 29 Oct 2005 11:45:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVstb-0006cR-0E for help-gnu-emacs@gnu.org; Sat, 29 Oct 2005 11:45:27 -0400 Original-Received: from [132.198.101.203] (helo=eagle.uvm.edu) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EVsta-000261-SB for help-gnu-emacs@gnu.org; Sat, 29 Oct 2005 11:45:27 -0400 Original-Received: from elk.uvm.edu (elk.uvm.edu [132.198.101.63]) by eagle.uvm.edu (8.13.5/8.13.5) with ESMTP id j9TFjPDH002749 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sat, 29 Oct 2005 11:45:25 -0400 X-X-Sender: ashawley@elk.uvm.edu Original-To: help-gnu-emacs@gnu.org In-Reply-To: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:30681 Archived-At: This problem is now a much shorter bug report: /a I wrote on Mon, 22 Aug 2005, > After the confusion from my original post, I am still looking for a > solution to the "keyboard macros with Isearch" problem. > > Kevin Boyd's response though not helpful for my problem does show exactly > what the problem is with Isearch. If one wanted an Emacs macro using > Isearch to terminate a search, then one could explicityly add `RET' (or > for Kevin `C-m') to terminate the search. But even without `RET', a > macro using search terminates the search when the macro ends, rather than > keeping the search interactive. > > I wrote on 9 August 2005: > > > Isearch doesn't play nice with keyboard macros. > > > > One of the simplest macros that could use Isearch would to be a simple > > call of isearch-forward using C-s. The macro could be created with: > > > > C-x ( C-s C-x ) C-x C-k b C-. > > > > or evaluating: > > > > (global-set-key [?\C-.] "\C-s") > > > > Unfortunately, calling such a macro causes Isearch to halt taking > > input rather than stay "interactive" and take input from the user for > > the search string and continue highlighting any matches. > > > > The above is admittedly not a useful example, but I'm interested how > > to store specific interactive searches with Isearch as macros, like > > `C-s C-w' or anything more complicated, and then bounding them to > > shorter key sequences like `C-.' or . Using the `C-s C-w' > > example: > > > > C-x ( C-s C-w C-x ) C-x C-k b C-. > > > > or evaluating: > > > > (global-set-key [?\C-.] "\C-s\C-w") > > > > The search works by going to the end of the current word, but halts > > and gives the message, "Mark saved where search started". > > > > It's not clear to me how create customizations for calling Isearch, > > unless you use not only Emacs Lisp but make hacks useing Isearch's > > internals. > > > > This code in the function isearch-done in file isearch.el looks like > > at least one suspect for bias against macros: > > > > (or executing-kbd-macro (> (minibuffer-depth) 0) > > (message "Mark saved where search started")))))) > > > > /a