emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "András Simonyi" <andras.simonyi@gmail.com>
To: Joseph Vidal-Rosset <joseph@vidal-rosset.net>
Cc: org-mode-email <emacs-orgmode@gnu.org>,
	John Kitchin <jkitchin@andrew.cmu.edu>
Subject: Re: citeproc-org and org-ref 3
Date: Wed, 1 Dec 2021 17:33:56 +0100	[thread overview]
Message-ID: <CAOWRwxC=p7ij8DEWTOq8TYqGsZBkcLT3oYFNcnj+OKqudCppqA@mail.gmail.com> (raw)
In-Reply-To: <aecb4621-de37-fedb-aac5-e755badca073@vidal-rosset.net>

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
<joseph@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.simonyi@gmail.com <mailto:andras.simonyi@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
> >     <joseph@vidal-rosset.net <mailto:joseph@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.
> >      >
> >
>


  reply	other threads:[~2021-12-01 16:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 17:00 citeproc-org and org-ref 3 Joseph Vidal-Rosset
2021-11-30 17:16 ` András Simonyi
2021-11-30 17:24   ` Joseph Vidal-Rosset
2021-11-30 17:31   ` John Kitchin
2021-11-30 18:15     ` Joseph Vidal-Rosset
2021-12-01 15:49     ` Joseph Vidal-Rosset
2021-12-01 16:33       ` András Simonyi [this message]
2021-12-01 16:48         ` Joseph Vidal-Rosset
2021-12-01 22:16           ` John Kitchin
2021-12-02 13:17             ` Joseph Vidal-Rosset
2021-12-02 15:56               ` Joseph Vidal-Rosset
2021-12-02 17:35                 ` John Kitchin
2021-12-03  8:04                   ` Joseph Vidal-Rosset
2021-12-03 15:24                     ` John Kitchin
2021-12-03 16:48                       ` Joseph Vidal-Rosset
2021-12-03 17:13                         ` John Kitchin
2021-12-04 14:23                           ` Max Nikulin
2021-12-04 14:45                           ` Joseph Vidal-Rosset
2021-12-04 15:07                             ` John Kitchin
2021-12-04 15:31                               ` Joseph Vidal-Rosset
2021-12-01 22:08         ` John Kitchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOWRwxC=p7ij8DEWTOq8TYqGsZBkcLT3oYFNcnj+OKqudCppqA@mail.gmail.com' \
    --to=andras.simonyi@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    --cc=joseph@vidal-rosset.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).