From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cody Goodman Subject: Org mode notes collapse parser brittle Date: Fri, 10 Nov 2017 14:43:07 -0600 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="089e08250508daacbe055da6f77a" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDG8s-0001ka-A6 for emacs-orgmode@gnu.org; Fri, 10 Nov 2017 15:43:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDG8r-0000XW-5L for emacs-orgmode@gnu.org; Fri, 10 Nov 2017 15:43:10 -0500 Received: from mail-ua0-x235.google.com ([2607:f8b0:400c:c08::235]:54909) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eDG8q-0000XO-W4 for emacs-orgmode@gnu.org; Fri, 10 Nov 2017 15:43:09 -0500 Received: by mail-ua0-x235.google.com with SMTP id j14so7654544uag.11 for ; Fri, 10 Nov 2017 12:43:08 -0800 (PST) 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 --089e08250508daacbe055da6f77a Content-Type: text/plain; charset="UTF-8" Does anyone else use notes extensively with src blocks and results drawers? It seems that the regex to parse src blocks and collapse them breaks on drawer :END: markers and possibly other things. Here's an image of the error: https://i.imgur.com/dqDsO5g.png And the example that it happens with: Begin EXAMPLE * IN-PROGRESS Minimal example :LOGBOOK: - Note taken on [2017-11-10 Fri 12:01] \\ As soon as you add a drawer result though, the LOGBOOK no longer collapses correctly and stops at the first drawer's END. Ideally when collapsing LOGBOOK =#+RESULTS\n\s+:RESULTS:[^:END:]+:END:= could not be counted as the end of a logbook or end of a note. #+BEGIN_SRC shell :async :results raw drawer :dir ~/hacking-yi/yi-rope ls -larth default.nix #+END_SRC #+RESULTS: :RESULTS: -rw-r--r-- 1 cody users 520 Nov 10 12:04 default.nix :END: - Note taken on [2017-11-10 Fri 11:49] \\ Notes like this are fine and collapse correctly both at the note level and the logbook level #+BEGIN_SRC shell :async :results raw mkdir ~/hacking-yi #+END_SRC #+RESULTS: CLOCK: [2017-11-10 Fri 11:49] :END: End Example Thanks, Cody --089e08250508daacbe055da6f77a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Does anyone else use notes extensively= with src blocks and results=20 drawers? It seems that the regex to parse src blocks and collapse them=20 breaks on drawer :END: markers and possibly other things.

Here's an image of the error: https://i.imgur.com/dqDsO5g.png

And= the example that it happens with:


Begin= EXAMPLE
* IN-PROGRESS Minimal example
  :LOGBOOK:
  - Note taken on [2017-11-10 Fri 12:01] \\

    As soon as you add a drawer result though, the LOGBOOK no longer collap=
ses correctly and stops at the first drawer's END. Ideally when collaps=
ing LOGBOOK =3D#+RESULTS\n\s+:RESULTS:[^:END:]+:END:=3D could not be counte=
d as the end of a logbook or end of a note.

    #+BEGIN_SRC shell :async :results raw drawer :dir ~/hacking-yi/yi-rope
     ls -larth default.nix
    #+END_SRC

    #+RESULTS:
    :RESULTS:
    -rw-r--r-- 1 cody users 520 Nov 10 12:04 default.nix
    :END:


  - Note taken on [2017-11-10 Fri 11:49] \\

    Notes like this are fine and collapse correctly both at the note level =
and the logbook level

     #+BEGIN_SRC shell :async :results raw=20
     mkdir ~/hacking-yi
     #+END_SRC

     #+RESULTS:

  CLOCK: [2017-11-10 Fri 11:49]
  :END:
End Example


Thanks,

Cody
--089e08250508daacbe055da6f77a--