From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Chris F.A. Johnson" Newsgroups: gmane.emacs.help Subject: Re: Is there an easier way to jump to the same word? Date: Thu, 11 Apr 2013 03:43:09 -0400 Organization: A noiseless patient Spider Message-ID: References: Reply-To: cfajohnson@gmail.com NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1365686429 5181 80.91.229.3 (11 Apr 2013 13:20:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Apr 2013 13:20:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 11 15:20:29 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UQHQS-0000LN-4m for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Apr 2013 15:20:28 +0200 Original-Received: from localhost ([::1]:58030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQHQR-0003T2-Lw for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Apr 2013 09:20:27 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Injection-Info: mx05.eternal-september.org; posting-host="def1fc8f73d5cc661e1c421d248552de"; logging-data="23168"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18OROEB2VrWwiPtR2kqLfxETrLV2m59mZc=" User-Agent: slrn/0.9.8.1 (Linux) Cancel-Lock: sha1:L86y164QjYpJc+0JfqvygVTH1xw= Original-Xref: usenet.stanford.edu gnu.emacs.help:197813 X-Mailman-Approved-At: Thu, 11 Apr 2013 09:20:11 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90092 Archived-At: On 2013-04-11, Steven Degutis wrote: > --047d7b67031bbb272504da0c7ba5 > Content-Type: text/plain; charset=ISO-8859-1 > > Often times I find that I want to jump to another occurrence of the > word-under-point, almost always variables or functions. I end up going to > the beginning of the word with M-b, doing isearch-forward with C-s, adding > all the words until the full word is the search term with C-w a bunch of > times, and finally C-s to jump around to other instances of it. > > Is there a better way to do this? This is what I use: (defun current-word-search () "search forward for word under cursor" (interactive) (word-search-forward (current-word))) -- Chris F.A. Johnson Author: ======================= Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress) Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)