From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: org-mode interprets * as a headline in text between #+BEGIN_.. and #+END_... Date: Fri, 07 Oct 2016 08:09:08 +0200 Message-ID: <87y420lmgr.fsf@nicolasgoaziou.fr> References: <874m4prv4x.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsOLJ-0007Bq-W1 for emacs-orgmode@gnu.org; Fri, 07 Oct 2016 02:09:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsOLF-00016H-KK for emacs-orgmode@gnu.org; Fri, 07 Oct 2016 02:09:12 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:42878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsOLF-00014H-Di for emacs-orgmode@gnu.org; Fri, 07 Oct 2016 02:09:09 -0400 In-Reply-To: <874m4prv4x.fsf@gmail.com> (Nick Dokos's message of "Thu, 06 Oct 2016 18:05:18 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nick Dokos Cc: emacs-orgmode@gnu.org Hello, Nick Dokos writes: > Is the "* on column 0 is a headline" convention a consequence of the > dependence on outline.el? Or is it just historical baggage? I cannot > remember the grammar rules, but I'm wondering if the parser could be > made to say "not a headline" in this situation, and if so, what the > consequences might be (particularly, the bad consequences). > > I'm not sure whether Nicolas has actually explained this situation in > the past, but, with gmane non compos mentis, I did not attempt to find > an earlier discussion. This is inherent on how the syntax is defined, and how the parser is implemented. As an outliner, the main syntactic element in an Org document is the headline. Everything else has a lower priority. Therefore, a block will not be parsed before a headline. The good side of headlines being top level elements is that parsing (without cache) only needs to start from the closest headline above. If blocks could be parsed before headlines, parsing should start from the beginning of the document every time. Regards, -- Nicolas Goaziou