emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [RFC] Remove Org Struct mode
@ 2017-08-20 13:57 Nicolas Goaziou
  2017-08-20 14:56 ` Neil Jerram
                   ` (10 more replies)
  0 siblings, 11 replies; 32+ messages in thread
From: Nicolas Goaziou @ 2017-08-20 13:57 UTC (permalink / raw)
  To: Org Mode List

Hello,

I would like to remove Org Struct minor mode from Org code base. Here is
the rationale:

1. It is broken. It might look like using Org in another buffer, but it
   is not. In particular, it just cannot cope with lists, indentation,
   filling in, e.g., Message mode, as soon as we try something
   non-trivial. Really, that's a poor-man's Org mode.

2. Its implementation is very hackish. In particular, it is not modular
   at all. It rewrites some core functions according to the major mode
   in use. For example `org-fill-function' tries to handle specially
   text in a Message mode buffer, basically short-circuiting regular
   behaviour. There no support for other major modes. If we want some,
   we need to hard-code it.

3. Due to previous point, some basic Org functions are sub-optimal
   because they preserve compatibility with Org Struct mode. For example
   `org-forward-heading-same-level' must process every headline past the
   current one and check their level until an appropriate one is found.
   It would be faster to go looking for the next headline according to
   the number of stars we want.

4. It is somewhat outside Org mode's scope to provide such a feature. It
   is tempting to provide everything we can think of, but we should
   focus on the main task: handle Org files, i.e., files written in Org
   compatible syntax.

5. There are alternatives. E.g., outshine.el, outline-minor-mode, ...

I _do_ use `orgstruct++-mode'. But it is broken beyond repair.
Alternatives, which do not need to pay a technical debt, are certainly
better, or, at least, a saner ground for improvement.

I'm not opposed to an Org struct mode living in ELPA. But, as pointed
out, it is difficult to extract from code base without rewriting it
completely. If alternatives are serious enough, that would be
re-inventing the wheel, too.

The only thing that would be missing, AFAIK, is plain list handling.
However, I'm quite certain it is possible to re-use most code from
"org-list.el", using a dumbed down `org-list-struct' function. Indeed,
currently, `org-list-struct' requires to know about inlinetasks,
drawers, blocks... i.e., most of the Org syntax. This is not an option
in foreign buffers. Once `org-list-struct' (and maybe `org-in-item-p')
are simplified, other functions in "org-list.el" can be used as is.

I'm not talking about OrgTbl mode (yet). OrgTbl mode is different: it
doesn't suffer from points 1, 3 end 5. It is easier to extract it as an
external library, which someone should ultimately do.

To sum it up, I offer to remove `orgstruct-mode' (and
`orgstruct++-mode') from the code base. I can also offer my help to
anyone willing to extract some `list-minor-mode' and `table-minor-mode'
from Org.

WDYT?


Regards,

-- 
Nicolas Goaziou                                                0x80A93738

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-20 13:57 [RFC] Remove Org Struct mode Nicolas Goaziou
@ 2017-08-20 14:56 ` Neil Jerram
  2017-08-20 17:04 ` Scott Randby
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 32+ messages in thread
From: Neil Jerram @ 2017-08-20 14:56 UTC (permalink / raw)
  To: emacs-orgmode

I have been using org-mode for a few years now, but have never yet 
noticed org-struct mode.  So removing org-struct would be no loss for me 
(and possibly a gain, if it eased ongoing org-mode maintenance and 
development).

OTOH I certainly do use and appreciate orgtbl minor mode, and it would 
be a big disadvantage for me if that function disappeared. I've no 
objection in principle, though, to reorganizing _how_ that function is 
provided.

Regards - Neil


On 20/08/17 14:57, Nicolas Goaziou wrote:
> Hello,
>
> I would like to remove Org Struct minor mode from Org code base. Here is
> the rationale:
>
> 1. It is broken. It might look like using Org in another buffer, but it
>     is not. In particular, it just cannot cope with lists, indentation,
>     filling in, e.g., Message mode, as soon as we try something
>     non-trivial. Really, that's a poor-man's Org mode.
>
> 2. Its implementation is very hackish. In particular, it is not modular
>     at all. It rewrites some core functions according to the major mode
>     in use. For example `org-fill-function' tries to handle specially
>     text in a Message mode buffer, basically short-circuiting regular
>     behaviour. There no support for other major modes. If we want some,
>     we need to hard-code it.
>
> 3. Due to previous point, some basic Org functions are sub-optimal
>     because they preserve compatibility with Org Struct mode. For example
>     `org-forward-heading-same-level' must process every headline past the
>     current one and check their level until an appropriate one is found.
>     It would be faster to go looking for the next headline according to
>     the number of stars we want.
>
> 4. It is somewhat outside Org mode's scope to provide such a feature. It
>     is tempting to provide everything we can think of, but we should
>     focus on the main task: handle Org files, i.e., files written in Org
>     compatible syntax.
>
> 5. There are alternatives. E.g., outshine.el, outline-minor-mode, ...
>
> I _do_ use `orgstruct++-mode'. But it is broken beyond repair.
> Alternatives, which do not need to pay a technical debt, are certainly
> better, or, at least, a saner ground for improvement.
>
> I'm not opposed to an Org struct mode living in ELPA. But, as pointed
> out, it is difficult to extract from code base without rewriting it
> completely. If alternatives are serious enough, that would be
> re-inventing the wheel, too.
>
> The only thing that would be missing, AFAIK, is plain list handling.
> However, I'm quite certain it is possible to re-use most code from
> "org-list.el", using a dumbed down `org-list-struct' function. Indeed,
> currently, `org-list-struct' requires to know about inlinetasks,
> drawers, blocks... i.e., most of the Org syntax. This is not an option
> in foreign buffers. Once `org-list-struct' (and maybe `org-in-item-p')
> are simplified, other functions in "org-list.el" can be used as is.
>
> I'm not talking about OrgTbl mode (yet). OrgTbl mode is different: it
> doesn't suffer from points 1, 3 end 5. It is easier to extract it as an
> external library, which someone should ultimately do.
>
> To sum it up, I offer to remove `orgstruct-mode' (and
> `orgstruct++-mode') from the code base. I can also offer my help to
> anyone willing to extract some `list-minor-mode' and `table-minor-mode'
> from Org.
>
> WDYT?
>
>
> Regards,
>

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-20 13:57 [RFC] Remove Org Struct mode Nicolas Goaziou
  2017-08-20 14:56 ` Neil Jerram
@ 2017-08-20 17:04 ` Scott Randby
  2017-08-20 18:04 ` Eric S Fraga
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 32+ messages in thread
From: Scott Randby @ 2017-08-20 17:04 UTC (permalink / raw)
  To: Nicolas Goaziou, Org Mode List

On 08/20/2017 09:57 AM, Nicolas Goaziou wrote:
> 
> I would like to remove Org Struct minor mode from Org code base. Here is
> the rationale:
> 

I use OrgStruct in my configuration files, but it is so limited that I've been slowly moving my configuration to Org files. It is frustrating that simple things like C-c C-u don't work in OrgStruct. Removing OrgStruct from the Org code base would be incentive for me to finish rewriting my configuration files. However, I have to wonder what harm is caused by leaving OrgStruct in the code base.

Scott Randby

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-20 13:57 [RFC] Remove Org Struct mode Nicolas Goaziou
  2017-08-20 14:56 ` Neil Jerram
  2017-08-20 17:04 ` Scott Randby
@ 2017-08-20 18:04 ` Eric S Fraga
  2017-08-21  5:47   ` Jarmo Hurri
  2017-08-21 12:48   ` Eduardo Mercovich
  2017-08-20 22:06 ` Tim Cross
                   ` (7 subsequent siblings)
  10 siblings, 2 replies; 32+ messages in thread
