emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] TOC local for specified heading and its subheadings - now broken?


From: D. C. Toedt
Subject: [O] TOC local for specified heading and its subheadings - now broken?
Date: Mon, 30 Jul 2018 15:48:40 +0100

1. In November 2015, Sacha Chua very kindly put together a patch to allow the following:

> # ============= The next line is the desired feature:  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 — 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 — tech contracts & IP 
(My last name is pronounced "Tate")  Houston, Texas, USA  
O: +1 (713) 364-6545   C: +1 (713) 516-8968
  
address@hidden    @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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]