Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#+begin_example block in Org-Babel #+RESULTS causes ox-hugo rendering failure #727

Open
samuelortion opened this issue Sep 6, 2023 · 1 comment

Comments

@samuelortion
Copy link

samuelortion commented Sep 6, 2023

Actual Behavior

ox-hugo complains when using a org-mode example block if inside a org-babel #+RESULTS block.

Expected Behavior

I thought this could be rendered without error as when there is only : before multiple results line..

How to Reproduce the Issue

Example Org File

#+title: Asp Solutions
#+author: Samuel Ortion
#+date: <2023-08-24 jeu.>
#+bibliography: ../references.bib
#+hugo_base_dir: ../www/

#+RESULTS:
: 10

#+begin_src pasp
child(C, P) :- parent(P, C).
parent(vader, luke).
#show child/2.
#+end_src

#+RESULTS:
#+begin_example
clingo version 5.6.2
Reading from /tmp/babel-kEapMk/clingo-4cyjcS
Solving...
Answer: 1
child(luke,vader)
SATISFIABLE

Models       : 1
Calls        : 1
Time         : 0.000s (Solving: 0.00s 1st Model: 0.00s Unsat: 0.00s)
CPU Time     : 0.000s
#+end_example

Generated Markdown File or Error

C-c C-e H H returns *** ERROR: (clingo): parsing failed [ Babel evaluation exited with code 65 ]

Ox-Hugo Debug Information

Debug Info

Debug information for ox-hugo

Emacs Version

GNU Emacs 28.2 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8)
 of 2023-06-05

Org Version

Org mode version 9.7 (9.7-??-d6f3aed @ /home/sortion/.config/emacs/.local/straight/build-28.2/org/)

Hugo Version

hugo v0.101.0+extended linux/amd64 BuildDate=unknown

Org load-path shadows

Warning: Possible mixed installation of Org