From: Eric S Fraga @ 2017-08-20 18:04 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

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

I have no issues with org-struct-mode being removed.  I used to use it,
especially for emails.  I now simply change the mode to org, write
whatever content I want, and then switch back to message mode to send my
email.  Works fine and gives me the full power of org.

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-787-g197c58

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-20 13:57 [RFC] Remove Org Struct mode Nicolas Goaziou
                   ` (2 preceding siblings ...)
  2017-08-20 18:04 ` Eric S Fraga
@ 2017-08-20 22:06 ` Tim Cross
  2017-08-21  2:48   ` numbchild
  2017-08-21 11:59 ` Michael Brand
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 32+ messages in thread
From: Tim Cross @ 2017-08-20 22:06 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List


One of the reasons I moved to using mu4e for email was because I was
told I could use orgStruct mode and write my email using org structured
editing.

The reality has been somewhat disappointing. One of the main things I
wanted was better handling of lists and this is one area of orgstruct
mode which certainly doesn't work correctly.

So, given what you say and the fact the mode isn't working as
advertised, I tend to agree. Just adding a note to my org task list to
look at outshine.el, which I wasn't aware of. If I really need org
structural editing for writing an email, I'll write it in an org-mode
file and then transfer it to a message buffer - as you point out, there
is lots in org mode which makes no sense in an email buffer anyway!

Tim

Nicolas Goaziou writes:

> Hello,
>
> I would like to remove Org Struct minor mode from Org code base. Here is
> the rationale:
>
> 1. It is broken. It might look like using Org in another buffer, but it
>    is not. In particular, it just cannot cope with lists, indentation,
>    filling in, e.g., Message mode, as soon as we try something
>    non-trivial. Really, that's a poor-man's Org mode.
>
> 2. Its implementation is very hackish. In particular, it is not modular
>    at all. It rewrites some core functions according to the major mode
>    in use. For example `org-fill-function' tries to handle specially
>    text in a Message mode buffer, basically short-circuiting regular
>    behaviour. There no support for other major modes. If we want some,
>    we need to hard-code it.
>
> 3. Due to previous point, some basic Org functions are sub-optimal
>    because they preserve compatibility with Org Struct mode. For example
>    `org-forward-heading-same-level' must process every headline past the
>    current one and check their level until an appropriate one is found.
>    It would be faster to go looking for the next headline according to
>    the number of stars we want.
>
> 4. It is somewhat outside Org mode's scope to provide such a feature. It
>    is tempting to provide everything we can think of, but we should
>    focus on the main task: handle Org files, i.e., files written in Org
>    compatible syntax.
>
> 5. There are alternatives. E.g., outshine.el, outline-minor-mode, ...
>
> I _do_ use `orgstruct++-mode'. But it is broken beyond repair.
> Alternatives, which do not need to pay a technical debt, are certainly
> better, or, at least, a saner ground for improvement.
>
> I'm not opposed to an Org struct mode living in ELPA. But, as pointed
> out, it is difficult to extract from code base without rewriting it
> completely. If alternatives are serious enough, that would be
> re-inventing the wheel, too.
>
> The only thing that would be missing, AFAIK, is plain list handling.
> However, I'm quite certain it is possible to re-use most code from
> "org-list.el", using a dumbed down `org-list-struct' function. Indeed,
> currently, `org-list-struct' requires to know about inlinetasks,
> drawers, blocks... i.e., most of the Org syntax. This is not an option
> in foreign buffers. Once `org-list-struct' (and maybe `org-in-item-p')
> are simplified, other functions in "org-list.el" can be used as is.
>
> I'm not talking about OrgTbl mode (yet). OrgTbl mode is different: it
> doesn't suffer from points 1, 3 end 5. It is easier to extract it as an
> external library, which someone should ultimately do.
>
> To sum it up, I offer to remove `orgstruct-mode' (and
> `orgstruct++-mode') from the code base. I can also offer my help to
> anyone willing to extract some `list-minor-mode' and `table-minor-mode'
> from Org.
>
> WDYT?
>
>
> Regards,


-- 
Tim Cross

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-20 22:06 ` Tim Cross
@ 2017-08-21  2:48   ` numbchild
  0 siblings, 0 replies; 32+ messages in thread
From: numbchild @ 2017-08-21  2:48 UTC (permalink / raw)
  To: Tim Cross; +Cc: Org Mode List, Nicolas Goaziou

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

I agree too, because the OrgStruct mode functions is so limited for basic
Org-mode viewing/editing/navigating etc.

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

On Mon, Aug 21, 2017 at 6:06 AM, Tim Cross <theophilusx@gmail.com> wrote:

