snosov1 / toc-org

toc-org is an Emacs utility to have an up-to-date table of contents in the org files without exporting (useful primarily for readme files on GitHub)
GNU General Public License v3.0
286 stars 29 forks source link

Headers with non-unique names are not handled properly #17

Closed snosov1 closed 8 years ago

snosov1 commented 8 years ago

Reported by @dvcrn in #1

We have 2 issues related to header uniqueness:

  1. GitHub seems to be appending numbers (i.e. messagelist-1 to distinct between headers with the same name). toc-org doesn't do this. See #16
  2. Internal org linking also jumps only to the first appearance of the heading because toc-org simply uses text search for that.

Example:

snosov1 commented 8 years ago

First problem was also reported as #16 (and fixed).

The 2nd problem doesn't seem to have an "native" org solution, so I'll close this as "won't fix". (If you issue org-store-link on the duplicate header and use org-insert-link afterwards, it will generate the same link toc-org would, i.e. it offers no means to solve the ambiguity)