From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Add ability to force-enable TOC Date: Tue, 19 Sep 2017 14:49:48 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a114d725c38ea8005598bf9be" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duJqe-0005Z6-V5 for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 10:50:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duJqd-0002yX-Ea for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 10:50:04 -0400 Received: from mail-yw0-x229.google.com ([2607:f8b0:4002:c05::229]:54292) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1duJqd-0002xk-9L for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 10:50:03 -0400 Received: by mail-yw0-x229.google.com with SMTP id w9so164997ywi.11 for ; Tue, 19 Sep 2017 07:50:01 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-org list --001a114d725c38ea8005598bf9be Content-Type: text/plain; charset="UTF-8" Hello, I have use-cases where I don't like to see the headings numbered but still want the TOC to be generated. I have this in many of my Org files: #+OPTIONS: num:nil H:4 But after commit bd23781[1], that has stopped working i.e. no TOC is created because of num:nil. Can we enforce the TOC generation using the "toc:" option. Below does not work at the moment, but would like that to work. #+OPTIONS: num:nil H:4 toc:4 Thanks. [1]: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=bd2378161e76932103c9ef1f8343ffcc0d275007 -- Kaushal Modi --001a114d725c38ea8005598bf9be Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

I have use-cases where I don'= ;t like to see the headings numbered but still want the TOC to be generated= .

I have this in many of my Org files:
<= br>
#+OPTIONS: num:nil H:4

But after= commit bd23781[1], that has stopped working i.e. no TOC is created because= of num:nil.

Can we enforce the TOC generation usi= ng the "toc:" option. Below does not work at the moment, but woul= d like that to work.

#+OPTIONS: num:nil H:4 toc:4 = =C2=A0

Thanks.

--

Kaushal Modi

--001a114d725c38ea8005598bf9be-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Add ability to force-enable TOC Date: Tue, 19 Sep 2017 15:00:17 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1141e7989c964405598c1ec4" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duK0m-0005RJ-EH for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 11:00:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duK0i-0001Wa-M2 for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 11:00:32 -0400 Received: from mail-yw0-x22d.google.com ([2607:f8b0:4002:c05::22d]:43942) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1duK0i-0001WT-Hd for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 11:00:28 -0400 Received: by mail-yw0-x22d.google.com with SMTP id s62so211928ywg.0 for ; Tue, 19 Sep 2017 08:00:28 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-org list --001a1141e7989c964405598c1ec4 Content-Type: text/plain; charset="UTF-8" On Tue, Sep 19, 2017 at 10:49 AM Kaushal Modi wrote: > Can we enforce the TOC generation using the "toc:" option. Below does not > work at the moment, but would like that to work. > > #+OPTIONS: num:nil H:4 toc:4 > Above works after the below patch: diff --git a/lisp/ox.el b/lisp/ox.el index 2be77a87b33..1831432df87 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -5227,7 +5227,8 @@ Footnote sections and unnumbered headlines are ignored." (org-element-map (org-element-contents scope) 'headline (lambda (headline) (unless (or (org-element-property :footnote-section-p headline) - (not (org-export-numbered-headline-p headline info))) + (and (null (plist-get info :with-toc)) + (not (org-export-numbered-headline-p headline info)))) (let ((level (org-export-get-relative-level headline info))) (and (<= level n) headline)))) info))) But I am pretty sure that's not the right way as the default value of org-export-with-toc is t. -- Kaushal Modi --001a1141e7989c964405598c1ec4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Sep 19= , 2017 at 10:49 AM Kaushal Modi <kaushal.modi@gmail.com> wrote:
Can we enforce the TOC generation using the &qu= ot;toc:" option. Below does not work at the moment, but would like tha= t to work.

#+OPTIONS: num:nil H:4 toc:4 =C2=A0=

Above works after the below pa= tch:

diff --git a/lisp/ox.el b/lisp/ox.el
index 2be77a87b33..1831432df87 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -5227,7 +5227,8 @@ Footnote sections and un= numbered headlines are ignored."
=C2=A0 =C2=A0 =C2=A0(org-el= ement-map (org-element-contents scope) 'headline
=C2=A0 =C2= =A0 =C2=A0 =C2=A0(lambda (headline)
=C2=A0 (unless (or (org-element-property :footnote-section-p head= line)
- =C2=A0 =C2=A0(no= t (org-export-numbered-headline-p headline info)))
+ =C2=A0 =C2=A0(and (null (plist-get info :wit= h-toc))
+ (not (org-exp= ort-numbered-headline-p headline info))))
=C2=A0 =C2=A0(let ((level (org-export-get-relative-level h= eadline info)))
=C2=A0 = =C2=A0 =C2=A0(and (<=3D level n) headline))))
=C2=A0 =C2=A0 = =C2=A0 =C2=A0info)))

