From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: string to string matching Date: Fri, 30 Apr 2010 20:58:13 +0200 Message-ID: <4BDB2845.6090801@easy-emacs.de> References: <4BCD1CAE.4010306@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1272653846 12960 80.91.229.12 (30 Apr 2010 18:57:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 30 Apr 2010 18:57:26 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Zhu, Shenli" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 30 20:57:25 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O7vOq-00070F-MO for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Apr 2010 20:57:21 +0200 Original-Received: from localhost ([127.0.0.1]:44472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7vOq-0003Xu-6F for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Apr 2010 14:57:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7vO7-0003Qh-3q for help-gnu-emacs@gnu.org; Fri, 30 Apr 2010 14:56:35 -0400 Original-Received: from [140.186.70.92] (port=50431 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7vO5-0003Q5-Rd for help-gnu-emacs@gnu.org; Fri, 30 Apr 2010 14:56:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7vO4-0002wZ-4E for help-gnu-emacs@gnu.org; Fri, 30 Apr 2010 14:56:33 -0400 Original-Received: from moutng.kundenserver.de ([212.227.17.9]:59315) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7vO3-0002wK-Ou for help-gnu-emacs@gnu.org; Fri, 30 Apr 2010 14:56:32 -0400 Original-Received: from [192.168.178.27] (p54BEA80B.dip0.t-ipconnect.de [84.190.168.11]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0M4VfU-1NBr4z0Aua-00yrjh; Fri, 30 Apr 2010 20:56:29 +0200 User-Agent: Thunderbird 2.0.0.19 (X11/20081227) In-Reply-To: <4BCD1CAE.4010306@gmail.com> X-Provags-ID: V01U2FsdGVkX1/4vThThRryGBaMo50RJm98L8LISSYt8HcqTlU 1stPpUtp4d3Mo6GcCCDLxa64o52fLflNeFCZl0WBSb6sYa/32X fagYrGHFdcAJ8lvV3JiA5aWpwjvnn6yUR0PgwidaW4= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:72875 Archived-At: Zhu, Shenli wrote: > Hello experts, > > Emacs use syntax table to implement char to char matching, e.g. "(" and > ")" parenthesis matching. > But how to do string to string matching, e.g. "BEGIN" and "END" matching? > > Thank you, > -Z > > > Hi, tried some realisations of the matter. One identifies begin and end of sh-script forms. Its here: https://code.launchpad.net/~a-roehler/s-x-emacs-werkstatt/sh-beg-end.el A more generic tool identifying any THING by its beginnings and ends is here: https://code.launchpad.net/~a-roehler/s-x-emacs-werkstatt/beg-end.el You may watch realisation of the latter by calling ar-blok-atpt from https://code.launchpad.net/~a-roehler/s-x-emacs-werkstatt/thing-at-point-utils.el where `blok' is freely customizable setting begin- and end-strings. HTH Andreas -- https://code.launchpad.net/~a-roehler/python-mode https://code.launchpad.net/s-x-emacs-werkstatt/