From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Karan Bathla Newsgroups: gmane.emacs.help Subject: Custom searches, like interactively searching palindromes Date: Fri, 1 Oct 2010 02:50:04 -0700 (PDT) Message-ID: <7042.89429.qm@web36206.mail.mud.yahoo.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1285926769 6779 80.91.229.12 (1 Oct 2010 09:52:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 1 Oct 2010 09:52:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 01 11:52:44 2010 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 1P1cIE-0007nu-S6 for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Oct 2010 11:52:43 +0200 Original-Received: from localhost ([127.0.0.1]:56272 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1cIE-0003AE-7O for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Oct 2010 05:52:42 -0400 Original-Received: from [140.186.70.92] (port=52583 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1cFj-0002Hp-Tr for help-gnu-emacs@gnu.org; Fri, 01 Oct 2010 05:50:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P1cFi-0002cN-Po for help-gnu-emacs@gnu.org; Fri, 01 Oct 2010 05:50:07 -0400 Original-Received: from web36206.mail.mud.yahoo.com ([209.191.68.232]:26191) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1P1cFi-0002bi-Lr for help-gnu-emacs@gnu.org; Fri, 01 Oct 2010 05:50:06 -0400 Original-Received: (qmail 90209 invoked by uid 60001); 1 Oct 2010 09:50:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1285926605; bh=/Q9kSRMpoKOkZQGtqxZZW1dYUpCXdsAKybIFj1iTrKg=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=aPcw3jpt4IPMbykWDb02r0oBV0jKZ6YROlE+URF7X/drv78r4pbIIQ3plONHAtMFFfgHjSRf8OtxTcOaSWRQQ/FtCNwWr8mHzQrUIdsT9UHPv+YpocfeAxJaSff7hKGolk67FAE3aqqaMSfB2pBcdtO217e/S4xaBfKX+K5v0Zw= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=n+Xb2YQDGrv6qCGwWhXBfsJfyJhdKEKWmT5uk4Wq9vhSjDUEyA3U9FRvPWWRozn7zjUJn1syRQcX2gD7T2wfAhJvxVWV2ctqfIyZ+fsRDjwZAfZqf30o/owYu0dckt2ADry1xNzcOUFn5rjeA1/dhw+EHUdApd5exGnFNQPzIaU=; X-YMail-OSG: nLC6GRAVM1lcmf0vd6wOJFHS.KVnY4010Auk3P6tT2_sqpU r4a6L4NqWRA.uKHUcRx8lvvzoGnhyyu9KlhnAw.mv7ZOayHFP3SGB44RFp3A 4fn.lZo_IFJrTDUI7NNFuLZUigY9uUCXnToZuF_pTy.FG.Ee._l7YAGo_lZi rSQZs9BVPuG2hwJ4WvpqIGMnDjP_14ts6fBAZ3yVSY_OvmjiRZnv8NHq4xGM IplOLXJKTOxCof63T9YbWAssVGlpHdWg.EDRQqJ2FYjOluM7lAzuQ3BMhWFY y7OKyB7PtUN6wQOFzdtYdZsdFcn5DpVcyXdJo91Q_FUzICZ4GuIHRJpPY Original-Received: from [203.83.248.32] by web36206.mail.mud.yahoo.com via HTTP; Fri, 01 Oct 2010 02:50:04 PDT X-Mailer: YahooMailClassic/11.4.9 YahooMailWebService/0.8.105.279950 X-detected-operating-system: by eggs.gnu.org: FreeBSD 6.x (1) 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:75049 Archived-At: Hi I would like to know how one can interactively search for patterns that are not captured by regexes, like palindromes. One approach would be to use \, to embed a lisp function, like it's availabe in regex-replace. Is it easy to modify existing functions (or make new ones using the ones available) to do this? Or maybe something like (check-for-pattern palindrome), where palindrome is a function that takes a string and returns true if that string is palindrome. The function check-for-pattern does the search interactively feeding new string in the buffer to palindrome and highlighting them if they match. The problem I am facing here is writing the check-for-pattern function using the existing search functions. Any other ways to do it ? Thanks Karan