From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emre Sevinc Newsgroups: gmane.emacs.help Subject: Re: How to produce the effect of * and # of VIM in Emacs? Date: Wed, 27 Jul 2005 23:52:07 +0300 Organization: Istanbul Bilgi University Message-ID: <87ll3sas5k.fsf@ileriseviye.org> References: <87ack8uxj0.fsf@ileriseviye.org> <3kpmgfFvjmpuU1@individual.net> <873bq0cg3i.fsf@ileriseviye.org> <42e7ebf6_3@news1.prserv.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1122497746 17498 80.91.229.2 (27 Jul 2005 20:55:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Jul 2005 20:55:46 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 27 22:55:35 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dxsvq-0001OL-8F for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jul 2005 22:55:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DxsyF-00076F-QR for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jul 2005 16:57:43 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.tiscali.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 46 Original-X-Trace: individual.net Q/t1vHUEkRvrIV9qh5z1HwBo+Rshr9QLUamOvMuSHCwfwP6LQ0 User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:oFfsQl/mEpZ9NPW4cwPmn3eTb+o= Original-Xref: shelby.stanford.edu gnu.emacs.help:132715 Original-To: help-gnu-emacs@gnu.org 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:28238 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28238 kgold@watson.ibm.com (kgold) writes: > Emre Sevinc writes: >> > >> > Search forward and backward for the word under the cursor >> > >> > You can make a macro from this sequence and bind it to a key >> >> I tried that by pressing C-x ( and then pressing M-b C-s C-w >> and then C-x ) and Emacs said that a macro is defined, then I >> came to the middle of the word pressed C-x e to execute the >> macro but the cursor just stayed there, nothing happened. >> Any ideas why that doesn't work? Is it related to I-search's >> being interactive and interfering with the macro creation process? > > You need one more C-s. C-w says search for the word, and the second > C-s says to get the next match. Unfortunately that did not create the effect I'm searching for. As you suggested C-x ( M-b C-s C-w C-s ) and then C-x e but it didn't do what I described. Alternatively I tried these in *scratch*: (global-set-key (kbd "C-*") "\M-b\C-s\C-s\C-w") (global-set-key (kbd "C-*") "\M-b\C-s\C-w\C-s") which didn't work, too. I don't know what I doing wrong if I can't handle it with simple keyboard macro way then I'll have to use the elisp functions from the suggested packages (even though I think they are a little bit overkill for just the single thing I want (besides that, they are nice and providing functionality I liked)). -- Emre Sevinc eMBA Software Developer Actively engaged in: http:www.bilgi.edu.tr http://ileriseviye.org http://www.bilgi.edu.tr http://fazlamesai.net Cognitive Science Student http://cazci.com http://www.cogsci.boun.edu.tr