/home/sortion/.config/emacs/.local/straight/build-28.2/org/ox hides /usr/share/emacs/28.2/lisp/org/ox
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ox-texinfo hides /usr/share/emacs/28.2/lisp/org/ox-texinfo
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ox-publish hides /usr/share/emacs/28.2/lisp/org/ox-publish
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ox-org hides /usr/share/emacs/28.2/lisp/org/ox-org
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ox-odt hides /usr/share/emacs/28.2/lisp/org/ox-odt
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ox-md hides /usr/share/emacs/28.2/lisp/org/ox-md
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ox-man hides /usr/share/emacs/28.2/lisp/org/ox-man
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ox-latex hides /usr/share/emacs/28.2/lisp/org/ox-latex
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ox-koma-letter hides /usr/share/emacs/28.2/lisp/org/ox-koma-letter
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ox-icalendar hides /usr/share/emacs/28.2/lisp/org/ox-icalendar
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ox-html hides /usr/share/emacs/28.2/lisp/org/ox-html
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ox-beamer hides /usr/share/emacs/28.2/lisp/org/ox-beamer
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ox-ascii hides /usr/share/emacs/28.2/lisp/org/ox-ascii
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org hides /usr/share/emacs/28.2/lisp/org/org
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-version hides /usr/share/emacs/28.2/lisp/org/org-version
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-timer hides /usr/share/emacs/28.2/lisp/org/org-timer
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-tempo hides /usr/share/emacs/28.2/lisp/org/org-tempo
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-table hides /usr/share/emacs/28.2/lisp/org/org-table
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-src hides /usr/share/emacs/28.2/lisp/org/org-src
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-refile hides /usr/share/emacs/28.2/lisp/org/org-refile
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-protocol hides /usr/share/emacs/28.2/lisp/org/org-protocol
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-plot hides /usr/share/emacs/28.2/lisp/org/org-plot
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-pcomplete hides /usr/share/emacs/28.2/lisp/org/org-pcomplete
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-num hides /usr/share/emacs/28.2/lisp/org/org-num
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-mouse hides /usr/share/emacs/28.2/lisp/org/org-mouse
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-mobile hides /usr/share/emacs/28.2/lisp/org/org-mobile
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-macs hides /usr/share/emacs/28.2/lisp/org/org-macs
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-macro hides /usr/share/emacs/28.2/lisp/org/org-macro
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-loaddefs hides /usr/share/emacs/28.2/lisp/org/org-loaddefs
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-list hides /usr/share/emacs/28.2/lisp/org/org-list
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-lint hides /usr/share/emacs/28.2/lisp/org/org-lint
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-keys hides /usr/share/emacs/28.2/lisp/org/org-keys
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-inlinetask hides /usr/share/emacs/28.2/lisp/org/org-inlinetask
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-indent hides /usr/share/emacs/28.2/lisp/org/org-indent
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-id hides /usr/share/emacs/28.2/lisp/org/org-id
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-habit hides /usr/share/emacs/28.2/lisp/org/org-habit
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-goto hides /usr/share/emacs/28.2/lisp/org/org-goto
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-footnote hides /usr/share/emacs/28.2/lisp/org/org-footnote
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-feed hides /usr/share/emacs/28.2/lisp/org/org-feed
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-faces hides /usr/share/emacs/28.2/lisp/org/org-faces
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-entities hides /usr/share/emacs/28.2/lisp/org/org-entities
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-element hides /usr/share/emacs/28.2/lisp/org/org-element
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-duration hides /usr/share/emacs/28.2/lisp/org/org-duration
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-datetree hides /usr/share/emacs/28.2/lisp/org/org-datetree
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-ctags hides /usr/share/emacs/28.2/lisp/org/org-ctags
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-crypt hides /usr/share/emacs/28.2/lisp/org/org-crypt
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-compat hides /usr/share/emacs/28.2/lisp/org/org-compat
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-colview hides /usr/share/emacs/28.2/lisp/org/org-colview
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-clock hides /usr/share/emacs/28.2/lisp/org/org-clock
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-capture hides /usr/share/emacs/28.2/lisp/org/org-capture
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-attach hides /usr/share/emacs/28.2/lisp/org/org-attach
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-attach-git hides /usr/share/emacs/28.2/lisp/org/org-attach-git
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-archive hides /usr/share/emacs/28.2/lisp/org/org-archive
/home/sortion/.config/emacs/.local/straight/build-28.2/org/org-agenda hides /usr/share/emacs/28.2/lisp/org/org-agenda
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ol hides /usr/share/emacs/28.2/lisp/org/ol
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ol-w3m hides /usr/share/emacs/28.2/lisp/org/ol-w3m
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ol-rmail hides /usr/share/emacs/28.2/lisp/org/ol-rmail
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ol-mhe hides /usr/share/emacs/28.2/lisp/org/ol-mhe
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ol-man hides /usr/share/emacs/28.2/lisp/org/ol-man
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ol-irc hides /usr/share/emacs/28.2/lisp/org/ol-irc
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ol-info hides /usr/share/emacs/28.2/lisp/org/ol-info
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ol-gnus hides /usr/share/emacs/28.2/lisp/org/ol-gnus
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ol-eww hides /usr/share/emacs/28.2/lisp/org/ol-eww
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ol-eshell hides /usr/share/emacs/28.2/lisp/org/ol-eshell
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ol-doi hides /usr/share/emacs/28.2/lisp/org/ol-doi
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ol-docview hides /usr/share/emacs/28.2/lisp/org/ol-docview
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ol-bibtex hides /usr/share/emacs/28.2/lisp/org/ol-bibtex
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ol-bbdb hides /usr/share/emacs/28.2/lisp/org/ol-bbdb
/home/sortion/.config/emacs/.local/straight/build-28.2/org/oc hides /usr/share/emacs/28.2/lisp/org/oc
/home/sortion/.config/emacs/.local/straight/build-28.2/org/oc-natbib hides /usr/share/emacs/28.2/lisp/org/oc-natbib
/home/sortion/.config/emacs/.local/straight/build-28.2/org/oc-csl hides /usr/share/emacs/28.2/lisp/org/oc-csl
/home/sortion/.config/emacs/.local/straight/build-28.2/org/oc-biblatex hides /usr/share/emacs/28.2/lisp/org/oc-biblatex
/home/sortion/.config/emacs/.local/straight/build-28.2/org/oc-basic hides /usr/share/emacs/28.2/lisp/org/oc-basic
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob hides /usr/share/emacs/28.2/lisp/org/ob
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-tangle hides /usr/share/emacs/28.2/lisp/org/ob-tangle
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-table hides /usr/share/emacs/28.2/lisp/org/ob-table
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-sqlite hides /usr/share/emacs/28.2/lisp/org/ob-sqlite
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-sql hides /usr/share/emacs/28.2/lisp/org/ob-sql
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-shell hides /usr/share/emacs/28.2/lisp/org/ob-shell
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-sed hides /usr/share/emacs/28.2/lisp/org/ob-sed
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-screen hides /usr/share/emacs/28.2/lisp/org/ob-screen
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-scheme hides /usr/share/emacs/28.2/lisp/org/ob-scheme
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-sass hides /usr/share/emacs/28.2/lisp/org/ob-sass
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-ruby hides /usr/share/emacs/28.2/lisp/org/ob-ruby
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-ref hides /usr/share/emacs/28.2/lisp/org/ob-ref
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-python hides /usr/share/emacs/28.2/lisp/org/ob-python
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-processing hides /usr/share/emacs/28.2/lisp/org/ob-processing
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-plantuml hides /usr/share/emacs/28.2/lisp/org/ob-plantuml
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-perl hides /usr/share/emacs/28.2/lisp/org/ob-perl
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-org hides /usr/share/emacs/28.2/lisp/org/ob-org
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-octave hides /usr/share/emacs/28.2/lisp/org/ob-octave
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-ocaml hides /usr/share/emacs/28.2/lisp/org/ob-ocaml
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-maxima hides /usr/share/emacs/28.2/lisp/org/ob-maxima
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-matlab hides /usr/share/emacs/28.2/lisp/org/ob-matlab
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-makefile hides /usr/share/emacs/28.2/lisp/org/ob-makefile
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-lua hides /usr/share/emacs/28.2/lisp/org/ob-lua
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-lob hides /usr/share/emacs/28.2/lisp/org/ob-lob
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-lisp hides /usr/share/emacs/28.2/lisp/org/ob-lisp
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-lilypond hides /usr/share/emacs/28.2/lisp/org/ob-lilypond
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-latex hides /usr/share/emacs/28.2/lisp/org/ob-latex
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-julia hides /usr/share/emacs/28.2/lisp/org/ob-julia
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-js hides /usr/share/emacs/28.2/lisp/org/ob-js
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-java hides /usr/share/emacs/28.2/lisp/org/ob-java
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-haskell hides /usr/share/emacs/28.2/lisp/org/ob-haskell
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-groovy hides /usr/share/emacs/28.2/lisp/org/ob-groovy
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-gnuplot hides /usr/share/emacs/28.2/lisp/org/ob-gnuplot
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-fortran hides /usr/share/emacs/28.2/lisp/org/ob-fortran
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-forth hides /usr/share/emacs/28.2/lisp/org/ob-forth
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-exp hides /usr/share/emacs/28.2/lisp/org/ob-exp
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-eval hides /usr/share/emacs/28.2/lisp/org/ob-eval
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-eshell hides /usr/share/emacs/28.2/lisp/org/ob-eshell
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-emacs-lisp hides /usr/share/emacs/28.2/lisp/org/ob-emacs-lisp
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-dot hides /usr/share/emacs/28.2/lisp/org/ob-dot
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-ditaa hides /usr/share/emacs/28.2/lisp/org/ob-ditaa
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-css hides /usr/share/emacs/28.2/lisp/org/ob-css
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-core hides /usr/share/emacs/28.2/lisp/org/ob-core
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-comint hides /usr/share/emacs/28.2/lisp/org/ob-comint
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-clojure hides /usr/share/emacs/28.2/lisp/org/ob-clojure
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-calc hides /usr/share/emacs/28.2/lisp/org/ob-calc
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-awk hides /usr/share/emacs/28.2/lisp/org/ob-awk
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-R hides /usr/share/emacs/28.2/lisp/org/ob-R
/home/sortion/.config/emacs/.local/straight/build-28.2/org/ob-C hides /usr/share/emacs/28.2/lisp/org/ob-C

