From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Badari Kakumani" Newsgroups: gmane.emacs.help Subject: lisp function to search-forward for lines with same indent Date: 28 Aug 2006 01:16:52 -0700 Organization: http://groups.google.com Message-ID: <1156753011.964177.189840@b28g2000cwb.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1156754480 26296 80.91.229.2 (28 Aug 2006 08:41:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Aug 2006 08:41:20 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 28 10:41:17 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GHcgF-0004Kn-BR for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Aug 2006 10:41:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GHcgE-00050b-LN for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Aug 2006 04:41:14 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!b28g2000cwb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-NNTP-Posting-Host: 128.107.248.220 Original-X-Trace: posting.google.com 1156753017 26154 127.0.0.1 (28 Aug 2006 08:16:57 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 28 Aug 2006 08:16:57 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: b28g2000cwb.googlegroups.com; posting-host=128.107.248.220; posting-account=0N54pQ0AAACKpZzrYixCds5IKoApfAwr Original-Xref: shelby.stanford.edu gnu.emacs.help:141362 Original-To: help-gnu-emacs@gnu.org 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:36982 Archived-At: folks, i have a large call-tree hierarchy represented as indented lines shown below: File::Spec::Functions::__ANON__ x 1 0.00s = (0.00 + 0.00)s File::Spec::Unix::catfile x 1 0.00s = (0.00 + 0.00)s File::Spec::Unix::canonpath x 1 0.00s File::Spec::Unix::catdir x 1 0.00s = (0.00 + 0.00)s File::Spec::Unix::canonpath x 1 0.00s at::obj::BEGIN x 14 19.07s = (0.12 + 18.95)s if my cursor is positioned at the first line shown in the above output, i want to develop a function such that it finds the last-line in the output shown -- a line with exactly two-spaces in the beginning and then a non-space-charcter. i want this to work for any other lines with a differing starting indentation. any clues on how to go about developing this lisp function or any pointers to existing functions that do this will help. to my surprise, in emacs, when i press: Esc Ctr-s ^ Space \sw emacs is matching all lines that start with any number of spaces (instead of matching lines with exactly one-space in the beginning of line and a non-space character). not sure why it is behaving this way. thanks, -badari