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

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

lisp function to search-forward for lines with same indent


From: Badari Kakumani
Subject: lisp function to search-forward for lines with same indent
Date: 28 Aug 2006 01:16:52 -0700
User-agent: G2/0.2

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



reply via email to

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