Study the output of M-x list-load-path-shadows.

ox-hugo defcustoms

org-hugo-section “posts”
org-hugo-use-code-for-kbd nil
org-hugo-preserve-filling t
org-hugo-delete-trailing-ws t
org-hugo-prefer-hyphen-in-tags t
org-hugo-allow-spaces-in-tags t
org-hugo-tag-processing-functions (org-hugo–tag-processing-fn-replace-with-spaces-maybe org-hugo–tag-processing-fn-replace-with-hyphens-maybe)
org-hugo-auto-set-lastmod nil
org-hugo-export-with-toc nil
org-hugo-export-with-section-numbers nil
org-hugo-front-matter-format “toml”
org-hugo-default-static-subdirectory-for-externals “ox-hugo”
org-hugo-external-file-extensions-allowed-for-copying (“jpg” “jpeg” “tiff” “png” “svg” “gif” “mp4” “pdf” “odt” “doc” “ppt” “xls” “docx” “pptx” “xlsx”)
org-hugo-date-format “%Y-%m-%dT%T%z”
org-hugo-paired-shortcodes “”
org-hugo-suppress-lastmod-period 0.0
org-hugo-front-matter-format “toml”

For reference: here is the home made org-babel mode I used : https://github.com/samuelortion/ob-pasp/ (It might be not following the standards).

@samuelortion samuelortion changed the title #+begin_example block in Org-Babel #+RESULTS cause ox-hugo rendering failure #+begin_example block in Org-Babel #+RESULTS causes ox-hugo rendering failure Sep 9, 2023
@mmqqdd
Copy link

mmqqdd commented Apr 30, 2024

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants