emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David Masterson <dsmasterson92630@outlook.com>
To: Tom Gillespie <tgbugs@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Empty headline titles unsupported: Bug?
Date: Fri, 28 May 2021 23:21:14 -0700	[thread overview]
Message-ID: <SJ0PR03MB5455DAE538DD197BD7627E629B219@SJ0PR03MB5455.namprd03.prod.outlook.com> (raw)
In-Reply-To: <CA+G3_POki3h-9k5v=mPk7xFfze6fO3EN57Ju6_5+bj9fF7wytA@mail.gmail.com> (Tom Gillespie's message of "Thu, 27 May 2021 22:36:47 -0700")

Tom Gillespie <tgbugs@gmail.com> writes:

> Hi all,
>      Here is the 4th (or so) iteration of the grammar for titles that
> I think deals with most of the issues in this thread along with a
> bunch of nasty test cases. The previous attempts can be inspected in
> the git history, but long story short, it is extremely hard to find a
> grammar that follows the principle of least surprise and you have to
> use the tokenizer to ensure that the tags pattern always parses as
> such so that tags don't magically switch to being the title when you
> remove the rest of the contents of the title. The final example
> L1648-L1665 shows many of the things that should parse as tags and do
> with this tokenizer/grammar combination. The key to dealing with the
> ambiguity of empty title and tags vs something that looks like tags
> but parses as a title (which is surprising) is to use the tokenizer to
> greedily recognize tags at the end of the line. This ensures that the
> tags pattern at the end of the line always parses as tags and doesn't
> switch just because the title is empty. Happy to elaborate. Best,
> Tom
>
> https://github.com/tgbugs/laundry/blob/next/laundry/heading.rkt
> https://github.com/tgbugs/laundry/blob/971cf35683cd60156868c12b070c2dd9e19d8d06/laundry/tokenizer.rkt#L98-L140
>
> https://github.com/tgbugs/laundry/blob/971cf35683cd60156868c12b070c2dd9e19d8d06/laundry/test.rkt#L326-L367
> https://github.com/tgbugs/laundry/blob/971cf35683cd60156868c12b070c2dd9e19d8d06/laundry/test.rkt#L400-L558
> https://github.com/tgbugs/laundry/blob/971cf35683cd60156868c12b070c2dd9e19d8d06/laundry/test.rkt#L1298-L1369
> https://github.com/tgbugs/laundry/blob/971cf35683cd60156868c12b070c2dd9e19d8d06/laundry/test.rkt#L1371-L1419
> https://github.com/tgbugs/laundry/blob/971cf35683cd60156868c12b070c2dd9e19d8d06/laundry/test.rkt#L1648-L1665

This looks interesting, but I'm not yet familiar with racket & brag -= I
assume laundry doesn't produce any output from the input Org file other
than some form of "good" or "bad" signal.  True?

-- 
David Masterson


  reply	other threads:[~2021-05-29  6:37 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-22 11:15 Sebastian Miele
2021-05-22 12:21 ` Nicolas Goaziou
2021-05-23  4:45   ` Ihor Radchenko
2021-05-23 14:06     ` Nicolas Goaziou
2021-05-23 14:33       ` Ihor Radchenko
2021-05-23 14:55         ` Nicolas Goaziou
2021-05-23 15:22           ` Ihor Radchenko
2021-05-24 11:01             ` Sebastian Miele
2021-05-24 10:37       ` Sebastian Miele
2021-09-26  9:04     ` Bastien
2021-09-26 23:47       ` Tom Gillespie
2021-09-27 19:59       ` Nicolas Goaziou
2021-09-29 11:26     ` Bastien
2021-05-24 10:46 ` Sebastian Miele
2021-05-24 22:17   ` David Masterson
2021-05-25 10:43     ` Sebastian Miele
2021-05-25 11:43       ` Sebastian Miele
2021-05-25 16:10         ` Nicolas Goaziou
2021-05-25 21:04           ` David Masterson
2021-05-25 23:06             ` Tim Cross
2021-05-26 23:37               ` David Masterson
2021-05-26 14:07           ` Ihor Radchenko
2021-05-26 23:42             ` David Masterson
2021-05-27  3:29               ` Ihor Radchenko
2021-05-27 22:35                 ` David Masterson
2021-05-28  5:36                   ` Tom Gillespie
2021-05-29  6:21                     ` David Masterson [this message]
2021-05-29  6:54                       ` Tom Gillespie
2021-05-29  8:04                         ` Ihor Radchenko
2021-05-29 19:33                           ` Tom Gillespie
2021-05-30  4:06                             ` Ihor Radchenko
2021-05-29 14:09                   ` Ihor Radchenko
2021-05-30  2:19                     ` David Masterson

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=SJ0PR03MB5455DAE538DD197BD7627E629B219@SJ0PR03MB5455.namprd03.prod.outlook.com \
    --to=dsmasterson92630@outlook.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tgbugs@gmail.com \
    --subject='Re: Empty headline titles unsupported: Bug?' \
    /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

Code repositories for project(s) associated with this 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).