emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [RFC] Org Minor Mode?
Date: Thu, 29 May 2014 00:19:01 +0200	[thread overview]
Message-ID: <878uplim22.fsf@gmail.com> (raw)
In-Reply-To: 8738ft379k.fsf@bzg.ath.cx

Bastien <bzg@gnu.org> writes:

Hi Bastien,

> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>>> I for one need to have a clearer picture of what such a minor mode
>>> would really do, without getting prematurily lost in the details of
>>> possible implementations.
>>
>> Its just a better and smarter outshine-mode (major-mode agnostic "Org
>> look&feel" for programming modes).
>
> But what would it *do*?  Can you give a simple example of a specific
> feature?  The one about editing source code in buffers other than Org
> buffers, maybe?

What outshine does already is the navigation, structure editing,
visibility cycling and fontification stuff in a major-mode agnostic
way. I would like to have the "Org action commands" too, i.e. all those
functions that make Org headers 'smart':

- todos
- priorities
- tags
- timestamps
- clocking
- properties
- ...

There is no real reason why the Org functions could not work on outside
of Org-mode since they a fundamentally based on regexp, only that those
regexps constants are hardcoded (^,$, and \\*) and the functions contain
many hardcoded regesp snippets too - thus they cannot deal with
outcommnented headers in programming buffers.

>> outshine, outorg and navi-mode are all in the mid-range of popular melpa
>> packages, so there seems to be some real demand ...
>
> No doubt!
>
>> I started with code (https://github.com/tj64/omm),
>
> (FWIW I don't think omm.el is a really good name, it's hard to guess
> what it is supposed to do.  You could use org-minor-mode.el and keep
> omm- as a prefix?)

that would be no problem

>> but faced the fundamental problem of hardcoded regexps (^, $, and
>> \\*) all over the Org sources that make Org functions fail on
>> outcommented headers and in outcommented text sections in general.
>>
>> The goals, ideas and even implementations (outshine, orgstruct) are
>> already there, a first intent to merge them into one library exists
>> (omm.el), but what to do about this core problem?
>
> Circumvent it?  Instead of try to adapt tons of Org features so that
> they run into other modes, we could try to emulate them in temporary
> buffers, where the peculiarities of the origin mode do not prevent
> Org functions from running -- see for example how `org-open-at-point'
> deals with links in comments.  This could be generalized to, e.g.,
> handle lists in Emacs lisp comments.

Thats currently possible with outorg.el, M-# M-# on a outshine subtree
or buffer is just the reverse of C-c ' on a source-block - it offers the
subtree of buffer in a temporary *outorg-edit-buffer* in full Org-mode
with the comment-section converted to text and the source-code enclosed
in source-blocks. 

So this works quite well already. But as outshine evolves, me and others
would like to have it more powerful and even more similar to
Org-mode. Then I start reimplementing features based on outline and
extensions, knowing that they are already there in Org-mode,
sophisticated and well tested. Thats a bit frustrating, especially since
it seems that its just a few chars in the regexps that inhibit using
Org-mode functions outside of org-mode. This would be easy to fix in a
small library, but since Org-mode is so big, this is really a political
thing since changing the regexps would cause more than 600 changes in
the sources and then require a (slightly) different approach to writing
regexps in the future. There is definitely a cost, but the gain would be
considerable too ...

-- 
cheers,
Thorsten

  reply	other threads:[~2014-05-28 22:19 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-10 17:55 [RFC] Org Minor Mode? Thorsten Jolitz
2014-04-10 19:19 ` Nicolas Goaziou
2014-04-11 10:07   ` Bastien
2014-04-11 17:22     ` Richard Lawrence
2014-04-13 16:28       ` Thorsten Jolitz
2014-04-19  5:37       ` Samuel Wales
2014-04-19 10:25         ` Thorsten Jolitz
2014-04-13 16:07     ` Thorsten Jolitz
2014-04-18 13:27       ` Bastien
2014-04-13 16:00   ` Thorsten Jolitz
2014-04-18 13:29     ` Bastien
2014-04-18 15:54       ` Thorsten Jolitz
2014-04-19  5:23         ` Bastien
2014-04-19 10:11           ` Thorsten Jolitz
2014-04-19 12:57             ` Bastien
2014-04-24 21:06               ` Ilya Shlyakhter
2014-04-25  8:00                 ` Thorsten Jolitz
2014-04-29 12:24                 ` Bastien
2014-04-29 18:44                   ` Ilya Shlyakhter
2014-05-06  9:06                     ` Bastien
2014-04-24 21:16   ` Ilya Shlyakhter
2014-04-25  7:49     ` Thorsten Jolitz
2014-05-06  9:20       ` Bastien
2014-05-27  9:20         ` Thorsten Jolitz
2014-05-28 21:47           ` Bastien
2014-05-28 22:19             ` Thorsten Jolitz [this message]
2014-05-29  0:01               ` Bastien
2014-05-29 17:47                 ` Thorsten Jolitz
2014-05-29 18:57                   ` Bastien
2014-05-30  8:52                     ` Thorsten Jolitz
2014-05-30 12:13                       ` Bastien
2014-05-30 13:41                         ` Thorsten Jolitz
2014-05-30 13:54                           ` Bastien
2014-05-30 14:15                             ` Thorsten Jolitz
2014-05-30 14:22                               ` Bastien
2014-05-30 14:38                                 ` Thorsten Jolitz

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=878uplim22.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).