But I am pretty sure that'= ;s not the right way as the default value of org-export-with-toc is t.=C2= =A0
--

Kaushal Modi

--001a1141e7989c964405598c1ec4-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Add ability to force-enable TOC Date: Tue, 19 Sep 2017 17:33:18 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403045c48bc57930805598c9579" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duKWt-0002FG-1f for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 11:33:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duKWs-00017c-3R for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 11:33:43 -0400 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:43884) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1duKWr-00016c-SV for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 11:33:42 -0400 Received: by mail-wm0-x236.google.com with SMTP id a137so430392wma.0 for ; Tue, 19 Sep 2017 08:33:40 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Kaushal Modi Cc: emacs-org list --f403045c48bc57930805598c9579 Content-Type: text/plain; charset="UTF-8" On Tue, Sep 19, 2017 at 4:49 PM, Kaushal Modi wrote: > Hello, > > I have use-cases where I don't like to see the headings numbered but still > want the TOC to be generated. > > I have this in many of my Org files: > > #+OPTIONS: num:nil H:4 > > But after commit bd23781[1], that has stopped working i.e. no TOC is > created because of num:nil. > I would see this as a bug - clearly it makes sense to have a TOC without numbering. Nicolas, was this an oversight, or was this change intended? Carsten > > Can we enforce the TOC generation using the "toc:" option. Below does not > work at the moment, but would like that to work. > > #+OPTIONS: num:nil H:4 toc:4 > > Thanks. > > [1]: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id= > bd2378161e76932103c9ef1f8343ffcc0d275007 > -- > > Kaushal Modi > --f403045c48bc57930805598c9579 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Sep 19, 2017 at 4:49 PM, Kaushal Modi <kaushal.modi@gmail= .com> wrote:
Hello,

I have use-cases where I don't like to see= the headings numbered but still want the TOC to be generated.
I have this in many of my Org files:

= #+OPTIONS: num:nil H:4

But after commit bd2378= 1[1], that has stopped working i.e. no TOC is created because of num:nil.

I would see this as a bug - clea= rly it makes sense to have a TOC without numbering.

Nicolas, was this an oversight, or was this change intended?
Carsten
=C2=A0
<= div dir=3D"ltr">

Can we enforce the TOC generation using= the "toc:" option. Below does not work at the moment, but would = like that to work.

#+OPTIONS: num:nil H:4 toc:4 = =C2=A0

Thanks.

--

Kaushal Modi


