emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* change headings to list but have a nested numeration?
@ 2022-07-09 16:43 Uwe Brauer
  2022-07-10  9:33 ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Brauer @ 2022-07-09 16:43 UTC (permalink / raw)
  To: emacs-orgmode

Hi

I start with this part

* The pseudo code
** The actual Matlab code
** Initialisation 
*** Details

Which is converted via org-ctrl-c-minus
to 
* The pseudo code
  - The actual Matlab code
  - Initialisation 
    - Details

However here the structure depends on the indentation and that might not
be that rebust would it be possible to convert to such a structure:

* The pseudo code
  1. The actual Matlab code
  2. Initialisation 
     1.1 Details

That looks more stable to me.

Thanks and regards

Uwe Brauer 
-- 
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 



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

* Re: change headings to list but have a nested numeration?
  2022-07-09 16:43 change headings to list but have a nested numeration? Uwe Brauer
@ 2022-07-10  9:33 ` Ihor Radchenko
  2022-07-13  5:04   ` Uwe Brauer
  0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2022-07-10  9:33 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

Uwe Brauer <oub@mat.ucm.es> writes:

> I start with this part
>
> * The pseudo code
> ** The actual Matlab code
> ** Initialisation 
> *** Details
>
> Which is converted via org-ctrl-c-minus
> to 
> * The pseudo code
>   - The actual Matlab code
>   - Initialisation 
>     - Details
>
> However here the structure depends on the indentation and that might not
> be that rebust would it be possible to convert to such a structure:
>
> * The pseudo code
>   1. The actual Matlab code
>   2. Initialisation 
>      1.1 Details

AFAIK, using "-" is hard-coded in org-toggle-item.
Also, 1.1 is not a valid list bullet.

So, you need to implement alternative bullet support yourself.
Patches are welcome!

Best,
Ihor


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

* Re: change headings to list but have a nested numeration?
  2022-07-10  9:33 ` Ihor Radchenko
@ 2022-07-13  5:04   ` Uwe Brauer
  2022-07-31 12:48     ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Brauer @ 2022-07-13  5:04 UTC (permalink / raw)
  To: emacs-orgmode

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


> Uwe Brauer <oub@mat.ucm.es> writes:

> AFAIK, using "-" is hard-coded in org-toggle-item.
> Also, 1.1 is not a valid list bullet.

> So, you need to implement alternative bullet support yourself.
> Patches are welcome!

I see, several observations.

    1. For headings there is a third party package called
       ‘org-outline-numbering.el’. Which provides a mode that display
       headings in such a numbering scheme, however using overlays, as
       far as I can see.

    2. Headings are much more robust since the use an unique syntax in
       form of *, on the other hand list depend heavily on indentation. So,
       again, third party packages such as
       org-transform-tree-table/toggle transform trees to table and
       back, however if a table contain a list that looses its
       indentation when transforming from a table to tree. That is not
       really a concern for org vanilla but a sign that lists are more
       delicate since the depend on indentation.

Regards

Uwe Brauer 



-- 
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

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

* Re: change headings to list but have a nested numeration?
  2022-07-13  5:04   ` Uwe Brauer
@ 2022-07-31 12:48     ` Ihor Radchenko
  2022-08-01 11:46       ` Uwe Brauer
  0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2022-07-31 12:48 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

Uwe Brauer <oub@mat.ucm.es> writes:

> I see, several observations.
>
>     1. For headings there is a third party package called
>        ‘org-outline-numbering.el’. Which provides a mode that display
>        headings in such a numbering scheme, however using overlays, as
>        far as I can see.

FYI, we have a built-in org-num-mode.

Best,
Ihor


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

* Re: change headings to list but have a nested numeration?
  2022-07-31 12:48     ` Ihor Radchenko
@ 2022-08-01 11:46       ` Uwe Brauer
  2022-08-03  9:53         ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Brauer @ 2022-08-01 11:46 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Uwe Brauer, emacs-orgmode

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

>>> "IR" == Ihor Radchenko <yantar92@gmail.com> writes:

> Uwe Brauer <oub@mat.ucm.es> writes:
>> I see, several observations.
>> 
>> 1. For headings there is a third party package called
>> ‘org-outline-numbering.el’. Which provides a mode that display
>> headings in such a numbering scheme, however using overlays, as
>> far as I can see.

> FYI, we have a built-in org-num-mode.

Thanks for pointing this out to me, but it does not work for lists only for headings (as its doc string explains), but lists are based on indenting so that seems a lot harder than headings


Regards

Uwe 
-- 
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

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

* Re: change headings to list but have a nested numeration?
  2022-08-01 11:46       ` Uwe Brauer
@ 2022-08-03  9:53         ` Ihor Radchenko
  0 siblings, 0 replies; 6+ messages in thread
From: Ihor Radchenko @ 2022-08-03  9:53 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

Uwe Brauer <oub@mat.ucm.es> writes:

>> FYI, we have a built-in org-num-mode.
>
> Thanks for pointing this out to me, but it does not work for lists only for headings (as its doc string explains), but lists are based on indenting so that seems a lot harder than headings

You are indeed right that org-num only works for headings.

As for lists, there is not as much difference actually, org-list-struct
is anyway parsed once you call something like org-element-at-point. One
can simply traverse the struct to determine that numbering.

Of course, someone™ must take the work and produce a patch for org-num.

Best,
Ihor


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

end of thread, other threads:[~2022-08-03  9:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-09 16:43 change headings to list but have a nested numeration? Uwe Brauer
2022-07-10  9:33 ` Ihor Radchenko
2022-07-13  5:04   ` Uwe Brauer
2022-07-31 12:48     ` Ihor Radchenko
2022-08-01 11:46       ` Uwe Brauer
2022-08-03  9:53         ` Ihor Radchenko

Code repositories for project(s) associated with this 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).