emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Cannot use Org Cite with Org Publish
@ 2023-03-29 11:19 Amery Gration
  2023-03-29 14:48 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Amery Gration @ 2023-03-29 11:19 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 2127 bytes --]

I am having a problem using Org Cite with Org Publish (Emacs 28.1, Org 9.6.1). Publication of documents containing an Org Cite citation fails every time. Here's a minimum (not) working example. I have a file `publish.el` which contains the following vanilla Elisp.
```
(require 'package)
(setq package-user-dir (expand-file-name "./.packages"))
(setq package-archives
      '(("melpa" . "https://melpa.org/packages/"<https://melpa.org/packages/>)
        ("elpa" . "https://elpa.gnu.org/packages/"<https://elpa.gnu.org/packages/>)))

(package-initialize)
(unless package-archive-contents
  (package-refresh-contents))

(require 'ox-publish)

(setq org-publish-project-alist
      `(("website"
         :base-directory "Content/"
         :publishing-directory "Public/")))

(org-publish-all t)
```
The document I want to publish is `Content/index.org` and contains a citation.
```
#+bibliography: bibliography.bib

[cite/t:@edwards1992]

#+print_bibliography:
```
This refers to the bibliography file `Content/bibliography.bib`.
```
@book{edwards1992,
  title = {Likelihood},
  author = {Edwards, A. W. F.},
  date = {1992},
  edition = {Expanded edition},
  publisher = {{Johns Hopkins University Press}},
  location = {{Baltimore}},
}
```
When I try to publish this document, using the bash command `emacs -Q --script publish.el`, I get an error message and no output.
```
Resetting org-publish-cache
Publishing file /home/ag0082/Documents/Computing/Website/Mwe/Content/index.org using ‘org-html-publish-to-html’
Debugger entered--Lisp error: (error "Wrong value for ENTRY-OR-KEY: nil")
  signal(error ("Wrong value for ENTRY-OR-KEY: nil"))
  error("Wrong value for ENTRY-OR-KEY: %S" nil)
  ...
  command-line-1(("-scriptload" "publish.el"))
  command-line()
  normal-top-level()
```
Strangely, I find I that I can export the file `Content/index.org ` (C-c C-e h o) with no problem.

Does anyone know what is going wrong?

Regards

Amery

Dr Amery Gration
Research Fellow in Astrophysics
Astrophysics Research Group
University of Surrey
GUILDFORD
GU2 7XH

[-- Attachment #2: Type: text/html, Size: 3002 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cannot use Org Cite with Org Publish
  2023-03-29 11:19 Cannot use Org Cite with Org Publish Amery Gration
@ 2023-03-29 14:48 ` Ihor Radchenko
       [not found]   ` <33b7fd5a-b7a1-6a73-101f-041d4f81044f@surrey.ac.uk>
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2023-03-29 14:48 UTC (permalink / raw)
  To: Amery Gration; +Cc: emacs-orgmode@gnu.org

Amery Gration <a.gration@surrey.ac.uk> writes:

> I am having a problem using Org Cite with Org Publish (Emacs 28.1, Org 9.6.1). Publication of documents containing an Org Cite citation fails every time. Here's a minimum (not) working example. I have a file `publish.el` which contains the following vanilla Elisp.

I am unable to reproduce using your steps.
Using Emacs 28.2 + Org version from ELPA though.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cannot use Org Cite with Org Publish
       [not found]   ` <33b7fd5a-b7a1-6a73-101f-041d4f81044f@surrey.ac.uk>
@ 2023-03-29 15:03     ` Ihor Radchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2023-03-29 15:03 UTC (permalink / raw)
  To: Amery Gration; +Cc: emacs-orgmode

[Adding Org ML back to CC]

Amery Gration <a.gration@surrey.ac.uk> writes:

> Thanks so much for replying. Do you mean the MWE works for you without error, or that the MWE doesn't work for you at all?

Your MWE works for me and I do get html exported with citations without errors.
Though the MWE is not 100% precise. If things, reliably do not work for
you, please make your reproduce as precise as you can. I also recommend
trying with different Emacs version.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-29 15:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-29 11:19 Cannot use Org Cite with Org Publish Amery Gration
2023-03-29 14:48 ` Ihor Radchenko
     [not found]   ` <33b7fd5a-b7a1-6a73-101f-041d4f81044f@surrey.ac.uk>
2023-03-29 15:03     ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).