From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.help Subject: Re: Is there an easier way to jump to the same word? Date: Thu, 11 Apr 2013 22:36:29 +0530 Message-ID: <87hajdkne2.fsf@gmail.com> References: <87eheh89pj.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1365700016 3797 80.91.229.3 (11 Apr 2013 17:06:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Apr 2013 17:06:56 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Steven Degutis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 11 19:07:00 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 1UQKxb-0006r0-5r for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Apr 2013 19:06:55 +0200 Original-Received: from localhost ([::1]:54082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQKxa-0000Sv-LU for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Apr 2013 13:06:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQKxO-0000QZ-0y for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 13:06:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQKxM-0006rO-NR for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 13:06:41 -0400 Original-Received: from mail-da0-x234.google.com ([2607:f8b0:400e:c00::234]:45819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQKxM-0006rG-HT for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 13:06:40 -0400 Original-Received: by mail-da0-f52.google.com with SMTP id f10so762193dak.25 for ; Thu, 11 Apr 2013 10:06:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=zN4Qhr3sTirXL2+XtmwOxZcXRicaLRGuQpXcjMHUsX0=; b=omXrlNcl9x/MmolwHR8i3bmDGPVPfB+s8r3EKlsUKymh4+pNlsE/5/Dapn0O90GoE2 sQ7odTtLlxdmBFrt1VdnJge7r6Sw4UeKUMd5fsIeunTNy3Yb91zu71t4NXWO1LRjc2iw 8sH0ENNjyjGooKCaMJRSSR1JixD5g8gujH5xBVnX9OpbsOaibitogDFn71YJ8o6N3chG v6HCpsG6d6OvgBbyBZpG6vKp+GZJWwk/Fvewkzyb0UdN44vmhkYMiX2cCczATyhLfe3y 9CPjdk/+xvC9noiJWbEeQOfzM4O20/KEZqY3AuvgmA+NpoNADDSKxzadc90L3leqMXFf dZ2g== X-Received: by 10.68.253.133 with SMTP id aa5mr9911524pbd.131.1365699999851; Thu, 11 Apr 2013 10:06:39 -0700 (PDT) Original-Received: from debian-6.05 ([115.241.91.192]) by mx.google.com with ESMTPS id qr7sm4923151pbc.16.2013.04.11.10.06.36 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Thu, 11 Apr 2013 10:06:38 -0700 (PDT) In-Reply-To: (Steven Degutis's message of "Thu, 11 Apr 2013 09:08:48 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c00::234 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:90104 Archived-At: If you don't find `hi-lock-read-regexp-defaults-function' `occur-read-regexp-defaults-function' `find-tag-default-as-regexp' then your bzr version in not the most recent one. Try upgrading. Here is some customization that I have in .emacs. --8<---------------cut here---------------start------------->8--- (setq hi-lock-read-regexp-defaults-function 'find-tag-default-as-regexp) (setq occur-read-regexp-defaults-function 'find-tag-default-as-regexp) (add-hook 'occur-hook (lambda nil (next-error) (delete-other-windows))) (add-hook 'occur-mode-find-occurrence-hook (lambda nil (highlight-regexp (find-tag-default-as-regexp)))) --8<---------------cut here---------------end--------------->8--- Steven Degutis writes: > First of all those keys are stolen by paredit. > > Second of all the UI for this seems like overkill compared to > highlight-symbol.el. It doesn't need its own window, it just should > highlight matches in the current window and allow me to jump between > them easily. But knowing emacs, there's probably some variable to > disable opening a new window with the search results. > > And finally, it doesn't seem to highlight the matches in the buffer. > > -Steven > > On Thu, Apr 11, 2013 at 8:42 AM, Jambunathan K > wrote: > > Steven Degutis writes: > > > 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. > > > If you are using Emacs from bzr, configure the variable below to > run > occur for symbol at point. > > C-h v occur-read-regexp-defaults-function > > > Then jump around with > > M-s o > M-g M-n > M-g M-n > M-g M-p > > or look at occur before and jump directly to the needed location. > > > > > > > Is there a better way to do this? > > > > -Steven >