From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Search occurrences of character at point Date: Fri, 4 Aug 2017 08:47:58 -0700 (PDT) Message-ID: References: <86wp6ja7ru.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1501864630 4669 195.159.176.226 (4 Aug 2017 16:37:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 4 Aug 2017 16:37:10 +0000 (UTC) To: Guido Van Hoecke , Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 04 18:37:06 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddfau-0000go-92 for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Aug 2017 18:37:00 +0200 Original-Received: from localhost ([::1]:55659 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddfb0-000155-7H for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Aug 2017 12:37:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddepd-0001fu-86 for help-gnu-emacs@gnu.org; Fri, 04 Aug 2017 11:48:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddepZ-0000qN-Ky for help-gnu-emacs@gnu.org; Fri, 04 Aug 2017 11:48:09 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:19290) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ddepZ-0000ns-Ai for help-gnu-emacs@gnu.org; Fri, 04 Aug 2017 11:48:05 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v74FlxvJ028497 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Aug 2017 15:48:01 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v74FlxW1027251 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Aug 2017 15:47:59 GMT Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v74FlxHT018032; Fri, 4 Aug 2017 15:47:59 GMT In-Reply-To: <86wp6ja7ru.fsf@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6770.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:113926 Archived-At: > 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, ...) >=20 > 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. >=20 > 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.