From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aankhen Subject: Re: understanding the function outline-level Date: Wed, 8 Jun 2011 02:00:46 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QU2wc-00044k-1A for emacs-orgmode@gnu.org; Tue, 07 Jun 2011 16:32:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QU2wa-0002D0-Al for emacs-orgmode@gnu.org; Tue, 07 Jun 2011 16:32:09 -0400 Received: from mail-vx0-f169.google.com ([209.85.220.169]:37158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QU2wZ-0002Cr-TQ for emacs-orgmode@gnu.org; Tue, 07 Jun 2011 16:32:08 -0400 Received: by vxk20 with SMTP id 20so5054821vxk.0 for ; Tue, 07 Jun 2011 13:32:06 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Michael Brand , Org mailing list Hi Michael, On Tue, Jun 7, 2011 at 21:53, Michael Brand wr= ote: > I am on the way of tracking down an (Org?) buglet and now > outline-level tries to strike me with my lack of experience with > "Match Data" of Emacs search and I would like to ask for some help to > understand. > > M-: (outline-level) returns a value that I don't understand yet. The > number does not correspond to the amount of stars and is independent > of at the beginning of which line the point was before. And when I > look at the implementation of outline-level I am missing a function > that initializes the "Match Data". Where is that last search or match > operation? Here=E2=80=99s a slightly more complicated alternative method: ,---- | (progn | (org-back-to-heading) | (org-reduced-level (org-current-level))) `---- This will take into account `org-odd-levels-only'. Aankhen