>
> One of the reasons I moved to using mu4e for email was because I was
> told I could use orgStruct mode and write my email using org structured
> editing.
>
> The reality has been somewhat disappointing. One of the main things I
> wanted was better handling of lists and this is one area of orgstruct
> mode which certainly doesn't work correctly.
>
> So, given what you say and the fact the mode isn't working as
> advertised, I tend to agree. Just adding a note to my org task list to
> look at outshine.el, which I wasn't aware of. If I really need org
> structural editing for writing an email, I'll write it in an org-mode
> file and then transfer it to a message buffer - as you point out, there
> is lots in org mode which makes no sense in an email buffer anyway!
>
> Tim
>
> Nicolas Goaziou writes:
>
> > Hello,
> >
> > I would like to remove Org Struct minor mode from Org code base. Here is
> > the rationale:
> >
> > 1. It is broken. It might look like using Org in another buffer, but it
> >    is not. In particular, it just cannot cope with lists, indentation,
> >    filling in, e.g., Message mode, as soon as we try something
> >    non-trivial. Really, that's a poor-man's Org mode.
> >
> > 2. Its implementation is very hackish. In particular, it is not modular
> >    at all. It rewrites some core functions according to the major mode
> >    in use. For example `org-fill-function' tries to handle specially
> >    text in a Message mode buffer, basically short-circuiting regular
> >    behaviour. There no support for other major modes. If we want some,
> >    we need to hard-code it.
> >
> > 3. Due to previous point, some basic Org functions are sub-optimal
> >    because they preserve compatibility with Org Struct mode. For example
> >    `org-forward-heading-same-level' must process every headline past the
> >    current one and check their level until an appropriate one is found.
> >    It would be faster to go looking for the next headline according to
> >    the number of stars we want.
> >
> > 4. It is somewhat outside Org mode's scope to provide such a feature. It
> >    is tempting to provide everything we can think of, but we should
> >    focus on the main task: handle Org files, i.e., files written in Org
> >    compatible syntax.
> >
> > 5. There are alternatives. E.g., outshine.el, outline-minor-mode, ...
> >
> > I _do_ use `orgstruct++-mode'. But it is broken beyond repair.
> > Alternatives, which do not need to pay a technical debt, are certainly
> > better, or, at least, a saner ground for improvement.
> >
> > I'm not opposed to an Org struct mode living in ELPA. But, as pointed
> > out, it is difficult to extract from code base without rewriting it
> > completely. If alternatives are serious enough, that would be
> > re-inventing the wheel, too.
> >
> > The only thing that would be missing, AFAIK, is plain list handling.
> > However, I'm quite certain it is possible to re-use most code from
> > "org-list.el", using a dumbed down `org-list-struct' function. Indeed,
> > currently, `org-list-struct' requires to know about inlinetasks,
> > drawers, blocks... i.e., most of the Org syntax. This is not an option
> > in foreign buffers. Once `org-list-struct' (and maybe `org-in-item-p')
> > are simplified, other functions in "org-list.el" can be used as is.
> >
> > I'm not talking about OrgTbl mode (yet). OrgTbl mode is different: it
> > doesn't suffer from points 1, 3 end 5. It is easier to extract it as an
> > external library, which someone should ultimately do.
> >
> > To sum it up, I offer to remove `orgstruct-mode' (and
> > `orgstruct++-mode') from the code base. I can also offer my help to
> > anyone willing to extract some `list-minor-mode' and `table-minor-mode'
> > from Org.
> >
> > WDYT?
> >
> >
> > Regards,
>
>
> --
> Tim Cross
>
>

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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-20 18:04 ` Eric S Fraga
@ 2017-08-21  5:47   ` Jarmo Hurri
  2017-08-22  6:58     ` Marcin Borkowski
  2017-08-21 12:48   ` Eduardo Mercovich
  1 sibling, 1 reply; 32+ messages in thread
From: Jarmo Hurri @ 2017-08-21  5:47 UTC (permalink / raw)
  To: emacs-orgmode

Eric S Fraga <esflists@gmail.com> writes:

> I have no issues with org-struct-mode being removed.  I used to use
> it, especially for emails.  I now simply change the mode to org, write
> whatever content I want, and then switch back to message mode to send
> my email.  Works fine and gives me the full power of org.

This is a neat idea. After hearing this, I also have no issue with
org-struct-mode being phased out.

Jarmo

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-20 13:57 [RFC] Remove Org Struct mode Nicolas Goaziou
                   ` (3 preceding siblings ...)
  2017-08-20 22:06 ` Tim Cross
@ 2017-08-21 11:59 ` Michael Brand
  2017-08-22 12:21   ` Kaushal Modi
  2017-08-21 15:15 ` Richard Lawrence
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 32+ messages in thread
From: Michael Brand @ 2017-08-21 11:59 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

Hi all

If I understand correctly orgstruct-mode has much more convenient key
bindings like TAB and its variants for cycling than outshine.el or
outline-minor-mode which is a big advantage for me. When point is on a
heading also the other key bindings are just the same as in Org mode.
This was my reason to give up outshine.el and to stick with headings
where orgstruct-mode does a good job and to not use lists.

If it is an option that someone reduces orgstruct-mode to only cycle
and navigate headings, without all the rest like for example heading
structure editing or lists, I would continue to use it instead of
outshine.el, outorg.el or even Org Babel for sometimes shared source
code files.

Michael

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-20 18:04 ` Eric S Fraga
  2017-08-21  5:47   ` Jarmo Hurri
@ 2017-08-21 12:48   ` Eduardo Mercovich
  1 sibling, 0 replies; 32+ messages in thread
From: Eduardo Mercovich @ 2017-08-21 12:48 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: Org Mode List, Nicolas Goaziou

Hello.

> I have no issues with org-struct-mode being removed. I used to 
> use it, especially for emails. I now simply change the mode to 
> org, write whatever content I want, and then switch back to 
> message mode to send my email. [...]

I do exactly as Eric says here.
Actually, I didn't knew about org-struct-mode.


-- 
eduardo mercovich

 Donde se cruzan tus talentos 
 con las necesidades del mundo, 
 ahí está tu vocación. 
 (Anónimo)

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-20 13:57 [RFC] Remove Org Struct mode Nicolas Goaziou
                   ` (4 preceding siblings ...)
  2017-08-21 11:59 ` Michael Brand
@ 2017-08-21 15:15 ` Richard Lawrence
  2017-08-22 12:16 ` Kaushal Modi
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 32+ messages in thread
From: Richard Lawrence @ 2017-08-21 15:15 UTC (permalink / raw)
  To: Nicolas Goaziou, Org Mode List

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> I would like to remove Org Struct minor mode from Org code base.

