org-make-toc icon indicating copy to clipboard operation
org-make-toc copied to clipboard

Does not support multiple headings having the same name

Open quarkQuark opened this issue 2 years ago • 1 comments

When used in a file where two or more headings have the same name, the generated links use the same reference for each. For example, running org-make-toc on

* Heading
* Heading

gives

- [[#heading][Heading]]
- [[#heading][Heading]]

Instead, it should generate something like

- [[#heading-1[Heading]]
- [[#heading-2][Heading]]

quarkQuark avatar Aug 28 '22 19:08 quarkQuark

It's not quite that simple. There are two "backends" supported: Org's in-Emacs rendering, and GitHub's org-ruby-based renderer. This package does not give headings anchor IDs, it only generates links to the anchors that are expected to be given to the headings by the backends. So if we added numbers to uniqify the links, what anchors would they point to, since those are out of our control?

alphapapa avatar Aug 29 '22 09:08 alphapapa