andras-simonyi/citeproc-org

ox-hugo won't export org-mode file to markdown when using org-ref + citeproc-org because formatter definition is void

lailamor opened this issue · 7 comments

Description

ox-hugo won't export org-mode file to markdown when using org-ref + citeproc-org because formatter definition is void.

Replication

  1. Create hugo blog.

     hugo new site blog
    
  2. Create main org file blog/blog.org. Add below to blog.org

blog.org

#+AUTHOR: Me

#+STARTUP: content

#+HUGO_BASE_DIR: .
#+HUGO_AUTO_SET_LASTMOD: t


* Posts                                                                :post:
  :PROPERTIES:
  :EXPORT_HUGO_SECTION: posts
  :END:

** Issue                                                             :@issue:

*** DONE ox-hugo won't export because formatter is void
    CLOSED: [2020-10-01 Mon 02:08]
    :PROPERTIES:
    :EXPORT_DATE: 2020-10-01
    :EXPORT_FILE_NAME: issue
    :END:

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec hendrerit
    tempor tellus. Donec pretium posuere tellus. Proin quam nisl, tincidunt et,
    mattis eget, convallis nec, purus. Cum sociis natoque penatibus et magnis
    dis parturient montes, nascetur ridiculus mus. Nulla posuere. Donec vitae
    dolor. Nullam tristique diam non turpis. Cras placerat accumsan
    nulla. Nullam rutrum. Nam vestibulum accumsan nisl. cite:dominik-2010-tom7rm

* References
bibliography:static/references.bib

  1. Create bibtex file in blog/static/references.bib. Add below do references.bib.
