Thanks for the feedback. Small comments from my side now, I'll look at this in
more detail when I have more time, maybe tomorrow.

Christian Moe <[email protected]> writes:

> - It would be good to have all this code together in one place in
>   publish.sh (the add-hook line has strayed down), perhaps at the
>   current end of the file

OK

> - But in any case, perhaps an export filter added to
>   `org-export-filter-link-functions' would be a slightly cleaner
>   approach than an export hook that has to `org-element-map' over the
>   links in the buffer?

I didn't know about that, will check it out. Based on the name of the variable
it sounds like it's relevant ;)

> - What happens if retrieving the libredirect data fails for whatever
>   reason?

It totally breaks for now.

> We need to think about the description parts. See the Reddit link:
>
>   Browse _Org-mode discussions on reddit.com_ _(original URL)_
>
> Here it's actually the "(original URL)" link that points to reddit.com,
> while the link that seems to suggest it does, points to the alternative,
> which seems a bit confusing.

I agree. I will think about it a bit more. These links are few and between so
I can change the descriptions manually, but future contributions might refer
to "reddit.com" or similar and the problem will appear again. OTOH I don't
think it's too big of a deal to just ignore this slight confusion, but others
might disagree.

This also inspired a grep for reddit.com and I found org-web-social.org, which
includes an automatically generated list of links for reddit.com (based on rss
via rss.bloople.net). It generates this at export-time and it seems *after*
org-export-before-parsing-functions, so this approach doesn't convert these
links.

Thanks again!

Reply via email to