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

Ok. I found out that (save-excursion (beginning-of-line) (org-outline-level)) 
can compensate.

of an outline heading. If it is not, it will return garbage.

Here I am lost and would like some help. I was not able to find out how to 
determine if the cursor is on a line with an outline heading or not.


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to