emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* how to change the headline starter *
@ 2011-06-11 18:58 harven
  2011-06-13 20:32 ` Darlan Cavalcante Moreira
  0 siblings, 1 reply; 44+ messages in thread
From: harven @ 2011-06-11 18:58 UTC (permalink / raw)
  To: emacs-orgmode

Hi, 
is it possible to change the headline starter, for example from * to - ?
thanks,
--
Harven

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-06-11 18:58 how to change the headline starter * harven
@ 2011-06-13 20:32 ` Darlan Cavalcante Moreira
  2011-07-02  9:48   ` Bastien
  0 siblings, 1 reply; 44+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-06-13 20:32 UTC (permalink / raw)
  To: harven; +Cc: emacs-orgmode


I don't think this is possible. The "*" as a headline starter seems to be
hard-coded in org.

Also, "-" is used as a list starter (as well as other starters such as
"+").

--
Darlan Cavalcante

At Sat, 11 Jun 2011 20:58:39 +0200,
harven <harven@free.fr> wrote:
> 
> Hi, 
> is it possible to change the headline starter, for example from * to - ?
> thanks,
> --
> Harven
> 

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-06-13 20:32 ` Darlan Cavalcante Moreira
@ 2011-07-02  9:48   ` Bastien
  0 siblings, 0 replies; 44+ messages in thread
From: Bastien @ 2011-07-02  9:48 UTC (permalink / raw)
  To: Darlan Cavalcante Moreira; +Cc: emacs-orgmode, harven

Hi Darlan,

Darlan Cavalcante Moreira <darcamo@gmail.com> writes:

> I don't think this is possible. The "*" as a headline starter seems to be
> hard-coded in org.

I confirm this is not possible, it's hardcoded in outline-mode, and Org
is derived from this mode.

As this is a FAQ, I added an entry in Worg/org-faq.org

Cheers,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
       [not found] <1728286333.2576351310650722865.JavaMail.root@zimbra29-e5.priv.proxad.net>
@ 2011-07-14 13:53 ` harven
  2011-07-14 15:47   ` Bastien
  0 siblings, 1 reply; 44+ messages in thread
From: harven @ 2011-07-14 13:53 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode



----- Mail Original -----
De: "Bastien" <bzg@altern.org>
À: "Darlan Cavalcante Moreira" <darcamo@gmail.com>
Cc: "harven" <harven@free.fr>, emacs-orgmode@gnu.org
Envoyé: Samedi 2 Juillet 2011 11h48:52 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne
Objet: Re: [O] how to change the headline starter *

Hi Darlan,

Darlan Cavalcante Moreira <darcamo@gmail.com> writes:

> I don't think this is possible. The "*" as a headline starter seems to be
> hard-coded in org.

I confirm this is not possible, it's hardcoded in outline-mode, and Org
is derived from this mode.

As this is a FAQ, I added an entry in Worg/org-faq.org

Cheers,

-- 
 Bastien


Sorry for the late response. The "*" as a headline character is not hard-coded
in outline-mode. The headline character can be in fact any regexp, and is
specified in the variable outline-regexp defined in outline.el. Its default
value is "[*\f]+".

It is howewer hard-coded as a "*" e.g. in org-indent.el 
(e.g. in org-indent-initialize), and a change to outline-regexp breaks
org-mode.

BUG. How to reproduce. 
Starting with emacs -Q (this is emacs 23.2 together with org-mode 6.33),
execute in the scratch buffer
(setq outline-regexp "[-\f]+")
so as to use - as the headline starter character in outline mode.
Switch to another buffer, enter the text

- first heading 
-- second heading
   some stuff here

Activate org-mode. M-x org-mode.

Then go to the first heading. TAB folds the text as expected.
Go to the second heading. TAB inserts a TAB instead of folding 
the second heading.

Sincerely,
--
        Harven

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-14 13:53 ` how to change the headline starter * harven
@ 2011-07-14 15:47   ` Bastien
  2011-07-14 17:32     ` harven
  2011-07-14 19:28     ` Philipp Haselwarter
  0 siblings, 2 replies; 44+ messages in thread
From: Bastien @ 2011-07-14 15:47 UTC (permalink / raw)
  To: harven; +Cc: emacs-orgmode

harven@free.fr writes:

> (setq outline-regexp "[-\f]+")
> so as to use - as the headline starter character in outline mode.
> Switch to another buffer, enter the text
>
> - first heading 
> -- second heading
>    some stuff here
>
> Activate org-mode. M-x org-mode.

You should not do this.  org-mode lists start with a "-", using 
this character for headlines will just confuse things.

Can't you live with the "*" as the headline character?

My 2 cents,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-14 15:47   ` Bastien
@ 2011-07-14 17:32     ` harven
  2011-07-14 18:01       ` Nick Dokos
                         ` (3 more replies)
  2011-07-14 19:28     ` Philipp Haselwarter
  1 sibling, 4 replies; 44+ messages in thread
From: harven @ 2011-07-14 17:32 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode


> bzh@altern.org writes:
>
> harven@free.fr writes:
> 
> > (setq outline-regexp "[-\f]+")
> > so as to use - as the headline starter character in outline mode.
> > Switch to another buffer, enter the text
> >
> > - first heading
> > -- second heading
> >    some stuff here
> >
> > Activate org-mode. M-x org-mode.
> 
> You should not do this.  org-mode lists start with a "-", using
> this character for headlines will just confuse things.

Let me rephrase my message then.

BUG. How to reproduce.
Starting with emacs -Q (this is emacs 23.2 together with org-mode 6.33),
execute in the scratch buffer
(setq outline-regexp "[•\f]+")
so as to use a bullet as the headline starter character in outline mode.
Switch to another buffer, enter the text

• first heading
•• second heading
   some stuff here

Activate org-mode. M-x org-mode.

Then go to the first heading. TAB folds the text as expected.
Go to the second heading. TAB inserts a TAB instead of folding
the second heading.

> Can't you live with the "*" as the headline character?

That's a pretty rude answer, I must say. I don't know a single
language (language as e.g. english, russian, spanish...) that
uses * as an headline character. BTW, I know that bugs should be
reported through the bug tracker, I will do that asap, and
no, I don't have a patch, I don't understand how org-mode
works.

-- 
            Harven

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-14 17:32     ` harven
@ 2011-07-14 18:01       ` Nick Dokos
  2011-07-16  2:05         ` Carsten Dominik
  2011-07-14 19:10       ` Pieter Praet
                         ` (2 subsequent siblings)
  3 siblings, 1 reply; 44+ messages in thread
From: Nick Dokos @ 2011-07-14 18:01 UTC (permalink / raw)
  To: harven; +Cc: Bastien, nicholas.dokos, emacs-orgmode

harven@free.fr wrote:

> 
> > bzh@altern.org writes:
> >
> > harven@free.fr writes:
> > 
> > > (setq outline-regexp "[-\f]+")
> > > so as to use - as the headline starter character in outline mode.
> > > Switch to another buffer, enter the text
> > >
> > > - first heading
> > > -- second heading
> > >    some stuff here
> > >
> > > Activate org-mode. M-x org-mode.
> > 
> > You should not do this.  org-mode lists start with a "-", using
> > this character for headlines will just confuse things.
> 
> Let me rephrase my message then.
> 
> BUG. How to reproduce.
> Starting with emacs -Q (this is emacs 23.2 together with org-mode 6.33),
> execute in the scratch buffer
> (setq outline-regexp "[•\f]+")
> so as to use a bullet as the headline starter character in outline mode.
> Switch to another buffer, enter the text
> 
> • first heading
> •• second heading
>    some stuff here
> 
> Activate org-mode. M-x org-mode.
> 
> Then go to the first heading. TAB folds the text as expected.
> Go to the second heading. TAB inserts a TAB instead of folding
> the second heading.
> 
> > Can't you live with the "*" as the headline character?
> 
> That's a pretty rude answer, I must say. I don't know a single

No, it's not. It is as clear an indication as anybody can give you that
asterisks are pretty much embedded into org structure.

Patient: "Doctor, it hurts when I do that"
Doctor: "Don't do that"

You may not like it but that's the way it is. Trying to change it at a
superficial level (as you did by changing outline-regexp) is likely to
land you in a world of pain.

Nick

> language (language as e.g. english, russian, spanish...) that
> uses * as an headline character. BTW, I know that bugs should be
> reported through the bug tracker, I will do that asap, and
> no, I don't have a patch, I don't understand how org-mode
> works.
> 

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-14 17:32     ` harven
  2011-07-14 18:01       ` Nick Dokos
@ 2011-07-14 19:10       ` Pieter Praet
  2011-07-15 10:21         ` Philipp Haselwarter
  2011-07-15 11:30         ` Memnon Anon
  2011-07-15 10:49       ` Bastien
  2011-07-15 11:03       ` Bastien
  3 siblings, 2 replies; 44+ messages in thread
From: Pieter Praet @ 2011-07-14 19:10 UTC (permalink / raw)
  To: harven, Bastien; +Cc: emacs-orgmode

On Thu, 14 Jul 2011 19:32:18 +0200 (CEST), harven@free.fr wrote:
> 
> > bzh@altern.org writes:
> >
> > harven@free.fr writes:
> > 
> > > (setq outline-regexp "[-\f]+")
> > > so as to use - as the headline starter character in outline mode.
> > > Switch to another buffer, enter the text
> > >
> > > - first heading
> > > -- second heading
> > >    some stuff here
> > >
> > > Activate org-mode. M-x org-mode.
> > 
> > You should not do this.  org-mode lists start with a "-", using
> > this character for headlines will just confuse things.
> 
> Let me rephrase my message then.
> 
> BUG. How to reproduce.
> Starting with emacs -Q (this is emacs 23.2 together with org-mode 6.33),
> execute in the scratch buffer
> (setq outline-regexp "[•\f]+")
> so as to use a bullet as the headline starter character in outline mode.
> Switch to another buffer, enter the text
> 
> • first heading
> •• second heading
>    some stuff here
> 
> Activate org-mode. M-x org-mode.
> 
> Then go to the first heading. TAB folds the text as expected.
> Go to the second heading. TAB inserts a TAB instead of folding
> the second heading.
> 
> > Can't you live with the "*" as the headline character?
> 
> That's a pretty rude answer, I must say. I don't know a single
> language (language as e.g. english, russian, spanish...) that
> uses * as an headline character. BTW, I know that bugs should be
> reported through the bug tracker, I will do that asap, and
> no, I don't have a patch, I don't understand how org-mode
> works.
> 
> -- 
>             Harven
> 


Harven,

One of Org-mode's fundamental goals is to help people make more
*efficient* (sorry, •efficient•) use of their time. Screwing around
with utterly useless vanity config ("I wanna make it look COOL")
is the exact opposite.


Please don't *insult* our devs by calling this useless BS a "BUG",
let alone ask them to *waste* their precious time and skills on it.


If you manage to implement it yourself, you're welcome to send your
patch to the list. We might need it someday, when we -in a bout of
insanity- decide our target audience somehow includes twelve-year-olds.


If you find that rude, don't worry:

If our product or the technical support pertaining to it proves
unsatisfactory in any way, you're entitled to a full refund.

Just send your proof of purchase to one of our sales reps near you.

You still have the receipt don't you?


Peace

-- 
Pieter

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-14 15:47   ` Bastien
  2011-07-14 17:32     ` harven
@ 2011-07-14 19:28     ` Philipp Haselwarter
  2011-07-15 10:52       ` Nicolas Goaziou
  2011-07-15 10:56       ` Bastien
  1 sibling, 2 replies; 44+ messages in thread
From: Philipp Haselwarter @ 2011-07-14 19:28 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@altern.org> writes:

> harven@free.fr writes:
>
>> (setq outline-regexp "[-\f]+")
>> so as to use - as the headline starter character in outline mode.
>> Switch to another buffer, enter the text
>>
>> - first heading 
>> -- second heading
>>    some stuff here
>>
>> Activate org-mode. M-x org-mode.
>
> You should not do this.  org-mode lists start with a "-", using 
> this character for headlines will just confuse things.
>
> Can't you live with the "*" as the headline character?
>
> My 2 cents,

Is there any particular reason for it to be hardcoded? Apart from the
fact that /well it just is this way right now/ I mean.
That'd be useful information for anyone interested in changing it. Then
you can still just tell them to write a patch if they care that much
('cause even in org-mode-land patches don't write themselves just yet)
[I just had the most awesome idea for a feature request].
If it's "just" about inheriting from a variable in some 300 places it
could at least be discussed.

-- 
Philipp Haselwarter

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-14 19:10       ` Pieter Praet
@ 2011-07-15 10:21         ` Philipp Haselwarter
  2011-07-15 10:40           ` Jambunathan K
  2011-07-16 12:59           ` Pieter Praet
  2011-07-15 11:30         ` Memnon Anon
  1 sibling, 2 replies; 44+ messages in thread
From: Philipp Haselwarter @ 2011-07-15 10:21 UTC (permalink / raw)
  To: emacs-orgmode

No need to go all flaming because someone thinks the looks of the
software matter. TBH I don't see what's wrong with that or in what way
that's the opposite of efficiency.

Abstracting the user interface from the logic is an important paradigm,
especially for something like org-mode that you want to run on a wide
range of devices – think 24" monitors vs 3" mobile devices. You don't
want to have too much of the looks hardcoded.

Now if you don't find that to be one of /your/ personal top priorities –
fine, don't bother. But going all bashing because someone insists on his
opinion that this is important? I don't see what you're trying to
achieve here.


