From mboxrd@z Thu Jan 1 00:00:00 1970 From: "D. C. Toedt" Subject: TOC local for specified heading and its subheadings - now broken? Date: Mon, 30 Jul 2018 15:48:40 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000000f27ec0572389152" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fk9UC-0002pf-3z for emacs-orgmode@gnu.org; Mon, 30 Jul 2018 10:49:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fk9UA-0000N5-MB for emacs-orgmode@gnu.org; Mon, 30 Jul 2018 10:49:24 -0400 Received: from mail-yb0-x234.google.com ([2607:f8b0:4002:c09::234]:47006) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fk9UA-0000Ms-CI for emacs-orgmode@gnu.org; Mon, 30 Jul 2018 10:49:22 -0400 Received: by mail-yb0-x234.google.com with SMTP id c3-v6so4831067ybi.13 for ; Mon, 30 Jul 2018 07:49:21 -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-orgmode@gnu.org --0000000000000f27ec0572389152 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 1. In November 2015, Sacha Chua very kindly put together a patch to allow the following: > # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The next line is the desired fe= ature: Generate a TOC list (with links) of *all subheadings in the specified heading * > *#+TOC: headlines 1 local ConfInfoClauses * 2. Nicholas subsequently proposed modifying the syntax: #+toc: headlines 1 :headline #headline > or > *#+toc: headlines 1 :target #headline* > since TOC keywords always refer to headlines. 3. Sacha's patch appears to have been applied to ox-html.el for a couple of years now =E2=80=94 but it doesn't seem to work anymore, regardless of the = syntax used. I've tried it on my main file, and also on a small test file, as follows: #+TITLE: Test of subTOC for specified headline * Section 1 :PROPERTIES: :CUSTOM_ID: SectionOne :END: ** Section 1.1 :PROPERTIES: :CUSTOM_ID: SecOneOne :END: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam interdum dui eu commodo sodales. Nunc ac pulvinar augue. Suspendisse sagittis tempus aliquet. Ut placerat, magna quis blandit pretium, risus libero maximus dui, non sollicitudin ligula orci non massa. Morbi bibendum facilisis elit a congue. Suspendisse blandit iaculis quam, sed molestie leo. Nulla porttitor leo eu urna fermentum pretium. In congue nulla laoreet nunc accumsan, vel malesuada lacus porta. Praesent vulputate arcu lectus, vitae tincidunt elit laoreet eget. Suspendisse lobortis nibh sed est scelerisque imperdiet. ** Another section: 1.2 :PROPERTIES: :CUSTOM_ID: SecOneTwo :END: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam interdum dui eu commodo sodales. Nunc ac pulvinar augue. Suspendisse sagittis tempus aliquet. Ut placerat, magna quis blandit pretium, risus libero maximus dui, non sollicitudin ligula orci non massa. Morbi bibendum facilisis elit a congue. Suspendisse blandit iaculis quam, sed molestie leo. Nulla porttitor leo eu urna fermentum pretium. In congue nulla laoreet nunc accumsan, vel malesuada lacus porta. Praesent vulputate arcu lectus, vitae tincidunt elit laoreet eget. Suspendisse lobortis nibh sed est scelerisque imperdiet. * Next top-level section: Two :PROPERTIES: :CUSTOM_ID: SecTwo :END: The next portion should be a sub-TOC for Section 1: #+TOC: headlines 2 :target #SectionOne But what it produces is a complete table of contents. So let's try adding "local" as a keyword: #+TOC: headlines 2 local :target #SectionOne But that produces no TOC at all. I've got GNU Emacs 26.1 (9.0) installed for Mac OS and the 2018-07-23 update of org-mode. Any suggestions? D. C. Toedt III Attorney & neutral arbitrator =E2=80=94 tech contracts & = IP *(My last name is pronounced "Tate") *Houston, Texas, USA O: +1 (713) 364-6545 C: +1 (713) 516-8968 dc@toedt.com @dctoedt Skype: dctoedt www.OnContracts.com/About Unless expressly stated otherwise, this message is not intended to serve as assent to an agreement or other document, even if attached to this message. --0000000000000f27ec0572389152 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
= 1. In Novembe= r 2015, Sacha Chua very kindly put together a patch to allow the following:=

= > # =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The next line is the desired feature:=C2= =A0=C2=A0Generate a TOC list (with links) of all subheadings in the sp= ecified heading=C2=A0
> #+TOC: headl= ines 1 local ConfInfoClauses=C2=A0

=

2. Nicholas subseque= ntly proposed modifying the syntax:

