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

Add an option to automatically insert CUSTOM_ID property to entries

Open noctuid opened this issue 2 years ago • 1 comments

This will allow links to work on both Github and in Org. Fixes #20.

I only looked at the existing code briefly, but it looked like entry was only called on non-ignored headings. If that's incorrect or there is something else wrong with this approach, let me know.

noctuid avatar May 08 '22 12:05 noctuid

Any feedback on this? I am making some new packages and would like to switch to org-make-toc for my table of contents (but want links to work in the org buffer also; using custom ids better than the toc-org solution since it will work without user configuration).

noctuid avatar Jun 05 '22 17:06 noctuid

This is a nice feature and it would be really nice if it could be merged ;-)

mattiasdrp avatar Nov 24 '22 10:11 mattiasdrp

Thanks for pinging on this PR. I don't think I had noticed it yet.

This seems like a good idea, yes. I wonder if it would be even better if it were implemented as one of the link-type functions so it wouldn't need a new customization option. It could probably be just a simple function that called the github-style function and also added the custom ID.

It would also be good to handle disambiguation in case multiple headings have the same name. But I'm not sure if that should be in scope for this PR. What do you think?

Thanks.

alphapapa avatar Nov 24 '22 22:11 alphapapa

I'm not sure. I think it might be better to have it as a setting in the case that styles for other sites were added instead of having two styles for each site. Let me know if you want me to change it to a new style instead.

It would also be good to handle disambiguation in case multiple headings have the same name. But I'm not sure if that should be in scope for this PR. What do you think?

Probably something to look into later. Haven't tested to see how github handles it (or if it can correctly handle it), but I think disambiguation needs to be considered even if this PR isn't merged.

noctuid avatar Mar 13 '23 20:03 noctuid

Finally merged. Please let me know if it works for you. Thanks.

alphapapa avatar Sep 04 '23 09:09 alphapapa

Hello, sorry for the late answer. This update is perfect for my needs, thanks a lot :-)

mattiasdrp avatar Jan 18 '24 15:01 mattiasdrp

Thanks!

alphapapa avatar Jan 18 '24 20:01 alphapapa