Like others, I only use Org Struct mode to get some Org-like list
handling and such when I'm writing email, and as Nicolas observes, it
barely works.  So I'm OK with this, especially if it makes Org easier to
maintain!

-- 
Best,
Richard

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-21  5:47   ` Jarmo Hurri
@ 2017-08-22  6:58     ` Marcin Borkowski
  2017-08-22  8:32       ` Eric S Fraga
  0 siblings, 1 reply; 32+ messages in thread
From: Marcin Borkowski @ 2017-08-22  6:58 UTC (permalink / raw)
  To: Jarmo Hurri; +Cc: emacs-orgmode

Hi all,

I'm in a similar situation - I only use Org-struct for my init.el, I'm
fine with dropping it.

On 2017-08-21, at 07:47, Jarmo Hurri <jarmo.hurri@iki.fi> wrote:

> Eric S Fraga <esflists@gmail.com> writes:
>
>> I have no issues with org-struct-mode being removed.  I used to use
>> it, especially for emails.  I now simply change the mode to org, write
>> whatever content I want, and then switch back to message mode to send
>> my email.  Works fine and gives me the full power of org.
>
> This is a neat idea. After hearing this, I also have no issue with
> org-struct-mode being phased out.

Out of curiosity: did anyone consider using lentic
(https://github.com/phillord/lentic) for that?

Best,

--
Marcin Borkowski

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-22  6:58     ` Marcin Borkowski
@ 2017-08-22  8:32       ` Eric S Fraga
  0 siblings, 0 replies; 32+ messages in thread
From: Eric S Fraga @ 2017-08-22  8:32 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: Jarmo Hurri, emacs-orgmode

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

On Tuesday, 22 Aug 2017 at 08:58, Marcin Borkowski wrote:

[...]

> Out of curiosity: did anyone consider using lentic
> (https://github.com/phillord/lentic) for that?

I did look at this in the past but it seemed overkill for emails... and
I use babel when programming otherwise so don't really need it.  YMMV,
of course!

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-787-g197c58

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-20 13:57 [RFC] Remove Org Struct mode Nicolas Goaziou
                   ` (5 preceding siblings ...)
  2017-08-21 15:15 ` Richard Lawrence
@ 2017-08-22 12:16 ` Kaushal Modi
  2017-08-22 13:45 ` Aaron Ecay
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 32+ messages in thread
From: Kaushal Modi @ 2017-08-22 12:16 UTC (permalink / raw)
  To: Nicolas Goaziou, Org Mode List

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

On Sun, Aug 20, 2017 at 9:58 AM Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> I would like to remove Org Struct minor mode from Org code base.


Like many others who replied here, I also do not use Org Struct. So its
removal will have no effect on my workflow.


> 5. There are alternatives. E.g., outshine.el, outline-minor-mode, ...
>

I use one of those alternatives.. outshine.el.


> I'm not talking about OrgTbl mode (yet). OrgTbl mode is different: it
> doesn't suffer from points 1, 3 end 5.
>

Thanks. I find orgtbl-mode very useful.
-- 

Kaushal Modi

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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-21 11:59 ` Michael Brand
@ 2017-08-22 12:21   ` Kaushal Modi
  2017-08-22 17:48     ` Michael Brand
  0 siblings, 1 reply; 32+ messages in thread
From: Kaushal Modi @ 2017-08-22 12:21 UTC (permalink / raw)
  To: Michael Brand, Nicolas Goaziou; +Cc: Org Mode List

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

On Mon, Aug 21, 2017 at 8:00 AM Michael Brand <michael.ch.brand@gmail.com>
wrote:

> Hi all
>
> If I understand correctly orgstruct-mode has much more convenient key
> bindings like TAB and its variants for cycling than outshine.el or
> outline-minor-mode which is a big advantage for me. When point is on a
> heading also the other key bindings are just the same as in Org mode.
> This was my reason to give up outshine.el
>

Hi Michael,

I use both of the Org-like features in outshine. I have these variables set
in my config:

    (setq outshine-use-speed-commands t)
    (setq outshine-org-style-global-cycling-at-bob-p t)

Also check outshine-speed-commands-default and outshine-speed-commands-user
(setup is similar to that of Org Speed Keys).

-- 

Kaushal Modi

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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-20 13:57 [RFC] Remove Org Struct mode Nicolas Goaziou
                   ` (6 preceding siblings ...)
  2017-08-22 12:16 ` Kaushal Modi
@ 2017-08-22 13:45 ` Aaron Ecay
  2017-08-22 13:50 ` Carsten Dominik
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 32+ messages in thread
From: Aaron Ecay @ 2017-08-22 13:45 UTC (permalink / raw)
  To: Nicolas Goaziou, Org Mode List

Hi Nicolas,

2017ko abuztuak 20an, Nicolas Goaziou-ek idatzi zuen:
> 
> Hello,
> 
> I would like to remove Org Struct minor mode from Org code base.

FWIW, +1 from me.  I often bumped up against org-struct related
difficulties when coding on org, and I can easily imagine that removing
it will make maintenance much easier while (as you pointed out) still
leaving alternative solutions for recovering (most of) its
functionality.

-- 
Aaron Ecay

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-20 13:57 [RFC] Remove Org Struct mode Nicolas Goaziou
                   ` (7 preceding siblings ...)
  2017-08-22 13:45 ` Aaron Ecay
@ 2017-08-22 13:50 ` Carsten Dominik
  2017-08-27 16:34   ` Nicolas Goaziou
  2017-08-22 22:57 ` Eric Abrahamsen
  2017-08-23 10:47 ` Rasmus
  10 siblings, 1 reply; 32+ messages in thread
From: Carsten Dominik @ 2017-08-22 13:50 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

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

Hi Nicolas,

I have not problems with removing orgstruct-mode, it is indeed a bad hack
and I am no longer using it.

I am glad you are not planning to remove orgtbl-mode.  In particular, in
connection with radio tables, it is a feature that I use constantly, so I
would object strongly to removing it.

Carsten

