Closed wowhxj closed 3 years ago
Hello,
I cannot obviously have the same #+hugo_base_dir
as in your example, but I tried this and it worked
#+hugo_base_dir: ./dir name with space/
#+macro: issue =ox-hugo= Issue #[[https://github.com/kaushalmodi/ox-hugo/issues/$1][$1]]
* Blog Ideas
** TODO my first blog
:PROPERTIES:
:EXPORT_FILE_NAME: my-first-blog
:END:
{{{issue(436)}}}
this is the first one.
I believe you are seeing this issue because of that warning:
Warning: Possible mixed installation of Org
The fix would be to clean up your Org installation so that you don't have a mix of very old and very new Org versions. E.g. you don't need /Applications/Emacs.app/Contents/Resources/lisp/org/
at all as you are installing the latest Org from Elpa. You can update your load-paths so that that old path doesn't get loaded at all. Alternatively, you can just delete that old dir (/Applications/Emacs.app/Contents/Resources/lisp/org/
), restart Emacs, and see if you still see this same issue (you should not 🤞 ).
Hello,
I cannot obviously have the same
#+hugo_base_dir
as in your example, but I tried this and it worked#+hugo_base_dir: ./dir name with space/ #+macro: issue =ox-hugo= Issue #[[https://github.com/kaushalmodi/ox-hugo/issues/$1][$1]] * Blog Ideas ** TODO my first blog :PROPERTIES: :EXPORT_FILE_NAME: my-first-blog :END: {{{issue(436)}}} this is the first one.
I believe you are seeing this issue because of that warning:
Warning: Possible mixed installation of Org
The fix would be to clean up your Org installation so that you don't have a mix of very old and very new Org versions. E.g. you don't need
/Applications/Emacs.app/Contents/Resources/lisp/org/
at all as you are installing the latest Org from Elpa. You can update your load-paths so that that old path doesn't get loaded at all. Alternatively, you can just delete that old dir (/Applications/Emacs.app/Contents/Resources/lisp/org/
), restart Emacs, and see if you still see this same issue (you should not 🤞 ).
Hi,
Thanks for the reply. I tried your advice by deleting /Applications/Emacs.app/Contents/Resources/lisp/org/
directory.
After that, I restarted Emacs and tried to export again. Still FAILED.
Then, I tried to delete all my config and packages except org, ox-hugo and tried again. This time Succeed.
The problem must be some config issure or package conflict. I'll add packages one by one and try to figure out what is going on here. Would leave this issue open for a while.
After tried one package by one package, finally I found the problem.
In my exporting config, I changed org-export-backends
to (html pandoc) as following:
(use-package ox
:ensure nil
:after org
:custom
(org-export-with-toc t)
(org-export-with-tags 'not-in-toc)
(org-export-with-email t)
(org-export-with-author t)
(org-export-with-drawers nil)
(org-export-with-priority t)
(org-export-with-footnotes t)
(org-export-with-smart-quotes t)
(org-export-with-section-numbers nil)
(org-export-with-sub-superscripts '{})
;; Use :eval never-export header argument to avoid evaluating.
(org-export-use-babel t)
(org-export-headline-levels 5)
(org-export-coding-system 'utf-8)
(org-export-with-broken-links 'mark)
(org-export-backends '(html pandoc))
)
I think that's the reason why ox-hugo cannot find the backends.
After I modified my config as following, problem resolved.
(use-package ox
:ensure nil
:after org
:config
(add-to-list 'org-export-backends 'pandoc)
:custom
(org-export-with-toc t)
(org-export-with-tags 'not-in-toc)
(org-export-with-email t)
(org-export-with-author t)
(org-export-with-drawers nil)
(org-export-with-priority t)
(org-export-with-footnotes t)
(org-export-with-smart-quotes t)
(org-export-with-section-numbers nil)
(org-export-with-sub-superscripts '{})
;; Use :eval never-export header argument to avoid evaluating.
(org-export-use-babel t)
(org-export-headline-levels 5)
(org-export-coding-system 'utf-8)
(org-export-with-broken-links 'mark)
)
Although I don't know the root cause. Maybe ox-hugo
use one of backends which is removed by me.
I'd like to share this with you. Will close this issue. Thanks again..
Maybe ox-hugo use one of backends which is removed by me.
Yes, ox-hugo backend extends from ox-md and ox-md extends from ox-html.
Unless there's a real need, I wouldn't advise that you remove any of the inbuilt Org backends.
Actual Behavior
Thanks very much for the great package.
When I tried to export a org subtree to hugo-markdown file via
C-c C-e H H
, it prompt "org-export-get-all-transcoders: Wrong type argument: org-export-backend, nil" and FAILED.I also tried to use
C-c C-e H h
to export file to markdown and it SUCCEEDED.Expected Behavior
It should succeed exporting a org subtree to/content/posts/xxx.md file.
How to Reproduce the Issue
With the following example org file and config.
My ox-hugo config:
Example Org File
Emacs lisp debug backtrace
Ox-Hugo Debug Information
I'm sorry after I did following two steps, i couldn't find any debug information between
</summary>
and</details>
.I'll paste all I got after I executed
M-x org-hugo-debug-info
below.Debug information for
ox-hugo
Emacs Version
Org Version
Hugo Version
Org
load-path
shadowsWarning: Possible mixed installation of Org
Study the output of
M-x list-load-path-shadows
.ox-hugo
defcustoms