From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Talmage Subject: Bug: org-mode interprets * as a headline in text between #+BEGIN_.. and #+END_... Date: Thu, 6 Oct 2016 16:28:42 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c05cea4c418bf053e382302 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsFHc-00039M-Gu for emacs-orgmode@gnu.org; Thu, 06 Oct 2016 16:28:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsFHZ-000559-Vs for emacs-orgmode@gnu.org; Thu, 06 Oct 2016 16:28:47 -0400 Received: from mail-it0-x22f.google.com ([2607:f8b0:4001:c0b::22f]:37474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsFHZ-00053K-KR for emacs-orgmode@gnu.org; Thu, 06 Oct 2016 16:28:45 -0400 Received: by mail-it0-x22f.google.com with SMTP id j69so41238522itb.0 for ; Thu, 06 Oct 2016 13:28:43 -0700 (PDT) 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: emacs-orgmode@gnu.org --94eb2c05cea4c418bf053e382302 Content-Type: text/plain; charset=UTF-8 I often paste verbatim text into the lab notebook I keep with org-mode. Org-mode always interprets any line that begins with an asterisk as a headline, even when the line is surrounded by #+BEGIN_... and #+END_... patterns. This breaks org-special-edit, making it complain, "No special environment to edit here", unless I manually insert another character at the beginning of every line in the block that begins with an asterisk. The behavior surprised me. I found two ways to work around it. First, I can edit the would-be verbatim text as described above. It will always look like the original text in org-special-edit. That's marginally acceptable because it alters my original text and makes me take one more step before I can copy and paste it elsewhere. Second, I can put such text in a drawer. I discovered that org-mode does not mis-interpret my text in a drawer. Here is an example. It's markdown text. I use #+{BEGIN,END}_EXAMPLE but this behavior occurs in all of the #+BEGIN_.. and #+END_... patterns. #+BEGIN_EXAMPLE This is the README.md for rfc-tools, a collection of programs for processing IETF RFCs. * fetch-rfcs-by-title.sh downloads into the current directory the RFCs whose titles contain the string given on the command line. Uses an rfc-index file in the current directory. Prefers the PDF version of RFCs but will obtain the text version if the PDF is not available. * fetch-sip-rfcs.sh downloads RFCs that contain "Session Initiation" in their titles into the current directory. * search-rfc-index.sh searches an rfc-index file in the current directory for the string given on the command line. The string can contain spaces. * join-titles.awk turns the contents of an rfc-index file into a series of long lines. Each line begins with the RFC number, then a space, then the rest of the entry from the rfc-index. #+END_EXAMPLE --94eb2c05cea4c418bf053e382302 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I often paste verbatim text into the lab notebook I keep w= ith org-mode.=C2=A0 Org-mode always interprets any line that begins with an= asterisk as a headline, even when the line is surrounded by #+BEGIN_... an= d #+END_... patterns. This breaks org-special-edit, making it complain, &qu= ot;No special environment to edit here", unless I manually insert anot= her character at the beginning of every line in the block that begins with = an asterisk.

The behavior surprised me.=C2=A0 I found tw= o ways to work around it.=C2=A0 First, I can edit the would-be verbatim tex= t as described above. It will always look like the original text in org-spe= cial-edit. That's marginally acceptable because it alters my original t= ext and makes me take one more step before I can copy and paste it elsewher= e.=C2=A0 Second, I can put such text in a drawer.=C2=A0 I discovered that o= rg-mode does not mis-interpret my text in a drawer.


Here is an example.=C2=A0 It's markdown text.=C2=A0 I = use #+{BEGIN,END}_EXAMPLE but this behavior occurs in all of the #+BEGIN_..= and #+END_... patterns.

#+BEGIN_EXAMPLE
This is the README.md for rfc-tools, a collection of programs for
processing IETF RFCs.

* fetch-rfcs-by-title= .sh downloads into the current directory the RFCs
=C2=A0 =C2=A0wh= ose titles contain the string given on the command line.=C2=A0 Uses an
=C2=A0 rfc-index file in the current directory.=C2=A0 Prefers the PDF= version of
=C2=A0 RFCs but will obtain the text version if the P= DF is not available.

* fetch-sip-rfcs.sh downloads= RFCs that contain "Session Initiation"
=C2=A0 in their= titles into the current directory.

* search-rfc-i= ndex.sh searches an rfc-index file in the current
=C2=A0 director= y for the string given on the command line.=C2=A0 The string can
= =C2=A0 contain spaces.
=C2=A0 =C2=A0=C2=A0
* join-title= s.awk turns the contents of an rfc-index file into a
=C2=A0 serie= s of long lines.=C2=A0 Each line begins with the RFC number, then a
=C2=A0 space, then the rest of the entry from the rfc-index.
#= +END_EXAMPLE

--94eb2c05cea4c418bf053e382302--