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
292 stars 29 forks source link

"No match for custom ID" #49

Closed priyadarshan closed 6 years ago

priyadarshan commented 7 years ago

Hi, I have been using toc-org daily to create TOC for blog posts.

When trying to follow a link in the sample org buffer below I get error:

org-link-search: No match for custom ID: h1-header

Sample text:

* toc :toc:

* h=Heading 1

** h1. Header
Text

** h2. Header
More text

* z=Heading 2

** z1. Header
Other text

After calling toc-org-insert-toc this is the resulting buffer:

* toc :toc:
- [[#hheading-1][h=Heading 1]]
  - [[#h1-header][h1. Header]]
  - [[#h2-header][h2. Header]]
- [[#zheading-2][z=Heading 2]]
  - [[#z1-header][z1. Header]]

* h=Heading 1

** h1. Header

Text

** h2. Header

More text

* z=Heading 2

** z1. Header

Other text

Could it be because headers contain =? Is there a workaround for this?

Thanks for toc-org.

snosov1 commented 7 years ago

Hey! Sorry for the late response - I was away for some time.

Frankly, I can't reproduce it myself. All the links seem to work fine. It might be something with org or emacs setup. I've tested on

GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9) of 2016-12-08
Org mode version 9.0.1 (9.0.1-elpa @ /home/sergei/.emacs.d/elpa/org-20161118/)

What is yours?

priyadarshan commented 7 years ago

Hi, I am using this version:

GNU Emacs 25.3.1 (amd64-portbld-freebsd11.0, GTK+ Version 3.22.15) of 2017-09-30
Org mode version 9.1.2 (9.1.2-elpaplus @ /home/priyadarshan/.emacs.d/elpa/org-plus-contrib-20171004/)

You are right. I have created a completely blank emacs.d, save MELPA setup and toc-org, and the above test case is working fine.

It must be something to do with other org settings.

Let me investigate further, I will report back.

snosov1 commented 6 years ago

I'll close this for now. Please, re-open if necessary

priyadarshan commented 6 years ago

Thank you for the help.