From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: `C-u 2 S-Tab' with `#+STARTUP: odd' Date: Tue, 13 Oct 2009 20:47:34 +0200 Message-ID: <8850D7A8-1F73-494D-98CF-10AA691B1170@gmail.com> References: 6D3A0AC2-C1BF-4541-8E55-0E3A4E488A67@gmail.com <4AD2D9A9.1030504@alumni.ethz.ch> <4AD38AE1.7000409@alumni.ethz.ch> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MxmPQ-0003Jd-PO for emacs-orgmode@gnu.org; Tue, 13 Oct 2009 14:47:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MxmPP-0003JJ-9l for emacs-orgmode@gnu.org; Tue, 13 Oct 2009 14:47:43 -0400 Received: from [199.232.76.173] (port=55170 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxmPP-0003JG-44 for emacs-orgmode@gnu.org; Tue, 13 Oct 2009 14:47:43 -0400 Received: from fg-out-1718.google.com ([72.14.220.155]:59688) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MxmPO-0002Qg-Lv for emacs-orgmode@gnu.org; Tue, 13 Oct 2009 14:47:42 -0400 Received: by fg-out-1718.google.com with SMTP id 16so810921fgg.12 for ; Tue, 13 Oct 2009 11:47:41 -0700 (PDT) In-Reply-To: <4AD38AE1.7000409@alumni.ethz.ch> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Michael Brand Cc: emacs-orgmode@gnu.org On Oct 12, 2009, at 10:00 PM, Michael Brand wrote: >>> I wonder how the function org-outline-level is intended to work. >>> Should it show the outline level or count the stars like in org- >>> version 6.31a and one has to take into account `odd' himself to >>> get the outline level when implementing own stuff which use e. g. >>> the function org-shifttab? >> org-outline-level shows the number of stars, independently of org- >> odd-levels >> Use >> (org-reduced-level (org-outline-level)) >> to get normalized levels. >> Inside org, you need to check which function works with what kind >> of level, this is unfortunately not entirely abstracted. >> HTH >> - Carsten > > Thank you, exactly what I have missed. Allow me to mention that I > would like this hint to be added to the Help documentation of org- > outline-level where I looked before. Done. > > There is something more with org-outline-level in org-version 6.31a > which I still don't understand because I am not aware of some > functions used in its implementation. I drilled down the quite > special situation to the following file content. I hope that the > indentation of x by three spaces does not get lost in the mailing > list archive: > > -*- eval: (org-mode) -*- > x > > After opening this file and confirming `eval', org-outline-level > reports `3' (changes when changing the indentation of x) but I > expect it to report someting like `0', `1000' or `1001' or similar > like it does with variations like e. g. > > -*- mode: org -*- > x The function assumes that the cursor is located at the beginning of an outline heading. If it is not, it will return garbage. HTH - Carsten - Carsten