help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there an easier way to jump to the same word?


From: Jambunathan K
Subject: Re: Is there an easier way to jump to the same word?
Date: Thu, 11 Apr 2013 22:36:29 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

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 <sbdegutis@gmail.com> 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
> <kjambunathan@gmail.com> wrote:
>
>     Steven Degutis <sbdegutis@gmail.com> 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
>     



reply via email to

[Prev in Thread] Current Thread [Next in Thread]