all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tom Gillespie <tgbugs@gmail.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: Dominik Schrempf <dominik.schrempf@gmail.com>,
	Emacs Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: Org lint and named source blocks
Date: Tue, 21 Sep 2021 13:32:51 -0700	[thread overview]
Message-ID: <CA+G3_PPXgXRdCjH_kb7Na8K-A-MTrfSg2fAOxRDqi6PCSVQbpQ@mail.gmail.com> (raw)
In-Reply-To: <87o88mqd6o.fsf@localhost>

> Should we allow syntax like #+KEYWORD:value to be correct or do we
> require a whitespace/space after colon all the time?

The spec as written is ambiguous/silent on this issue. In my work on
laundry tokenizer and grammar I have found keyword syntax to be a
thorny issue, and I strongly suggest that for the time being we either
make no ruling on this or we state that the colon that ends the
keyword should be followed by a space as a precautionary measure.
The safe thing to do is to always require whitespace after the colon
because it guarantees correct interpretation.

Requiring whitespace after the colon simplifies the grammar, however
it means that you can't compact keyword lines, and it induces an
annoying failure mode where missing spaces are no longer keywords.

However, it is technically possible to make keywords work without the
whitespace, so long as there is at least one whitespace prior to the
next colon (but not contained in square brackets, e.g. #+key:lol[ a b
c ]:value is a well formed keyword under a slighly generalized
grammar). The problem is that we would like to make keyword syntax
fully closed, and I need a bit more time to get that worked out before
any definitive conclusions are drawn.

The complexity of the generalized keyword syntax can be seen here
https://github.com/tgbugs/laundry/blob/5a396bef98d9a3cd9ee929f21cd47612dd6cb1ac/laundry/lex-abbrev.rkt#L107-L249

Best,
Tom


  reply	other threads:[~2021-09-21 20:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21  7:39 Org lint and named source blocks Dominik Schrempf
2021-09-21 13:18 ` Ihor Radchenko
2021-09-21 20:32   ` Tom Gillespie [this message]
2021-10-04  6:19     ` Ihor Radchenko
2021-10-04  8:02       ` Tom Gillespie
2021-10-04  8:21         ` Timothy
2021-10-04  9:14           ` Tom Gillespie
2021-10-04  6:16   ` Ihor Radchenko

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

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

  git send-email \
    --in-reply-to=CA+G3_PPXgXRdCjH_kb7Na8K-A-MTrfSg2fAOxRDqi6PCSVQbpQ@mail.gmail.com \
    --to=tgbugs@gmail.com \
    --cc=dominik.schrempf@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.