Dear Andras, You are very probably right. I will have a look on this entry in my default bibliography file.
The code (let ((org-export-before-parsing-hook '(org-ref-csl-preprocess-buffer))) (org-open-file (org-html-export-to-html))) put in .emacs.d/personal/preload/myorgexport.el provokes the request of opening a html file, when emacs --daemon is started; therefore I conclude that it should not be used as I did... Anyway, every tentative to export in a bibliography in html fails at the moment, even with a new bibliography file... :( Best wishes, Le 01/12/2021 à 17:33, András Simonyi a écrit : > Dear Joseph, > > based on the error message there seems to be a problem with the > 'curley-nil-on-bennet-spinoz' bibliography entry, is it possible that > it contains a 'year = nil' row? If yes then I don't think that is > well-formed, at least citeproc-el cannot currently parse it. Anyhow, > apparently I need to improve/add citeproc-el error messages about > bib(la)tex parsing, because several parsing problems have surfaced > lately and the current error messages aren't helpful at all. > > best wishes, > András > > On Wed, 1 Dec 2021 at 16:50, Joseph Vidal-Rosset > <jos...@vidal-rosset.net> wrote: >> >> Dear John, >> >> I must say that to export references in html with org-ref 3, I meet a >> lot of problems (with LaTeX, it's fine). >> >> I am using prelude emacs and GNU Emacs 29.0.50 . >> >> Starting emacs --daemon, the code >> >> (let ((org-export-before-parsing-hook '(org-ref-csl-preprocess-buffer))) >> (org-open-file (org-html-export-to-html))) >> >> in my setup provokes this unwanting effect: >> >> [Prelude] Loading personal configuration files in >> /home/joseph/.emacs.d/personal/preload... >> Loading /home/joseph/.emacs.d/personal/preload/myorgexport.el (source)... >> Output file: >> >> and with Enter : >> >> [Prelude] Loading personal configuration files in >> /home/joseph/.emacs.d/personal/preload... >> Loading /home/joseph/.emacs.d/personal/preload/myorgexport.el (source)... >> Output file: >> Warning (initialization): An error occurred while loading >> ‘/home/joseph/.emacs.d/init.el’: >> >> Wrong type argument: stringp, nil >> >> To ensure normal operation, you should investigate and remove the >> cause of the error in your initialization file. Start Emacs with >> the ‘--debug-init’ option to view a complete error backtrace. Disable >> showing Disable logging >> Starting Emacs daemon. >> >> With --debug-init, I get: >> >> Debugger entered--Lisp error: (wrong-type-argument stringp nil) >> string-to-number(nil) >> citeproc-bt--to-csl-date("nil" nil) >> citeproc-blt-entry-to-csl((("Url" . >> "http://dx.doi.org/10.1163/9789004246638_005") ("Doi" . >> "10.1163/9789004246638_005") ("Date_added" . "Mon May 16 19:09:37 2016") >> ("Booktitle" . "Spinoza: Issues and Directions") ("Series" . "Spinoza: >> Issues and Directions") ("Year" . "nil") ("Publisher" . "Brill Academic >> Publishers") ("Pages" . "39-52") ("Author" . "Edwin Curley") ("Title" . >> "ON BENNETTS SPINOZA: THE ISSUE OF TELEOLOGY") ("=type=" . "InBook") >> ("=key=" . "curley-nil-on-bennet-spinoz")) nil nil) >> #f(compiled-function (key entry) #<bytecode >> -0x7fcb46b5c8e80b3>)("curley-nil-on-bennet-spinoz" (("Url" . >> "http://dx.doi.org/10.1163/9789004246638_005") ("Doi" . >> "10.1163/9789004246638_005") ("Date_added" . "Mon May 16 19:09:37 2016") >> ("Booktitle" . "Spinoza: Issues and Directions") ("Series" . "Spinoza: >> Issues and Directions") ("Year" . "nil") ("Publisher" . "Brill Academic >> Publishers") ("Pages" . "39-52") ("Author" . "Edwin Curley") ("Title" . >> "ON BENNETTS SPINOZA: THE ISSUE OF TELEOLOGY") ("=type=" . "InBook") >> ("=key=" . "curley-nil-on-bennet-spinoz"))) >> maphash(#f(compiled-function (key entry) #<bytecode >> -0x7fcb46b5c8e80b3>) #<hash-table equal 665/730 0x156f8acb26b7>) >> citeproc-hash-itemgetter-from-any(("~/Dropbox/Orgzly/reforg.bib")) >> org-ref-process-buffer(html) >> org-ref-csl-preprocess-buffer(html) >> run-hook-with-args(org-ref-csl-preprocess-buffer html) >> org-export-as(html nil nil nil (:output-file "~/test.html")) >> org-export-to-file(html "~/test.html" nil nil nil nil nil) >> org-html-export-to-html() >> (org-open-file (org-html-export-to-html)) >> (let ((org-export-before-parsing-hook >> '(org-ref-csl-preprocess-buffer))) (org-open-file >> (org-html-export-to-html))) >> eval-buffer(#<buffer *load*-634240> nil >> "/home/joseph/.emacs.d/personal/preload/myorgexport..." nil t) ; >> Reading at buffer position 3196 >> >> load-with-code-conversion("/home/joseph/.emacs.d/personal/preload/myorgexport..." >> "/home/joseph/.emacs.d/personal/preload/myorgexport..." nil nil) >> load("/home/joseph/.emacs.d/personal/preload/myorgexport...") >> mapc(load ("/home/joseph/.emacs.d/personal/preload/myorgexport...")) >> (progn (message "[Prelude] Loading personal configuration files in >> ..." prelude-personal-preload-dir) (mapc 'load (directory-files >> prelude-personal-preload-dir 't "^[^#.].*el$"))) >> (if (file-exists-p prelude-personal-preload-dir) (progn (message >> "[Prelude] Loading personal configuration files in ..." >> prelude-personal-preload-dir) (mapc 'load (directory-files >> prelude-personal-preload-dir 't "^[^#.].*el$")))) >> eval-buffer(#<buffer *load*> nil "/home/joseph/.emacs.d/init.el" nil >> t) ; Reading at buffer position 4489 >> load-with-code-conversion("/home/joseph/.emacs.d/init.el" >> "/home/joseph/.emacs.d/init.el" t t) >> load("/home/joseph/.emacs.d/init" noerror nomessage) >> startup--load-user-init-file(#f(compiled-function () #<bytecode >> 0xec639179d6199fa>) #f(compiled-function () #<bytecode >> -0x1f3c686ddc0dc635>) t) >> command-line() >> normal-top-level() >> >> It's too complicated for me. >> org-ref version 2 with citeproc-org by Andras worked well, but now I am >> afraid that to downgrade to org-ref 2 is not necessarily the best >> solution. I am lost. >> >> Best wishes, and thanks for your help. >> >> Jo. >> >> >> Le 30/11/2021 à 18:31, John Kitchin a écrit : >>> See https://www.youtube.com/watch?v=rRR-5NSpKyE >>> <https://www.youtube.com/watch?v=rRR-5NSpKyE> for an overview of what to >>> do. basically you need a csl file that provides the style you want, and >>> you specify it like this in the org file or in default settings. You may >>> also need a locale file if you are not blogging in english. >>> >>> #+csl-style: apa-5th-edition.csl >>> >>> #+csl-locale: en-US >>> >>> >>> You can find a basic example org file for html export with CSL at >>> https://github.com/jkitchin/org-ref/blob/master/examples/basic-csl.org >>> <https://github.com/jkitchin/org-ref/blob/master/examples/basic-csl.org> >>> >>> Here is a minimal way to export your blog file I suppose. >>> >>> (let ((org-export-before-parsing-hook '(org-ref-csl-preprocess-buffer))) >>> (org-open-file (org-html-export-to-html))) >>> >>> >>> John >>> >>> ----------------------------------- >>> Professor John Kitchin (he/him/his) >>> Doherty Hall A207F >>> Department of Chemical Engineering >>> Carnegie Mellon University >>> Pittsburgh, PA 15213 >>> 412-268-7803 >>> @johnkitchin >>> http://kitchingroup.cheme.cmu.edu <http://kitchingroup.cheme.cmu.edu> >>> >>> >>> >>> On Tue, Nov 30, 2021 at 12:16 PM András Simonyi >>> <andras.simo...@gmail.com <mailto:andras.simo...@gmail.com>> wrote: >>> >>> Dear Joseph, >>> >>> unfortunately, my note on the `citeproc-org` page has become kind of >>> misleading and has to be updated because org-ref didn't switch to the >>> new org-cite citation syntax after all, although this was the plan for >>> a while. I think if you wish to use org-ref 3 then you should simply >>> remove citeproc-org entirely -- if I understand correctly the latest >>> version of org-ref supports the old syntax as well and is capable of >>> CSL-based export (among others) on its own. >>> >>> best regards, >>> András >>> >>> On Tue, 30 Nov 2021 at 18:00, Joseph Vidal-Rosset >>> <jos...@vidal-rosset.net <mailto:jos...@vidal-rosset.net>> wrote: >>> > >>> > >>> > Dear John, and dear Andras, >>> > >>> > Having updated my org-ref to the last version, I see that the html >>> > export of bibliography does not work any longer for my blog. >>> > >>> > Reading Andras's note here >>> > https://github.com/andras-simonyi/citeproc-org >>> <https://github.com/andras-simonyi/citeproc-org> >>> > I confess that I am lost. >>> > >>> > What have I to do to not waste too much time with this problem? >>> > >>> > Best wishes, >>> > >>> > Jo. >>> > >>> >>