=C2=A0 #+toc: headli= nes 1 :headline #headline
or=C2=A0
=C2=A0 #+toc: headlines 1 :target #headline<= font color=3D"#000000" face=3D"arial, helvetica, sans-serif">
since TOC keywor= ds always refer to headlines.


3. Sacha's patc= h appears to have been applied to ox-html.el for a couple of years now =E2= =80=94 but it doesn't seem to work anymore, regardless of the syntax us= ed.=C2=A0

I= 9;ve tried it on my main file, and also on a small test file, as follows:

#+TITLE: Test of subTOC for specif= ied headline
<= div class=3D"gmail_default" style=3D"">
* Sec= tion 1
=C2=A0 :PROPERTIES:=C2=A0
=C2=A0 :CUSTOM_ID: SectionOne
=C2=A0 := END:

** Section 1.= 1
=C2=A0 :PROPERTIES:=C2=A0
<= /div>
=C2=A0 :CUSTOM_ID: SecOneOne
=C2=A0 :END:= =C2=A0


Lorem ipsum dolor sit amet, consectetur adipiscing el= it. Nullam interdum dui eu commodo sodales. Nunc ac pulvinar augue. Suspend= isse sagittis tempus aliquet. Ut placerat, magna quis blandit pretium, risu= s libero maximus dui, non sollicitudin ligula orci non massa. Morbi bibendu= m facilisis elit a congue. Suspendisse blandit iaculis quam, sed molestie l= eo. Nulla porttitor leo eu urna fermentum pretium. In congue nulla laoreet = nunc accumsan, vel malesuada lacus porta. Praesent vulputate arcu lectus, v= itae tincidunt elit laoreet eget. Suspendisse lobortis nibh sed est sceleri= sque imperdiet.

**= Another section: 1.2
=
=C2=A0 :PROPERTIES:=C2=A0
=C2=A0 :CUSTOM_ID: SecOneTwo
=C2=A0 :END:=C2=A0

<= /div>

<= div class=3D"gmail_default" style=3D"">Lorem ipsum dolor sit amet, consecte= tur adipiscing elit. Nullam interdum dui eu commodo sodales. Nunc ac pulvin= ar augue. Suspendisse sagittis tempus aliquet. Ut placerat, magna quis blan= dit pretium, risus libero maximus dui, non sollicitudin ligula orci non mas= sa. Morbi bibendum facilisis elit a congue. Suspendisse blandit iaculis qua= m, sed molestie leo. Nulla porttitor leo eu urna fermentum pretium. In cong= ue nulla laoreet nunc accumsan, vel malesuada lacus porta. Praesent vulputa= te arcu lectus, vitae tincidunt elit laoreet eget. Suspendisse lobortis nib= h sed est scelerisque imperdiet.

* Next top-level section: Two
=C2= =A0 :PROPERTIES:=C2=A0
=C2=A0 :CUSTOM_ID: SecTwo<= /div>
=C2=A0 :END:

The next portion should be a sub-TOC for Section 1:<= /div>

#+TOC: headlines 2= :target #SectionOne
<= div class=3D"gmail_default">

But what it produces is a complete table of contents.
=

<= div class=3D"gmail_default" style=3D"">So let's try adding "local&= quot; as a keyword:

=
#+TOC: headlines 2 local=C2=A0 :target #SectionOne

But that produces no TOC at all.=C2= =A0

I've got GNU Emac= s 26.1 (9.0) installed for Mac OS and the 2018-07-23 update of org-mode.=C2= =A0=C2=A0

Any suggestions?

D. C. Toedt III= =C2=A0 =C2=A0Attorney=C2=A0& neutral arbitrator=C2=A0= =E2=80=94 tech contracts & IP=C2=A0
(My last name is pronoun= ced "Tate")=C2=A0=C2=A0Hou= ston, Texas, USA=C2=A0=C2=A0
O:=C2=A0<= span title=3D"Call with Google Voice" style=3D"color:rgb(153,153,153);font-= family:verdana,sans-serif;font-size:x-small">+1 (713) 364-6545= =C2=A0 =C2=A0C= :=C2=A0+1 (713) 516-8968
=C2=A0=C2=A0
dc@toedt= .com=C2=A0 =C2=A0=C2=A0@dctoedt<= font size=3D"1">=C2=A0 =C2=A0
Skype: dctoedt
=C2=A0=C2=A0
www.OnCon= tracts.com/About=C2=A0=C2=A0
=
Unl= ess expressly stated otherwise, this message=C2=A0is not intended=C2=A0to serve
as
assent to an agreement=C2=A0or other document, = even if=C2=A0at= tached to this message.



=
=
--0000000000000f27ec0572389152--