On Sun, Aug 20, 2017 at 3:57 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> I would like to remove Org Struct minor mode from Org code base. Here is
> the rationale:
>
> 1. It is broken. It might look like using Org in another buffer, but it
>    is not. In particular, it just cannot cope with lists, indentation,
>    filling in, e.g., Message mode, as soon as we try something
>    non-trivial. Really, that's a poor-man's Org mode.
>
> 2. Its implementation is very hackish. In particular, it is not modular
>    at all. It rewrites some core functions according to the major mode
>    in use. For example `org-fill-function' tries to handle specially
>    text in a Message mode buffer, basically short-circuiting regular
>    behaviour. There no support for other major modes. If we want some,
>    we need to hard-code it.
>
> 3. Due to previous point, some basic Org functions are sub-optimal
>    because they preserve compatibility with Org Struct mode. For example
>    `org-forward-heading-same-level' must process every headline past the
>    current one and check their level until an appropriate one is found.
>    It would be faster to go looking for the next headline according to
>    the number of stars we want.
>
> 4. It is somewhat outside Org mode's scope to provide such a feature. It
>    is tempting to provide everything we can think of, but we should
>    focus on the main task: handle Org files, i.e., files written in Org
>    compatible syntax.
>
> 5. There are alternatives. E.g., outshine.el, outline-minor-mode, ...
>
> I _do_ use `orgstruct++-mode'. But it is broken beyond repair.
> Alternatives, which do not need to pay a technical debt, are certainly
> better, or, at least, a saner ground for improvement.
>
> I'm not opposed to an Org struct mode living in ELPA. But, as pointed
> out, it is difficult to extract from code base without rewriting it
> completely. If alternatives are serious enough, that would be
> re-inventing the wheel, too.
>
> The only thing that would be missing, AFAIK, is plain list handling.
> However, I'm quite certain it is possible to re-use most code from
> "org-list.el", using a dumbed down `org-list-struct' function. Indeed,
> currently, `org-list-struct' requires to know about inlinetasks,
> drawers, blocks... i.e., most of the Org syntax. This is not an option
> in foreign buffers. Once `org-list-struct' (and maybe `org-in-item-p')
> are simplified, other functions in "org-list.el" can be used as is.
>
> I'm not talking about OrgTbl mode (yet). OrgTbl mode is different: it
> doesn't suffer from points 1, 3 end 5. It is easier to extract it as an
> external library, which someone should ultimately do.
>
> To sum it up, I offer to remove `orgstruct-mode' (and
> `orgstruct++-mode') from the code base. I can also offer my help to
> anyone willing to extract some `list-minor-mode' and `table-minor-mode'
> from Org.
>
> WDYT?
>
>
> Regards,
>
> --
> Nicolas Goaziou                                                0x80A93738
>
>

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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-22 12:21   ` Kaushal Modi
@ 2017-08-22 17:48     ` Michael Brand
  2017-09-05 18:48       ` Michael Brand
  2017-09-09 18:20       ` Thorsten Jolitz
  0 siblings, 2 replies; 32+ messages in thread
From: Michael Brand @ 2017-08-22 17:48 UTC (permalink / raw)
  To: Org Mode List; +Cc: Nicolas Goaziou

Thanks for pointing out speed keys in outshine.el that I was not aware
of. However I still failed.

My requirements for orgstruct-mode or its replacement are very limited
compared to what orgstruct-mode or outshine.el do or intend to do:

1) Only headings, no lists
2) No structure editing, only cycling and navigation
3) Key bindings accessible directly also in vi emulation
4) Key bindings exactly like Org
5) Headings also in block-indented comments (on its own line)
6) No syntax highlighting of headings
7) Org original special folding of the ARCHIVE tag

Note that I need all this only for a limited amount of Org functions
(a subset of orgstruct-setup):

- TAB (org-cycle)
- S-TAB (org-cycle)
- C-TAB (org-force-cycle-archived)
- C-c C-f (org-forward-heading-same-level)
- C-c C-b (org-backward-heading-same-level)
- C-c C-n (outline-next-visible-heading)
- C-c C-p (outline-previous-visible-heading)
- C-c C-u (outline-up-heading)

All items 3)..7) are supported in orgstruct-mode, in outshine.el I was
not able to make them work. If I want to use the speed keys in
outshine.el with vi emulation I have to switch to Emacs mode and back
where in orgstruct-mode I can stay and use simply TAB/S-TAB/C-TAB.

Michael

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-20 13:57 [RFC] Remove Org Struct mode Nicolas Goaziou
                   ` (8 preceding siblings ...)
  2017-08-22 13:50 ` Carsten Dominik
@ 2017-08-22 22:57 ` Eric Abrahamsen
  2017-08-23 10:47 ` Rasmus
  10 siblings, 0 replies; 32+ messages in thread
From: Eric Abrahamsen @ 2017-08-22 22:57 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> I would like to remove Org Struct minor mode from Org code base. Here is
> the rationale:
>
> 1. It is broken. It might look like using Org in another buffer, but it
>    is not. In particular, it just cannot cope with lists, indentation,
>    filling in, e.g., Message mode, as soon as we try something
>    non-trivial. Really, that's a poor-man's Org mode.
>
> 2. Its implementation is very hackish. In particular, it is not modular
>    at all. It rewrites some core functions according to the major mode
>    in use. For example `org-fill-function' tries to handle specially
>    text in a Message mode buffer, basically short-circuiting regular
>    behaviour. There no support for other major modes. If we want some,
>    we need to hard-code it.

+1. I've tried two or three times to refactor it, and it was a
nightmare. I only use lists in orgstruct-mode, so I'd be happy with a
very reduced version, or nothing at all.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-20 13:57 [RFC] Remove Org Struct mode Nicolas Goaziou
                   ` (9 preceding siblings ...)
  2017-08-22 22:57 ` Eric Abrahamsen
@ 2017-08-23 10:47 ` Rasmus
  2017-08-23 11:33   ` Adam Porter
  10 siblings, 1 reply; 32+ messages in thread
From: Rasmus @ 2017-08-23 10:47 UTC (permalink / raw)
  To: emacs-orgmode

Hi Nicolas,

Thanks for bringing this up.

> I would like to remove Org Struct minor mode from Org code base. Here is
> the rationale:

Ugh, I use it in init.el and for emails, but it doesn’t work great in
message-mode anyway.  I miss list handling.  Supposedly, you can get Emacs
to handle lists, but I never got it working.

I have looked at the org-struct code at some occasions, and it looks like
voodoo.  As such, I support the removal of org-struct.

I would like to see a minor-mode for handling lists as well (for emails
and plainer text than Org).  While it sounds like an interesting task to
look into simplifying the relevant parts of org-list.el, I don’t think I
will be able to find the time to do this.

I also would like to see a minor-mode for Org-like cycling when using
outline-minor-mode, as I use this feature in init.el.

Regards,
Rasmus

-- 
When in doubt, do it!

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-23 10:47 ` Rasmus
@ 2017-08-23 11:33   ` Adam Porter
  2017-08-23 12:24     ` Michael Brand
  0 siblings, 1 reply; 32+ messages in thread