-- 
Philipp Haselwarter

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-15 10:21         ` Philipp Haselwarter
@ 2011-07-15 10:40           ` Jambunathan K
  2011-07-16 12:59           ` Pieter Praet
  1 sibling, 0 replies; 44+ messages in thread
From: Jambunathan K @ 2011-07-15 10:40 UTC (permalink / raw)
  To: emacs-orgmode

Philipp Haselwarter <philipp.haselwarter@gmx.de> writes:

> No need to go all flaming 

+1

Let's keep out hearts warm and our love of Orgmode mild. Let's not warm
our hearts so much that it starts an hell fire and burn our souls to
ashes.

I hold all 3 parties not entirely above reproach. Just my 2 cents.

ps: I feel all good and charged up for the rest of the day now that I
have pronounced my judgement and condemned the guilty.

Jambunathan K.

-- 

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-14 17:32     ` harven
  2011-07-14 18:01       ` Nick Dokos
  2011-07-14 19:10       ` Pieter Praet
@ 2011-07-15 10:49       ` Bastien
  2011-07-15 18:19         ` Achim Gratz
  2011-07-15 11:03       ` Bastien
  3 siblings, 1 reply; 44+ messages in thread
From: Bastien @ 2011-07-15 10:49 UTC (permalink / raw)
  To: harven; +Cc: emacs-orgmode

Hi Harven,

I understand your point -- yes, from a purely theoretical point
of view, we should be able to use another character than "*" to 
match headlines, because org-mode is derived from outline-mode.

If you can go through Org's code (or motivate someone to go thru the
code for you) and check where the "*" is hardcoded instead of being
inherited from outline-mode that would help a lot, because I'm busy
with other changes I find more important right now.

>> Can't you live with the "*" as the headline character?
>
> That's a pretty rude answer, I must say. 

Sorry if that sounded rude, it was not my intention and I asked this
sincerely.  I'm still interested in your answer btw :)

> I don't know a single language (language as e.g. english, russian,
> spanish...) that uses * as an headline character.

Er... I don't know a single language that depends on Emacs to be 
spoken.  Org does.

Best,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-14 19:28     ` Philipp Haselwarter
@ 2011-07-15 10:52       ` Nicolas Goaziou
  2011-07-15 11:30         ` Memnon Anon
  2011-07-15 11:50         ` Bastien
  2011-07-15 10:56       ` Bastien
  1 sibling, 2 replies; 44+ messages in thread
From: Nicolas Goaziou @ 2011-07-15 10:52 UTC (permalink / raw)
  To: Philipp Haselwarter; +Cc: emacs-orgmode

Hello,

Philipp Haselwarter <philipp.haselwarter@gmx.de> writes:

> Is there any particular reason for it to be hardcoded? Apart from the
> fact that /well it just is this way right now/ I mean.

I don't know the truth here, but I'd guess it is about keeping Org
structure in ASCII. Org is about simplicity and portability (and about
depth and flexibility, but those come after in the motto). Having to
type unicode symbols for such a basic task as creating an headline may
be considered as a failure from this point of view. I'm not even talking
about using some other ASCII character, as it would bring
incompatibilities with existing structures, like lists or comments.

In the same vein, I had thought about offering the user to choose list
bullets among unicode symbols[1] ("-", "+" are not very convenient if
you write mathematics in the item). But I changed my mind:

  - creating an item would require the user to type the unicode symbol,
    which may not always be easily accessible on a keyboard.
    
  - adding subsequent items would imply, for the same reason, the use of
    M-RET, making it difficult to modify the Org file from outside of
    Emacs.

Even if you choose some accessible unicode symbol, it will still be one
order of magnitude harder to reach than "*".


> That'd be useful information for anyone interested in changing it. Then
> you can still just tell them to write a patch if they care that much
> ('cause even in org-mode-land patches don't write themselves just yet)
> [I just had the most awesome idea for a feature request].
> If it's "just" about inheriting from a variable in some 300 places it
> could at least be discussed.

I think some parts of Org code use `outline-regexp', some others use
`org-outline-regexp' and some parts have it hard-coded.

For the sake of consistency, It would certainly be a good idea to
generalize the use of `org-outline-regexp'. But considering that the
actual code for headlines is very stable, and that no one reported an
impossibility to accommodate to stars there, I guess such changes are at
a very low priority.


Footnotes:

[1] I even considered adding unicode overlays on standard bullets in
order to help readability. But:
1. Too much overlays slow down Org drastically,
2. I don't like to have hidden information in my buffers,
3. Once again, I would stray away from simplicity.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-14 19:28     ` Philipp Haselwarter
  2011-07-15 10:52       ` Nicolas Goaziou
@ 2011-07-15 10:56       ` Bastien
  2011-07-25 10:12         ` org-icons package (was: how to change the headline starter *) Renzo Been
  1 sibling, 1 reply; 44+ messages in thread
From: Bastien @ 2011-07-15 10:56 UTC (permalink / raw)
  To: Philipp Haselwarter; +Cc: emacs-orgmode

Hi Philipp,

Philipp Haselwarter <philipp.haselwarter@gmx.de> writes:

> Is there any particular reason for it to be hardcoded? Apart from the
> fact that /well it just is this way right now/ I mean.

Nothing carved in stone, but here are the two reasons I see:

- we don't want users to use arbitrary regexp to match headlines as they
  are very likely to shoot themselves in the foot (Harven's example of
  using "-" instead of "*" is a good example of that.)

- Given this, I am not able to imagine a good way of limiting the number
  of allowed characters.

> That'd be useful information for anyone interested in changing it. 

I'd interested in any solution to the problems above.

> Then
> you can still just tell them to write a patch if they care that much
> ('cause even in org-mode-land patches don't write themselves just yet)

:)

> [I just had the most awesome idea for a feature request].

Please share!

> If it's "just" about inheriting from a variable in some 300 places it
> could at least be discussed.

Yep -- if you have the energy to go through the code and see where it is
hardcoded while it should not, please do.  

Thanks,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-14 17:32     ` harven
                         ` (2 preceding siblings ...)
  2011-07-15 10:49       ` Bastien
@ 2011-07-15 11:03       ` Bastien
  3 siblings, 0 replies; 44+ messages in thread
From: Bastien @ 2011-07-15 11:03 UTC (permalink / raw)
  To: harven; +Cc: emacs-orgmode

harven@free.fr writes:

> Starting with emacs -Q (this is emacs 23.2 together with org-mode
> 6.33),

This version of Org is quite old -- for bug reports, we encourage 
people to check against the latest version.

> execute in the scratch buffer
> (setq outline-regexp "[•\f]+")
> so as to use a bullet as the headline starter character in outline mode.
> Switch to another buffer, enter the text
>
> • first heading
> •• second heading
>    some stuff here
>
> Activate org-mode. M-x org-mode.
>
> Then go to the first heading. TAB folds the text as expected.

I cannot reproduce this in Emacs 24.1 and Org 7.6 (latest git version).  

In fact, things are even worse here, the headline is not recognized as
such when (setq outline-regexp "[•\f]+")

Thanks,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-15 10:52       ` Nicolas Goaziou
@ 2011-07-15 11:30         ` Memnon Anon
  2011-07-15 11:51           ` Bastien
  2011-07-15 11:50         ` Bastien
  1 sibling, 1 reply; 44+ messages in thread
From: Memnon Anon @ 2011-07-15 11:30 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

I think this is a very reasonable and concise mail on the star topic
Nicolas wrote here. 

If Bastien agrees to its assessment, I would suggest adding a link to it
to the FAQ item on the topic.

Memnon

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-14 19:10       ` Pieter Praet
  2011-07-15 10:21         ` Philipp Haselwarter
@ 2011-07-15 11:30         ` Memnon Anon
  1 sibling, 0 replies; 44+ messages in thread
From: Memnon Anon @ 2011-07-15 11:30 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

Pieter Praet <pieter@praet.org> writes:
> On Thu, 14 Jul 2011 19:32:18 +0200 (CEST), harven@free.fr wrote:

> Please don't *insult* our devs by calling this useless BS a "BUG",
> let alone ask them to *waste* their precious time and skills on it.

Mhh, I don't think it was in any way insulting to ask?
OTOH, I also think Bastien was not rude :).

Please keep also in mind that english is not everyones native language;
this plus the fact that email as a written medium is sometimes hard(er)
to interpret. 

You call this useless BS, not worth a bugreport.
Well, it seems to me Harven is new to the list and to org.
In debianstyle bug context, something like:
,----
| Severity: *Wishlist*
| Subject: Please consider making '*' not hardcoded
| 
| Hi, I use orgmode and I really like it; thanks!
| However, using emacs for a while, I got used to the fact that 
| everything is configurable; orgmode itself with its hundreds of
| variables to customize its behaviour is a prime example.
| However, I tried to get accustomed to the stars as outline indicators, I
| also tried the org-hide-leading-stars, but I can't get used to it.
| I would really love to see this configurable: 
| Emacs, got unicode, lets make use of that! Imagine something like "•".
| If emacs were the old ascii only text editor it used to be, I would not 
| even have considered it: You devs included picture/pdf/etc. display in
| Buffers and spoiled me ;).
| I really don't know how much work this would be, I just wanted to voice
| my opinion on it (hence *wishlist*).
| 
| Thanks 
| Memnon
`----
would be acceptable I think. (Note: This is purely fictional, I really
don't care, personally).

It would then probably stay there, either with Bastien answering
something like: 
,----
| Hi, the "*" is hardcoded from the projects start and it would mean
| significant work to change that. I *might* tackle this someday, but
| don't hold your breath.
`----
or he would close it and tag it "won't fix" with a similar reply.

> If you manage to implement it yourself, you're welcome to send your
> patch to the list. We might need it someday, when we -in a bout of
> insanity- decide our target audience somehow includes twelve-year-olds.

Belittleing a possible contribution before it was even started?
That however is close to rude *imho*...

Memnon
P.S.: I deliberately waited a day to reply to this message.
      I really like this list and its well behaved attitude: This is a 
      nice place. While I also stumbled at the "rude" and basically
      agree to your assessment, Pieter, I found your reply a tad too    
      agressive for my taste. So I had to be the "advocatus diaboli" ;).

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-15 10:52       ` Nicolas Goaziou
  2011-07-15 11:30         ` Memnon Anon
@ 2011-07-15 11:50         ` Bastien
  2011-07-15 12:08           ` Nicolas Goaziou
  1 sibling, 1 reply; 44+ messages in thread
From: Bastien @ 2011-07-15 11:50 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode, Philipp Haselwarter

Hi Nicolas,

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> I think some parts of Org code use `outline-regexp', some others use
> `org-outline-regexp' and some parts have it hard-coded.
>
> For the sake of consistency, It would certainly be a good idea to
> generalize the use of `org-outline-regexp'.

Actually, I think "*" _should_ be hardcoded.

Org is a text format (.org) meant to be usable outside Emacs.

Such a fundamental part of the format should be an invariant,
easily recognized by any tool.

What do you think?

-- 
 Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-15 11:30         ` Memnon Anon
@ 2011-07-15 11:51           ` Bastien
  0 siblings, 0 replies; 44+ messages in thread
From: Bastien @ 2011-07-15 11:51 UTC (permalink / raw)
  To: Memnon Anon; +Cc: emacs-orgmode

Hi Memnon,

Memnon Anon <gegendosenfleisch@googlemail.com> writes:

> If Bastien agrees to its assessment, I would suggest adding a link to it
> to the FAQ item on the topic.

Please do.  No matter if I 100% agree with its assessment or not, 
as long as it is informative -- and it is informative :)

-- 
 Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-15 11:50         ` Bastien
@ 2011-07-15 12:08           ` Nicolas Goaziou
  2011-07-16 11:22             ` Bastien
  0 siblings, 1 reply; 44+ messages in thread
From: Nicolas Goaziou @ 2011-07-15 12:08 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, Philipp Haselwarter

Hello,

Bastien <bzg@altern.org> writes:

> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>
>> I think some parts of Org code use `outline-regexp', some others use
>> `org-outline-regexp' and some parts have it hard-coded.
>>
>> For the sake of consistency, It would certainly be a good idea to
>> generalize the use of `org-outline-regexp'.
>
> Actually, I think "*" _should_ be hardcoded.
>
> Org is a text format (.org) meant to be usable outside Emacs.
>
> Such a fundamental part of the format should be an invariant,
> easily recognized by any tool.
>
> What do you think?

I do not disagree. My point is that it could be hard-coded in
a consistent way, i.e. all references to an headline could look for
`org-outline-regexp' instead of some custom string (even though it may
be shorter and easier to write).

This isn't related to `org-outline-regexp' being a defconst.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-15 10:49       ` Bastien
@ 2011-07-15 18:19         ` Achim Gratz
  2011-07-15 21:04           ` harven
  2011-07-16 11:08           ` Bastien
  0 siblings, 2 replies; 44+ messages in thread
From: Achim Gratz @ 2011-07-15 18:19 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@altern.org> writes:
> If you can go through Org's code (or motivate someone to go thru the
> code for you) and check where the "*" is hardcoded instead of being
> inherited from outline-mode that would help a lot, because I'm busy
> with other changes I find more important right now.

There's roughly 100 places in Org where "\\*+" is hardcoded (there may
be false positives and negatives), four that use org-outline-regexp (a
defconst) and 12 that use outline-regexp.  Plain outline-regexp is
localized to org-outline-regexp on entering orgmode, but I'm not sure
why it is used further on (probably for historical reasons).

