Bastien <b...@gnu.org> writes: Hi Bastien,
> Thorsten Jolitz <tjol...@gmail.com> writes: > >> The real value and innovation of a true >> org-minor-mode would be to introduce Org's intelligent headlines and all >> the related functionality into the world of outcommented text in >> programming modes. > > Yes. We could have `orgstruct-comment-prefix-regexp' along with > `orgstruct-heading-prefix-regexp'. I'll check this, thanks for > the idea! As long as there are hardcoded regexp searches all over the place in org.el, org-agenda.el, orgtbl.el, and to a minor extends almost all other Org libraries, I don't think just another outline-regexp can do the trick - the called functions will fail when trying to match ,-------- | "^foo$" `-------- but looking at ,--------------------------------------------------------------- | "^<<comment-starter-syntax>>foo<<maybe-comment-end-syntax>>$" `--------------------------------------------------------------- Furthermore calling Org functions modifies the buffer, sometimes inserting new lines, sometimes not. An Org minor-mode would need to detect all newly inserted lines after a command call and outcomment them with the programming major-mode's comment syntax. I already found a way to do that using external calls to diff, its implemented in omm.el (needs to be debugged though, I stopped working on it because it seemed the idea of an Org Minor Mode was a bit unpopular). In summary, its about: 1. generalize the regexp constants and vars (allow for comment-syntax, when org-minor-mode) 2. deal with hardcoded regexp-snippets in functions (my proposoal: replace "^" with org-BOL, "$" with org-EOL, "\\*" with org-STAR) 3. outcomment new lines after calls to Org commands. All the other stuff should be already there in orgstruct and outshine. -- cheers, Thorsten