From: Adam Porter @ 2017-08-23 11:33 UTC (permalink / raw)
  To: emacs-orgmode

Rasmus <rasmus@gmx.us> writes:

> I also would like to see a minor-mode for Org-like cycling when using
> outline-minor-mode, as I use this feature in init.el.

Outshine provides this feature.  In my init file, I have headers like:

;;;; Org

And when I press TAB with point on that line, it collapses everything
between it and the next header.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-23 11:33   ` Adam Porter
@ 2017-08-23 12:24     ` Michael Brand
  2017-08-23 15:14       ` Adam Porter
  2017-08-23 19:17       ` Rasmus
  0 siblings, 2 replies; 32+ messages in thread
From: Michael Brand @ 2017-08-23 12:24 UTC (permalink / raw)
  To: Adam Porter; +Cc: Org Mode

Hi Adam

First thank you for taking over maintenance of outshine.el from Thorsten Jolitz.

On Wed, Aug 23, 2017 at 1:33 PM, Adam Porter <adam@alphapapa.net> wrote:
> Rasmus <rasmus@gmx.us> writes:
>
>> I also would like to see a minor-mode for Org-like cycling when using
>> outline-minor-mode, as I use this feature in init.el.
>
> Outshine provides this feature.  In my init file, I have headers like:
>
> ;;;; Org
>
> And when I press TAB with point on that line, it collapses everything
> between it and the next header.

How can I collapse block-indented comments like a or b in the following?:

;; * Org
(defun foo ()
  ;; ** a
  (bar)
  ;; ** b
  (beer))
;; * Calc

orgstruct-mode supports it with orgstruct-heading-prefix-regexp set to
for example " *;;;* ".

A bit less important for me: How can I turn off syntax highlighting of
headings, respectively generally in outshine.el?

Michael

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-23 12:24     ` Michael Brand
@ 2017-08-23 15:14       ` Adam Porter
  2017-08-23 21:00         ` Michael Brand
  2017-08-27 13:07         ` Michael Brand
  2017-08-23 19:17       ` Rasmus
  1 sibling, 2 replies; 32+ messages in thread
From: Adam Porter @ 2017-08-23 15:14 UTC (permalink / raw)
  To: emacs-orgmode

Michael Brand <michael.ch.brand@gmail.com> writes:

Hi Michael,

> First thank you for taking over maintenance of outshine.el from
> Thorsten Jolitz.

Well, I figured it was the least I could do, since he's put so much
effort into outshine, outorg, and navi-mode over the years.  Be advised,
although I am now the maintainer, I only comprehend a tiny fraction of
them; I learn more about them when I need to fix something, which so far
has hardly happened.  :)

> How can I collapse block-indented comments like a or b in the following?:
>
> ;; * Org
> (defun foo ()
>   ;; ** a
>   (bar)
>   ;; ** b
>   (beer))
> ;; * Calc
>
> orgstruct-mode supports it with orgstruct-heading-prefix-regexp set to
> for example " *;;;* ".

I don't think this is possible, or at least not easily.  The
outline-regexp variable says:

Regular expression to match the beginning of a heading.
Any line whose beginning matches this regexp is considered to start a heading.
Note that Outline mode only checks this regexp at the start of a line,
so the regexp need not (and usually does not) start with ‘^’.

So I think you would need to modify outline-mode to do this.

However, there are other ways to fold text besides
outline/outline-minor-mode/outshine.  You could probably do it fairly
easily with the origami package.

Or you could do what I do: I modify outline-regexp and outline-level so
that the asterisks aren't even necessary.  Instead, the heading level is
set by how many semicolons there are, e.g.:

;; Regular comment
;;; Heading level 1
;;;; Heading level 2
...

Then any comment that starts with 3 or more semicolons is indented to
the left edge and becomes a collapsible heading, regardless of the
indentation of the code under it.

#+BEGIN_SRC elisp
(defun ap/el-outline-level ()
  (or
   ;; Commented outline heading
   (and (string-match (rx
		       (* space)
		       (group (one-or-more (syntax comment-start)))
		       (one-or-more space))
		      (match-string 0))
	(- (match-end 0) (match-beginning 0) 1))

   ;; Lisp def heading
   ;; Add 8 (the highest standard outline level) to every keyword
   ;; heading
   (+ 8 (- (match-end 0) (match-beginning 0)))))

(defun ap/el-mode-outline-hook ()
  (setq outline-level 'ap/el-outline-level)
  (setq outline-regexp "\\(;;[;]\\{1,8\\} \\|\\((defun\\)\\)"))
  
(add-hook 'emacs-lisp-mode-hook 'ap/el-mode-outline-hook)
#+END_SRC

It works well for me, and it doesn't even require outshine IIRC, just
outline-minor-mode.  I've tried to make this work in other languages
too, like using the number of # characters for the outline level in
shell scripts, but I failed miserably, so I use outshine for other
languages.  It's easier in elisp since Emacs already treats
triple-semicolon comments as headings.

> A bit less important for me: How can I turn off syntax highlighting of
> headings, respectively generally in outshine.el?

Well, the first thing that comes to mind is to unset the properties of
the outline-level faces, but I'm not sure if you can do that per-buffer.
So you might try removing the outline-font-lock-keywords or
outline-font-lock-faces.

Hope this helps.

Adam

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-23 12:24     ` Michael Brand
  2017-08-23 15:14       ` Adam Porter
@ 2017-08-23 19:17       ` Rasmus
  2017-08-23 21:02         ` Michael Brand
  1 sibling, 1 reply; 32+ messages in thread
From: Rasmus @ 2017-08-23 19:17 UTC (permalink / raw)
  To: emacs-orgmode

Michael Brand <michael.ch.brand@gmail.com> writes:

> orgstruct-mode supports it with orgstruct-heading-prefix-regexp set to
> for example " *;;;* ".

FWIW, I use similar patterns,

    ;; outline-regexp: ";;\\*+\\|\\`"
    ;; orgstruct-heading-prefix-regexp: ";;\\*+\\|\\`"