There are quite a few other places where regexp are hardcoded that
already have or probably should have defconst or defvar symbols, if it's
done for headings one could reasonably expect that it should be done for
other things as well.  I don't know if having a regexp a compile-time
constant is advantageous in terms of performance.  In any case it would
be quite some effort to clean up all regexp to only use symbols.

The other thing is that then of course all the definitions would need to
be stored within the org files since I don't see how one could infer
them all in the general case from just looking at the file.  So it would
seem to make more sense to me to keep the org syntax as is and perhaps
allow some more visual sugar by adding overlays (for those that don't
miond their performance impact).


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-15 18:19         ` Achim Gratz
@ 2011-07-15 21:04           ` harven
  2011-07-15 21:55             ` harven
  2011-07-16 11:12             ` Bastien
  2011-07-16 11:08           ` Bastien
  1 sibling, 2 replies; 44+ messages in thread
From: harven @ 2011-07-15 21:04 UTC (permalink / raw)
  To: emacs-orgmode

Achim Gratz <Stromeko <at> nexgo.de> writes:

> 
> Bastien <bzg <at> altern.org> writes:
> > If you can go through Org's code (or motivate someone to go thru the
> > code for you) and check where the "*" is hardcoded instead of being
> > inherited from outline-mode that would help a lot, because I'm busy
> > with other changes I find more important right now.
> 
> There's roughly 100 places in Org where "\\*+" is hardcoded (there may
> be false positives and negatives)

There are a lot of false positives coming from the wildcards appearing in
regular expressions. The * header seems to be hardcoded as  ?* and I get less
than 30 matches for " \\?\\*" for the 6.33 version of org-mode. 

    org-archive.el.gz    1
    org-agenda.el.gz     1
    org-clock.el.gz      2
    org-datetree.el.gz   1
    org-freemind.el.gz   1
    org-habit.el.gz      1
    org-html.el.gz       1
    org-indent.el.gz     1
    org-inlinetask.el.gz 2
    org-list.el.gz       1
    org.el.gz           14

Once the sources have been downloaded and marked in *Ibuffer*, I got these
numbers using

    M-x ibuffer-do-eval RET
   (print (concat buffer-file-name "  " (number-to-string (how-many " \\?\\*")))
(get-buffer "*scratch*")) RET

I am assuming that the org files all start with a org- prefix. Am I right ?

Hope that helps

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-15 21:04           ` harven
@ 2011-07-15 21:55             ` harven
  2011-07-16 11:12             ` Bastien
  1 sibling, 0 replies; 44+ messages in thread
From: harven @ 2011-07-15 21:55 UTC (permalink / raw)
  To: emacs-orgmode

harven <harven <at> free.fr> writes:

> 
> Achim Gratz <Stromeko <at> nexgo.de> writes:
> 
> > 
> > Bastien <bzg <at> altern.org> writes:
> > > If you can go through Org's code (or motivate someone to go thru the
> > > code for you) and check where the "*" is hardcoded instead of being
> > > inherited from outline-mode that would help a lot, because I'm busy
> > > with other changes I find more important right now.
> > 
> > There's roughly 100 places in Org where "\\*+" is hardcoded (there may
> > be false positives and negatives)
> 
> There are a lot of false positives coming from the wildcards appearing in
> regular expressions. 

Sorry, I misunderstood what you were looking for. Indeed, these must also
be taken in account. And also org-indent-outline-re, I guess.

Sincerely,
-- 
Harven

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-14 18:01       ` Nick Dokos
@ 2011-07-16  2:05         ` Carsten Dominik
  2011-07-16  6:20           ` harven
  2011-07-16 10:31           ` Bastien
  0 siblings, 2 replies; 44+ messages in thread
From: Carsten Dominik @ 2011-07-16  2:05 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Bastien, emacs-orgmode, harven


On 14.7.2011, at 20:01, Nick Dokos wrote:

> harven@free.fr wrote:
> 
>> 
>>> bzh@altern.org writes:
>>> 
>>> harven@free.fr writes:
>>> 
>>>> (setq outline-regexp "[-\f]+")
>>>> so as to use - as the headline starter character in outline mode.
>>>> Switch to another buffer, enter the text
>>>> 
>>>> - first heading
>>>> -- second heading
>>>>   some stuff here
>>>> 
>>>> Activate org-mode. M-x org-mode.
>>> 
>>> You should not do this.  org-mode lists start with a "-", using
>>> this character for headlines will just confuse things.
>> 
>> Let me rephrase my message then.
>> 
>> BUG. How to reproduce.
>> Starting with emacs -Q (this is emacs 23.2 together with org-mode 6.33),
>> execute in the scratch buffer
>> (setq outline-regexp "[•\f]+")
>> so as to use a bullet as the headline starter character in outline mode.
>> Switch to another buffer, enter the text
>> 
>> • first heading
>> •• second heading
>>   some stuff here
>> 
>> Activate org-mode. M-x org-mode.
>> 
>> Then go to the first heading. TAB folds the text as expected.
>> Go to the second heading. TAB inserts a TAB instead of folding
>> the second heading.
>> 
>>> Can't you live with the "*" as the headline character?
>> 
>> That's a pretty rude answer, I must say. I don't know a single
> 
> No, it's not. It is as clear an indication as anybody can give you that
> asterisks are pretty much embedded into org structure.
> 
> Patient: "Doctor, it hurts when I do that"
> Doctor: "Don't do that"
> 
> You may not like it but that's the way it is. Trying to change it at a
> superficial level (as you did by changing outline-regexp) is likely to
> land you in a world of pain.

Yes.  While in principle it might be possible
to change the headline character, in practice is would be
very difficult, because it is hard-coded not only in regular
expressions but also in the structure-editing commands and in
many other places.

Org-mocde has many syntax elements using many characters, and
any modification of the headline character would likely
lead to conflicts in other areas.  So I do not recommend
even trying to change this.  Outline-mode is a general mode
to do outlining and can change this.  Org-mode is a specific
file format.

BTW, this discussion has happened in the mailing list
before several times - a FAQ entry might indeed be
appropriate.

- Carsten



> 
> Nick
> 
>> language (language as e.g. english, russian, spanish...) that
>> uses * as an headline character. BTW, I know that bugs should be
>> reported through the bug tracker, I will do that asap, and
>> no, I don't have a patch, I don't understand how org-mode
>> works.
>> 
> 

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-16  2:05         ` Carsten Dominik
@ 2011-07-16  6:20           ` harven
  2011-07-16 10:33             ` Bastien
  2011-07-16 10:31           ` Bastien
  1 sibling, 1 reply; 44+ messages in thread
From: harven @ 2011-07-16  6:20 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <carsten.dominik <at> gmail.com> writes:

> 
> BTW, this discussion has happened in the mailing list
> before several times - a FAQ entry might indeed be
> appropriate.
> 
> - Carsten

Let me apologize for having started the thread then.
Sincerely,
--
Harven

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-16  2:05         ` Carsten Dominik
  2011-07-16  6:20           ` harven
@ 2011-07-16 10:31           ` Bastien
  2011-07-19  5:16             ` Carsten Dominik
  1 sibling, 1 reply; 44+ messages in thread
From: Bastien @ 2011-07-16 10:31 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: nicholas.dokos, emacs-orgmode, harven

Hi Carsten,

Carsten Dominik <carsten.dominik@gmail.com> writes:

> Org-mocde has many syntax elements using many characters, and
> any modification of the headline character would likely
> lead to conflicts in other areas.  So I do not recommend
> even trying to change this.  Outline-mode is a general mode
> to do outlining and can change this.  Org-mode is a specific
> file format.

This confirms my intuition that the "*" should be hardcoded.

I will work on a patch to this effect and submit it to the list, 
I even expect there will be some performance boost.

Thanks for your input!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-16  6:20           ` harven
@ 2011-07-16 10:33             ` Bastien
  0 siblings, 0 replies; 44+ messages in thread
From: Bastien @ 2011-07-16 10:33 UTC (permalink / raw)
  To: harven; +Cc: emacs-orgmode

Hi Harven,

harven <harven@free.fr> writes:

> Let me apologize for having started the thread then.

Well, no one hurt!  

It's sometimes a good things to try to rephrase old problems.

In this case it led me to have another perspective about this 
issue, so thank *you* for starting it.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-15 18:19         ` Achim Gratz
  2011-07-15 21:04           ` harven
@ 2011-07-16 11:08           ` Bastien
  1 sibling, 0 replies; 44+ messages in thread
From: Bastien @ 2011-07-16 11:08 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Hi Achim,

Achim Gratz <Stromeko@nexgo.de> writes:

> I don't know if having a regexp a compile-time
> constant is advantageous in terms of performance.  

I think it is.

> In any case it would
> be quite some effort to clean up all regexp to only use symbols.

Harven's question convinced me to undertake this effort, stay tuned.

> So it would
> seem to make more sense to me to keep the org syntax as is and perhaps
> allow some more visual sugar by adding overlays (for those that don't
> miond their performance impact).

Yes, that'd be also the route I favor, although I'm afraid performance
will be hugely impacted.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-15 21:04           ` harven
  2011-07-15 21:55             ` harven
@ 2011-07-16 11:12             ` Bastien
  1 sibling, 0 replies; 44+ messages in thread
From: Bastien @ 2011-07-16 11:12 UTC (permalink / raw)
  To: harven; +Cc: emacs-orgmode

Hi Harven,

harven <harven@free.fr> writes:

> I am assuming that the org files all start with a org- prefix. Am I
> right ?

There are also ob-* files in recent version of Org.

I did a quick check and could not find references to outline-regexp 
or org-outline-regexp in those files, but maybe "^\\*" is hardcoded
in some places too.

Thanks for digging into this issue, I'll need your help when I'll 
try to hardcode the "*" character!

Best,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-15 12:08           ` Nicolas Goaziou
@ 2011-07-16 11:22             ` Bastien
  0 siblings, 0 replies; 44+ messages in thread
From: Bastien @ 2011-07-16 11:22 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode, Philipp Haselwarter

Hi Nicolas,

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> I do not disagree. 

:)

> My point is that it could be hard-coded in
> a consistent way, i.e. all references to an headline could look for
> `org-outline-regexp' instead of some custom string (even though it may
> be shorter and easier to write).

I do agree.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-15 10:21         ` Philipp Haselwarter
  2011-07-15 10:40           ` Jambunathan K
@ 2011-07-16 12:59           ` Pieter Praet
  2011-07-17  8:08             ` Aankhen
  2011-07-17 14:53             ` Marcus Klemm
  1 sibling, 2 replies; 44+ messages in thread
From: Pieter Praet @ 2011-07-16 12:59 UTC (permalink / raw)
  To: Philipp Haselwarter, emacs-orgmode

On Fri, 15 Jul 2011 12:21:01 +0200, Philipp Haselwarter <philipp.haselwarter@gmx.de> wrote:
> No need to go all flaming because someone thinks the looks of the
> software matter. TBH I don't see what's wrong with that or in what way
> that's the opposite of efficiency.

What I considered "wrong" about it was the OP implying -twice- that a
frivolous feature request such as this could be marked as being a
full-caps "BUG" [1,2].

Considering all the time and effort Org-mode's selfless developers have
sacrificed to deliver this mindblowing piece of software to us, this
could easily be perceived as an insult in my opinion, regardless of
whether or not it was intentional.

I know that this doesn't justify the tone of my impulsive reply in any
way whatsoever, and I do apologize for disrupting the serene atmosphere
which characterizes this list, but... I sent it, and I stand behind it 100%.

Besides, how could someone who cares about how slick and shiny their
software looks *possibly* end up using Emacs?

> Abstracting the user interface from the logic is an important paradigm,
> especially for something like org-mode that you want to run on a wide
> range of devices – think 24" monitors vs 3" mobile devices. You don't
> want to have too much of the looks hardcoded.

Exactly! That is, believe it or not, the whole point.

What the OP is suggesting effectively nullifies the separation between
model and view in that it would allow changing Org-mode's outlining
markup at its very core, potentially leading to a wildgrowth of "custom"
markup formats which could hardly be called "plain text" anymore, not to
mention the avalanche of PEBCAK-related bug reports it may unleash.

> Now if you don't find that to be one of /your/ personal top priorities –
> fine, don't bother. But going all bashing because someone insists on his
> opinion that this is important? I don't see what you're trying to
> achieve here.

Pretty much since the very beginning, Org-mode has been described as:
  "Org is a mode for keeping notes, maintaining TODO lists, and doing
  project planning with a fast and effective plain-text system."

Seeing as how this description hasn't changed ever since, one can safely
assume that keeping the markup format sane (i.e. plain-text) and
consistent (i.e. semi-standardized, so as not to complicate joint
project planning) is a top priority for the entire Org-mode community.

As for my personal priorities: I didn't start using Emacs solely because
Org-mode *requires* me to, but because I care about getting my work done,
as efficiently as possible. Mac/Windows-influenced non-features (and
the code overhead they introduce) will undoubtedly interfere with that.

IOW, a lack of certain "features" is an essential feature in and of itself.

I guess what I'm trying to achieve is to keep Org-mode from slowly and
inconspicuously devolving into something featuring transparent blinking
3D unicorn overlays with cherries on top. That's a gross exaggeration of
course (one would hope), but I'm sure you catch my drift.

> 
> -- 
> Philipp Haselwarter
> 
> 


Peace

-- 
Pieter

[1] id:"1016444425.2577651310651584384.JavaMail.root@zimbra29-e5.priv.proxad.net"
[2] id:"1240511841.2591431310664738370.JavaMail.root@zimbra29-e5.priv.proxad.net"

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-16 12:59           ` Pieter Praet
@ 2011-07-17  8:08             ` Aankhen
  2011-07-17  9:59               ` Christian Moe
  2011-07-17 14:53             ` Marcus Klemm
  1 sibling, 1 reply; 44+ messages in thread
