emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Brand <michael.brand@alumni.ethz.ch>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: `C-u 2 S-Tab' with `#+STARTUP: odd'
Date: Wed, 14 Oct 2009 08:19:02 +0200	[thread overview]
Message-ID: <4AD56D56.5050302@alumni.ethz.ch> (raw)
In-Reply-To: <8850D7A8-1F73-494D-98CF-10AA691B1170@gmail.com>

>> 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.

  reply	other threads:[~2009-10-14  6:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-12  7:24 `C-u 2 S-Tab' with `#+STARTUP: odd' Michael Brand
2009-10-12 13:15 ` Carsten Dominik
2009-10-12 20:00   ` Michael Brand
2009-10-13 18:47     ` Carsten Dominik
2009-10-14  6:19       ` Michael Brand [this message]
2009-10-14 11:15         ` Bernt Hansen
2009-10-14 11:56           ` Michael Brand
2009-10-14 13:58         ` Carsten Dominik
2009-10-14 19:20           ` Michael Brand
  -- strict thread matches above, loose matches on Subject: below --
2009-09-10 11:48 Michael Brand
2009-09-10 16:32 ` Carsten Dominik
2009-10-14 10:15 ` Carsten Dominik
2009-10-14 13:58 ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AD56D56.5050302@alumni.ethz.ch \
    --to=michael.brand@alumni.ethz.ch \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).