emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mauro Mandracchia <mauromandracchia@gmail.com>
To: Lejon <lejon@relevant-information.com>
Cc: tgbugs@gmail.com, Eric S Fraga <e.fraga@ucl.ac.uk>,
	emacs-orgmode@gnu.org, TEC <tecosaur@gmail.com>
Subject: Re: Org-Mode as DSL
Date: Sat, 31 Oct 2020 22:48:03 +0100	[thread overview]
Message-ID: <CAJJiUvvw5mRUqAqmeh-EXXagbA1knbgrzi4HYS9Q1T7PTjnKuw@mail.gmail.com> (raw)
In-Reply-To: <87zh42fpir.fsf@leo-B85-HD3.i-did-not-set--mail-host-address--so-tickle-me>

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

Thanks for the warm welcome and the amount of inputs and details that
everybody so fast provides.
I'm really impressed by this community.

Ok seems that delivering a language specification in EBNF has some
challenges that can hardly be addressed due to the nature of org-mode
design, but I read around that often EBNF is not the silver bullet to solve
a grammar representation although it is a de-facto standard.

So I will try to put some orders in my thoughts, when I look at
functionalities of org-mode I will split them in the following categories:

   - Grammar Specification
   - Metadata
      - TODO
      - Code Block

      - Tangling (or waving for the web people)
   - Properties of the file
      - Templating

      - Block Execution
   - Environment (Global variables such as PATH)
      - Language
      - Context for arguments

      - Publishing Functions
      - Target Format
      - Custom Parser

I share a lot with of your ideas and inputs, here some observations and
options that I noticed:

   - Indeed emacs is not that big and could run as a background process to
   deliver org-mode features to other systems.
   I do something very similar to *TEC* for my CI/CD and my static
   generated website, but I'm not sure I would run emacs as a web service.

   - LSP doesn't mention org-mode as available language, but it does for
   markdown
   https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentItem
   maybe because org-mode is not a language?

   - I share the sentiment that some api are a bit obscure and most
   important there isn't for instance an official way to say "this is how you
   create extensions in org".

   - I found that multiple people are already converting org-mode into json
   by using org*-map-entries *which indeed is not very publicly shown (I
   miss something like "this is how you create extensions in org").

   - I relate a lot to the issues that *Tom Gillespie* discusses in his
   post (
   https://lists.gnu.org/archive/html/emacs-orgmode/2020-10/msg00244.html)
   about tangling and executions and I loved to see your efforts in trying to
   solving them.

   - Since gccemacs elisp could compile to C (not sure this is relevant,
   but can be investigated if there are opportunities to be capable to have
   org-mode embendable).


For my personal needs I think I would pragmatically start toying around
with a org-mode to json like here https://github.com/ludios/org-to-json
And once I gain some confidence on the output JSON, I think I will gain
more confidence about the grammar definition.

I think that converting org-mode to JSON could show org-mode as an Abstract
Syntax Tree, I think from there it should be easier to create a
specification and maybe is what already *orgajs
<https://github.com/orgapp/orgajs>* already did.
I believe creating functions like tangle and execution shouldn't be that
trivial from an AST.

Concluding,
there is overlap between the Interfaces of LSP and org-mode which makes a
lot of sense since both target the interaction for with a document eg:

   - Propose actions, these can be:
      - Execute
      - Tangle
      - Change state TODO
      - Insert date, tag, etc...
   - Go to definition (For linking sections)
   - Support multi language in the same document

This makes me think that creating an org-mode LSP is not that crazy idea
after all, what do you think?
If you would build an LSP for org-mode which setup would you choose? What
do you think would be hard to implement?

Again many thanks 🙏
Mauro.

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

      reply	other threads:[~2020-10-31 21:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 21:12 Org-Mode as DSL Mauro Mandracchia
2020-10-29 23:14 ` Tom Gillespie
2020-10-30 11:35 ` Eric S Fraga
2020-10-30 12:01   ` TEC
2020-10-31 14:17     ` Lejon
2020-10-31 21:48       ` Mauro Mandracchia [this message]

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=CAJJiUvvw5mRUqAqmeh-EXXagbA1knbgrzi4HYS9Q1T7PTjnKuw@mail.gmail.com \
    --to=mauromandracchia@gmail.com \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=lejon@relevant-information.com \
    --cc=tecosaur@gmail.com \
    --cc=tgbugs@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 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).