all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Renaud Casenave-Péré" <renaud@casenave-pere.fr>
To: "help-gnu-emacs\@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: Is there an easier way to jump to the same word?
Date: Fri, 12 Apr 2013 06:50:19 +0100	[thread overview]
Message-ID: <874nfcmh5w.fsf@casenave-pere.fr> (raw)
In-Reply-To: <878v4omosz.fsf@casenave-pere.fr> ("Renaud \=\?iso-8859-1\?Q\?Cas\?\= \=\?iso-8859-1\?Q\?enave-P\=E9r\=E9\=22's\?\= message of "Fri, 12 Apr 2013 04:05:16 +0100")

On Fri, Apr 12 2013, Renaud Casenave-Péré wrote:

> You may find this solution a bit overkill, but if you install evil, you can use
> something like this :
>
> (global-set-key (kbd "C-*") #'(lambda ()
>                                 (interactive)
>                                 (evil-search-symbol t))) ;; search forward
>
> (global-set-key (kbd "C-#") #'(lambda ()
>                                 (interactive)
>                                 (evil-search-symbol nil))) ;; search backward
>
> which does what you want and should work even if you don't use evil at all as
> long as you do (require 'evil-search).

Another (beggining of a) solution. With something like this :

(defun isearch-yank-word-at-point ()
  "Pull the word at point into search string."
  (interactive)
  (goto-char (beginning-of-thing 'word))
  (isearch-yank-internal
   #'(lambda ()
       (end-of-thing 'word))))

(define-key isearch-mode-map (kbd "C-*") 'isearch-yank-word-at-point)

In combination with `isearch-forward-word', you can jump to the next iteration
of the word you are on, using only isearch and thing-at-point facilities.

-- 
Renaud Casenave-Pere



  parent reply	other threads:[~2013-04-12  5:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.23929.1365647063.855.help-gnu-emacs@gnu.org>
2013-04-11  7:43 ` Is there an easier way to jump to the same word? Chris F.A. Johnson
2013-04-11  7:57   ` Damien Wyart
2013-04-11  8:22   ` Chris F.A. Johnson
2013-04-11 14:05     ` Steven Degutis
     [not found]       ` <878v4omosz.fsf@casenave-pere.fr>
2013-04-12  5:50         ` Renaud Casenave-Péré [this message]
2013-04-11  2:24 Steven Degutis
2013-04-11  7:11 ` Andreas Röhler
2013-04-11  7:35 ` Le Wang
2013-04-11 13:39   ` Jambunathan K
2013-04-11 14:09     ` Steven Degutis
2013-04-11 14:06   ` Steven Degutis
2013-04-11  8:04 ` Bastien
2013-04-11 14:13   ` Steven Degutis
2013-04-13  0:19     ` Bastien
2013-04-13  0:22       ` Steven Degutis
2013-04-11 13:42 ` Jambunathan K
2013-04-11 14:08   ` Steven Degutis
2013-04-11 17:06     ` Jambunathan K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874nfcmh5w.fsf@casenave-pere.fr \
    --to=renaud@casenave-pere.fr \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.