unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Guido Van Hoecke <guivho@gmail.com>, Emacs <help-gnu-emacs@gnu.org>
Subject: RE: Search occurrences of character at point
Date: Fri, 4 Aug 2017 08:47:58 -0700 (PDT)	[thread overview]
Message-ID: <c4eb2d03-f103-464e-ae0e-d4b5c3723bea@default> (raw)
In-Reply-To: <86wp6ja7ru.fsf@gmail.com>

> I sometimes have to edit some text where I want to find all occurences
> of some non-standard character, such as Char:  (173, #o255, #xad, ...)
> 
> I'd like a way to have the cursor sit on such a character and hit a key
> to position it at the next occurrence of said character.
> 
> I'm sure there's a way to do this?

1. `M-s o' (command `occur'), followed by typing `[' followed
by typing or pasting the character, followed by typing `]'.

E.g., `M-s o [w]' shows occurrences of character `w'.

After typing `[' you can also use `C-x RET' followed by
typing the code point or the Unicode name of the character
(followed by typing `]').

`M-s o' shows matches for a regexp.  A regexp of a character
enclosed in `[...]' matches that character.

2. `occur' shows the matches in a separate buffer, where
you can navigate among them.  This is slightly different
from what you request, which is to hit a key to immediately
go to the next occurrence.

To do that, just use `C-s' (`isearch-forward')
followed by typing the character.  Repeat `C-s' to go to
subsequent occurrences of the character.  Again, instead
of typing the character you can use `C-x RET' followed by
typing the code point or the Unicode name of the character.



  parent reply	other threads:[~2017-08-04 15:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-04 11:31 Search occurrences of character at point Guido Van Hoecke
2017-08-04 15:37 ` Yassin Philip
2017-08-04 15:47 ` Drew Adams [this message]
2017-08-04 16:09 ` Yuri Khan
2017-08-04 17:08   ` Drew Adams
2017-08-04 18:23     ` Guido Van Hoecke
2017-08-04 16:42 ` John Ankarström

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=c4eb2d03-f103-464e-ae0e-d4b5c3723bea@default \
    --to=drew.adams@oracle.com \
    --cc=guivho@gmail.com \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).