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

2018-08-19 Thread Nicolas Goaziou
Hello,

"D. C. Toedt"  writes:

> So let's try adding "local" as a keyword:
>
> #+TOC: headlines 2 local  :target #SectionOne
>
> But that produces no TOC at all.

There is no sub-heading at the location you insert your #+TOC keyword,
so the results is expected. Try to insert it in a heading that
effectively contains sub-headings.

Regards,

-- 
Nicolas Goaziou



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

2018-07-30 Thread D. C. Toedt
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

d...@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.