emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* TOC local for specified heading and its subheadings - now broken?
@ 2018-07-30 14:48 D. C. Toedt
  2018-08-19  8:21 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: D. C. Toedt @ 2018-07-30 14:48 UTC (permalink / raw)
  To: emacs-orgmode

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

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
<https://lists.gnu.org/archive/html/emacs-orgmode/2015-11/msg00697.html>
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

dc@toedt.com    @dctoedt <https://twitter.com/DCToedt>
Skype: dctoedt

www.OnContracts.com/About <http://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.

[-- Attachment #2: Type: text/html, Size: 16519 bytes --]

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

* Re: TOC local for specified heading and its subheadings - now broken?
  2018-07-30 14:48 TOC local for specified heading and its subheadings - now broken? D. C. Toedt
@ 2018-08-19  8:21 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-08-19  8:21 UTC (permalink / raw)
  To: D. C. Toedt; +Cc: emacs-orgmode

Hello,

"D. C. Toedt" <dc@toedt.com> 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

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

end of thread, other threads:[~2018-08-19  8:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-30 14:48 TOC local for specified heading and its subheadings - now broken? D. C. Toedt
2018-08-19  8:21 ` Nicolas Goaziou

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