andras-simonyi / citeproc-el

A CSL 1.0.2 Citation Processor for Emacs.
GNU General Public License v3.0
85 stars 9 forks source link

(void-function editor) error on Emacs 25.3 #102

Closed kaushalmodi closed 2 years ago

kaushalmodi commented 2 years ago

Hello,

I was adding a citeproc dependent test to ox-hugo test suite, and I am seeing this backtrace when the GHA runs on Emacs 25.3:

2022-02-11T16:19:59.5855842Z [ox-hugo] Exporting ‘Citation CSL’ (citation-csl.org)
2022-02-11T16:19:59.6681942Z Debugger entered--Lisp error: (void-function editor)
2022-02-11T16:19:59.6682239Z   editor(nil)
2022-02-11T16:19:59.6729959Z   citeproc-proc--internalize-item([cl-struct-citeproc-proc [cl-struct-citeproc-style ((title nil "Chicago Manual of Style 17th edition (author-date)") (id nil "http://www.zotero.org/styles/chicago-author-date") (link ((href . "http://www.zotero.org/styles/chicago-author-date") (rel . "self"))) (link ((href . "http://www.chicagomanualofstyle.org/tools_citationguide.html") (rel . "documentation"))) (author nil (name nil "Julian Onions") (email nil "julian.onions@gmail.com")) (contributor nil (name nil "Sebastian Karcher")) (contributor nil (name nil "Richard Karnesky") (email nil "karnesky+zotero@gmail.com") (uri nil "http://arc.nucapt.northwestern.edu/Richard_Karnesky")) (contributor nil (name nil "Andrew Dunning") (email nil "andrew.dunning@utoronto.ca") (uri nil "https://orcid.org/0000-0003-0464-5036")) (contributor nil (name nil "Matthew Roth") (email nil "matthew.g.roth@yale.edu") (uri nil " https://orcid.org/0000-0001-7902-6331")) (contributor nil (name nil "Brenton M. Wiernik")) (category ((citation-format . "author-date"))) (category ((field . "generic-base"))) (summary nil "The author-date variant of the Chicago style") (updated nil "2018-01-24T12:00:00+00:00") (rights ((license . "http://creativecommons.org/licenses/by-sa/3.0/")) "This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License")) ((initialize-with-hyphen . "true") (class . "in-text") (version . "1.0") (demote-non-dropping-particle . "display-and-sort") (page-range-format . "chicago")) ((line-spacing . "1") (hanging-indent . "true") (et-al-min . "11") (et-al-use-first . "7") (subsequent-author-substitute . "———") (entry-spacing . "0")) (lambda (context) (citeproc--sort (quote nil) context (citeproc--key (quote ((macro . "contributors"))) context) (citeproc--key (quote ((variable . "issued"))) context) (citeproc--key (quote ((variable . "title"))) context))) (t t t) (lambda (context) (citeproc--layout (quote ((suffix . "."))) context (citeproc--group (quote ((delimiter . ". "))) context (citeproc--text (quote (...)) context) (citeproc--text (quote (...)) context) (citeproc--text (quote (...)) context)) (citeproc--text (quote ((macro . "description"))) context) (citeproc--text (quote ((macro . "secondary-contributors") (prefix . ". "))) context) (citeproc--text (quote ((macro . "container-title") (prefix . ". "))) context) (citeproc--text (quote ((macro . "container-contributors"))) context) (citeproc--text (quote ((macro . "edition"))) context) (citeproc--text (quote ((macro . "locators-chapter"))) context) (citeproc--text (quote ((macro . "collection-title-journal") (prefix . ", ") (suffix . ", "))) context) (citeproc--text (quote ((macro . "locators"))) context) (citeproc--text (quote ((macro . "collection-title") (prefix . ". "))) context) (citeproc--text (quote ((macro . "issue"))) context) (citeproc--text (quote ((macro . "locators-article"))) context) (citeproc--text (quote ((macro . "access") (prefix . ". "))) context))) ((cite-group-delimiter . ", ") (near-note-distance . "5") (et-al-min . "4") (et-al-use-first . "1") (disambiguate-add-year-suffix . "true") (disambiguate-add-names . "true") (disambiguate-add-givenname . "true") (givenname-disambiguation-rule . "primary-name") (collapse . "year") (after-collapse-delimiter . "; ")) nil nil nil (lambda (context) (citeproc--layout (quote ((prefix . "(") (suffix . ")") (delimiter . "; "))) context (citeproc--group (quote ((delimiter . ", "))) context (citeproc--choose (quote nil) context (citeproc--if (quote ...) context (citeproc--group ... context ... ...)) (citeproc--else (quote nil) context (citeproc--group ... context ... ...))) (citeproc--text (quote (...)) context)))) ((prefix . "(") (suffix . ")") (delimiter . "; ")) ((limit-day-ordinals-to-day-1 . "false") (punctuation-in-quote . "true")) (("issue" lambda (context) (citeproc--macro (quote nil) context (citeproc--choose (quote nil) context (citeproc--if (quote ...) context (citeproc--text ... context)) (citeproc--else-if (quote ...) context (cit

Ref: https://github.com/kaushalmodi/ox-hugo/pull/559

Test files

t.org

#+title: Citation CSL

#+hugo_base_dir: ../
#+author:

#+bibliography: orgcite.bib
#+cite_export: csl

#+filetags: org_cite csl citations bibliography

#+macro: oxhugoissue =ox-hugo= Issue #[[https://github.com/kaushalmodi/ox-hugo/issues/$1][$1]]

#+begin_description
Test citation CSL using ~oc.el~ + ~citeproc.el~.
#+end_description

{{{oxhugoissue(558)}}}

[cite:@OrgCitations]

Below, the "Bibliography" heading will be auto-inserted.

#+print_bibliography:

orgcite.bib

@article{OrgCitations,
         author={org, mode and Syntax, Citation and List, Mailing and Effort, Time},
         journal={Journal of Plain Text Formats},
         title={Elegant Citations with Org-Mode},
         year={2021},
         month={7},
         volume={42},
         number={1},
         pages={2-3}}
kaushalmodi commented 2 years ago

I am assuming that citeproc should work with emacs 25.x; is that right?

https://github.com/andras-simonyi/citeproc-el/blob/ba49516265fa24b138346c4918d39d19b4de8a62/citeproc.el#L9

andras-simonyi commented 2 years ago

Thanks for reporting this, Emacs 25 is definitely a target, so I'll try to look into the issue in the coming week.

andras-simonyi commented 2 years ago

Hello, apologies for coming back to this problem only now. Is Emacs 25 still a target for ox-hugo now that Emacs 28 is out?

kaushalmodi commented 2 years ago

Hello András, no. A few months back, I bumped up the minimum requirement of ox-hugo to Emacs 26.3. So this issue for citeproc isn't needed any more.

andras-simonyi commented 2 years ago

Thanks for the prompt response and sorry, again, for the long delay.