references.bib
@book{dominik-2010-tom7rm,
    author = {Dominik, Carsten},
    publisher = {Network Theory Ltd},
    title = {{The Org Mode 7 Reference Manual}},
    url = {https://web.archive.org/web/20160426062148/http://www.network-theory.co.uk/org/manual},
    year = {2010}
}

  1. Open blog.org and run export to hugo markdown compatible file (e.g. C-c C-e H A). See Emacs Messages buffer.

Error stack

  • When trying to create a post with org-ref citations and exporting it (with C-c C-e H A).

    [ox-hugo] 1/ Exporting ‘ox-hugo won't export because formatter is void’ ..
    citeproc-formatter-for-format: Symbol’s function definition is void: formatter
    

Other comments

I didn't have this issue before. I've made some updates and also switched to using Emacs 28.0.50 feature/native-comp branch; no idea if it's related.

Debug information

Debug Info

Emacs Version

GNU Emacs 28.0.50 (feature/native-comp, build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.17.3)
 of 2020-09-24 (commit e5b052d60d905209c6cefcf18c620167ed946301)

Org Version

Org mode version N/A (N/A !!check installation!! @ /home/lailamor/.emacs.d/straight/build/org/)

citeproc-el version

citeproc-el                0.1.2-2-g0ad1f97           0   0 ~/.emacs.d/straight/repos/citeproc-el/

citeproc-org version

citeproc-org               0.2.4-25-g22a759c          0   0 ~/.emacs.d/straight/repos/citeproc-org/    

org-ref version

org-ref                   v1.1.1-431-g71f4eb7         0   0 ~/.emacs.d/straight/repos/org-ref/

Hugo Version

Hugo Static Site Generator v0.75.1/extended linux/amd64 BuildDate: unknown

Org load-path shadows

Warning: Possible mixed installation of Org

/home/lailamor/.emacs.d/straight/build/org/ox-beamer hides /usr/share/emacs/28.0.50/lisp/org/ox-beamer
/home/lailamor/.emacs.d/straight/build/org/ox-icalendar hides /usr/share/emacs/28.0.50/lisp/org/ox-icalendar
/home/lailamor/.emacs.d/straight/build/org/ob-stan hides /usr/share/emacs/28.0.50/lisp/org/ob-stan
/home/lailamor/.emacs.d/straight/build/org/ob-sed hides /usr/share/emacs/28.0.50/lisp/org/ob-sed
/home/lailamor/.emacs.d/straight/build/org/ob-clojure hides /usr/share/emacs/28.0.50/lisp/org/ob-clojure
/home/lailamor/.emacs.d/straight/build/org/ob-core hides /usr/share/emacs/28.0.50/lisp/org/ob-core
/home/lailamor/.emacs.d/straight/build/org/org-colview hides /usr/share/emacs/28.0.50/lisp/org/org-colview
/home/lailamor/.emacs.d/straight/build/org/ob-js hides /usr/share/emacs/28.0.50/lisp/org/ob-js
/home/lailamor/.emacs.d/straight/build/org/ol-mhe hides /usr/share/emacs/28.0.50/lisp/org/ol-mhe
/home/lailamor/.emacs.d/straight/build/org/org-macro hides /usr/share/emacs/28.0.50/lisp/org/org-macro
/home/lailamor/.emacs.d/straight/build/org/ob-org hides /usr/share/emacs/28.0.50/lisp/org/ob-org
/home/lailamor/.emacs.d/straight/build/org/ol-w3m hides /usr/share/emacs/28.0.50/lisp/org/ol-w3m
/home/lailamor/.emacs.d/straight/build/org/ox-publish hides /usr/share/emacs/28.0.50/lisp/org/ox-publish
/home/lailamor/.emacs.d/straight/build/org/org-clock hides /usr/share/emacs/28.0.50/lisp/org/org-clock
/home/lailamor/.emacs.d/straight/build/org/ob-makefile hides /usr/share/emacs/28.0.50/lisp/org/ob-makefile
/home/lailamor/.emacs.d/straight/build/org/ol-bibtex hides /usr/share/emacs/28.0.50/lisp/org/ol-bibtex
/home/lailamor/.emacs.d/straight/build/org/org-faces hides /usr/share/emacs/28.0.50/lisp/org/org-faces
/home/lailamor/.emacs.d/straight/build/org/ob-ebnf hides /usr/share/emacs/28.0.50/lisp/org/ob-ebnf
/home/lailamor/.emacs.d/straight/build/org/org-keys hides /usr/share/emacs/28.0.50/lisp/org/org-keys
/home/lailamor/.emacs.d/straight/build/org/ob-emacs-lisp hides /usr/share/emacs/28.0.50/lisp/org/ob-emacs-lisp
/home/lailamor/.emacs.d/straight/build/org/ox-org hides /usr/share/emacs/28.0.50/lisp/org/ox-org
/home/lailamor/.emacs.d/straight/build/org/ob-lilypond hides /usr/share/emacs/28.0.50/lisp/org/ob-lilypond
/home/lailamor/.emacs.d/straight/build/org/ob-ditaa hides /usr/share/emacs/28.0.50/lisp/org/ob-ditaa
/home/lailamor/.emacs.d/straight/build/org/org-compat hides /usr/share/emacs/28.0.50/lisp/org/org-compat
/home/lailamor/.emacs.d/straight/build/org/org-loaddefs hides /usr/share/emacs/28.0.50/lisp/org/org-loaddefs
/home/lailamor/.emacs.d/straight/build/org/ob-dot hides /usr/share/emacs/28.0.50/lisp/org/ob-dot
/home/lailamor/.emacs.d/straight/build/org/ob-C hides /usr/share/emacs/28.0.50/lisp/org/ob-C
/home/lailamor/.emacs.d/straight/build/org/ob-matlab hides /usr/share/emacs/28.0.50/lisp/org/ob-matlab
/home/lailamor/.emacs.d/straight/build/org/org-macs hides /usr/share/emacs/28.0.50/lisp/org/org-macs
/home/lailamor/.emacs.d/straight/build/org/org-src hides /usr/share/emacs/28.0.50/lisp/org/org-src
/home/lailamor/.emacs.d/straight/build/org/ob-picolisp hides /usr/share/emacs/28.0.50/lisp/org/ob-picolisp
/home/lailamor/.emacs.d/straight/build/org/ox-man hides /usr/share/emacs/28.0.50/lisp/org/ox-man
/home/lailamor/.emacs.d/straight/build/org/org-archive hides /usr/share/emacs/28.0.50/lisp/org/org-archive
/home/lailamor/.emacs.d/straight/build/org/ob-hledger hides /usr/share/emacs/28.0.50/lisp/org/ob-hledger
/home/lailamor/.emacs.d/straight/build/org/org-mobile hides /usr/share/emacs/28.0.50/lisp/org/org-mobile
/home/lailamor/.emacs.d/straight/build/org/ob-comint hides /usr/share/emacs/28.0.50/lisp/org/ob-comint
/home/lailamor/.emacs.d/straight/build/org/ob-sass hides /usr/share/emacs/28.0.50/lisp/org/ob-sass
/home/lailamor/.emacs.d/straight/build/org/ol-irc hides /usr/share/emacs/28.0.50/lisp/org/ol-irc
/home/lailamor/.emacs.d/straight/build/org/ol hides /usr/share/emacs/28.0.50/lisp/org/ol
/home/lailamor/.emacs.d/straight/build/org/ob-ref hides /usr/share/emacs/28.0.50/lisp/org/ob-ref
/home/lailamor/.emacs.d/straight/build/org/org-num hides /usr/share/emacs/28.0.50/lisp/org/org-num
/home/lailamor/.emacs.d/straight/build/org/ob-python hides /usr/share/emacs/28.0.50/lisp/org/ob-python
/home/lailamor/.emacs.d/straight/build/org/ox-odt hides /usr/share/emacs/28.0.50/lisp/org/ox-odt
/home/lailamor/.emacs.d/straight/build/org/ob-java hides /usr/share/emacs/28.0.50/lisp/org/ob-java
/home/lailamor/.emacs.d/straight/build/org/org-datetree hides /usr/share/emacs/28.0.50/lisp/org/org-datetree
/home/lailamor/.emacs.d/straight/build/org/ox hides /usr/share/emacs/28.0.50/lisp/org/ox
/home/lailamor/.emacs.d/straight/build/org/ob-fortran hides /usr/share/emacs/28.0.50/lisp/org/ob-fortran
/home/lailamor/.emacs.d/straight/build/org/ob-coq hides /usr/share/emacs/28.0.50/lisp/org/ob-coq
/home/lailamor/.emacs.d/straight/build/org/org-entities hides /usr/share/emacs/28.0.50/lisp/org/org-entities
/home/lailamor/.emacs.d/straight/build/org/ox-texinfo hides /usr/share/emacs/28.0.50/lisp/org/ox-texinfo
/home/lailamor/.emacs.d/straight/build/org/ol-gnus hides /usr/share/emacs/28.0.50/lisp/org/ol-gnus
/home/lailamor/.emacs.d/straight/build/org/ox-md hides /usr/share/emacs/28.0.50/lisp/org/ox-md
/home/lailamor/.emacs.d/straight/build/org/ob-latex hides /usr/share/emacs/28.0.50/lisp/org/ob-latex
/home/lailamor/.emacs.d/straight/build/org/ol-eshell hides /usr/share/emacs/28.0.50/lisp/org/ol-eshell
/home/lailamor/.emacs.d/straight/build/org/ox-ascii hides /usr/share/emacs/28.0.50/lisp/org/ox-ascii
/home/lailamor/.emacs.d/straight/build/org/ob-lisp hides /usr/share/emacs/28.0.50/lisp/org/ob-lisp
/home/lailamor/.emacs.d/straight/build/org/ob-calc hides /usr/share/emacs/28.0.50/lisp/org/ob-calc
/home/lailamor/.emacs.d/straight/build/org/ob-table hides /usr/share/emacs/28.0.50/lisp/org/ob-table
/home/lailamor/.emacs.d/straight/build/org/org-indent hides /usr/share/emacs/28.0.50/lisp/org/org-indent
/home/lailamor/.emacs.d/straight/build/org/ob-shell hides /usr/share/emacs/28.0.50/lisp/org/ob-shell
/home/lailamor/.emacs.d/straight/build/org/ob-abc hides /usr/share/emacs/28.0.50/lisp/org/ob-abc
/home/lailamor/.emacs.d/straight/build/org/ob-R hides /usr/share/emacs/28.0.50/lisp/org/ob-R
/home/lailamor/.emacs.d/straight/build/org/ob-octave hides /usr/share/emacs/28.0.50/lisp/org/ob-octave
/home/lailamor/.emacs.d/straight/build/org/ob-plantuml hides /usr/share/emacs/28.0.50/lisp/org/ob-plantuml
/home/lailamor/.emacs.d/straight/build/org/ob-forth hides /usr/share/emacs/28.0.50/lisp/org/ob-forth
/home/lailamor/.emacs.d/straight/build/org/org-crypt hides /usr/share/emacs/28.0.50/lisp/org/org-crypt
/home/lailamor/.emacs.d/straight/build/org/org-inlinetask hides /usr/share/emacs/28.0.50/lisp/org/org-inlinetask
/home/lailamor/.emacs.d/straight/build/org/ob-processing hides /usr/share/emacs/28.0.50/lisp/org/ob-processing
/home/lailamor/.emacs.d/straight/build/org/ol-docview hides /usr/share/emacs/28.0.50/lisp/org/ol-docview
/home/lailamor/.emacs.d/straight/build/org/ob-maxima hides /usr/share/emacs/28.0.50/lisp/org/ob-maxima
/home/lailamor/.emacs.d/straight/build/org/ob-perl hides /usr/share/emacs/28.0.50/lisp/org/ob-perl
/home/lailamor/.emacs.d/straight/build/org/org-pcomplete hides /usr/share/emacs/28.0.50/lisp/org/org-pcomplete
/home/lailamor/.emacs.d/straight/build/org/ox-html hides /usr/share/emacs/28.0.50/lisp/org/ox-html
/home/lailamor/.emacs.d/straight/build/org/ol-eww hides /usr/share/emacs/28.0.50/lisp/org/ol-eww
/home/lailamor/.emacs.d/straight/build/org/org-attach-git hides /usr/share/emacs/28.0.50/lisp/org/org-attach-git
/home/lailamor/.emacs.d/straight/build/org/ob hides /usr/share/emacs/28.0.50/lisp/org/ob
/home/lailamor/.emacs.d/straight/build/org/org-id hides /usr/share/emacs/28.0.50/lisp/org/org-id
/home/lailamor/.emacs.d/straight/build/org/ob-ocaml hides /usr/share/emacs/28.0.50/lisp/org/ob-ocaml
/home/lailamor/.emacs.d/straight/build/org/ob-io hides /usr/share/emacs/28.0.50/lisp/org/ob-io
/home/lailamor/.emacs.d/straight/build/org/org-attach hides /usr/share/emacs/28.0.50/lisp/org/org-attach
/home/lailamor/.emacs.d/straight/build/org/ob-eval hides /usr/share/emacs/28.0.50/lisp/org/ob-eval
/home/lailamor/.emacs.d/straight/build/org/ob-groovy hides /usr/share/emacs/28.0.50/lisp/org/ob-groovy
/home/lailamor/.emacs.d/straight/build/org/org-protocol hides /usr/share/emacs/28.0.50/lisp/org/org-protocol
/home/lailamor/.emacs.d/straight/build/org/ob-tangle hides /usr/share/emacs/28.0.50/lisp/org/ob-tangle
/home/lailamor/.emacs.d/straight/build/org/org-footnote hides /usr/share/emacs/28.0.50/lisp/org/org-footnote
/home/lailamor/.emacs.d/straight/build/org/ob-lua hides /usr/share/emacs/28.0.50/lisp/org/ob-lua
/home/lailamor/.emacs.d/straight/build/org/org-lint hides /usr/share/emacs/28.0.50/lisp/org/org-lint
/home/lailamor/.emacs.d/straight/build/org/ob-gnuplot hides /usr/share/emacs/28.0.50/lisp/org/ob-gnuplot
/home/lailamor/.emacs.d/straight/build/org/org-timer hides /usr/share/emacs/28.0.50/lisp/org/org-timer
/home/lailamor/.emacs.d/straight/build/org/ob-eshell hides /usr/share/emacs/28.0.50/lisp/org/ob-eshell
/home/lailamor/.emacs.d/straight/build/org/ob-awk hides /usr/share/emacs/28.0.50/lisp/org/ob-awk
/home/lailamor/.emacs.d/straight/build/org/ol-bbdb hides /usr/share/emacs/28.0.50/lisp/org/ol-bbdb
/home/lailamor/.emacs.d/straight/build/org/ol-rmail hides /usr/share/emacs/28.0.50/lisp/org/ol-rmail
/home/lailamor/.emacs.d/straight/build/org/org-goto hides /usr/share/emacs/28.0.50/lisp/org/org-goto
/home/lailamor/.emacs.d/straight/build/org/org-element hides /usr/share/emacs/28.0.50/lisp/org/org-element
/home/lailamor/.emacs.d/straight/build/org/org-table hides /usr/share/emacs/28.0.50/lisp/org/org-table
/home/lailamor/.emacs.d/straight/build/org/ob-shen hides /usr/share/emacs/28.0.50/lisp/org/ob-shen
/home/lailamor/.emacs.d/straight/build/org/org-tempo hides /usr/share/emacs/28.0.50/lisp/org/org-tempo
/home/lailamor/.emacs.d/straight/build/org/org-mouse hides /usr/share/emacs/28.0.50/lisp/org/org-mouse
/home/lailamor/.emacs.d/straight/build/org/ob-sqlite hides /usr/share/emacs/28.0.50/lisp/org/ob-sqlite
/home/lailamor/.emacs.d/straight/build/org/ob-ruby hides /usr/share/emacs/28.0.50/lisp/org/ob-ruby
/home/lailamor/.emacs.d/straight/build/org/org-agenda hides /usr/share/emacs/28.0.50/lisp/org/org-agenda
/home/lailamor/.emacs.d/straight/build/org/org-list hides /usr/share/emacs/28.0.50/lisp/org/org-list
/home/lailamor/.emacs.d/straight/build/org/ob-lob hides /usr/share/emacs/28.0.50/lisp/org/ob-lob
/home/lailamor/.emacs.d/straight/build/org/ob-asymptote hides /usr/share/emacs/28.0.50/lisp/org/ob-asymptote
/home/lailamor/.emacs.d/straight/build/org/ob-mscgen hides /usr/share/emacs/28.0.50/lisp/org/ob-mscgen
/home/lailamor/.emacs.d/straight/build/org/org-ctags hides /usr/share/emacs/28.0.50/lisp/org/org-ctags
/home/lailamor/.emacs.d/straight/build/org/org hides /usr/share/emacs/28.0.50/lisp/org/org
/home/lailamor/.emacs.d/straight/build/org/org-habit hides /usr/share/emacs/28.0.50/lisp/org/org-habit
/home/lailamor/.emacs.d/straight/build/org/org-plot hides /usr/share/emacs/28.0.50/lisp/org/org-plot
/home/lailamor/.emacs.d/straight/build/org/ob-haskell hides /usr/share/emacs/28.0.50/lisp/org/ob-haskell
/home/lailamor/.emacs.d/straight/build/org/ob-vala hides /usr/share/emacs/28.0.50/lisp/org/ob-vala
/home/lailamor/.emacs.d/straight/build/org/org-capture hides /usr/share/emacs/28.0.50/lisp/org/org-capture
/home/lailamor/.emacs.d/straight/build/org/ox-latex hides /usr/share/emacs/28.0.50/lisp/org/ox-latex
/home/lailamor/.emacs.d/straight/build/org/ob-screen hides /usr/share/emacs/28.0.50/lisp/org/ob-screen
/home/lailamor/.emacs.d/straight/build/org/org-feed hides /usr/share/emacs/28.0.50/lisp/org/org-feed
/home/lailamor/.emacs.d/straight/build/org/org-duration hides /usr/share/emacs/28.0.50/lisp/org/org-duration
/home/lailamor/.emacs.d/straight/build/org/ob-scheme hides /usr/share/emacs/28.0.50/lisp/org/ob-scheme
/home/lailamor/.emacs.d/straight/build/org/ob-sql hides /usr/share/emacs/28.0.50/lisp/org/ob-sql
/home/lailamor/.emacs.d/straight/build/org/ob-ledger hides /usr/share/emacs/28.0.50/lisp/org/ob-ledger
/home/lailamor/.emacs.d/straight/build/org/ob-css hides /usr/share/emacs/28.0.50/lisp/org/ob-css
/home/lailamor/.emacs.d/straight/build/org/ol-info hides /usr/share/emacs/28.0.50/lisp/org/ol-info
/home/lailamor/.emacs.d/straight/build/org/ob-J hides /usr/share/emacs/28.0.50/lisp/org/ob-J
/home/lailamor/.emacs.d/straight/build/org/ob-exp hides /usr/share/emacs/28.0.50/lisp/org/ob-exp
/home/lailamor/.emacs.d/straight/build/org/org-install hides /usr/share/emacs/28.0.50/lisp/org/org-install

Thanks for the detailed report, will try to look into this in the next few days. I've transferred the issue to citeproc-org, because at first sight it looks most probably an org-related problem.

Unfortunately, I couldn't reproduce it so far, but it might be a problem with the -if-let macro on your system. Could you check what happens if the -if-let is omitted from the function definition, that is, could you redefine the function citeproc-formatter-for-format after encountering the problem by running

(defun citeproc-formatter-for-format (format) (alist-get format citeproc-fmt--formatters-alist))

(You can run it with M-: (eval expression) or from IELM, for instance.) Does this change anything?

After redefining citeproc-formatter-for-format and running C-c C-e H A, I get:

[ox-hugo] 1/ Exporting ‘ox-hugo won't export because formatter is void’ ..
Symbol’s function definition is void: fmt-fun

I can't reproduce the issue on another machine of mine (Manjaro Linux) with emacs 28.0.50 master branch. Later I may try installing the feature/native-comp on that machine to test if I can reproduce.

I'm using a relatively simple init.el to test it.

init.el
;;;; PACKAGES

;;; PACKAGE ARCHIVES
;;
(require 'package)


;;; PACKAGE MANAGER: STRAIGHT.EL
;;	https://github.com/raxod502/straight.el#getting-started
;;	Date: 2020-07-18
(defvar bootstrap-version)
(let ((bootstrap-file
     (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
    (bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
  (with-current-buffer
      (url-retrieve-synchronously
       "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
       'silent 'inhibit-cookies)
    (goto-char (point-max))
    (eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))

;; Make ':straight t' be assumed on use-package
;; unless you explicitly override it with :straight nil.
;;	https://github.com/raxod502/straight.el#integration-with-use-package
;;	https://github.com/raxod502/straight.el#integration-with-use-package-1
;;	Date: 2020-07-18
(setq straight-use-package-by-default t)


;;; USE-PACKAGE

;; Install use-package with the staight.el.
;;	https://github.com/raxod502/straight.el#integration-with-use-package
;;	Date: 2020-07-18
(straight-use-package 'use-package)



;;;; USER INTERFACE (UI)

;;; AUTO-FILL-MODE
;; Turn on Auto Fill mode automatically in Text mode and related modes.
;;	Date: 2020-07-04
(add-hook 'text-mode-hook 'auto-fill-mode)


;;; LINE NUMBERS
;; Toggle Display-Line-Numbers mode in all buffers.
;;	https://www.emacswiki.org/emacs/LineNumbers
;;	Date: 2020-07-07
(when (version<= "26.0.50" emacs-version)
(global-display-line-numbers-mode))

;; Display relative line numbers.
;;	https://www.reddit.com/r/emacs/comments/hjy4xj/relative_line_numbers/fwpa4in/
;;	Date: 2020-07-05
(setq-default display-line-numbers-type 'relative)


;;; COLUMN NUMBER
;; Display current column number.
;;	https://www.gnu.org/software/emacs/manual/html_node/efaq/Displaying-the-current-line-or-column.html
;;	Date: 2020-07-24
(setq column-number-mode t)



;;;; COMPUTER LANGUAGES

;;; ORG-MODE
(use-package org)


;;; OX-HUGO
;;      https://ox-hugo.scripter.co/doc/usage/
;;      Date: 2020-09-04
(use-package ox-hugo)


;;; ORG-REF
;;      Date: 2020-09-07
(use-package org-ref)


;;; CITEPROC-ORG
;;      Date: 2020-09-07
(use-package citeproc-org
:config
;; Default value `"* Bibliography\n"' makes headings be exported by ox-hugo as
;; unordered lists to markdown.
;;    https://github.com/andras-simonyi/citeproc-org/issues/10#issuecomment-693188387
;;    Date: 2020-09-16
(setq citeproc-org-org-bib-header "**** References\n"))

(citeproc-org-setup)

I may try installing the feature/native-comp on that machine to test if I can reproduce.

I did, but couldn't reproduce. Below the detailed backtraces.

citeproc-formatter-for-format: Symbol’s function definition is void: formatter
Debugger entered--Lisp error: (void-function formatter)
formatter(#s(citeproc-formatter :rt #f(compiled-function (rt) #<bytecode 0x160a81a481dc984c>) :cite identity :bib-item #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_54> :bib #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_1>))
citeproc-formatter-for-format(org)
citeproc-citation--render-formatted-citation(#s(citeproc-citation :cites ((... ... ...)) :note-index nil :capitalize-first nil :suppress-affixes nil :grouped nil) #s(citeproc-proc :style #s(citeproc-style :info (... ... ... ... ... ... ... ... ... ... ... ... ...) :opts (... ... ... ... ...) :bib-opts (... ... ... ... ... ...) :bib-sort (lambda ... ...) :bib-sort-orders (t t t) :bib-layout (lambda ... ...) :cite-opts (... ... ... ... ... ... ... ... ... ...) :cite-note nil :cite-sort nil :cite-sort-orders nil :cite-layout (lambda ... ...) :cite-layout-attrs (... ... ...) :locale-opts (... ...) :macros (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :terms (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :uses-ys-var nil :date-text (... ... ... ...) :date-numeric (... ... ... ...)) :getter #f(compiled-function (itemids) #<bytecode -0x6dc58004673d3f2>) :itemdata #<hash-table equal 1/65 0x15803c3b95f7> :citations #s(queue :head (...) :tail (...)) :names #<hash-table equal 1/65 0x15803c3b95d7> :finalized t) org nil)
#f(compiled-function (it) #<bytecode -0x122a6db74fcde612>)(#s(citeproc-citation :cites (((position . first) (itd . #s(citeproc-itemdata :varvals ((citation-number . "1") (label . "page") (issued ...) (URL . "https://web.archive.org/web/20160426062148/http://...") (title . "The Org Mode 7 Reference Manual") (publisher . "Network Theory Ltd") (author ...) (citation-label . "dominik-2010-tom7rm") (type . "book")) :rawcite nil :rc-uptodate nil :sort-key ("Dominik, Carsten" "70100000" "The Org Mode 7 Reference Manual") :occurred-before t :disamb-pos first)) (id . "dominik-2010-tom7rm"))) :note-index nil :capitalize-first nil :suppress-affixes nil :grouped nil))
citeproc-render-citations(#s(citeproc-proc :style #s(citeproc-style :info (... ... ... ... ... ... ... ... ... ... ... ... ...) :opts (... ... ... ... ...) :bib-opts (... ... ... ... ... ...) :bib-sort (lambda ... ...) :bib-sort-orders (t t t) :bib-layout (lambda ... ...) :cite-opts (... ... ... ... ... ... ... ... ... ...) :cite-note nil :cite-sort nil :cite-sort-orders nil :cite-layout (lambda ... ...) :cite-layout-attrs (... ... ...) :locale-opts (... ...) :macros (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :terms (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :uses-ys-var nil :date-text (... ... ... ...) :date-numeric (... ... ... ...)) :getter #f(compiled-function (itemids) #<bytecode -0x6dc58004673d3f2>) :itemdata #<hash-table equal 1/65 0x15803c3b95f7> :citations #s(queue :head (...) :tail (...)) :names #<hash-table equal 1/65 0x15803c3b95d7> :finalized t) org nil)
citeproc-org--append-and-render-citations(((:elt (link ...) :elt-no 0 :cite-no 0 :fn-no nil :new-fn nil)) #s(citeproc-proc :style #s(citeproc-style :info (... ... ... ... ... ... ... ... ... ... ... ... ...) :opts (... ... ... ... ...) :bib-opts (... ... ... ... ... ...) :bib-sort (lambda ... ...) :bib-sort-orders (t t t) :bib-layout (lambda ... ...) :cite-opts (... ... ... ... ... ... ... ... ... ...) :cite-note nil :cite-sort nil :cite-sort-orders nil :cite-layout (lambda ... ...) :cite-layout-attrs (... ... ...) :locale-opts (... ...) :macros (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :terms (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :uses-ys-var nil :date-text (... ... ... ...) :date-numeric (... ... ... ...)) :getter #f(compiled-function (itemids) #<bytecode -0x6dc58004673d3f2>) :itemdata #<hash-table equal 1/65 0x15803c3b95f7> :citations #s(queue :head (...) :tail (...)) :names #<hash-table equal 1/65 0x15803c3b95d7> :finalized t) hugo link nil)
citeproc-org-render-references(hugo)
org-export-as(hugo :subtreep nil nil (:output-file "/home/lailamor/hugo/blog2/content/posts/issue.md"))
org-export-to-file(hugo "/home/lailamor/hugo/blog2/content/posts/issue.md" nil :subtreep nil)
org-hugo-export-to-md(nil :subtreep nil)
org-hugo--export-subtree-to-md(nil nil :all-subtrees)
#f(compiled-function () #<bytecode 0x1f541dc5863d>)()
org-scan-tags(#f(compiled-function () #<bytecode 0x1f541dc5863d>) (lambda (todo tags-list level) (progn (setq org-cached-props nil) (or (and (org-string<> (or (org-cached-entry-get nil "EXPORT_FILE_NAME") "") ""))))) nil nil)
org-map-entries(#f(compiled-function () #<bytecode 0x1f541dc5863d>) "EXPORT_FILE_NAME<>\"\"")
org-hugo-export-wim-to-md(:all-subtrees nil nil)
(lambda (a _s v _b) (org-hugo-export-wim-to-md :all-subtrees a v))(nil nil nil nil)
org-export-dispatch(nil)
funcall-interactively(org-export-dispatch nil)
command-execute(org-export-dispatch)
Symbol’s function definition is void: fmt-fun
Debugger entered--Lisp error: (void-function fmt-fun)
fmt-fun(nil)
#f(compiled-function (rt) #<bytecode 0x160a81a481dc984c>)((((rendered-var . author) (rendered-names) (name-id . 0)) "Dominik"))
mapconcat(#f(compiled-function (rt) #<bytecode 0x160a81a481dc984c>) ((((rendered-var . author) (rendered-names) (name-id . 0)) "Dominik") " " (((rendered-var . issued)) "2010")) "")
#f(compiled-function (rt) #<bytecode 0x160a81a481dc984c>)((((cited-item-no . "1")) (((rendered-var . author) (rendered-names) (name-id . 0)) "Dominik") " " (((rendered-var . issued)) "2010")))
mapconcat(#f(compiled-function (rt) #<bytecode 0x160a81a481dc984c>) ("(" (((cited-item-no . "1")) (((rendered-var . author) (rendered-names) (name-id . 0)) "Dominik") " " (((rendered-var . issued)) "2010")) ")") "")
#f(compiled-function (rt) #<bytecode 0x160a81a481dc984c>)((nil "(" (((cited-item-no . "1")) (((rendered-var . author) (rendered-names) (name-id . 0)) "Dominik") " " (((rendered-var . issued)) "2010")) ")"))
citeproc-citation--render-formatted-citation(#s(citeproc-citation :cites ((... ... ...)) :note-index nil :capitalize-first nil :suppress-affixes nil :grouped nil) #s(citeproc-proc :style #s(citeproc-style :info (... ... ... ... ... ... ... ... ... ... ... ... ...) :opts (... ... ... ... ...) :bib-opts (... ... ... ... ... ...) :bib-sort (lambda ... ...) :bib-sort-orders (t t t) :bib-layout (lambda ... ...) :cite-opts (... ... ... ... ... ... ... ... ... ...) :cite-note nil :cite-sort nil :cite-sort-orders nil :cite-layout (lambda ... ...) :cite-layout-attrs (... ... ...) :locale-opts (... ...) :macros (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :terms (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :uses-ys-var nil :date-text (... ... ... ...) :date-numeric (... ... ... ...)) :getter #f(compiled-function (itemids) #<bytecode -0x6dc58004673d3f2>) :itemdata #<hash-table equal 1/65 0x15803c3b95f7> :citations #s(queue :head (...) :tail (...)) :names #<hash-table equal 1/65 0x15803c3b95d7> :finalized t) org nil)
#f(compiled-function (it) #<bytecode -0x122a6db74fcde612>)(#s(citeproc-citation :cites (((position . first) (itd . #s(citeproc-itemdata :varvals ((citation-number . "1") (label . "page") (issued ...) (URL . "https://web.archive.org/web/20160426062148/http://...") (title . "The Org Mode 7 Reference Manual") (publisher . "Network Theory Ltd") (author ...) (citation-label . "dominik-2010-tom7rm") (type . "book")) :rawcite nil :rc-uptodate nil :sort-key ("Dominik, Carsten" "70100000" "The Org Mode 7 Reference Manual") :occurred-before t :disamb-pos first)) (id . "dominik-2010-tom7rm"))) :note-index nil :capitalize-first nil :suppress-affixes nil :grouped nil))
citeproc-render-citations(#s(citeproc-proc :style #s(citeproc-style :info (... ... ... ... ... ... ... ... ... ... ... ... ...) :opts (... ... ... ... ...) :bib-opts (... ... ... ... ... ...) :bib-sort (lambda ... ...) :bib-sort-orders (t t t) :bib-layout (lambda ... ...) :cite-opts (... ... ... ... ... ... ... ... ... ...) :cite-note nil :cite-sort nil :cite-sort-orders nil :cite-layout (lambda ... ...) :cite-layout-attrs (... ... ...) :locale-opts (... ...) :macros (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :terms (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :uses-ys-var nil :date-text (... ... ... ...) :date-numeric (... ... ... ...)) :getter #f(compiled-function (itemids) #<bytecode -0x6dc58004673d3f2>) :itemdata #<hash-table equal 1/65 0x15803c3b95f7> :citations #s(queue :head (...) :tail (...)) :names #<hash-table equal 1/65 0x15803c3b95d7> :finalized t) org nil)
citeproc-org--append-and-render-citations(((:elt (link ...) :elt-no 0 :cite-no 0 :fn-no nil :new-fn nil)) #s(citeproc-proc :style #s(citeproc-style :info (... ... ... ... ... ... ... ... ... ... ... ... ...) :opts (... ... ... ... ...) :bib-opts (... ... ... ... ... ...) :bib-sort (lambda ... ...) :bib-sort-orders (t t t) :bib-layout (lambda ... ...) :cite-opts (... ... ... ... ... ... ... ... ... ...) :cite-note nil :cite-sort nil :cite-sort-orders nil :cite-layout (lambda ... ...) :cite-layout-attrs (... ... ...) :locale-opts (... ...) :macros (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :terms (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :uses-ys-var nil :date-text (... ... ... ...) :date-numeric (... ... ... ...)) :getter #f(compiled-function (itemids) #<bytecode -0x6dc58004673d3f2>) :itemdata #<hash-table equal 1/65 0x15803c3b95f7> :citations #s(queue :head (...) :tail (...)) :names #<hash-table equal 1/65 0x15803c3b95d7> :finalized t) hugo link nil)
citeproc-org-render-references(hugo)
org-export-as(hugo :subtreep nil nil (:output-file "/home/lailamor/hugo/blog2/content/posts/issue.md"))
org-export-to-file(hugo "/home/lailamor/hugo/blog2/content/posts/issue.md" nil :subtreep nil)
org-hugo-export-to-md(nil :subtreep nil)
org-hugo--export-subtree-to-md(nil nil :all-subtrees)
#f(compiled-function () #<bytecode 0x1f541dc5863d>)()
org-scan-tags(#f(compiled-function () #<bytecode 0x1f541dc5863d>) (lambda (todo tags-list level) (progn (setq org-cached-props nil) (or (and (org-string<> (or (org-cached-entry-get nil "EXPORT_FILE_NAME") "") ""))))) nil nil)
org-map-entries(#f(compiled-function () #<bytecode 0x1f541dc5863d>) "EXPORT_FILE_NAME<>\"\"")
org-hugo-export-wim-to-md(:all-subtrees nil nil)
(lambda (a _s v _b) (org-hugo-export-wim-to-md :all-subtrees a v))(nil nil nil nil)
org-export-dispatch(nil)
funcall-interactively(org-export-dispatch nil)
command-execute(org-export-dispatch)

Thanks, and apologies for responding that late. Unfortunately the only thing I can think of is that the problems come somehow from macro-expansion failures related to native compilation -- for instance, it seems that the -if-let macro (from the dash package) used in the function citeproc-formatter-for-format is not expanded properly and Emacs tries to evaluate the binding form

(formatter (alist-get format citeproc-fmt--formatters-alist))

as a function call. The second trace seems to show a similar problem with expanding the -when-let macro. If you want to experiment further you can try to replace all occurrences of -when-let and -if-let with the equivalent if-let and when-let macros and see whether this changes things (the code uses the dash variants only for historical reasons), but the problem seems to be very general, not specific to citeproc-el or citeproc-org.

Meanwhile I managed to reproduce the issue with the native-comp branch, and it seems to be solved by using the internal Emacs versions of the if-let and when-let macros. I've pushed the changes (andras-simonyi/citeproc-el@f6268ab) to the citeproc-el repo -- could you check whether it fixes the problem on your system?

could you check whether it fixes the problem on your system?

Just made some tests, and it fixed the problem.

but the problem seems to be very general, not specific to citeproc-el or citeproc-org.

Yes, seems like an upstream issue indeed by your explanation. I'd report there but I'm not familiar with mailing lists at all...

Thank you so much András!