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

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

RE: Search occurrences of character at point


From: Drew Adams
Subject: RE: Search occurrences of character at point
Date: Fri, 4 Aug 2017 08:47:58 -0700 (PDT)

> 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.



reply via email to

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