Rasmus

-- 
This is the kind of tedious nonsense up with which I will not put

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-23 15:14       ` Adam Porter
@ 2017-08-23 21:00         ` Michael Brand
  2017-08-27 13:07         ` Michael Brand
  1 sibling, 0 replies; 32+ messages in thread
From: Michael Brand @ 2017-08-23 21:00 UTC (permalink / raw)
  To: Adam Porter; +Cc: Org Mode

Hi Adam

Thank you for all the explanations that I will study and try later.
Especially the origami package looks very useful to me.

Michael

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-23 19:17       ` Rasmus
@ 2017-08-23 21:02         ` Michael Brand
  0 siblings, 0 replies; 32+ messages in thread
From: Michael Brand @ 2017-08-23 21:02 UTC (permalink / raw)
  To: Rasmus; +Cc: Org Mode

Hi Rasmus

On Wed, Aug 23, 2017 at 9:17 PM, Rasmus <rasmus@gmx.us> wrote:

> FWIW, I use similar patterns,
>
>     ;; outline-regexp: ";;\\*+\\|\\`"
>     ;; orgstruct-heading-prefix-regexp: ";;\\*+\\|\\`"

Thank you, I will try that out.

Michael

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-23 15:14       ` Adam Porter
  2017-08-23 21:00         ` Michael Brand
@ 2017-08-27 13:07         ` Michael Brand
  2017-09-02  8:03           ` Adam Porter
  1 sibling, 1 reply; 32+ messages in thread
From: Michael Brand @ 2017-08-27 13:07 UTC (permalink / raw)
  To: Adam Porter; +Cc: Org Mode

Hi Adam

On Wed, Aug 23, 2017 at 5:14 PM, Adam Porter <adam@alphapapa.net> wrote:

> ;; Regular comment
> ;;; Heading level 1
> ;;;; Heading level 2
> ...
>
> Then any comment that starts with 3 or more semicolons is indented to
> the left edge and becomes a collapsible heading, regardless of the
> indentation of the code under it.

I assume in the above sentence you meant that a comment to be a
heading has not to be indented. That is at least what I observed, and
was able to change:

In the setup code you provided (to be used with plain Outline minor
mode without outshine) with

  (setq outline-regexp "\\(;;[;]\\{1,8\\} \\|\\((defun\\)\\)")

when " *" is added at the beginning to respect indentation

  (setq outline-regexp " *\\(;;[;]\\{1,8\\} \\|\\((defun\\)\\)")

the indented comments are also considered a heading.

This makes me believe that in Outline major mode and maybe partly also
in Org mode even this

* Heading level 1
  * Heading level 2

could be made to work by tweaking outline-regexp and outline-level.

Michael

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-22 13:50 ` Carsten Dominik
@ 2017-08-27 16:34   ` Nicolas Goaziou
  2017-08-27 20:28     ` Samuel Wales
  0 siblings, 1 reply; 32+ messages in thread
From: Nicolas Goaziou @ 2017-08-27 16:34 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Org Mode List

Hello,

Carsten Dominik <dominik@uva.nl> writes:

> I am glad you are not planning to remove orgtbl-mode.  In particular, in
> connection with radio tables, it is a feature that I use constantly, so I
> would object strongly to removing it.

Of course. "orgtbl-mode" is nice and certainly shouldn't disappear.

What could be done, though, is to make it an external minor mode,
provided through, e.g., GNU Elpa. I have the feeling (albeit not
a strong one) the features it provides are tangential to those we could
expect from Org.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-27 16:34   ` Nicolas Goaziou
@ 2017-08-27 20:28     ` Samuel Wales
  0 siblings, 0 replies; 32+ messages in thread
From: Samuel Wales @ 2017-08-27 20:28 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Carsten Dominik, Org Mode List

i wrote this a long time ago to summarize the different options for
editing notes in org.

warning: it might make zero sense to you.

maybe it will be useful to somebody.

===

sometimes you want the notes to stay in your external file
(example: whatever.el).  but edit them in org mode.
orgstruct edits in orgish mode.

sometimes you want notes and code to stay in org and
generate the external file.  this is tangling.

sometimes you want a link to the notes in org in
whatever.el.  and a link to the whatever.el location in the
relevant node in org.  thus bidirectional links between
whatever.el and org.  (this has been called "mccoy mode"
after his suspicion of the transporter, but could also mean
that everything stays in, and is edited in, the real mccoy.
i.e. code stays in .el and notes stay in .org.)

===

legend:

n means notes
s means source
.el is a stand-in for any type of file that is not org
blank cells are n/a

for example, in the first line, in a .el babel source block:

  1) notes are edited in org
     - (the source block is embedded in notes)
  2) source is edited in a temporary buffer for .el
  3) there is no minor mode of relevance
  4) notes are kept in .org
  5) source is kept in .org in a source block
  6) the target can be a .el file


|-----------------------+---------+--------+---------+----------+-----------+--------|
| what                  | nmajor  | smajor | nminor  | notes in |
source in | target |
|-----------------------+---------+--------+---------+----------+-----------+--------|
| babel                 | org     | el tmp |         | .org     | .org
     | .el    |
| bidirectional linking | org     | el     |         | .org     | .el
     |        |
| poporg                | org tmp | el     |         | .el      | .el
     |        |
| outorg                | org tmp | el     | orgish? | .el      | .el
     |        |
| orgtbl                | el      | el     | orgish  | .el      | .el
     |        |
| org-link-minor-mode   | el      | el     | orgish  | .el      | .el
     |        |
| radio list / table    | org     | xlate  |         | .org     | .org
     | .el    |
|-----------------------+---------+--------+---------+----------+-----------+--------|



-- 
The Kafka Pandemic: <http://thekafkapandemic.blogspot.com>

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
<http://www.meaction.net/2017/02/03/pwme-people-with-me-are-being-murdered-by-neglect>.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-27 13:07         ` Michael Brand
@ 2017-09-02  8:03           ` Adam Porter
  0 siblings, 0 replies; 32+ messages in thread
From: Adam Porter @ 2017-09-02  8:03 UTC (permalink / raw)
  To: emacs-orgmode

Michael Brand <michael.ch.brand@gmail.com> writes:

> I assume in the above sentence you meant that a comment to be a
> heading has not to be indented.

Well, yes and no.  On my config, " ;;; test" is highlighted as a
heading, but it's only foldable as ";;; test".

> That is at least what I observed, and was able to change:
>
> In the setup code you provided (to be used with plain Outline minor
> mode without outshine) with
>
>   (setq outline-regexp "\\(;;[;]\\{1,8\\} \\|\\((defun\\)\\)")
>
> when " *" is added at the beginning to respect indentation
>
>   (setq outline-regexp " *\\(;;[;]\\{1,8\\} \\|\\((defun\\)\\)")
>
> the indented comments are also considered a heading.
>
> This makes me believe that in Outline major mode and maybe partly also
> in Org mode even this
>
> * Heading level 1
>   * Heading level 2
>
> could be made to work by tweaking outline-regexp and outline-level.

Probably so, I haven't dug into outline-mode.  :)

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-22 17:48     ` Michael Brand
@ 2017-09-05 18:48       ` Michael Brand
  2017-09-09 18:20       ` Thorsten Jolitz
  1 sibling, 0 replies; 32+ messages in thread
