Collaborative Org-Mode Enhanced Emacs Generalized Authorship
COMEEGA is a Blee concept and an Emacs package for enhancing readability and usability of various authorship-major-modes with augmentation by org-mode content. COMEEGA is applicable to autorship in general and programing languages (elisp, python, bash) and publishing (LaTeX, html) in particular. When applicable, doc-strings can be writen in org-mode. File related TODOs and scheduling can be specified in org-mode and execution of functions can be facilitated from within the file. In effect all org-mode capabilities are combined with the native authorship-major-mode capabilities.
Blee Poly-COMEEGA Panel for use in Blee.
- About COMEEGA
- Poly-COMEEGA Vs Native-COMEEGA — COMEEGA Without polymode
- COMEEGA and org-mode Dynamic Blocks (D-Blocks)
- COMEEGA and Comment Blocks
- Currently Supported COMEEGA Major-Modes
- Addition Of New COMEEGA Authorship-Major-Modes
- Switching Between poly-major-mode, major-mode and org-mode
- Concepts Of Literate Programming And org-babel Vs Surrounded Programming And COMEEGA
- Status, Usage And Known problems
- Potentials Of Polymode and COMEEGA
- Beyond Org-Mode: A Case For Emacs Native Markup Language (ENML)
- Blee-COMEEGA, BISOS And ByStar’s Uses Of COMEEGA
Surrounded programming can be taught of as the inverse of literate programming.
COMEEGA can be taught of as the inverse of org-mode based org-babel.
In babel (org-mode based literate programming), we include various programming fragments inside of an org-file. In bable, org recognizes authorship-major-modes and supports them.
In COMEEGA, we include various org-mode fragments inside of a programming language’s major mode as comments or as doc-strings in org format. The combination is then supported through polymode.
Advent of polymode, allows for this to become seemless and in due course we expect the source format of traditional programs to transition to COMEEGA. This, of course is primarily applicable to emacs-lisp-mode.
COMEEGA can be consistently applied to a series of authorship-major-modes. An authorship-major-mode is a major-mode intended for authoring — in contrast to for example, dired-mode, which can be thought of as an application-major-mode.
The “collaborative” dimension of COMEEGA is inherited from git and org-mode. Comeega-files are in git repos. File level collaboration maintains the natural communication context. Org-mode TODOs and scheduling, deligation, tracking and rich commenting allow for targeted collaboration. org-archiving combined with git fundamentals provide convenient collaboration and responsibility oriented audit-trails.
While availability of polymode, makes COMEEGA a great deal more pleasant, it is possible and still practical to use COMEEGA-files without polymode.
In this case, necessary mechanism to switch between the major-mode of the native language and org-mode is supported. This capability is part of this package as well.
Through out this document, when we speak of COMEEGA capabilities we are speaking of Poly-COMEEGA capabilities. When we explicitly mention Native-COMEEGA, we are referring to use of COMEEGA-files without polymode.
COMEEGA is the primary authorship model of Blee and BISOS. When we speak of Blee-COMEEGA, we are describing additional capabilities of Blee combined with Poly-COMEEGA or Native-COMEEGA.
A very powerfull feature of org-mode is Dynamic Blocks (D-Blocks) – https://orgmode.org/manual/Dynamic-Blocks.html. The D-Block machinary can be extended to work with other than org-mode. D-Blocks can be used to insert parameter controlled text in files.
Extension of org-mode Dynamic Blocks to other emacs major-modes involves definition of begin and end reg-exps in the line comment mode of major-modes.
The emacs package that controls definition of reg-exps for various major-modes is poly-dblocks – https://github.com/bx-blee/blee-dblocks.
For each native-major-mode of COMEEGA authorship-major-modes, org-mode text is included inside of that native-major-mode’s comment-blocks. Some programming languages only support line-comments and do not support comment blocks as part of the language. In most cases, it is possible to support comment-blocks through various enhancements. In order to do so, in elisp we use the comment-block — https://github.com/bx-blee/comment-block. In Bash, we have CommentBegin. In LaTeX, we build on the comment package. In Python we use tripple quotes.
Org-mode is included as comments or as doc-strings in authorship major-modes.
Each authorship-major-mode specifies a number of regexp tags:
- authorship-major-mode’s org-mode comment block syntax. These are typically built on top of authorship-major-mode’s block comment sysntax.
- authorship-major-mode’s org-mode doc-string syntax.
- authorship-major-mode’s org-dynamic-block comment prefix syntax.
COMEEGA builds on top of PolyMode. (1) and (2) above are specified as authorship-major-mode’s inner-block regexps.
(3) is specified as part of the machinary that makes org-dynamic-blocks available to authorship-major-modes.
(3) can be considered an optional layer. Blee-COMEEGA makes heavy use of this capability.
authorship-major-modes-org-dynamic-blocks are often used to create org-fragments. authorship-major-modes-org-dynamic-blocks can also be used as visible macro facilities for languages that don’t have macro capabilities.
Currently supported COMEEGA major-modes are:
At this time we provide support for the following programming languages and authorship activities.
authorship-major-mode | Comment Block syntax | Doc-String Syntax | Dynamic Block Syntax |
---|---|---|---|
emacs-lisp-mode (beg) | (orgCmntBegin | ” #+org_begin | |
emacs-lisp-mode (end) | orgCmntEnd) | #+org_end “” | |
python-mode (begin) | ””“#+org_begin | ””“#+org_begin | |
python-mode (end) | ””“#+org_begin | ””“#+org_begin | |
sh-mode (begin) | |||
sh-mode (end) | |||
latex-mode (begin) | |||
latex-mode (end) | |||
html-mode (begin) | |||
html-mode (end) |
Emacs Lisp does not have block/multiline comments. The comment-block package is used to provide string based elisp comments.
This authorship-major-mode’s org-mode comment block syntax is:
- open: (orgCmntBegin
- close: orgCmntEnd)
This authorship-major-mode’s org-mode doc-string syntax is:
- open: #+org_begin
- close: #+org_end
These are specified in comeega-poly-elisp.el.
This authorship-major-mode’s org-dynamic-block comment prefix syntax is:
- open: #+org_dblockNOTYET
- close: #+org_dblockNOTYET
Python’s “”” Some Comment.”“” feature is used.
This authorship-major-mode’s org-mode comment block syntax is:
- open: (orgCmntBegin
- close: orgCmntEnd)
This authorship-major-mode’s org-mode doc-string syntax is:
- open: #+org_begin
- close: #+org_end
These are specified in comeega-poly-elisp.el.
This authorship-major-mode’s org-dynamic-block comment prefix syntax is:
- open: #+org_dblockNOTYET
- close: #+org_dblockNOTYET
Bash’s here-document feature is used to provide block-comments.
This authorship-major-mode’s org-mode comment block syntax is:
- open: (orgCmntBegin
- close: orgCmntEnd)
This authorship-major-mode’s org-mode doc-string syntax is:
- open: #+org_begin
- close: #+org_end
These are specified in comeega-poly-elisp.el.
This authorship-major-mode’s org-dynamic-block comment prefix syntax is:
- open: #+org_dblockNOTYET
- close: #+org_dblockNOTYET
LaTeX’s comment packages is used to provide block-comments.
This authorship-major-mode’s org-mode comment block syntax is:
- open: (orgCmntBegin
- close: orgCmntEnd)
This authorship-major-mode’s org-mode doc-string syntax is:
- open: #+org_begin
- close: #+org_end
These are specified in comeega-poly-elisp.el.
This authorship-major-mode’s org-dynamic-block comment prefix syntax is:
- open: #+org_dblockNOTYET
- close: #+org_dblockNOTYET
TO BE DOCUMENTED
Addition Of new COMEEGA authorship-major-modes involves the following:
- For the new authorship-major-mode, decide on the comment-block and docstring syntax.
- Create a commega-poly-<mode>.elisp
For any authorship-major-mode file, you switch among the following:
- native-mode — comeega:native/switch Command
- poly-native-mode — comeega:poly-native/switch Command
- org-mode — comeega:org/switch Command
Blee keybinding for these are provided and you can customize as you wish.
The same way that org-babel can be considered an environment for Literate Programming, COMEEGA can be considered an environment for Surrounded Programming.
We expand on the concept of Surrounded Programming in contrast to Literate Programming.
Literate programming is a programming paradigm introduced by Donald Knuth in which a computer program is given an explanation of its logic in a natural language, such as English, interspersed with snippets of macros and traditional source code, from which compilable source code can be generated.
Sourrounded Programming is a programming paradigm in which a traditional computer program is surrounded by human-oriented text and tools. A Sourrounded Program has two parallel models and views:
- the traditional source code model and view
- an human languge oriented model and view
The Sourrounded Programming model is not specific to any particular programming language. The model provides for creation of a generalized authorship paradigm.
Sourrounded Programming can be thought of as the inverse of Literate Programming
Org-Babel is an environment for Literate Programming.
Babel is Org’s ability to execute source code within Org documents.
COMEEGA is an environment for Surrounded Programming.
COMEEGA is Org’s ability to augment and execute within source-code documents.
COMEEGA sourrounds the traditional source code and augments it by:
- human-oriented text which further structures and describes the semantics of the program
- Provides for rich mark ups of docstrings
- Provides for embedding rich set of tools within the source code itself and augment its development, executions and testing/verification
In the traditional programming framework,
We have been using COMEEGA without poly-mode for several years.
Polymode now makes COMEEGA a gread deal more plesant. But polymode is relatively new and as such there are glitches.
As polymode matures, COMEEGA can be standardized to become the default autorship model, obsoleting current traditional models. Why not? Right?!
The concept of COMEEGA originated in Blee (ByStar Libre-Halaal Emacs Environment).
COMEEGA is the standard authorship model of ByStar — http://www.by-star.net All of BISOS (ByStar Internet Services OS) is consistently developed with COMEEGA.
BISOS and ByStar’s uses of COMEEGA is called Blee-COMEEGA. Blee-COMEEGA is a set of conventions and features and capabilities that are used for authorship with Blee in the BISOS environment.
Inclusion of Blee-COMEEGA capabilities in COMEEGA documents is often through use of org dynamic-blocks (dblocks). The poly-dblock emacs package provides for inclusion of dblocks in various authorship-major modes.
With poly-dblock in place, we then provide a repository of dynamic blocks for use in Blee-COMEEGA files. These are included in the blee-dblocks emacs package.