From: Aankhen @ 2011-07-17  8:08 UTC (permalink / raw)
  To: Pieter Praet, Philipp Haselwarter, Org mailing list

Hi,

On Sat, Jul 16, 2011 at 18:29, Pieter Praet <pieter@praet.org> wrote:
> On Fri, 15 Jul 2011 12:21:01 +0200, Philipp Haselwarter <philipp.haselwarter@gmx.de> wrote:
>> No need to go all flaming because someone thinks the looks of the
>> software matter. TBH I don't see what's wrong with that or in what way
>> that's the opposite of efficiency.
>
> What I considered "wrong" about it was the OP implying -twice- that a
> frivolous feature request such as this could be marked as being a
> full-caps "BUG" [1,2].
>
> Considering all the time and effort Org-mode's selfless developers have
> sacrificed to deliver this mindblowing piece of software to us, this
> could easily be perceived as an insult in my opinion, regardless of
> whether or not it was intentional.

I agree.

> I know that this doesn't justify the tone of my impulsive reply in any
> way whatsoever, and I do apologize for disrupting the serene atmosphere
> which characterizes this list, but... I sent it, and I stand behind it 100%.
>
> Besides, how could someone who cares about how slick and shiny their
> software looks *possibly* end up using Emacs?

Pretty easy: you see that Emacs massively increases your productivity,
and you use it.  The genius of Emacs lies not in being ugly or being
minimalistic (now that would be something) but in being an amazingly
customizable platform.  Being nice to look at would not in any way
automatically render it useless.

>> Abstracting the user interface from the logic is an important paradigm,
>> especially for something like org-mode that you want to run on a wide
>> range of devices – think 24" monitors vs 3" mobile devices. You don't
>> want to have too much of the looks hardcoded.
>
> Exactly! That is, believe it or not, the whole point.
>
> What the OP is suggesting effectively nullifies the separation between
> model and view in that it would allow changing Org-mode's outlining
> markup at its very core, potentially leading to a wildgrowth of "custom"
> markup formats which could hardly be called "plain text" anymore, not to
> mention the avalanche of PEBCAK-related bug reports it may unleash.

I’m very confused.  Couldn’t the compatibility and standardization
problems be avoided entirely by indicating the character at the top of
the file if it differs from the norm?

And why would, say, changing the headline starter from ‘*’ to ‘+’ make
it any less of a plain text format?  Or, for that matter, changing it
to ‘→’?  These are all valid UTF-8 characters that any Unicode-aware
application is expected to understand and deal with.

>> Now if you don't find that to be one of /your/ personal top priorities –
>> fine, don't bother. But going all bashing because someone insists on his
>> opinion that this is important? I don't see what you're trying to
>> achieve here.
>
> Pretty much since the very beginning, Org-mode has been described as:
>  "Org is a mode for keeping notes, maintaining TODO lists, and doing
>  project planning with a fast and effective plain-text system."
>
> Seeing as how this description hasn't changed ever since, one can safely
> assume that keeping the markup format sane (i.e. plain-text) and
> consistent (i.e. semi-standardized, so as not to complicate joint
> project planning) is a top priority for the entire Org-mode community.

Re: plain text and standardization, see the above two paragraphs.

> As for my personal priorities: I didn't start using Emacs solely because
> Org-mode *requires* me to, but because I care about getting my work done,
> as efficiently as possible. Mac/Windows-influenced non-features (and
> the code overhead they introduce) will undoubtedly interfere with that.
>
> IOW, a lack of certain "features" is an essential feature in and of itself.

Have you looked at Emacs recently? “Minimalistic” is the opposite of
what it is.  The fact that you use it ought to show in itself that
minimalism isn’t what you want.

> I guess what I'm trying to achieve is to keep Org-mode from slowly and
> inconspicuously devolving into something featuring transparent blinking
> 3D unicorn overlays with cherries on top. That's a gross exaggeration of
> course (one would hope), but I'm sure you catch my drift.

Certainly.  I still don’t understand how this justifies all the fuss
over a request to change the headline starter.

Aankhen

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-17  8:08             ` Aankhen
@ 2011-07-17  9:59               ` Christian Moe
  0 siblings, 0 replies; 44+ messages in thread
From: Christian Moe @ 2011-07-17  9:59 UTC (permalink / raw)
  To: Aankhen; +Cc: Philipp Haselwarter, Org mailing list, Pieter Praet

On 7/17/11 10:08 AM, Aankhen wrote (in response to Pieter Prat):
>> What the OP is suggesting effectively nullifies the separation between
>> >  model and view in that it would allow changing Org-mode's outlining
>> >  markup at its very core, potentially leading to a wildgrowth of "custom"
>> >  markup formats which could hardly be called "plain text" anymore, not to
>> >  mention the avalanche of PEBCAK-related bug reports it may unleash.
> I’m very confused.  Couldn’t the compatibility and standardization
> problems be avoided entirely by indicating the character at the top of
> the file if it differs from the norm?
>
> And why would, say, changing the headline starter from ‘*’ to ‘+’ make
> it any less of a plain text format?  Or, for that matter, changing it
> to ‘→’?  These are all valid UTF-8 characters that any Unicode-aware
> application is expected to understand and deal with.
>

Fwiw, I disagree: I think this is to confuse syntax with view.

Model = entry with heading
Syntax = *
View = * (colorized)

Compare HTML:

Model = heading, 1st level
Syntax = <h1>...</h1>
View = larger font-size, bold

With CSS, HTML allows you to make headings look like anything you 
want. (Yes, they could even begin with a star!) But noone would 
request the right to write them (h1)...(/h1) or \h1{...} instead, just 
because they don't like the way angle brackets look. Yet that's the 
kind of change that has been discussed in this thread.

In Org-mode, I assume the view could be changed with overlays, at a 
cost in efficiency. If that were implemented, Harven could type stars, 
but see bullets. He should still type stars because they're part of 
the syntax, not of the view.

There is /some/ support for prettifying headlines already: 
[[info:org#Clean view]]

Me, I'm fine with the status quo: This is /not/ a feature request.

Yours,
Christian

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-16 12:59           ` Pieter Praet
  2011-07-17  8:08             ` Aankhen
@ 2011-07-17 14:53             ` Marcus Klemm
  2011-07-17 19:19               ` Bastien
  1 sibling, 1 reply; 44+ messages in thread
From: Marcus Klemm @ 2011-07-17 14:53 UTC (permalink / raw)
  To: emacs-orgmode

Pieter Praet <pieter <at> praet.org> writes:

> What the OP is suggesting effectively nullifies the separation between
> model and view ...

I'm sorry, but this is just plain wrong. The whole problem is that in
orgmode there is no real separation between model and view.

Any "normal" interactive application reads its data from one or multiple
file formats, transforms them to an internal representation, applies
operations to this internal representation and transforms it again for
the display. One can easily change the file format, internal
representation or appearance without changing the other.

In orgmode, it's basicly all one and the same. The model is the same as
the file format, with some additional run-time-information such as which
parts of the document are visible. And the view is the same as the model,
with some fontification. That's why changing the appearance of the
headlines would mean to change the model and--in the end--the file format
as well. Which, as you correctly stated, would create a lot of new
problems.

Ciao, Marcus

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-17 14:53             ` Marcus Klemm
@ 2011-07-17 19:19               ` Bastien
  2011-07-17 19:43                 ` Achim Gratz
  2011-08-13 13:46                 ` Matt Lundin
  0 siblings, 2 replies; 44+ messages in thread
From: Bastien @ 2011-07-17 19:19 UTC (permalink / raw)
  To: Marcus Klemm; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 181 bytes --]

Attached is a patch that replaces instances of outline-regexp 
by org-outline-regexp.  It also introduces more harmonization.

I'd be interesed in hearing about feedback.

Thanks!


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Don-t-use-outline-regexp-anymore.patch --]
[-- Type: text/x-patch, Size: 38332 bytes --]

From 942c0ffbc04cef5a8158c274397b51284d944c43 Mon Sep 17 00:00:00 2001
From: Bastien Guerry <bzg@altern.org>
Date: Sun, 17 Jul 2011 21:17:08 +0200
Subject: [PATCH] Don't use `outline-regexp' anymore.

Use `org-outline-regexp' instead or `outline-regexp'.  Also use the
new defconst `org-outline-regexp-bol' to match `org-outline-regexp'
at the beginning of line.

* org.el (org-outline-regexp-bol): New defconst.
(org-outline-level, org-set-font-lock-defaults, org-cycle)
(org-overview, org-content, org-flag-drawer)
(org-first-headline-recenter, org-insert-todo-heading)
(org-map-region, org-move-subtree-down, org-paste-subtree)
(org-kill-is-subtree-p, org-context-p, org-refile)
(org-refile-new-child, org-toggle-comment, org-todo)
(org-add-planning-info, org-add-log-setup, org-scan-tags)
(org-set-tags, org-insert-property-drawer)
(org-prepare-agenda-buffers, org-preview-latex-fragment)
(org-speed-command-default-hook, org-check-for-hidden)
(org-toggle-item, org-toggle-heading)
(org-indent-line-function, org-set-autofill-regexps)
(org-fill-paragraph, org-toggle-fixed-width-section)
(org-yank-generic, org-yank-folding-would-swallow-text)
(org-first-sibling-p, org-goto-sibling)
(org-goto-first-child, org-show-entry): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-remember.el (org-remember-handler): Use
`org-outline-regexp-bol'.

* org-mouse.el (org-mouse-match-todo-keyword, org-mode-hook)
(org-mouse-move-tree, org-mouse-transform-to-outline): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-macs.el (org-with-limited-levels)
(org-get-limited-outline-regexp): Use `org-outline-regexp'.

* org-indent.el (org-indent-outline-re)
(org-indent-refresh-section, org-indent-refresh-to): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-html.el (org-export-as-html): Use
`org-outline-regexp-bol'.

* org-footnote.el (org-footnote-at-definition-p)
(org-footnote-normalize): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-exp.el (org-export-preprocess-string): Don't redefine
`outline-regexp'.

* org-docbook.el (org-export-as-docbook): Use
`org-outline-regexp-bol'.

* org-colview.el (org-columns, org-columns-compute): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-colview-xemacs.el (org-columns, org-columns-compute):
Use `org-outline-regexp-bol'.

* org-clock.el (org-clock-insert-selection-line)
(org-clock-in, org-clock-out, org-dblock-write:clocktable):
Use `org-outline-regexp' and `org-outline-regexp-bol'.

* org-ascii.el (org-export-as-ascii)
(org-export-ascii-push-links): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-archive.el (org-archive-to-archive-sibling)
(org-archive-all-done): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-agenda.el (org-agenda, org-search-view)
(org-agenda-list-stuck-projects, org-agenda-get-timestamps)
(org-agenda-get-progress, org-agenda-get-blocks): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
---
 lisp/org-agenda.el         |   16 ++++---
 lisp/org-archive.el        |    4 +-
 lisp/org-ascii.el          |    6 ++-
 lisp/org-clock.el          |    8 ++--
 lisp/org-colview-xemacs.el |    4 +-
 lisp/org-colview.el        |    4 +-
 lisp/org-docbook.el        |    2 +-
 lisp/org-exp.el            |    1 -
 lisp/org-footnote.el       |    9 ++-
 lisp/org-html.el           |    2 +-
 lisp/org-indent.el         |    6 +-
 lisp/org-macs.el           |    4 +-
 lisp/org-mouse.el          |   10 ++--
 lisp/org-remember.el       |    2 +-
 lisp/org.el                |  115 ++++++++++++++++++++++----------------------
 15 files changed, 100 insertions(+), 93 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 4209b45..8583193 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -2263,7 +2263,7 @@ Pressing `<' twice means to restrict to the current subtree or region
 	       ((eq type 'todo-tree)
 		(org-check-for-org-mode)
 		(org-let lprops
-		  '(org-occur (concat "^" outline-regexp "[ \t]*"
+		  '(org-occur (concat "^" org-outline-regexp "[ \t]*"
 				      (regexp-quote match) "\\>"))))
 	       ((eq type 'occur-tree)
 		(org-check-for-org-mode)
@@ -3873,7 +3873,7 @@ in `org-agenda-text-search-extra-files'."
 	    regexps+))
     (setq regexps+ (sort regexps+ (lambda (a b) (> (length a) (length b)))))
     (if (not regexps+)
-	(setq regexp (concat "^" org-outline-regexp))
+	(setq regexp org-outline-regexp-bol)
       (setq regexp (pop regexps+))
       (if hdl-only (setq regexp (concat "^" org-outline-regexp ".*?"
 					regexp))))
