I like the org-indent-mode with the soft-indentation but even more I like the hard-indentation with `#+STARTUP: odd hidestars' instead for which I have a question. This is the content of the example file oddeven: -*- mode: org -*- #+STARTUP: oddeven hidestars content * 1 Org Mode ** 1.1 Introduction *** 1.1.1 Installation This is the content of the example file odd: -*- mode: org -*- #+STARTUP: odd hidestars content * 1 Org Mode *** 1.1 Introduction ***** 1.1.1 Installation The different _Emacs-faces_ (colors) for the heading levels are the same when comparing the two files. This Emacs-internal adaptation I appreciate a lot. C-u 2 S-Tab shows _two_ levels with the file oddeven but only _one_ with the file odd. Is this how it is intended to work for the file odd? org-version is 6.30e.
Hi Michael,
yes, I agree it would be consistent to adapt the interpretation
of the prefix arg when using odd-levels.
I have fixed this, it is available in git now, and will be in
the next release (6.31).
Thanks!
- Carsten
On Sep 10, 2009, at 1:48 PM, Michael Brand wrote:
> I like the org-indent-mode with the soft-indentation but even more I
> like the hard-indentation with `#+STARTUP: odd hidestars' instead for
> which I have a question.
>
> This is the content of the example file oddeven:
> -*- mode: org -*-
> #+STARTUP: oddeven hidestars content
> * 1 Org Mode
> ** 1.1 Introduction
> *** 1.1.1 Installation
>
> This is the content of the example file odd:
> -*- mode: org -*-
> #+STARTUP: odd hidestars content
> * 1 Org Mode
> *** 1.1 Introduction
> ***** 1.1.1 Installation
>
> The different _Emacs-faces_ (colors) for the heading levels are the
> same
> when comparing the two files. This Emacs-internal adaptation I
> appreciate a lot.
>
> C-u 2 S-Tab shows _two_ levels with the file oddeven but only _one_
> with
> the file odd. Is this how it is intended to work for the file odd?
>
>
> org-version is 6.30e.
>
>
>
> _______________________________________________
> 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
Thank you for the fix of the function org-shifttab in org-version 6.31a.
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?
> yes, I agree it would be consistent to adapt the interpretation
> of the prefix arg when using odd-levels.
>
> I have fixed this, it is available in git now, and will be in
> the next release (6.31).
>
> Thanks!
>
> - Carsten
>
> On Sep 10, 2009, at 1:48 PM, Michael Brand wrote:
>
>> I like the org-indent-mode with the soft-indentation but even more I
>> like the hard-indentation with `#+STARTUP: odd hidestars' instead for
>> which I have a question.
>>
>> This is the content of the example file oddeven:
>> -*- mode: org -*-
>> #+STARTUP: oddeven hidestars content
>> * 1 Org Mode
>> ** 1.1 Introduction
>> *** 1.1.1 Installation
>>
>> This is the content of the example file odd:
>> -*- mode: org -*-
>> #+STARTUP: odd hidestars content
>> * 1 Org Mode
>> *** 1.1 Introduction
>> ***** 1.1.1 Installation
>>
>> The different _Emacs-faces_ (colors) for the heading levels are the same
>> when comparing the two files. This Emacs-internal adaptation I
>> appreciate a lot.
>>
>> C-u 2 S-Tab shows _two_ levels with the file oddeven but only _one_ with
>> the file odd. Is this how it is intended to work for the file odd?
>>
>>
>> org-version is 6.30e.
On Oct 12, 2009, at 9:24 AM, Michael Brand wrote: > Thank you for the fix of the function org-shifttab in org-version > 6.31a. > > 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 > > >> yes, I agree it would be consistent to adapt the interpretation >> of the prefix arg when using odd-levels. >> I have fixed this, it is available in git now, and will be in >> the next release (6.31). >> Thanks! >> - Carsten >> On Sep 10, 2009, at 1:48 PM, Michael Brand wrote: >>> I like the org-indent-mode with the soft-indentation but even more I >>> like the hard-indentation with `#+STARTUP: odd hidestars' instead >>> for >>> which I have a question. >>> >>> This is the content of the example file oddeven: >>> -*- mode: org -*- >>> #+STARTUP: oddeven hidestars content >>> * 1 Org Mode >>> ** 1.1 Introduction >>> *** 1.1.1 Installation >>> >>> This is the content of the example file odd: >>> -*- mode: org -*- >>> #+STARTUP: odd hidestars content >>> * 1 Org Mode >>> *** 1.1 Introduction >>> ***** 1.1.1 Installation >>> >>> The different _Emacs-faces_ (colors) for the heading levels are >>> the same >>> when comparing the two files. This Emacs-internal adaptation I >>> appreciate a lot. >>> >>> C-u 2 S-Tab shows _two_ levels with the file oddeven but only >>> _one_ with >>> the file odd. Is this how it is intended to work for the file odd? >>> >>> >>> org-version is 6.30e. - Carsten
>> 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.
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
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
>> 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.
On Sep 10, 2009, at 1:48 PM, Michael Brand wrote:
> I like the org-indent-mode with the soft-indentation but even more I
> like the hard-indentation with `#+STARTUP: odd hidestars' instead for
> which I have a question.
>
> This is the content of the example file oddeven:
> -*- mode: org -*-
> #+STARTUP: oddeven hidestars content
> * 1 Org Mode
> ** 1.1 Introduction
> *** 1.1.1 Installation
>
> This is the content of the example file odd:
> -*- mode: org -*-
> #+STARTUP: odd hidestars content
> * 1 Org Mode
> *** 1.1 Introduction
> ***** 1.1.1 Installation
>
> The different _Emacs-faces_ (colors) for the heading levels are the
> same
> when comparing the two files. This Emacs-internal adaptation I
> appreciate a lot.
>
> C-u 2 S-Tab shows _two_ levels with the file oddeven but only _one_
> with
> the file odd. Is this how it is intended to work for the file odd?
Actually, I tested this now, and it works correctly in 6.31. I don't
quite
remember when his was changed, but this is implemented already - sorry
for
nor earlier looking what this really was about.
- Carsten
Michael Brand <michael.brand@alumni.ethz.ch> writes:
> 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.
I think you can use the function org-on-heading-p to determine if you
are on a heading or not.
HTH
-Bernt
>> 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.
>
> I think you can use the function org-on-heading-p to determine if you
> are on a heading or not.
Thank you, exactly what I have missed.
On Oct 14, 2009, at 8:19 AM, Michael Brand wrote:
>>> 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.
I have troube understanding what you mean.
An outline heading looks like this
*** heading
If the cursor is at the first character of that line, org-outline-
level will return
3. If the line looks different, the return value will be badly
determined (governed by the most recent match of a regular expression
anywhere in Emacs, might be anything).
If you need to find out, in a lisp program, if you are at the
beginning of a headline, use
(and (org-at-heading-p t) (bolp))
HTH
- Carsten
- Carsten
On Sep 10, 2009, at 1:48 PM, Michael Brand wrote:
> I like the org-indent-mode with the soft-indentation but even more I
> like the hard-indentation with `#+STARTUP: odd hidestars' instead for
> which I have a question.
>
> This is the content of the example file oddeven:
> -*- mode: org -*-
> #+STARTUP: oddeven hidestars content
> * 1 Org Mode
> ** 1.1 Introduction
> *** 1.1.1 Installation
>
> This is the content of the example file odd:
> -*- mode: org -*-
> #+STARTUP: odd hidestars content
> * 1 Org Mode
> *** 1.1 Introduction
> ***** 1.1.1 Installation
>
> The different _Emacs-faces_ (colors) for the heading levels are the
> same
> when comparing the two files. This Emacs-internal adaptation I
> appreciate a lot.
>
> C-u 2 S-Tab shows _two_ levels with the file oddeven but only _one_
> with
> the file odd. Is this how it is intended to work for the file odd?
Actually, I tested this now, and it works correctly in 6.31. I don't
quite
remember when his was changed, but this is implemented already - sorry
for
nor earlier looking what this really was about.
- Carsten
> I have troube understanding what you mean. > > An outline heading looks like this > > *** heading > > If the cursor is at the first character of that line, org-outline-level > will return 3. I want `3' _independently_ of on which column the cursor is on that line and therefore use (save-excursion (beginning-of-line) (org-outline-level)). > If the line looks different, the return value will be badly > determined (governed by the most recent match of a regular expression > anywhere in Emacs, might be anything). To cover this I use (outline-on-heading-p), without the optional parameter in my case. > If you need to find out, in a lisp program, if you are at the beginning > of a headline, use > > (and (org-at-heading-p t) (bolp)) The matter is that within any one line I rather want to _ignore_ the column than to _know_ on which column the cursor is. With all discussed here in this thread combined together I use (if (outline-on-heading-p) (org-reduced-level (save-excursion (beginning-of-line) (org-outline-level))) '0))) for my suggestion of heading visibility depth stepping described here http://thread.gmane.org/gmane.emacs.orgmode/17581/focus=18392