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-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Org mode notes collapse parser brittle Date: Fri, 10 Nov 2017 21:03:09 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f4030437b9ec290ca5055da740ee" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDGSR-0007El-9A for emacs-orgmode@gnu.org; Fri, 10 Nov 2017 16:03:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDGSQ-00038A-2Y for emacs-orgmode@gnu.org; Fri, 10 Nov 2017 16:03:23 -0500 Received: from mail-yw0-x229.google.com ([2607:f8b0:4002:c05::229]:53674) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eDGSP-00037y-Te for emacs-orgmode@gnu.org; Fri, 10 Nov 2017 16:03:21 -0500 Received: by mail-yw0-x229.google.com with SMTP id q126so9167999ywq.10 for ; Fri, 10 Nov 2017 13:03:21 -0800 (PST) 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: Cody Goodman Cc: emacs-orgmode@gnu.org --f4030437b9ec290ca5055da740ee Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Nov 10, 2017 at 3:44 PM Cody Goodman wrote: > 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 > I don't use LOGBOOK, but I was able to confirm this problem based on your example. But then I looked in the manual, and in (org) Drawers node, it's mentioned: > Sometimes you want to keep information associated with an entry, but you > normally don=E2=80=99t want to see it. For this, Org mode has _drawers_.= They > can contain anything but a headline and another drawer. *They can contain anything but a headline and another drawer.* So I guess you have hit a limitation. --=20 Kaushal Modi --f4030437b9ec290ca5055da740ee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Nov 10= , 2017 at 3:44 PM Cody Goodman <codygman.consulting@gmail.com> wrote:
Does anyone else us= e 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

I don't use LOGBOOK= , but I was able to confirm this problem based on your example.
<= br>
But then I looked in the manual, and in=C2=A0(org) Drawers no= de, it's mentioned:

> Sometimes you wa= nt to keep information associated with an entry, but you
> nor= mally don=E2=80=99t want to see it.=C2=A0 For this, Org mode has _drawers_.= =C2=A0 They
> can contain anything but a headline and another = drawer.

*They can contain anything but a hea= dline and another drawer.*

So I guess you have hit= a limitation.

--

Kaushal Modi

--f4030437b9ec290ca5055da740ee--