From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Bug: org-mode interprets * as a headline in text between #+BEGIN_.. and #+END_... Date: Thu, 6 Oct 2016 16:13:08 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsFyZ-0000WG-R9 for emacs-orgmode@gnu.org; Thu, 06 Oct 2016 17:13:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsFyX-0002ej-Gp for emacs-orgmode@gnu.org; Thu, 06 Oct 2016 17:13:10 -0400 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:36184) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsFyX-0002eZ-9J for emacs-orgmode@gnu.org; Thu, 06 Oct 2016 17:13:09 -0400 Received: by mail-wm0-x22a.google.com with SMTP id k125so350477808wma.1 for ; Thu, 06 Oct 2016 14:13:09 -0700 (PDT) In-Reply-To: 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: David Talmage Cc: emacs-orgmode On Thu, Oct 6, 2016 at 3:28 PM, David Talmage wrote: > 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. > > I don't have a good explanation of why, but I know you need a comma to escape org syntax, even within src blocks: - mention of it in the manual (footnote 4): http://orgmode.org/manual/Literal-examples.html - SO answer: http://stackoverflow.com/questions/7431167/escaping-org-mode-example-block-inside-of-an-example-block > 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 >