Cannot export to hugo/markdown #9
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: tec/org-glossary#9
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi @tecosaur,
if I export to Hugo/Markdown, I get the following error:
Do you have any idea why? Exporting to LaTeX works fine.
An MWE and/or backtrace would be a huge help here. With just that message I can't do much.
Thanks for looking into it. I can reproduce it with the attached files.
20221209154813-glossary_demo.org.txt
acronyms-it-general.org.txt
glossary-it-general.org.txt
When I comment these 2 lines, I can export just fine.
Note: If I remove the acronym EmRE from the text, the export works as well.
The backtrace I get when it fails looks like:
Do you see an error when exporting with the following?
Also, which version of Org and Emacs are you running?
Yes, this produces the same mistake. The "fix" to remove the "EmRE" acronym fixes it too.
I'm using a custom build of Emacs which reports the following versions:
How can I help solve this? I saw in the code that you don't have an export function for hugo/md, so I tried to provide some, but that didn't work (probably because I don't know how to properly reload the function):
If I run the minimal example you posted (without doing any experiments) I get the following debug output:
I just tried your example again and noticed I can export to Markdown, but not to Hugo. There were problems with
org-special-block-extras
becauseox-hugo
is a derived backend: https://github.com/alhassy/org-special-block-extras/issues/12#issuecomment-1003612876I don't really know what it's doing, but maybe that helps solve the problem?
I have no idea what's going on with the hugo/
gethash
issue, however I found an issue with the specificity oforg-glossary--get-export-specs
and have a potential fix for that, I just want to see if I can make it any prettier 🙂.With this fix the example from https://github.com/tecosaur/org-glossary/issues/9#issuecomment-1359675722 with a tweaked version of your
md
export spec seems to work as we'd both hope:@authsec I've just pushed
62153ffa13
, give that a shot and let me know if you still run into any issues.@tecosaur I've tested this quite a bit now and it seems to work reliably for the MWE even if I remove the org-headings as part of the document and use
#+glossary_sources: glossary-it-general acronyms-it-general
in the header as sources of the glosses.So when exporting to Markdown, the following document works, if I execute the embedded export-spec before exporting.
However, if I change it from
'md
to'hugo
which is basically the same markdown to render in this case, I get the initial nastyhash-table-p
problem again.@kaushalmodi Do you have any idea why this is not working?
Yea, the problem with the Hugo export is that it's trying to call
org-export-custom-protocol-maybe
withoutinfo
when the glossary link export needs theinfo
.a66063a991/ox-hugo.el (L2747)
@tecosaur Thanks for spotting that! So all that's needed is pass the
info
as well to that call?For Hugo export? Yea, I think that's all that's needed 🙂
It could be good if org-glossary produced a more helpful error message or worked in a limited capacity without info, but I'm not sure when/if I'll get to that.
@tecosaur I've created a PR to fix this in
ox-hugo
, butox-hugo
CI is broken for me for a while after the org cache updates in Org 9.6. I haven't found time to understand the issue and come up with a fix for that.Hmm, if you can reliably produce an org cache related error then Ihor would probably be interested in that.