Editing vs. Publishing #2
gitonthescene
started this conversation in
Ideas
Replies: 1 comment
-
Perhaps the right thing to do is to have an lsp server for org-mode. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Not the best title, but here’s my thinking. Tools based on org-mode files fall into roughly two categories: producers of org-mode syntax or consumers of org-mode syntax. Really tools often provide a mix of these functionalities but I think understanding them as distinct is useful.
Consumers can benefit from a well defined grammar where elements can be precisely understood. Producers (really editors) need to deal with files which do not yet conform to a well defined grammar.
Think of code editors as an analogy. Before you’ve finished your
if
statement the code is not yet well formatted. If you try to save and compile it, it breaks. Compilers are consumers of well formatted code.What’s my point? Having well-defined org-mode syntax defined by a parser in an editor is not a very good idea. Perhaps we should have a well defined grammar for org-mode that doesn’t necessarily accept everything that
org-element.pl
does. We could have separate processes which “validate” the buffer to a more precise spec. We could even have one that runs alongside editing in emacs the way that some code linters do.I think this is a better way forward and hopefully opens the door for more interoperability of tools written for org-mode syntax.
Beta Was this translation helpful? Give feedback.
All reactions