From: Michael Brand @ 2017-09-05 18:48 UTC (permalink / raw)
  To: Org Mode List; +Cc: Nicolas Goaziou

On Tue, Aug 22, 2017 at 7:48 PM, Michael Brand
<michael.ch.brand@gmail.com> wrote:

> 6) No syntax highlighting of headings

To get the above behavior of orgstruct-mode in outshine for
programming modes I added outshine-fontify. It makes me ready to let
orgstruct-mode go.

  outshine-fontify is a variable defined in ‘outshine.el’.
  Its value is (closure (t) nil (not (derived-mode-p 'prog-mode)))
  Original value was t

    This variable is safe as a file local variable if its value
    satisfies the predicate ‘(lambda (v) (memq v (quote (t nil))))’.

  Documentation:
  When to fontify the outshine headings in a buffer.

  Possible values are:

   ‘t’        Always (the default).
   ‘nil’      Never.
   function   A Lisp predicate function with no arguments. For example
              ‘(lambda () (not (derived-mode-p (quote prog-mode))))’
              fontifies only when not in a programming mode.

  ‘t’ and ‘nil’ can be used for a file local variable to make an
  exception for certain files or to be independent of the user’s
  customization.

  You can customize this variable.

Michael

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-08-22 17:48     ` Michael Brand
  2017-09-05 18:48       ` Michael Brand
@ 2017-09-09 18:20       ` Thorsten Jolitz
  2017-09-09 19:04         ` Michael Brand
  1 sibling, 1 reply; 32+ messages in thread
From: Thorsten Jolitz @ 2017-09-09 18:20 UTC (permalink / raw)
  To: emacs-orgmode

Michael Brand <michael.ch.brand@gmail.com> writes:

Hello Micheal,

> My requirements for orgstruct-mode or its replacement are very limited
> compared to what orgstruct-mode or outshine.el do or intend to do:

> 4) Key bindings exactly like Org

> All items 3)..7) are supported in orgstruct-mode, in outshine.el I was
> not able to make them work. 

I'm not sure how orgstruct-mode does it, but since outshine is a minor
mode, it cannot use Key bindings exactly like Org, since many of these
are used in other major modes too.

It is not easy to find a prefix for a minor mode that is easy to type
but won't conflict with major modes.

-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [RFC] Remove Org Struct mode
  2017-09-09 18:20       ` Thorsten Jolitz
@ 2017-09-09 19:04         ` Michael Brand
  0 siblings, 0 replies; 32+ messages in thread
From: Michael Brand @ 2017-09-09 19:04 UTC (permalink / raw)
  To: Thorsten Jolitz; +Cc: Org Mode

Hi Thorsten

First thank you very much for creating outshine.

On Sat, Sep 9, 2017 at 8:20 PM, Thorsten Jolitz <tjolitz@gmail.com> wrote:

> I'm not sure how orgstruct-mode does it, but since outshine is a minor
> mode, it cannot use Key bindings exactly like Org, since many of these
> are used in other major modes too.
>
> It is not easy to find a prefix for a minor mode that is easy to type
> but won't conflict with major modes.

Later I found that I don't have to use the outshine prefix key at all.
Outshine hijacks TAB like orgstruct-mode when on a headline and for
the other commands that orgstruct-mode hijacks as well I use now the
outshine speed commands. They work perfect with vi emulation by
switching to Emacs state (E) and back when done.

Michael

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2017-09-09 19:04 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-20 13:57 [RFC] Remove Org Struct mode Nicolas Goaziou
2017-08-20 14:56 ` Neil Jerram
2017-08-20 17:04 ` Scott Randby
2017-08-20 18:04 ` Eric S Fraga
2017-08-21  5:47   ` Jarmo Hurri
2017-08-22  6:58     ` Marcin Borkowski
2017-08-22  8:32       ` Eric S Fraga
2017-08-21 12:48   ` Eduardo Mercovich
2017-08-20 22:06 ` Tim Cross
2017-08-21  2:48   ` numbchild
2017-08-21 11:59 ` Michael Brand
2017-08-22 12:21   ` Kaushal Modi
2017-08-22 17:48     ` Michael Brand
2017-09-05 18:48       ` Michael Brand
2017-09-09 18:20       ` Thorsten Jolitz
2017-09-09 19:04         ` Michael Brand
2017-08-21 15:15 ` Richard Lawrence
2017-08-22 12:16 ` Kaushal Modi
2017-08-22 13:45 ` Aaron Ecay
2017-08-22 13:50 ` Carsten Dominik
2017-08-27 16:34   ` Nicolas Goaziou
2017-08-27 20:28     ` Samuel Wales
2017-08-22 22:57 ` Eric Abrahamsen
2017-08-23 10:47 ` Rasmus
2017-08-23 11:33   ` Adam Porter
2017-08-23 12:24     ` Michael Brand
2017-08-23 15:14       ` Adam Porter
2017-08-23 21:00         ` Michael Brand
2017-08-27 13:07         ` Michael Brand
2017-09-02  8:03           ` Adam Porter
2017-08-23 19:17       ` Rasmus
2017-08-23 21:02         ` Michael Brand

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).