@@ -4311,9 +4311,11 @@ of what a project is and how to check if it stuck, customize the variable
 			  "\\)\\>"))
 	 (tags (nth 2 org-stuck-projects))
 	 (tags-re (if (member "*" tags)
-		      (org-re "^\\*+ .*:[[:alnum:]_@#%]+:[ \t]*$")
+		      (org-re (concat org-outline-regexp-bol
+				      ".*:[[:alnum:]_@#%]+:[ \t]*$"))
 		    (if tags
-			(concat "^\\*+ .*:\\("
+			(concat org-outline-regexp-bol
+				".*:\\("
 				(mapconcat 'identity tags "\\|")
 				(org-re "\\):[[:alnum:]_@#%:]*[ \t]*$")))))
 	 (gen-re (nth 3 org-stuck-projects))
@@ -4766,7 +4768,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
 	(setq marker (org-agenda-new-marker b0)
 	      category (org-get-category b0))
 	(save-excursion
-	  (if (not (re-search-backward "^\\*+ " nil t))
+	  (if (not (re-search-backward org-outline-regexp-bol nil t))
 	      (setq txt org-agenda-no-heading-message)
 	    (goto-char (match-beginning 0))
 	    (setq hdmarker (org-agenda-new-marker)
@@ -4967,7 +4969,7 @@ please use `org-class' instead."
 		 (clockp
 		  (and (looking-at ".*\n[ \t]*-[ \t]+\\([^-\n \t].*?\\)[ \t]*$")
 		       (match-string 1)))))
-	  (if (not (re-search-backward "^\\*+ " nil t))
+	  (if (not (re-search-backward org-outline-regexp-bol nil t))
 	      (setq txt org-agenda-no-heading-message)
 	    (goto-char (match-beginning 0))
 	    (setq hdmarker (org-agenda-new-marker)
@@ -5366,7 +5368,7 @@ FRACTION is what fraction of the head-warning time has passed."
 		    (throw :skip t))
 		(setq marker (org-agenda-new-marker (point)))
 		(setq category (org-get-category))
-		(if (not (re-search-backward "^\\*+ " nil t))
+		(if (not (re-search-backward org-outline-regexp-bol nil t))
 		    (setq txt org-agenda-no-heading-message)
 		  (goto-char (match-beginning 0))
 		  (setq hdmarker (org-agenda-new-marker (point)))
diff --git a/lisp/org-archive.el b/lisp/org-archive.el
index f6736c4..3549328 100644
--- a/lisp/org-archive.el
+++ b/lisp/org-archive.el
@@ -352,7 +352,7 @@ sibling does not exist, it will be created at the end of the subtree."
     (widen)
     (let (b e pos leader level)
       (org-back-to-heading t)
-      (looking-at outline-regexp)
+      (looking-at org-outline-regexp)
       (setq leader (match-string 0)
 	    level (funcall outline-level))
       (setq pos (point))
@@ -403,7 +403,7 @@ sibling does not exist, it will be created at the end of the subtree."
 If the cursor is not on a headline, try all level 1 trees.  If
 it is on a headline, try all direct children.
 When TAG is non-nil, don't move trees, but mark them with the ARCHIVE tag."
-  (let ((re (concat "^\\*+ +" org-not-done-regexp)) re1
+  (let ((re (concat org-outline-regexp-bol "+" org-not-done-regexp)) re1
 	(rea (concat ".*:" org-archive-tag ":"))
 	(begm (make-marker))
 	(endm (make-marker))
diff --git a/lisp/org-ascii.el b/lisp/org-ascii.el
index b58d644..4c922f3 100644
--- a/lisp/org-ascii.el
+++ b/lisp/org-ascii.el
@@ -428,7 +428,7 @@ publishing directory."
 
     (org-init-section-numbers)
     (while (setq line (pop lines))
-      (when (and link-buffer (string-match "^\\*+ " line))
+      (when (and link-buffer (string-match org-outline-regexp-bol line))
 	(org-export-ascii-push-links (nreverse link-buffer))
 	(setq link-buffer nil))
       (setq wrap nil)
@@ -629,7 +629,9 @@ publishing directory."
       (save-match-data
 	(if (save-excursion
 	      (re-search-backward
-	       "^\\(\\([ \t]*\\)\\|\\(\\*+ \\)\\)[^ \t\n]" nil t))
+	       (concat "^\\(\\([ \t]*\\)\\|\\("
+		       org-outline-regexp
+		       "\\)\\)[^ \t\n]") nil t))
 	    (setq ind (or (match-string 2)
 			  (make-string (length (match-string 3)) ?\ )))))
       (mapc (lambda (x) (insert ind "[" (car x) "]: " (cdr x) "\n"))
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index a9c2cf6..980a035 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -479,7 +479,7 @@ pointing to it."
 		    heading (org-get-heading 'notags)
 		    prefix (save-excursion
 			     (org-back-to-heading t)
-			     (looking-at "\\*+ ")
+			     (looking-at org-outline-regexp)
 			     (match-string 0))
 		    task (substring
 			  (org-fontify-like-in-org-mode
@@ -1092,7 +1092,7 @@ the clocking selection, associated with the letter `d'."
 					    (match-string 2))))
 		     (if newstate (org-todo newstate))))
 		  ((and org-clock-in-switch-to-state
-			(not (looking-at (concat outline-regexp "[ \t]*"
+			(not (looking-at (concat org-outline-regexp "[ \t]*"
 						 org-clock-in-switch-to-state
 						 "\\>"))))
 		   (org-todo org-clock-in-switch-to-state)))
@@ -1380,7 +1380,7 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set."
 					   (match-string 2))))
 		    (if newstate (org-todo newstate))))
 		 ((and org-clock-out-switch-to-state
-		       (not (looking-at (concat outline-regexp "[ \t]*"
+		       (not (looking-at (concat org-outline-regexp "[ \t]*"
 						org-clock-out-switch-to-state
 						"\\>"))))
 		  (org-todo org-clock-out-switch-to-state))))))
@@ -2106,7 +2106,7 @@ the currently selected interval size."
 	    (setq level (string-to-number (match-string 1 (symbol-name scope))))
 	    (catch 'exit
 	      (while (org-up-heading-safe)
-		(looking-at outline-regexp)
+		(looking-at org-outline-regexp)
 		(if (<= (org-reduced-level (funcall outline-level)) level)
 		    (throw 'exit nil))))
 	    (org-narrow-to-subtree)))
diff --git a/lisp/org-colview-xemacs.el b/lisp/org-colview-xemacs.el
index a69af28..00a878f 100644
--- a/lisp/org-colview-xemacs.el
+++ b/lisp/org-colview-xemacs.el
@@ -862,7 +862,7 @@ around it."
 	  (save-restriction
 	    (narrow-to-region beg end)
 	    (org-clock-sum))))
