emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Cody Goodman <codygman.consulting@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Org mode notes collapse parser brittle
Date: Fri, 10 Nov 2017 14:43:07 -0600	[thread overview]
Message-ID: <CADq_+R3Pz_rWowZ941QoQ3_HxO6F4r1DVgW896BsiovcuiU3RQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1462 bytes --]

             reply	other threads:[~2017-11-10 20:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-10 20:43 Cody Goodman [this message]
2017-11-10 21:03 ` Org mode notes collapse parser brittle Kaushal Modi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADq_+R3Pz_rWowZ941QoQ3_HxO6F4r1DVgW896BsiovcuiU3RQ@mail.gmail.com \
    --to=codygman.consulting@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).