--f403045c48bc57930805598c9579-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Add ability to force-enable TOC Date: Tue, 19 Sep 2017 21:27:13 +0200 Message-ID: <87shfia3qm.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duOAz-0005wc-LK for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 15:27:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duOAy-0007jo-LP for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 15:27:21 -0400 Received: from relay2-d.mail.gandi.net ([2001:4b98:c:538::194]:50791) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1duOAy-0007hn-GA for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 15:27:20 -0400 In-Reply-To: (Carsten Dominik's message of "Tue, 19 Sep 2017 17:33:18 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Carsten Dominik Cc: emacs-org list , Kaushal Modi Hello, Carsten Dominik writes: > On Tue, Sep 19, 2017 at 4:49 PM, Kaushal Modi > wrote: > >> Hello, >> >> I have use-cases where I don't like to see the headings numbered but still >> want the TOC to be generated. >> >> I have this in many of my Org files: >> >> #+OPTIONS: num:nil H:4 >> >> But after commit bd23781[1], that has stopped working i.e. no TOC is >> created because of num:nil. >> > > I would see this as a bug - clearly it makes sense to have a TOC without > numbering. > > Nicolas, was this an oversight, or was this change intended? The change was intended. The idea was discussed on the ML. You may want to check the thread. This is on par with, e.g., what LaTeX does. Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Add ability to force-enable TOC Date: Tue, 19 Sep 2017 19:31:44 +0000 Message-ID: References: <87shfia3qm.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a114d725c76060205598fe9c8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duOFR-0008PX-JN for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 15:31:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duOFQ-0001gs-OC for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 15:31:57 -0400 Received: from mail-yw0-x233.google.com ([2607:f8b0:4002:c05::233]:48709) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1duOFQ-0001gV-KG for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 15:31:56 -0400 Received: by mail-yw0-x233.google.com with SMTP id u205so466731ywa.5 for ; Tue, 19 Sep 2017 12:31:56 -0700 (PDT) In-Reply-To: <87shfia3qm.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou , Carsten Dominik Cc: emacs-org list --001a114d725c76060205598fe9c8 Content-Type: text/plain; charset="UTF-8" On Tue, Sep 19, 2017 at 3:27 PM Nicolas Goaziou wrote: > The change was intended. The idea was discussed on the ML. You may want > to check the thread. > > This is on par with, e.g., what LaTeX does. > What would be a good way, though, to bring back that functionality? I don't mind if I need to set extra options/variables for that. -- Kaushal Modi --001a114d725c76060205598fe9c8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Sep 19= , 2017 at 3:27 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
The change was intended. The idea was discussed on the ML. You may = want
to check the thread.

This is on par with, e.g., what LaTeX does.

=
What would be a good way, though, to bring back that functionality? I = don't mind if I need to set extra options/variables for that.=C2=A0
--

Kaushal Modi

--001a114d725c76060205598fe9c8-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Add ability to force-enable TOC Date: Tue, 19 Sep 2017 21:57:32 +0200 Message-ID: <87h8vya2c3.fsf@nicolasgoaziou.fr> References: <87shfia3qm.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duOeF-0005Hi-Mj for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 15:57:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duOeE-000597-Vo for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 15:57:35 -0400 Received: from relay2-d.mail.gandi.net ([2001:4b98:c:538::194]:39561) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1duOeE-00058S-QH for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 15:57:34 -0400 In-Reply-To: (Kaushal Modi's message of "Tue, 19 Sep 2017 19:31:44 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Kaushal Modi Cc: Carsten Dominik , emacs-org list Kaushal Modi writes: > On Tue, Sep 19, 2017 at 3:27 PM Nicolas Goaziou > wrote: > >> The change was intended. The idea was discussed on the ML. You may want >> to check the thread. >> >> This is on par with, e.g., what LaTeX does. >> > > What would be a good way, though, to bring back that functionality? I don't > mind if I need to set extra options/variables for that. What is exactly the feature you are missing? Your example is a special case where _no_ heading is numbered. But we also had to deal with situations where only _some_ headings were numbered. In any case, this change solves two problems: 1. it makes all export back-ends consistent with TOC; 2. it allows to use, e.g., @heading instead of @unnumberedsec in Texinfo export. Thus, we don't need to provide a way to determine which one should be used. I admit the second point is probably only convenient for the lazy me: I don't have to find a proper way to support @heading commands in Texinfo export anymore. Regards, From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Add ability to force-enable TOC Date: Tue, 19 Sep 2017 20:12:41 +0000 Message-ID: References: <87shfia3qm.fsf@nicolasgoaziou.fr> <87h8vya2c3.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a114fa8a6e94dcd0559907b60" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duOt5-0003HR-6S for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 16:12:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duOt3-0007s7-Lt for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 16:12:55 -0400 Received: from mail-yw0-x236.google.com ([2607:f8b0:4002:c05::236]:52158) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1duOt3-0007rp-Fm for emacs-orgmode@gnu.org; Tue, 19 Sep 2017 16:12:53 -0400 Received: by mail-yw0-x236.google.com with SMTP id p10so538026ywh.8 for ; Tue, 19 Sep 2017 13:12:53 -0700 (PDT) In-Reply-To: <87h8vya2c3.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: Carsten Dominik , emacs-org list --001a114fa8a6e94dcd0559907b60 Content-Type: text/plain; charset="UTF-8" On Tue, Sep 19, 2017 at 3:57 PM Nicolas Goaziou wrote: > What is exactly the feature you are missing? Your example is a special > case where _no_ heading is numbered. I would not consider this as a special case. It is very common for HTML exports to not always number the headings. Blog posts are also very common examples.. we do not have blog posts with numbered h1/h2 headings. But for long blog posts, it often a norm to include a TOC. Example: https://scripter.co/notes/string-functions-nim-vs-python/ I also use the ascii exporter to export notes taken during meetings. I do not number them, and with a long notes, TOC is helpful. Numbered headings is more common in texinfo and latex, I believe. > But we also had to deal with > situations where only _some_ headings were numbered. > > In any case, this change solves two problems: > > 1. it makes all export back-ends consistent with TOC; > I understand that. But would like a way to get back the earlier behavior too. 2. it allows to use, e.g., @heading instead of @unnumberedsec in Texinfo > export. Thus, we don't need to provide a way to determine which one > should be used. > > I admit the second point is probably only convenient for the lazy me: > I don't have to find a proper way to support @heading commands in > Texinfo export anymore. > How about this updated patch? diff --git a/lisp/ox.el b/lisp/ox.el index 2be77a87b33..7b6170cb832 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -5227,7 +5227,8 @@ Footnote sections and unnumbered headlines are ignored." (org-element-map (org-element-contents scope) 'headline (lambda (headline) (unless (or (org-element-property :footnote-section-p headline) - (not (org-export-numbered-headline-p headline info))) + (and (not (numberp (plist-get info :with-toc))) + (not (org-export-numbered-headline-p headline info)))) (let ((level (org-export-get-relative-level headline info))) (and (<= level n) headline)))) info))) That way if the file has: #+OPTIONS: num:nil No TOC will be exported (even though the org-export-with-toc default is t). But if the file has: #+OPTIONS: num:nil toc:4 As the toc value is a number, the TOC will be exported even though num is nil. -- Kaushal Modi --001a114fa8a6e94dcd0559907b60 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Sep 19= , 2017 at 3:57 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
What is exactly the feature you are missing? Your example is a spec= ial
case where _no_ heading is numbered.

I wou= ld not consider this as a special case. It is very common for HTML exports = to not always number the headings.=C2=A0

Blog post= s are also very common examples.. we do not have blog posts with numbered h= 1/h2 headings. But for long blog posts, it often a norm to include a TOC. E= xample:=C2=A0https://scripter.co/notes/string-functions-nim-vs-python/
=

I also use the ascii exporter to export notes taken dur= ing meetings. I do not number them, and with a long notes, TOC is helpful.<= /div>

Numbered headings is more common in texinfo and la= tex, I believe.
=C2=A0
But we= also had to deal with
situations where only _some_ headings were numbered.

In any case, this change solves two problems:

1. it makes all export back-ends consistent with TOC;
=
=C2=A0I understand that. But would like a way to get back th= e earlier behavior too.

= 2. it allows to use, e.g., @heading instead of @unnumberedsec in Texinfo =C2=A0 =C2=A0export. Thus, we don't need to provide a way to determine = which one
=C2=A0 =C2=A0should be used.

I admit the second point is probably only convenient for the lazy me:
I don't have to find a proper way to support @heading commands in
Texinfo export anymore.

How about this = updated patch?

diff --git a/lisp/ox.el b/lisp/ox.e= l
index 2be77a87b33..7b6170cb832 100644
--- a/lisp/ox.e= l
+++ b/lisp/ox.el
@@ -5227,7 +5227,8 @@ Footnote secti= ons and unnumbered headlines are ignored."
=C2=A0 =C2=A0 =C2= =A0(org-element-map (org-element-contents scope) 'headline
= =C2=A0 =C2=A0 =C2=A0 =C2=A0(lambda (headline)
=C2=A0 (unless (or (org-element-property :footnote-se= ction-p headline)
- =C2= =A0 =C2=A0(not (org-export-numbered-headline-p headline info)))
+= =C2=A0 =C2=A0(and (not (numberp (= plist-get info :with-toc)))
+ <= /span> (not (org-export-numbered-headline-p headline info))))
=C2= =A0 =C2=A0(let ((level (org-export-= get-relative-level headline info)))
=C2=A0 =C2=A0 =C2=A0(and (<=3D level n) headline))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0info)))


That way if the file has:

#+OPTIONS: num:nil

No TOC will be exported (even though the org-export-w= ith-toc default is t).

But if the file has:
<= div>
#+OPTIONS: num:nil toc:4

As= the toc value is a number, the TOC will be exported even though num is nil= .

--

Kaus= hal Modi

--001a114fa8a6e94dcd0559907b60-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Add ability to force-enable TOC Date: Wed, 20 Sep 2017 10:14:18 +0200 Message-ID: References: <87shfia3qm.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="089e08222158294eeb05599a9167" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dua9Z-0003dl-Dk for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 04:14:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dua9Y-0003mU-2X for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 04:14:41 -0400 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:50305) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dua9X-0003i9-Rl for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 04:14:39 -0400 Received: by mail-wm0-x234.google.com with SMTP id v142so4781152wmv.5 for ; Wed, 20 Sep 2017 01:14:39 -0700 (PDT) In-Reply-To: <87shfia3qm.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: emacs-org list , Kaushal Modi --089e08222158294eeb05599a9167 Content-Type: text/plain; charset="UTF-8" On Tue, Sep 19, 2017 at 9:27 PM, Nicolas Goaziou wrote: > Hello, > > Carsten Dominik writes: > > > On Tue, Sep 19, 2017 at 4:49 PM, Kaushal Modi > > wrote: > > > >> Hello, > >> > >> I have use-cases where I don't like to see the headings numbered but > still > >> want the TOC to be generated. > >> > >> I have this in many of my Org files: > >> > >> #+OPTIONS: num:nil H:4 > >> > >> But after commit bd23781[1], that has stopped working i.e. no TOC is > >> created because of num:nil. > >> > > > > I would see this as a bug - clearly it makes sense to have a TOC without > > numbering. > > > > Nicolas, was this an oversight, or was this change intended? > > The change was intended. The idea was discussed on the ML. You may want > to check the thread. > > This is on par with, e.g., what LaTeX does. > That may be so, but I find that unfortunate. I am really using this feature often. I will go back and take a look at this thread. Can someone tell me what the subject line of that thread was? Carsten > > Regards, > > -- > Nicolas Goaziou > --089e08222158294eeb05599a9167 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Sep 19, 2017 at 9:27 PM, Nicolas Goaziou <= mail@nicolasgoa= ziou.fr> wrote:
Hello,

Carsten Dominik <dominik@uva.nl>= ; writes:

> On Tue, Sep 19, 2017 at 4:49 PM, Kaushal Modi <kaushal.modi@gmail.com>
> wrote:
>
>> Hello,
>>
>> I have use-cases where I don't like to see the headings number= ed but still
>> want the TOC to be generated.
>>
>> I have this in many of my Org files:
>>
>> #+OPTIONS: num:nil H:4
>>
>> But after commit bd23781[1], that has stopped working i.e. no TOC = is
>> created because of num:nil.
>>
>
> I would see this as a bug - clearly it makes sense to have a TOC witho= ut
> numbering.
>
> Nicolas, was this an oversight, or was this change intended?

The change was intended. The idea was discussed on the ML. You may w= ant
to check the thread.

This is on par with, e.g., what LaTeX does.

=
That may be so, but I find that unfortunate.=C2=A0 I am really using t= his feature often.

I will go back and take a look = at this thread.=C2=A0 Can someone tell me what the subject line of that thr= ead was?

Carsten
=C2=A0

Regards,

--
Nicolas Goaziou

--089e08222158294eeb05599a9167-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Add ability to force-enable TOC Date: Wed, 20 Sep 2017 12:25:42 +0200 Message-ID: <8760cdacpl.fsf@nicolasgoaziou.fr> References: <87shfia3qm.fsf@nicolasgoaziou.fr> <87h8vya2c3.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dueoI-0000Cm-3O for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 09:13:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dueo7-0007jj-VB for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 09:13:02 -0400 Received: from slow1-d.mail.gandi.net ([217.70.178.86]:46579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dueo7-0007iV-O6 for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 09:12:51 -0400 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by slow1-d.mail.gandi.net (Postfix) with ESMTP id 62CE147A27D for ; Wed, 20 Sep 2017 12:25:49 +0200 (CEST) In-Reply-To: (Kaushal Modi's message of "Tue, 19 Sep 2017 20:12:41 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Kaushal Modi Cc: Carsten Dominik , emacs-org list Hello, Kaushal Modi writes: > On Tue, Sep 19, 2017 at 3:57 PM Nicolas Goaziou > wrote: > >> What is exactly the feature you are missing? Your example is a special >> case where _no_ heading is numbered. > > > I would not consider this as a special case. It is very common for HTML > exports to not always number the headings. I didn't say it was an unusual case. I said it didn't cover all the use-cases. Maybe you are really needing a subset of the initial feature. IOW, do mixed numbered/unnumbered headings make sense in TOC? >> 1. it makes all export back-ends consistent with TOC; >> > > I understand that. But would like a way to get back the earlier behavior > too. Then there is the other way around: how do we tell LaTeX to include both numbered and unnumbered headings? And: how do we distinguish @unnumberedsec from @heading in Texinfo? > That way if the file has: > > #+OPTIONS: num:nil > > No TOC will be exported (even though the org-export-with-toc default is t). > > But if the file has: > > #+OPTIONS: num:nil toc:4 > > As the toc value is a number, the TOC will be exported even though num is > nil. AFAICT, this doesn't solve any of the two concerns. What we can do for "num:nil toc:4" can be done for "num:nil" alone. Regards, From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Add ability to force-enable TOC Date: Wed, 20 Sep 2017 10:53:06 +0200 Message-ID: <878th9rbt9.fsf@gmx.us> References: <87shfia3qm.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duezg-00011i-O2 for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 09:25:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dueyb-0001Hz-Il for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 09:24:48 -0400 Received: from [195.159.176.226] (port=41392 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dueyN-0000yt-SQ for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 09:23:40 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1duakl-0001xr-Nf for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 10:53:07 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Kaushal Modi writes: > On Tue, Sep 19, 2017 at 3:27 PM Nicolas Goaziou > wrote: > >> The change was intended. The idea was discussed on the ML. You may want >> to check the thread. >> >> This is on par with, e.g., what LaTeX does. >> > > What would be a good way, though, to bring back that functionality? I don't > mind if I need to set extra options/variables for that. In the case of LaTeX you could do: #+latex_header: \setcounter{secnumdepth}{0} #+options: toc:3 For what it’s worth, I don’t think the new behavior is correct, seeing Kaushal’s example. The option "num" touches secnumdepth (in ox-latex). But setting that does not imply that all headings should be constructed with their starred variant (e.g. "\section*{.}"). IMO, this behavior should be reverted in maint as it would be nice to include 9.1 in the next version of Emacs. Rasmus -- This message is brought to you by the department of redundant departments From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Add ability to force-enable TOC Date: Wed, 20 Sep 2017 10:54:11 +0200 Message-ID: <874lrxrbrg.fsf@gmx.us> References: <87shfia3qm.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duezk-00015r-Uv for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 09:26:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dueya-0001Fm-Ui for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 09:24:52 -0400 Received: from [195.159.176.226] (port=41445 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dueyP-00011O-9b for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 09:23:38 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1duame-000812-N9 for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 10:55:04 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Carsten Dominik writes: > That may be so, but I find that unfortunate. I am really using this > feature often. > > I will go back and take a look at this thread. Can someone tell me what > the subject line of that thread was? I think it’s this one. Subject: setting local variables Date: Thu, 07 Sep 2017 14:48:03 +0200 (and earlier) Rasmus -- May the Force be with you From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Add ability to force-enable TOC Date: Wed, 20 Sep 2017 10:40:42 +0000 Message-ID: References: <87shfia3qm.fsf@nicolasgoaziou.fr> <87h8vya2c3.fsf@nicolasgoaziou.fr> <8760cdacpl.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403045eaeaa6073ba05599c9c10" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dufEY-0005HB-VV for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 09:40:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dufEW-0003ix-PR for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 09:40:09 -0400 Received: from mail-yw0-x233.google.com ([2607:f8b0:4002:c05::233]:45515) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dufEW-0003iW-J8 for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 09:40:08 -0400 Received: by mail-yw0-x233.google.com with SMTP id q80so1906745ywg.2 for ; Wed, 20 Sep 2017 06:40:08 -0700 (PDT) In-Reply-To: <8760cdacpl.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: Carsten Dominik , emacs-org list --f403045eaeaa6073ba05599c9c10 Content-Type: text/plain; charset="UTF-8" On Wed, Sep 20, 2017, 6:25 AM Nicolas Goaziou wrote: > I didn't say it was an unusual case. I said it didn't cover all the > use-cases. Maybe you are really needing a subset of the initial feature. > Understood. IOW, do mixed numbered/unnumbered headings make sense in TOC? > Correct. That does not make sense to me. That is not my use case. >> 1. it makes all export back-ends consistent with TOC; > >> > > > > I understand that. But would like a way to get back the earlier behavior > > too. > > Then there is the other way around: how do we tell LaTeX to include both > numbered and unnumbered headings? > I see your point. AFAICT, this doesn't solve any of the two concerns. What we can do for > "num:nil toc:4" can be done for "num:nil" alone. > That might work.. treat num:nil differently than num:0 So here's the summary as per my understanding. Currently we support these: 1. Don't allow a mix of numbered and unnumbered headings in TOC. If any heading is unnumbered using the UNNUMBERED property, remove it from the TOC. 2. If we globally unnumber headings beyond a certain level by doing something like num:3, don't show headings beyond that level in the TOC. So num:0 wouldn't number any heading and also not generate the TOC. Now the 3rd use case (mine): 3. Unnumber all headings, but still keep them in TOC. So allow this 3rd use case when, may be, we have num:nil and not num:0? WDYT? @Carsten: Does this satisfy your use case too? > -- Kaushal Modi --f403045eaeaa6073ba05599c9c10 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Sep 20, 2017, 6:25 AM N= icolas Goaziou <mail@nicolasgo= aziou.fr> wrote:
I didn't say it was an unusual case. I said it didn't cover all the=
use-cases. Maybe you are really needing a subset of the initial feature.

Understood.=C2=A0

IOW, do mixed numbered/unnumbered headings make sense in TOC?

Correct. That does not make sense to me. That = is not my use case.=C2=A0

>> 1. it makes all export back-ends cons= istent with TOC;
>>
>
>=C2=A0 I understand that. But would like a way to get back the earlier = behavior
> too.

Then there is the other way around: how do we tell LaTeX to include both numbered and unnumbered headings?

I see your point.=C2=A0

AFAICT, this doesn't solve any of the two c= oncerns. What we can do for
"num:nil toc:4" can be done for "num:nil" alone.

That might work.. treat num:nil differe= ntly than num:0

So here's the summary as per m= y understanding.
=C2=A0
Currently we support these:

1. Don't allow a mix of numbered and unnumbered h= eadings in TOC. If any heading is unnumbered using the UNNUMBERED property,= remove it from the TOC.=C2=A0

2. If we globally u= nnumber headings beyond a certain level by doing something like num:3, don&= #39;t show headings beyond that level in the TOC. So num:0 wouldn't num= ber any heading and also not generate the TOC.=C2=A0

Now the 3rd use case (mine):

3. Unnumber all he= adings, but still keep them in TOC.=C2=A0

So allow= this 3rd use case when, may be, we have num:nil and not num:0?
<= br>
WDYT?=C2=A0

@Carsten: Does this sati= sfy your use case too?
--

Kaushal Modi

--f403045eaeaa6073ba05599c9c10-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Add ability to force-enable TOC Date: Wed, 20 Sep 2017 16:15:51 +0200 Message-ID: <87377hpiaw.fsf@gmx.us> References: <87shfia3qm.fsf@nicolasgoaziou.fr> <878th9rbt9.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dufnQ-0004ho-Dw for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 10:16:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dufnM-0005p9-EX for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 10:16:12 -0400 Received: from [195.159.176.226] (port=43629 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dufnM-0005oE-7T for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 10:16:08 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dufn7-0000tl-9E for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 16:15:53 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Rasmus writes: > IMO, this behavior should be reverted in maint as it would be nice to > include 9.1 in the next version of Emacs. I misunderstood the initial report. Ignore the above. I don’t understand why, in ox-latex, "num" sets both "\setcounter{secnumdepth}{.}" and switches to "section*" and friends. Setting "\setcounter{secnumdepth}{.}" is enough to get unnumbered headlines... Rasmus -- C is for Cookie From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Add ability to force-enable TOC Date: Wed, 20 Sep 2017 10:04:43 +0000 Message-ID: References: <87shfia3qm.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1140b5f484bead05599c1b83" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dufiD-0007xB-LI for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 10:10:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dufiC-0003gt-Ab for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 10:10:49 -0400 Received: from mail-yw0-x235.google.com ([2607:f8b0:4002:c05::235]:52301) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dufiC-0003gW-0S for emacs-orgmode@gnu.org; Wed, 20 Sep 2017 10:10:48 -0400 Received: by mail-yw0-x235.google.com with SMTP id i6so1965475ywc.9 for ; Wed, 20 Sep 2017 07:10:47 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Carsten Dominik , Nicolas Goaziou Cc: emacs-org list --001a1140b5f484bead05599c1b83 Content-Type: text/plain; charset="UTF-8" On Wed, Sep 20, 2017, 4:14 AM Carsten Dominik wrote: > > I will go back and take a look at this thread. Can someone tell me what > the subject line of that thread was? > http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00157.html -- Kaushal Modi --001a1140b5f484bead05599c1b83 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
= On Wed, Sep 20, 2017, 4:14 AM Carsten Dominik <dominik@uva.nl> wrote:

I will go back and take a look at this thread.=C2=A0= Can someone tell me what the subject line of that thread was?
<= /div>

--

Kaushal Modi

--001a1140b5f484bead05599c1b83-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Add ability to force-enable TOC Date: Fri, 22 Sep 2017 08:32:52 -0500 Message-ID: <87inga6epn.fsf@fastmail.fm> References: <87shfia3qm.fsf@nicolasgoaziou.fr> <87h8vya2c3.fsf@nicolasgoaziou.fr> <8760cdacpl.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvO4g-0006Hx-Cs for emacs-orgmode@gnu.org; Fri, 22 Sep 2017 09:32:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvO4d-0003IW-OA for emacs-orgmode@gnu.org; Fri, 22 Sep 2017 09:32:58 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:53231) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dvO4d-0003Fb-HP for emacs-orgmode@gnu.org; Fri, 22 Sep 2017 09:32:55 -0400 In-Reply-To: (Kaushal Modi's message of "Wed, 20 Sep 2017 10:40:42 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Kaushal Modi Cc: Carsten Dominik , emacs-org list , Nicolas Goaziou Kaushal Modi writes: > On Wed, Sep 20, 2017, 6:25 AM Nicolas Goaziou > wrote: > > I didn't say it was an unusual case. I said it didn't cover all > the use-cases. Maybe you are really needing a subset of the > initial feature. > > Understood. > > IOW, do mixed numbered/unnumbered headings make sense in TOC? > > Correct. That does not make sense to me. That is not my use case. I support the use case of unnumbered table of contents. In addition (although this is probably too much of a corner case to support officially in Org Mode), it is common in the U.S. to use a mix of numbered and unnumbered headings in books. One accomplishes this in LaTeX with the following: --8<---------------cut here---------------start------------->8--- \tableofcontents \chapter*{Introduction} \addcontentsline{toc}{chapter}{Introduction} \chapter{A Chapter} \chapter{Another Chapter} \chapter*{Conclusion} \addcontentsline{toc}{chapter}{Introduction} --8<---------------cut here---------------end--------------->8--- The resulting Table of Contents looks like this... Introduction 3 1 A Chapter 5 2 Another Chapter 7 Conclusion 9 Best, Matt