-      (while (re-search-forward (concat "^" outline-regexp) end t)
+      (while (re-search-forward org-outline-regexp-bol end t)
 	(if (and org-columns-skip-archived-trees
 		 (looking-at (concat ".*:" org-archive-tag ":")))
 	    (org-end-of-subtree t)
@@ -1097,7 +1097,7 @@ Don't set this, this is meant for dynamic scoping.")
 (defun org-columns-compute (property)
   "Sum the values of property PROPERTY hierarchically, for the entire buffer."
   (interactive)
-  (let* ((re (concat "^" outline-regexp))
+  (let* ((re org-outline-regexp-bol)
 	 (lmax 30) ; Does anyone use deeper levels???
 	 (lvals (make-vector lmax nil))
 	 (lflag (make-vector lmax nil))
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index d0ac1c1..be2830f 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -696,7 +696,7 @@ around it."
 	  (save-restriction
 	    (narrow-to-region beg end)
 	    (org-clock-sum))))
-      (while (re-search-forward (concat "^" outline-regexp) end t)
+      (while (re-search-forward org-outline-regexp-bol end t)
 	(if (and org-columns-skip-archived-trees
 		 (looking-at (concat ".*:" org-archive-tag ":")))
 	    (org-end-of-subtree t)
@@ -929,7 +929,7 @@ Don't set this, this is meant for dynamic scoping.")
 (defun org-columns-compute (property)
   "Sum the values of property PROPERTY hierarchically, for the entire buffer."
   (interactive)
-  (let* ((re (concat "^" outline-regexp))
+  (let* ((re org-outline-regexp-bol)
 	 (lmax 30) ; Does anyone use deeper levels???
 	 (lvals (make-vector lmax nil))
 	 (lflag (make-vector lmax nil))
diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el
index a28394a..8e48e77 100644
--- a/lisp/org-docbook.el
+++ b/lisp/org-docbook.el
@@ -651,7 +651,7 @@ publishing directory."
 	(catch 'nextline
 
 	  ;; End of quote section?
-	  (when (and inquote (string-match "^\\*+ " line))
+	  (when (and inquote (string-match org-outline-regexp-bol line))
 	    (insert "]]></programlisting>\n")
 	    (org-export-docbook-open-para)
 	    (setq inquote nil))
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 85a3346..b60e3d4 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -1083,7 +1083,6 @@ on this string to produce the exported version."
 	 (archived-trees (plist-get parameters :archived-trees))
 	 (inhibit-read-only t)
 	 (drawers org-drawers)
-	 (outline-regexp "\\*+ ")
 	 (source-buffer (current-buffer))
 	 target-alist rtn)
 
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index e80a90a..5fb83ad 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -230,7 +230,9 @@ The return value will be nil if not at a footnote definition, and a list with
 label, start, end and definition of the footnote otherwise."
   (save-excursion
     (end-of-line)
-    (let ((lim (save-excursion (re-search-backward "^\\*+ \\|^[ \t]*$" nil t))))
+    (let ((lim (save-excursion (re-search-backward 
+				(concat org-outline-regexp-bol
+					"\\|^[ \t]*$") nil t))))
       (when (re-search-backward org-footnote-definition-re lim t)
 	(end-of-line)
 	(list (match-string 2)
@@ -245,7 +247,8 @@ label, start, end and definition of the footnote otherwise."
 		  (or (and (re-search-forward
 			    (org-re
 			     (concat "^[ \t]*$" "\\|"
-				     "^\\*+ " "\\|"
+				     org-outline-regexp-bol
+				     "\\|"
 				     "^\\[\\([0-9]+\\|fn:[-_[:word:]]+\\)\\]"))
 			    bound 'move)
 			   (progn (skip-chars-forward " \t\n") (point-at-bol)))
@@ -569,7 +572,7 @@ Additional note on `org-footnote-insert-pos-for-preprocessor':
 		      (if org-odd-levels-only
 			  (and limit-level (1- (* limit-level 2)))
 			limit-level)))
-	 (outline-regexp
+	 (org-outline-regexp
 	  (concat "\\*" (if nstars (format "\\{1,%d\\} " nstars) "+ ")))
 	 ;; Determine the highest marker used so far.
 	 (ref-table (when export-props org-export-footnotes-seen))
diff --git a/lisp/org-html.el b/lisp/org-html.el
index ee84746..17f6b4f 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1439,7 +1439,7 @@ lang=\"%s\" xml:lang=\"%s\">
 	(catch 'nextline
 
 	  ;; end of quote section?
-	  (when (and inquote (string-match "^\\*+ " line))
+	  (when (and inquote (string-match org-outline-regexp-bol line))
 	    (insert "</pre>\n")
 	    (org-open-par)
 	    (setq inquote nil))
diff --git a/lisp/org-indent.el b/lisp/org-indent.el
index a08f494..a1c690d 100644
--- a/lisp/org-indent.el
+++ b/lisp/org-indent.el
@@ -217,7 +217,7 @@ useful to make it ever so slightly different."
 			  '(line-prefix nil wrap-prefix nil) string)
   string)
 
-(defvar org-indent-outline-re (concat "^" org-outline-regexp)
+(defvar org-indent-outline-re org-outline-regexp-bol
   "Outline heading regexp.")
 
 (defun org-indent-add-properties (beg end)
@@ -273,7 +273,7 @@ Point is assumed to be at the beginning of a headline."
   (when org-indent-mode
     (let (beg end)
       (save-excursion
-	(when (ignore-errors (let ((outline-regexp (format "\\*\\{1,%s\\}[ \t]+"
+	(when (ignore-errors (let ((org-outline-regexp (format "\\*\\{1,%s\\}[ \t]+"
 				(if (featurep 'org-inlinetask)
 				    (1- org-inlinetask-min-level)
 				  ""))))
@@ -290,7 +290,7 @@ Point is assumed to be at the beginning of a headline."
   (when org-indent-mode
     (let ((beg (point)) (end limit))
       (save-excursion
-	(and (ignore-errors (let ((outline-regexp (format "\\*\\{1,%s\\}[ \t]+"
+	(and (ignore-errors (let ((org-outline-regexp (format "\\*\\{1,%s\\}[ \t]+"
 				(if (featurep 'org-inlinetask)
 				    (1- org-inlinetask-min-level)
 				  ""))))
diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index f212cad..40741a9 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -347,7 +347,7 @@ point nowhere."
 
 (defmacro org-with-limited-levels (&rest body)
   "Execute BODY with limited number of outline levels."
-  `(let* ((outline-regexp (org-get-limited-outline-regexp)))
+  `(let* ((org-outline-regexp (org-get-limited-outline-regexp)))
      ,@body))
 
 (defvar org-odd-levels-only) ; defined in org.el
@@ -356,7 +356,7 @@ point nowhere."
   "Return outline-regexp with limited number of levels.
 The number of levels is controlled by `org-inlinetask-min-level'"
   (if (or (not (org-mode-p)) (not (featurep 'org-inlinetask)))
-      outline-regexp
+      org-outline-regexp
     (let* ((limit-level (1- org-inlinetask-min-level))
 	   (nstars (if org-odd-levels-only (1- (* limit-level 2)) limit-level)))
       (format "\\*\\{1,%d\\} " nstars))))
diff --git a/lisp/org-mouse.el b/lisp/org-mouse.el
index 4779c6c..5658bd5 100644
--- a/lisp/org-mouse.el
+++ b/lisp/org-mouse.el
@@ -635,7 +635,7 @@ This means, between the beginning of line and the point."
 (defun org-mouse-match-todo-keyword ()
   (save-excursion
     (org-back-to-heading)
-    (if (looking-at outline-regexp) (goto-char (match-end 0)))
+    (if (looking-at org-outline-regexp) (goto-char (match-end 0)))
     (or (looking-at (concat " +" org-todo-regexp " *"))
 	(looking-at " \\( *\\)"))))
 
@@ -927,7 +927,7 @@ This means, between the beginning of line and the point."
      (when (memq 'activate-stars org-mouse-features)
        (font-lock-add-keywords
 	nil
-	`((,outline-regexp
+	`((,org-outline-regexp
 	   0 `(face org-link mouse-face highlight keymap ,org-mouse-map)
 	   'prepend))
 	t))
@@ -999,7 +999,7 @@ This means, between the beginning of line and the point."
 	(end-of-line)
 	(if (eobp) (newline) (forward-char)))
 
-      (when (looking-at outline-regexp)
+      (when (looking-at org-outline-regexp)
 	(let ((level (- (match-end 0) (match-beginning 0))))
 	  (when (> end (match-end 0))
 	    (outline-end-of-subtree)
@@ -1019,11 +1019,11 @@ This means, between the beginning of line and the point."
 	(replace-text (concat (match-string 0) "* ")))
     (beginning-of-line 2)
     (save-excursion
-      (while (not (or (eobp) (looking-at outline-regexp)))
+      (while (not (or (eobp) (looking-at org-outline-regexp)))
 	(when (looking-at org-mouse-plain-list-regexp)
 	  (setq minlevel (min minlevel (- (match-end 1) (match-beginning 1)))))
 	(forward-line)))
-    (while (not (or (eobp) (looking-at outline-regexp)))
+    (while (not (or (eobp) (looking-at org-outline-regexp)))
       (when (and (looking-at org-mouse-plain-list-regexp)
 		 (eq minlevel (- (match-end 1) (match-beginning 1))))
 	(replace-match replace-text))
diff --git a/lisp/org-remember.el b/lisp/org-remember.el
index fcbcae1..ac5cb61 100644
--- a/lisp/org-remember.el
+++ b/lisp/org-remember.el
@@ -1072,7 +1072,7 @@ See also the variable `org-reverse-note-order'."
 		   (save-restriction
 		     (widen)
 		     (goto-char (point-min))
-		     (re-search-forward "^\\*+ " nil t)
+		     (re-search-forward org-outline-regexp-bol nil t)
 		     (beginning-of-line 1)
 		     (org-paste-subtree 1 txt)
 		     (and org-auto-align-tags (org-set-tags nil t))
diff --git a/lisp/org.el b/lisp/org.el
index 8c10534..5824a68 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4696,6 +4696,7 @@ This variable is set by `org-before-change-function'.
 (defvar org-inhibit-blocking nil)       ; Dynamically-scoped param.
 (defvar org-table-buffer-is-an nil)
 (defconst org-outline-regexp "\\*+ ")
+(defconst org-outline-regexp-bol "^\\*+ ")
 
 ;;;###autoload
 (define-derived-mode org-mode outline-mode "Org"
@@ -5529,7 +5530,7 @@ by `outline-regexp'.  Otherwise it returns garbage.
 If this is called at a normal headline, the level is the number of stars.
 Use `org-reduced-level' to remove the effect of `org-odd-levels'."
   (save-excursion
-    (looking-at outline-regexp)
+    (looking-at org-outline-regexp)
     (1- (- (match-end 0) (match-beginning 0)))))
 
 (defvar org-font-lock-keywords nil)
@@ -5622,7 +5623,9 @@ needs to be inserted at a specific position in the font-lock sequence.")
 	   '("^[ \t]*[-+*][ \t]+\\(.*?[ \t]+::\\)\\([ \t]+\\|$\\)"
 	     1 'bold prepend)
 	   ;; ARCHIVEd headings
-	   (list (concat "^\\*+ \\(.*:" org-archive-tag ":.*\\)")
+	   (list (concat 
+		  org-outline-regexp-bol
+		  "\\(.*:" org-archive-tag ":.*\\)")
 		 '(1 'org-archived prepend))
 	   ;; Specials
 	   '(org-do-latex-and-special-faces)
@@ -5905,12 +5908,12 @@ in special contexts.
 		      (if org-odd-levels-only
 			  (and limit-level (1- (* limit-level 2)))
 			limit-level)))
-	   (outline-regexp
+	   (org-outline-regexp
 	    (if (not (org-mode-p))
 		outline-regexp
 	      (concat "\\*" (if nstars (format "\\{1,%d\\} " nstars) "+ "))))
 	   (bob-special (and org-cycle-global-at-bob (not arg) (bobp)
-			     (not (looking-at outline-regexp))))
+			     (not (looking-at org-outline-regexp))))
 	   (org-cycle-hook
 	    (if bob-special
 		(delq 'org-optimize-window-after-visibility-change
@@ -5972,7 +5975,7 @@ in special contexts.
        ;; At an item/headline: delegate to `org-cycle-internal-local'.
        ((and (or (and org-cycle-include-plain-lists (org-at-item-p))
 		 (save-excursion (beginning-of-line 1)
-				 (looking-at outline-regexp)))
+				 (looking-at org-outline-regexp)))
 	     (or (bolp) (not (eq org-cycle-emulate-tab 'exc-hl-bol))))
 	(org-cycle-internal-local))
 
@@ -5991,7 +5994,7 @@ in special contexts.
 
        ((and (eq org-cycle-emulate-tab 'exc-hl-bol)
 	     (or (not (bolp))
-		 (not (looking-at outline-regexp))))
+		 (not (looking-at org-outline-regexp))))
 	(call-interactively (global-key-binding "\t")))
 
        ((if (and (memq org-cycle-emulate-tab '(white whitestart))
@@ -6213,7 +6216,7 @@ results."
   (interactive)
   (let ((level (save-excursion
 		 (goto-char (point-min))
-		 (if (re-search-forward (concat "^" outline-regexp) nil t)
+		 (if (re-search-forward org-outline-regexp-bol nil t)
 		     (progn
 		       (goto-char (match-beginning 0))
 		       (funcall outline-level))))))
@@ -6232,7 +6235,7 @@ With numerical argument N, show content up to level N."
 			     (outline-previous-visible-heading 1)
 			   (error (goto-char (point-min))))
 			 t)
-		  (looking-at outline-regexp))
+		  (looking-at org-outline-regexp))
 	(if (integerp arg)
 	    (show-children (1- arg))
 	  (show-branches))
@@ -6385,8 +6388,7 @@ open and agenda-wise Org files."
   (save-excursion
     (beginning-of-line 1)
     (when (looking-at "^[ \t]*:[a-zA-Z][a-zA-Z0-9]*:")
-      (let ((b (match-end 0))
-	    (outline-regexp org-outline-regexp))
+      (let ((b (match-end 0)))
 	(if (re-search-forward
 	     "^[ \t]*:END:"
 	     (save-excursion (outline-next-heading) (point)) t)
@@ -6402,7 +6404,7 @@ open and agenda-wise Org files."
   "Move cursor to the first headline and recenter the headline.
 Optional argument N means put the headline into the Nth line of the window."
   (goto-char (point-min))
-  (when (re-search-forward (concat "^\\(" outline-regexp "\\)") nil t)
+  (when (re-search-forward (concat "^\\(" org-outline-regexp "\\)") nil t)
     (beginning-of-line)
     (recenter (prefix-numeric-value N))))
 
@@ -7027,7 +7029,7 @@ state (TODO by default).  Also with prefix arg, force first state."
 	    'org-todo-get-default-hook new-mark-x nil)
 	   new-mark-x)))
       (beginning-of-line 1)
-      (and (looking-at "\\*+ ") (goto-char (match-end 0))
+      (and (looking-at org-outline-regexp) (goto-char (match-end 0))
 	   (if org-treat-insert-todo-heading-as-state-change
 	       (org-todo new-mark)
 	     (insert new-mark " "))))
@@ -7255,7 +7257,7 @@ After top level, it switches back to sibling level."
     (save-excursion
       (setq end (copy-marker end))
       (goto-char beg)
-      (if (and (re-search-forward (concat "^" outline-regexp) nil t)
+      (if (and (re-search-forward org-outline-regexp-bol nil t)
 	       (< (point) end))
 	  (funcall fun))
       (while (and (progn
@@ -7291,8 +7293,7 @@ This will leave level 1 alone, convert level 2 to level 3, level 3 to
 level 5 etc."
   (interactive)
   (when (yes-or-no-p "Are you sure you want to globally change levels to odd? ")
-    (let ((outline-regexp org-outline-regexp)
-	  (outline-level 'org-outline-level)
+    (let ((outline-level 'org-outline-level)
 	  (org-odd-levels-only nil) n)
       (save-excursion
 	(goto-char (point-min))
@@ -7369,7 +7370,7 @@ case."
 	(setq beg (point))))
     ;; Find insertion point, with error handling
     (while (> cnt 0)
-      (or (and (funcall movfunc) (looking-at outline-regexp))
+      (or (and (funcall movfunc) (looking-at org-outline-regexp))
 	  (progn (goto-char beg0)
 		 (error "Cannot move past superior level or buffer limit")))
       (setq cnt (1- cnt)))
@@ -7499,8 +7500,8 @@ the inserted text when done."
       "The kill is not a (set of) tree(s) - please use \\[yank] to yank anyway")))
   (let* ((visp (not (outline-invisible-p)))
 	 (txt tree)
-	 (^re (concat "^\\(" outline-regexp "\\)"))
-	 (re  (concat "\\(" outline-regexp "\\)"))
+	 (^re (concat "^\\(" org-outline-regexp "\\)"))
+	 (re  (concat "\\(" org-outline-regexp "\\)"))
 	 (^re_ (concat "\\(\\*+\\)[  \t]*"))
 
 	 (old-level (if (string-match ^re txt)
@@ -7527,7 +7528,7 @@ the inserted text when done."
 	 (next-level (save-excursion
 		       (condition-case nil
 			   (progn
-			     (or (looking-at outline-regexp)
+			     (or (looking-at org-outline-regexp)
 				 (outline-next-visible-heading 1))
 			     (if (looking-at re)
 				 (- (match-end 0) (match-beginning 0) 1)
@@ -7593,7 +7594,7 @@ If optional TXT is given, check this string instead of the current kill."
 						 org-outline-regexp "\\)")
 					 kill)
 			   (- (match-end 2) (match-beginning 2) 1)))
-	 (re (concat "^" org-outline-regexp))
+	 (re org-outline-regexp-bol)
 	 (start (1+ (or (match-beginning 2) -1))))
     (if (not start-level)
 	(progn
@@ -8230,8 +8231,7 @@ Possible values in the list of contexts are `table', `headline', and `item'."
     (prog1 (or (and (memq 'table contexts)
 		    (looking-at "[ \t]*|"))
 	       (and (memq 'headline contexts)
-;;?????????		    (looking-at "\\*+"))
-		    (looking-at outline-regexp))
+		    (looking-at org-outline-regexp))
 	       (and (memq 'item contexts)
 		    (looking-at "[ \t]*\\([-+*] \\|[0-9]+[.)] \\)"))
 	       (and (memq 'item-body contexts)
@@ -10430,7 +10430,7 @@ prefix argument (`C-u C-u C-u C-c C-w')."
 		  (if pos
 		      (progn
 			(goto-char pos)
-			(looking-at outline-regexp)
+			(looking-at org-outline-regexp)
 			(setq level (org-get-valid-level (funcall outline-level) 1))
 			(goto-char
 			 (if reversed
@@ -10575,7 +10575,7 @@ this function appends the default value from
 	      (goto-char pos)
 	    (goto-char (point-max))
 	    (if (not (bolp)) (newline)))
-	  (when (looking-at outline-regexp)
+	  (when (looking-at org-outline-regexp)
 	    (setq level (funcall outline-level))
 	    (org-end-of-subtree t t))
 	  (org-back-over-empty-lines)
@@ -10873,10 +10873,10 @@ expands them."
   (save-excursion
     (org-back-to-heading)
     (let (case-fold-search)
-      (if (looking-at (concat outline-regexp
+      (if (looking-at (concat org-outline-regexp
 			      "\\( *\\<" org-comment-string "\\>[ \t]*\\)"))
 	  (replace-match "" t t nil 1)
-	(if (looking-at outline-regexp)
+	(if (looking-at org-outline-regexp)
 	    (progn
 	      (goto-char (match-end 0))
 	      (insert org-comment-string " ")))))))
@@ -10941,7 +10941,7 @@ For calling through lisp, arg is also interpreted in the following way:
     (save-excursion
       (catch 'exit
 	(org-back-to-heading t)
-	(if (looking-at outline-regexp) (goto-char (1- (match-end 0))))
+	(if (looking-at org-outline-regexp) (goto-char (1- (match-end 0))))
 	(or (looking-at (concat " +" org-todo-regexp "\\( +\\|$\\)"))
 	    (looking-at " *"))
 	(let* ((match-data (match-data))
@@ -11664,7 +11664,7 @@ of `org-todo-keywords-1'."
 				   org-todo-keywords-1)))
 	       (t (error "Invalid prefix argument: %s" arg)))))
     (message "%d TODO entries found"
-	     (org-occur (concat "^" outline-regexp " *" kwd-re )))))
+	     (org-occur (concat "^" org-outline-regexp " *" kwd-re )))))
 
 (defun org-deadline (&optional remove time)
   "Insert the \"DEADLINE:\" string with a timestamp to make a deadline.
@@ -11820,7 +11820,7 @@ be removed."
 	(save-restriction
 	  (let (col list elt ts buffer-invisibility-spec)
 	    (org-back-to-heading t)
-	    (looking-at (concat outline-regexp "\\( *\\)[^\r\n]*"))
+	    (looking-at (concat org-outline-regexp "\\( *\\)[^\r\n]*"))
 	    (goto-char (match-end 1))
 	    (setq col (current-column))
 	    (goto-char (match-end 0))
@@ -11831,7 +11831,7 @@ be removed."
 				     org-keyword-time-not-clock-regexp))))
 	      ;; Nothing to add, nothing to remove...... :-)
 	      (throw 'exit nil))
-	    (if (and (not (looking-at outline-regexp))
+	    (if (and (not (looking-at org-outline-regexp))
 		     (looking-at (concat "[^\r\n]*?" org-keyword-time-regexp
 					 "[^\r\n]*"))
 		     (not (equal (match-string 1) org-clock-string)))
@@ -11917,7 +11917,7 @@ EXTRA is additional text that will be inserted into the notes buffer."
 	  (org-back-to-heading t)
 	  (narrow-to-region (point) (save-excursion
 				      (outline-next-heading) (point)))
-	  (looking-at (concat outline-regexp "\\( *\\)[^\r\n]*"
+	  (looking-at (concat org-outline-regexp "\\( *\\)[^\r\n]*"
 			      "\\(\n[^\r\n]*?" org-keyword-time-not-clock-regexp
 			      "[^\r\n]*\\)?"))
 	  (goto-char (match-end 0))
@@ -12435,7 +12435,7 @@ MATCHER is a Lisp form to be evaluated, testing if a given set of tags
 qualifies a headline for inclusion.  When TODO-ONLY is non-nil,
 only lines with a TODO keyword are included in the output."
   (require 'org-agenda)
-  (let* ((re (concat "^" outline-regexp " *\\(\\<\\("
+  (let* ((re (concat "^" org-outline-regexp " *\\(\\<\\("
 		     (mapconcat 'regexp-quote org-todo-keywords-1 "\\|")
 		     (org-re
 		      "\\>\\)\\)? *\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$")))
@@ -12996,7 +12996,7 @@ If DATA is nil or the empty string, any tags will be removed."
   "Set the tags for the current headline.
 With prefix ARG, realign all tags in headings in the current buffer."
   (interactive "P")
-  (let* ((re (concat "^" outline-regexp))
+  (let* ((re org-outline-regexp-bol)
 	 (current (org-get-tags-string))
 	 (col (current-column))
 	 (org-setting-tags t)
@@ -14041,7 +14041,7 @@ formats in the current buffer."
   "Insert a property drawer into the current entry."
   (interactive)
   (org-back-to-heading t)
-  (looking-at outline-regexp)
+  (looking-at org-outline-regexp)
   (let ((indent (if org-adapt-indentation
 		    (- (match-end 0)(match-beginning 0))
 		  0))
@@ -16104,7 +16104,7 @@ When a buffer is unmodified, it is just killed.  When modified, it is saved
 		  (if (org-on-heading-p t)
 		      (add-text-properties (point-at-bol) (org-end-of-subtree t) pa))))
 	      (goto-char (point-min))
-	      (setq re (concat "^\\*+ +" org-comment-string "\\>"))
+	      (setq re (concat org-outline-regexp-bol "+" org-comment-string "\\>"))
 	      (while (re-search-forward re nil t)
 		(add-text-properties
 		 (match-beginning 0) (org-end-of-subtree t) pc)))
@@ -16274,7 +16274,7 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]."
 	(cond
 	 ((or (equal subtree '(16))
 	      (not (save-excursion
-		     (re-search-backward (concat "^" outline-regexp) nil t))))
+		     (re-search-backward org-outline-regexp-bol nil t))))
 	  (setq beg (point-min) end (point-max)
 		msg "Creating images for buffer...%s"))
 	 ((equal subtree '(4))
@@ -16928,7 +16928,7 @@ If not, return to the original position and throw an error."
   "Hook for activating single-letter speed commands.
 `org-speed-commands-default' specifies a minimal command set. Use
 `org-speed-commands-user' for further customization."
-  (when (or (and (bolp) (looking-at outline-regexp))
+  (when (or (and (bolp) (looking-at org-outline-regexp))
 	    (and (functionp org-use-speed-commands)
 		 (funcall org-use-speed-commands)))
     (cdr (assoc keys (append org-speed-commands-user
@@ -17355,7 +17355,7 @@ WHAT can be either `headlines' or `items'.  If the current line is
 an outline or item heading and it has a folded subtree below it,
 this function returns t, nil otherwise."
   (let ((re (cond
-	     ((eq what 'headlines) (concat "^" org-outline-regexp))
+	     ((eq what 'headlines) org-outline-regexp-bol)
 	     ((eq what 'items) (org-item-beginning-re))
 	     (t (error "This should not happen"))))
 	beg end)
@@ -17890,7 +17890,7 @@ argument ARG, change each line in region into an item."
 		      (cond
 		       ;; Skip blank lines and inline tasks.
 		       ((looking-at "^[ \t]*$"))
-		       ((looking-at "^\\*+ "))
+		       ((looking-at org-outline-regexp-bol))
 		       ;; We can't find less than 0 indentation.
 		       ((zerop i) (throw 'exit (setq min-i 0)))
 		       ((< i min-i) (setq min-i i))))
@@ -17901,7 +17901,7 @@ argument ARG, change each line in region into an item."
 	      (let ((delta (- ind min-i)))
 		(while (< (point) end)
 		  (unless (or (looking-at "^[ \t]*$")
-			      (looking-at "^\\*+ "))
+			      (looking-at org-outline-regexp-bol))
 		    (org-indent-line-to (+ (org-get-indentation) delta)))
 		  (forward-line)))))))
 	(skip-blanks
@@ -18038,7 +18038,7 @@ stars to add."
 	((org-on-heading-p)
 	 (while (< (point) end)
 	   (when (org-on-heading-p t)
-	     (looking-at outline-regexp) (replace-match ""))
+	     (looking-at org-outline-regexp) (replace-match ""))
 	   (forward-line)))
 	;; Case 2. Started at an item: change items into headlines.
 	;;         One star will be added by `org-list-to-subtree'.
@@ -19279,7 +19279,7 @@ If point is in an inline task, mark that task instead."
      ;; Comments
      ((looking-at "# ") (setq column 0))
      ;; Headings
-     ((looking-at "\\*+ ") (setq column 0))
+     ((looking-at org-outline-regexp) (setq column 0))
      ;; Included files
      ((looking-at "#\\+include:") (setq column 0))
      ;; Footnote definition
@@ -19388,7 +19388,7 @@ the functionality can be provided as a fall-back.")
    (concat
     "\f" "\\|"
     "[ 	]*$" "\\|"
-    "\\*+ " "\\|"
+    org-outline-regexp "\\|"
     "[ \t]*#" "\\|"
     (org-item-re) "\\|"
     "[ \t]*[:|]" "\\|"
@@ -19398,7 +19398,8 @@ the functionality can be provided as a fall-back.")
   ;; But only if the user has not turned off tables or fixed-width regions
   (org-set-local
    'auto-fill-inhibit-regexp
-   (concat "\\*+ \\|#\\+"
+   (concat org-outline-regexp
+	   "\\|#\\+"
 	   "\\|[ \t]*" org-keyword-time-regexp
 	   (if (or org-enable-table-editor org-enable-fixed-width-editor)
 	       (concat
@@ -19441,7 +19442,7 @@ the functionality can be provided as a fall-back.")
 	(itemp (org-in-item-p)))
     (cond ((and (equal (char-after (point-at-bol)) ?*)
 		(save-excursion (goto-char (point-at-bol))
-				(looking-at outline-regexp)))
+				(looking-at org-outline-regexp)))
 	   t)				; skip headlines
 	  (table.el-p t)		; skip table.el tables
 	  (table-p (org-table-align) t)	; align Org tables
@@ -19585,10 +19586,10 @@ this line is also exported in fixed-width font."
 	    (forward-line 1)))
       (save-excursion
 	(org-back-to-heading)
-	(if (looking-at (concat outline-regexp
+	(if (looking-at (concat org-outline-regexp
 				"\\( *\\<" org-quote-string "\\>[ \t]*\\)"))
 	    (replace-match "" t t nil 1)
-	  (if (looking-at outline-regexp)
+	  (if (looking-at org-outline-regexp)
 	      (progn
 		(goto-char (match-end 0))
 		(insert org-quote-string " "))))))))
@@ -19815,9 +19816,9 @@ interactive command with similar behavior."
 	  (when (and (bolp) subtreep
 		     (not (setq swallowp
 				(org-yank-folding-would-swallow-text beg end))))
-	    (or (looking-at outline-regexp)
-		(re-search-forward (concat "^" outline-regexp) end t))
-	    (while (and (< (point) end) (looking-at outline-regexp))
+	    (or (looking-at org-outline-regexp)
+		(re-search-forward org-outline-regexp-bol end t))
+	    (while (and (< (point) end) (looking-at org-outline-regexp))
 	      (hide-subtree)
 	      (org-cycle-show-empty-lines 'folded)
 	      (condition-case nil
@@ -19843,8 +19844,8 @@ interactive command with similar behavior."
   (let (level)
     (save-excursion
       (goto-char beg)
-      (when (or (looking-at outline-regexp)
-		(re-search-forward (concat "^" outline-regexp) end t))
+      (when (or (looking-at org-outline-regexp)
+		(re-search-forward org-outline-regexp-bol end t))
 	(setq level (org-outline-level)))
       (goto-char end)
       (skip-chars-forward " \t\r\n\v\f")
@@ -19890,7 +19891,7 @@ This version does not only check the character property, but also
   "Before first heading?"
   (save-excursion
     (end-of-line)
-    (null (re-search-backward "^\\*+ " nil t))))
+    (null (re-search-backward org-outline-regexp-bol nil t))))
 
 (defun org-on-heading-p (&optional ignored)
   (outline-on-heading-p t))
@@ -19942,7 +19943,7 @@ make a significant difference in outlines with very many siblings."
 (defun org-first-sibling-p ()
   "Is this heading the first child of its parents?"
   (interactive)
-  (let ((re (concat "^" outline-regexp))
+  (let ((re org-outline-regexp-bol)
 	level l)
     (unless (org-at-heading-p t)
       (error "Not at a heading"))
@@ -19960,7 +19961,7 @@ when a sibling was found.  When none is found, return nil and don't
 move point."
   (let ((fun (if previous 're-search-backward 're-search-forward))
 	(pos (point))
-	(re (concat "^" outline-regexp))
+	(re org-outline-regexp-bol)
 	level l)
     (when (condition-case nil (org-back-to-heading t) (error nil))
       (setq level (funcall outline-level))
@@ -19985,7 +19986,7 @@ move point."
   "Goto the first child, even if it is invisible.
 Return t when a child was found. Otherwise don't move point and
 return nil."
-  (let (level (pos (point)) (re (concat "^" outline-regexp)))
+  (let (level (pos (point)) (re org-outline-regexp-bol))
     (when (condition-case nil (org-back-to-heading t) (error nil))
       (setq level (outline-level))
       (forward-char 1)
@@ -20161,7 +20162,7 @@ Show the heading too, if it is currently invisible."
 	   (max (point-min) (1- (point)))
 	   (save-excursion
 	     (if (re-search-forward
-		  (concat "[\r\n]\\(" outline-regexp "\\)") nil t)
+		  (concat "[\r\n]\\(" org-outline-regexp "\\)") nil t)
 		 (match-beginning 1)
 	       (point-max)))
 	   nil)
-- 
1.7.5.2


[-- Attachment #3: Type: text/plain, Size: 14 bytes --]


-- 
 Bastien

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-17 19:19               ` Bastien
@ 2011-07-17 19:43                 ` Achim Gratz
  2011-07-18  8:16                   ` Bastien
  2011-08-13 13:46                 ` Matt Lundin
  1 sibling, 1 reply; 44+ messages in thread
From: Achim Gratz @ 2011-07-17 19:43 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@altern.org> writes:
> Attached is a patch that replaces instances of outline-regexp 
> by org-outline-regexp.  It also introduces more harmonization.

So that's what you were doing all sunday... ;-)

> I'd be interesed in hearing about feedback.

Looks good, except that Git complains about two whitespace errors — but
that is easily taken care of by M-x delete-trailing-whitespace.


Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-17 19:43                 ` Achim Gratz
@ 2011-07-18  8:16                   ` Bastien
  0 siblings, 0 replies; 44+ messages in thread
From: Bastien @ 2011-07-18  8:16 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Hi Achim,

Achim Gratz <Stromeko@nexgo.de> writes:

> Looks good, except that Git complains about two whitespace errors — but
> that is easily taken care of by M-x delete-trailing-whitespace.

Thanks for confirming -- I've now applied the patch.

There is still some work to be done to completely remove hardcoded 
"\\*" sequences...  I'm on it this week.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-16 10:31           ` Bastien
@ 2011-07-19  5:16             ` Carsten Dominik
  2011-07-25 21:33               ` Bastien
  0 siblings, 1 reply; 44+ messages in thread
From: Carsten Dominik @ 2011-07-19  5:16 UTC (permalink / raw)
  To: Bastien; +Cc: nicholas.dokos, emacs-orgmode, harven


On 16.7.2011, at 12:31, Bastien wrote:

> Hi Carsten,
> 
> Carsten Dominik <carsten.dominik@gmail.com> writes:
> 
>> Org-mocde has many syntax elements using many characters, and
>> any modification of the headline character would likely
>> lead to conflicts in other areas.  So I do not recommend
>> even trying to change this.  Outline-mode is a general mode
>> to do outlining and can change this.  Org-mode is a specific
>> file format.
> 
> This confirms my intuition that the "*" should be hardcoded.

One argument against hardcoding would be that you can use org-cycle
in other modes, with outline-minor-mode, and I think a number of people
make use of this.

Of cause, if indeed an interesting speed bump can be achieved, we
can provide a stand-alone org-cycle, maybe even integrate it into
outline-mode itself.

- Carsten

> 
> I will work on a patch to this effect and submit it to the list, 
> I even expect there will be some performance boost.
> 
> Thanks for your input!
> 
> -- 
> Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

* org-icons package (was: how to change the headline starter *)
  2011-07-15 10:56       ` Bastien
@ 2011-07-25 10:12         ` Renzo Been
  2011-07-27 15:50           ` org-icons package Bastien
  0 siblings, 1 reply; 44+ messages in thread
From: Renzo Been @ 2011-07-25 10:12 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg <at> altern.org> writes:

> 
> Hi Philipp,
> 
> Philipp Haselwarter <philipp.haselwarter <at> gmx.de> writes:
> 
> > Is there any particular reason for it to be hardcoded? Apart from the
> > fact that /well it just is this way right now/ I mean.
> 
> Nothing carved in stone, but here are the two reasons I see:
> 
> - we don't want users to use arbitrary regexp to match headlines as they
>   are very likely to shoot themselves in the foot (Harven's example of
>   using "-" instead of "*" is a good example of that.)
> 
> - Given this, I am not able to imagine a good way of limiting the number
>   of allowed characters.
> 
> > That'd be useful information for anyone interested in changing it. 
> 
> I'd interested in any solution to the problems above.
> 
> > Then
> > you can still just tell them to write a patch if they care that much
> > ('cause even in org-mode-land patches don't write themselves just yet)
> 
> :)
> 
> > [I just had the most awesome idea for a feature request].
> 
> Please share!
> 
> > If it's "just" about inheriting from a variable in some 300 places it
> > could at least be discussed.
> 
> Yep -- if you have the energy to go through the code and see where it is
> hardcoded while it should not, please do.  
> 
> Thanks,
> 

Hi,

I was just thinking... If you want to change the "look" of the
org-headlines. Does one really need to change the code?

I have been using Nicolas Girard's org-icons package for quite a while. And
that makes org-buffers look pretty nice. You can even customise the icons, to
make it look the way you want.

However, some things about the org-icons package... It seems to be a little
outdated.  Are there many org-moders out there still using it?  Were there
ever any plans to include it in the org-distribution? Right now it needs to be
installed by hand, because the patch to org.el is outdated...  Also, I need to
load it two times in my .emacs before the icons work...

Ciao,
Renzo

The org-icons can be found here:
Download from Nicolas Girard's github
http://github.com/ngirard/org-icons
On the Worg site I could only find screenshots, no other information...
http://orgmode.org/worg/org-screenshots.html
The list-message announcement for org-icons
http://news.gmane.org/find-root.php?message_id=%3c87zl2962um.fsf%40stats.ox.ac.uk%3e
And some list-messages discussing including the org-icons-patch into org-mode
http://news.gmane.org/find-root.php?message_id=%3c87zlbx3kvf.fsf%40kassiopeya.MSHEIMNETZ%3e

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-19  5:16             ` Carsten Dominik
@ 2011-07-25 21:33               ` Bastien
  0 siblings, 0 replies; 44+ messages in thread
From: Bastien @ 2011-07-25 21:33 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: nicholas.dokos, emacs-orgmode, harven

Hi Carsten,

Carsten Dominik <carsten.dominik@gmail.com> writes:

>> This confirms my intuition that the "*" should be hardcoded.
>
> One argument against hardcoding would be that you can use org-cycle
> in other modes, with outline-minor-mode, and I think a number of people
> make use of this.

Yes, I confirm this is (partly) broken.  

I use this in emacs-lisp-mode:

#+begin_src emacs-lisp
(defun org-cycle-global ()
  (interactive)
  (org-cycle t))

(defun org-cycle-local ()
  (interactive)
  (save-excursion
    (move-beginning-of-line nil)
    (org-cycle)))

(global-set-key (kbd "C-M-]") 'org-cycle-global)
(global-set-key (kbd "M-]") 'org-cycle-local)
#+end_src

org-cycle-local still works, but org-cycle-global doesn't anymore.

I'll try to look at this.

> Of cause, if indeed an interesting speed bump can be achieved, we
> can provide a stand-alone org-cycle, maybe even integrate it into
> outline-mode itself.

Yes, this makes sense to have this in outline-mode rather than in
org-mode.  

-- 
 Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: org-icons package
  2011-07-25 10:12         ` org-icons package (was: how to change the headline starter *) Renzo Been
@ 2011-07-27 15:50           ` Bastien
  0 siblings, 0 replies; 44+ messages in thread
From: Bastien @ 2011-07-27 15:50 UTC (permalink / raw)
  To: Renzo Been; +Cc: emacs-orgmode

Hi Renzo,

Renzo Been <swangdoodles@gmail.com> writes:

> However, some things about the org-icons package... It seems to be a little
> outdated.  Are there many org-moders out there still using it?  

I'm not using it.

> Were there
> ever any plans to include it in the org-distribution? 

I don't know, I wasn't aware of this package.

> Right now it needs to be installed by hand, because the patch to
> org.el is outdated...  Also, I need to load it two times in my .emacs
> before the icons work...

The best thing would be to invite Nicolas Girard to discuss this 
on this list.  Can you do this?

Thanks,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-07-17 19:19               ` Bastien
  2011-07-17 19:43                 ` Achim Gratz
@ 2011-08-13 13:46                 ` Matt Lundin
  2011-08-13 14:16                   ` Matt Lundin
  1 sibling, 1 reply; 44+ messages in thread
From: Matt Lundin @ 2011-08-13 13:46 UTC (permalink / raw)
  To: Bastien; +Cc: Marcus Klemm, emacs-orgmode

Hi Bastien,

Bastien <bzg@altern.org> writes:

> Attached is a patch that replaces instances of outline-regexp 
> by org-outline-regexp.  It also introduces more harmonization.
>
> I'd be interesed in hearing about feedback.

What is the primary reason to use a hard-coded org-outline-regexp and
org-outline-regexp-bol instead of the buffer local outline-regexp? Is it
to clear up any confusion about whether the header regexp can be
customized? One of the negative effects is (as reported in another post)
that one can no longer use org-global-cycle in other modes (e.g.,
Auctex).

Perhaps for the relevant functions (e.g., org-overview) we could
construct org-outline-regexp-bol from the a bound version of
org-outline-regexp (i.e., one that uses the buffer local value of
outline-regexp). 

At the moment, this FAQ is obsolete:

http://orgmode.org/worg/org-faq.html#use-visibility-cycling-in-outline-mode

Best,
Matt

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-08-13 13:46                 ` Matt Lundin
@ 2011-08-13 14:16                   ` Matt Lundin
  2011-08-16 16:40                     ` Bastien
  0 siblings, 1 reply; 44+ messages in thread
From: Matt Lundin @ 2011-08-13 14:16 UTC (permalink / raw)
  To: Bastien; +Cc: Marcus Klemm, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]

Matt Lundin <mdl@imapmail.org> writes:

> Bastien <bzg@altern.org> writes:
>
>> Attached is a patch that replaces instances of outline-regexp 
>> by org-outline-regexp.  It also introduces more harmonization.
>>
>> I'd be interesed in hearing about feedback.
>
> What is the primary reason to use a hard-coded org-outline-regexp and
> org-outline-regexp-bol instead of the buffer local outline-regexp? Is it
> to clear up any confusion about whether the header regexp can be
> customized? One of the negative effects is (as reported in another post)
> that one can no longer use org-global-cycle in other modes (e.g.,
> Auctex).

On further investigation, I can see very easily how much this cleans up
the code. Sorry for the noise!

> Perhaps for the relevant functions (e.g., org-overview) we could
> construct org-outline-regexp-bol from the a bound version of
> org-outline-regexp (i.e., one that uses the buffer local value of
> outline-regexp). 

> At the moment, this FAQ is obsolete:

> http://orgmode.org/worg/org-faq.html#use-visibility-cycling-in-outline-mode

I think the best approach here is to hard-code org-outline-regexp and
org-outline-regexp-bol (as you have done) but to make it more flexible
in the *few* instances where one would like to use visibility functions
in outline-mode. I've attached a simple patch that restores global
cycling in outline-mode buffers. 

I hope had a wonderful vacation!

Best,
Matt


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Allow-org-cycle-to-work-in-outline-buffers.patch --]
[-- Type: text/x-patch, Size: 1346 bytes --]

From 2361624ba5b6fb9a49ebfa55f0cfc7245488437e Mon Sep 17 00:00:00 2001
From: Matt Lundin <mdl@imapmail.org>
Date: Sat, 13 Aug 2011 09:10:58 -0500
Subject: [PATCH] Allow org-cycle to work in outline buffers.

* lisp/org.el: (org-overview): Bind value of org-outline-regexp-bol
  locally, so as to use the value of org-outline-regexp, which is in
  turn locally bound to outline-regexp.
---
 lisp/org.el |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index e407e81..ee5397c 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6234,12 +6234,13 @@ of the first headline in the buffer.  This is important, because if the
 first headline is not level one, then (hide-sublevels 1) gives confusing
 results."
   (interactive)
-  (let ((level (save-excursion
-		 (goto-char (point-min))
-		 (if (re-search-forward org-outline-regexp-bol nil t)
-		     (progn
-		       (goto-char (match-beginning 0))
-		       (funcall outline-level))))))
+  (let* ((org-outline-regexp-bol (concat "^" org-outline-regexp))
+	 (level (save-excursion
+		  (goto-char (point-min))
+		  (if (re-search-forward org-outline-regexp-bol nil t)
+		      (progn
+			(goto-char (match-beginning 0))
+			(funcall outline-level))))))
     (and level (hide-sublevels level))))
 
 (defun org-content (&optional arg)
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 44+ messages in thread

* Re: how to change the headline starter *
  2011-08-13 14:16                   ` Matt Lundin
@ 2011-08-16 16:40                     ` Bastien
  0 siblings, 0 replies; 44+ messages in thread
From: Bastien @ 2011-08-16 16:40 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Marcus Klemm, emacs-orgmode

Hi Matt,

Matt Lundin <mdl@imapmail.org> writes:

> On further investigation, I can see very easily how much this cleans up
> the code. Sorry for the noise!

No problem!

>> Perhaps for the relevant functions (e.g., org-overview) we could
>> construct org-outline-regexp-bol from the a bound version of
>> org-outline-regexp (i.e., one that uses the buffer local value of
>> outline-regexp). 
>
>> At the moment, this FAQ is obsolete:
>
>> http://orgmode.org/worg/org-faq.html#use-visibility-cycling-in-outline-mode
>
> I think the best approach here is to hard-code org-outline-regexp and
> org-outline-regexp-bol (as you have done) but to make it more flexible
> in the *few* instances where one would like to use visibility functions
> in outline-mode. I've attached a simple patch that restores global
> cycling in outline-mode buffers. 

IIUC we don't need such patch anymore -- can you confirm this?

Thanks,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2011-08-16 16:40 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1728286333.2576351310650722865.JavaMail.root@zimbra29-e5.priv.proxad.net>
2011-07-14 13:53 ` how to change the headline starter * harven
2011-07-14 15:47   ` Bastien
2011-07-14 17:32     ` harven
2011-07-14 18:01       ` Nick Dokos
2011-07-16  2:05         ` Carsten Dominik
2011-07-16  6:20           ` harven
2011-07-16 10:33             ` Bastien
2011-07-16 10:31           ` Bastien
2011-07-19  5:16             ` Carsten Dominik
2011-07-25 21:33               ` Bastien
2011-07-14 19:10       ` Pieter Praet
2011-07-15 10:21         ` Philipp Haselwarter
2011-07-15 10:40           ` Jambunathan K
2011-07-16 12:59           ` Pieter Praet
2011-07-17  8:08             ` Aankhen
2011-07-17  9:59               ` Christian Moe
2011-07-17 14:53             ` Marcus Klemm
2011-07-17 19:19               ` Bastien
2011-07-17 19:43                 ` Achim Gratz
2011-07-18  8:16                   ` Bastien
2011-08-13 13:46                 ` Matt Lundin
2011-08-13 14:16                   ` Matt Lundin
2011-08-16 16:40                     ` Bastien
2011-07-15 11:30         ` Memnon Anon
2011-07-15 10:49       ` Bastien
2011-07-15 18:19         ` Achim Gratz
2011-07-15 21:04           ` harven
2011-07-15 21:55             ` harven
2011-07-16 11:12             ` Bastien
2011-07-16 11:08           ` Bastien
2011-07-15 11:03       ` Bastien
2011-07-14 19:28     ` Philipp Haselwarter
2011-07-15 10:52       ` Nicolas Goaziou
2011-07-15 11:30         ` Memnon Anon
2011-07-15 11:51           ` Bastien
2011-07-15 11:50         ` Bastien
2011-07-15 12:08           ` Nicolas Goaziou
2011-07-16 11:22             ` Bastien
2011-07-15 10:56       ` Bastien
2011-07-25 10:12         ` org-icons package (was: how to change the headline starter *) Renzo Been
2011-07-27 15:50           ` org-icons package Bastien
2011-06-11 18:58 how to change the headline starter * harven
2011-06-13 20:32 ` Darlan Cavalcante Moreira
2011-07-02  9:48   ` Bastien

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