From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wEJ8Nev0p2E2CgEAgWs5BA (envelope-from ) for ; Wed, 01 Dec 2021 23:19:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id YNoqMev0p2FMRgAA1q6Kng (envelope-from ) for ; Wed, 01 Dec 2021 22:19:23 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3C3B2C2D6 for ; Wed, 1 Dec 2021 23:19:23 +0100 (CET) Received: from localhost ([::1]:54676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msXwg-0002p6-94 for larch@yhetil.org; Wed, 01 Dec 2021 17:19:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msXw6-0002oq-5y for emacs-orgmode@gnu.org; Wed, 01 Dec 2021 17:18:46 -0500 Received: from [2607:f8b0:4864:20::82e] (port=46913 helo=mail-qt1-x82e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msXw1-0006KU-HY for emacs-orgmode@gnu.org; Wed, 01 Dec 2021 17:18:44 -0500 Received: by mail-qt1-x82e.google.com with SMTP id m25so25598613qtq.13 for ; Wed, 01 Dec 2021 14:18:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=Ym+kDomXEbid8ugptpLZ12taSDwlwmUB7hZRIyNIHI0=; b=bfxxxQFGkts/7YsQXZo3vEybMKR5hBLb03Zdl2EnOzk6MbcwHpaVJenwZxR5LRzrRR /ZlaMOtaqcbM96d3c9904JxSARDUQQqxcbnU7NohrBNWy14hln2ot1ce265TjiJ4hqFg VCMCIvR6Ftdop5AizNQRTWu+H/4rNwYTmEM85YuyBYBm/K3Xya+4zpsQwBU9u8ZVC+8S FjqvsR1nbLlMwx9T3ui1WQhRlrIo2x6TxCgt8fRO0ZiuL/F/4kOPoUgnyICEdzK4NR45 rznw628fU2RTBldFLEP3diIO9AXvnYRFijsV9qzAJMplxUueVhn1ZTSqlURitridyiEN Ilzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:references:user-agent:from:to:cc:subject :date:in-reply-to:message-id:mime-version:content-transfer-encoding; bh=Ym+kDomXEbid8ugptpLZ12taSDwlwmUB7hZRIyNIHI0=; b=sN1zKH1bE0dHxqahzbgZGg3eJ7u9ZR9myAeoCkeMsqaptK0dUuJpwVVzYivvXAC+nK qFnFmb8l8U3zo7l0A4Cuwgrt/cn5C8OArLYFvQiIMQuql8L7zRo4oVlcXb6C0QZuAIue aZxreqDnrrxoxIEXuNjzEjZjUOfkuq2p+a3+kE3rLtP2MGzSyYyAf1k416sx/US6qkaE 8XRpyVZXiHs2oi/FHeK6RI1GE5wEGJTh3y6K7qgFPoDg1Jh7AUqAQO29zpi6uzP9QY3i 8z4QCi0Sg+c1THv4p7Wq+C3F92i/rndI2Ybt7Yxn1XVmbsyA2WWcsowSfCDHDy/WGkts K3ww== X-Gm-Message-State: AOAM530i6sWPfv1MaOmEYav7uMWRJzW7bUUOKmqMqp6nn5FyqdkBvz1G cX2ZEmqd9a/KO6jbYhUR7wD4p2BUYM8= X-Google-Smtp-Source: ABdhPJyTfEn609u46lDcPJPLZC8CdQdjNKEmZqQk2GxJO+SWnK6Xjiu57asiCWP5lyF6SCXWi/8CUw== X-Received: by 2002:a05:622a:e:: with SMTP id x14mr10188790qtw.432.1638397119610; Wed, 01 Dec 2021 14:18:39 -0800 (PST) Received: from Johns-iMac.local ([2601:547:901:82e0:9c6:5371:40e4:9e90]) by smtp.gmail.com with ESMTPSA id g12sm573997qtk.69.2021.12.01.14.18.38 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Dec 2021 14:18:38 -0800 (PST) References: <56442351-6f41-3490-01f2-0ca5aa930c6a@vidal-rosset.net> <573b6fad-e445-3f53-9cd5-43d5b7f86904@vidal-rosset.net> User-agent: mu4e 1.6.8; emacs 28.0.60 From: John Kitchin To: Joseph Vidal-Rosset Subject: Re: citeproc-org and org-ref 3 Date: Wed, 01 Dec 2021 17:16:43 -0500 In-reply-to: <573b6fad-e445-3f53-9cd5-43d5b7f86904@vidal-rosset.net> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::82e (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::82e; envelope-from=johnrkitchin@gmail.com; helo=mail-qt1-x82e.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: org-mode-email , =?utf-8?Q?Andr=C3=A1s?= Simonyi Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1638397163; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Ym+kDomXEbid8ugptpLZ12taSDwlwmUB7hZRIyNIHI0=; b=ABtoU3y5ayNewnEafecord6gfJ4iP4D5ZMm0cfQweZouGNf8nSBE8cuACFFRReDp5BFAUd QZAbQkiYQm2Sj5+0EXohKJlkiqBAkgO91iC5GKkLC6BqVx+VYQkOB0wPTl2c8lbGYy55dj hzhCRbUTe77YSwCANe5vWeiPeEfBT5WLn/Rq3E+2L63JDHsnr2cKCcD2NFA12utx2rvgXQ mpWN3ga4TLaOIdMGsLZg1QIxd8tzYb6/y83qq5/zQl+mYfBZlcQmZ6auqAyJZCXc5Qlc09 NXjkkbBg2p9Xw5eB2cXRslmUQ7JLeLZMCSt77KgaclpYcld+1iVQRTZx2H7RTQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638397163; a=rsa-sha256; cv=none; b=Gqy0iZ4bwTB5ft1zkPAn3mZrmOAhUZnI0HmmaA4zgCQhBktnY3LLuUHuJJdJTS/HauR6lX K0MMhkFjEuCMNY7fcjvHSPchMDvda/EuvX/T/i1B74U3LYjWAhbfc0KZuqKsr6XWrxzIlu Zly0lar/agGlNcL6isA/u5lNg2OA1l+02c7deYATVopb5pDlO2FFTib+HBz05cknK5/v2t wK5S7np9rQAFBizxKJZG0vnYZiHu6dGoSIEgYJF4cWiHJZgmfULfJb7Uo1E/8UaKhvDmvx 8vbabqgKkauakYaHBd41HH4XY9n3Uok5u+nXFotW8MMmGiGYYKiYcc2szyBlXg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=bfxxxQFG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=andrew.cmu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.82 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=bfxxxQFG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=andrew.cmu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 3C3B2C2D6 X-Spam-Score: -1.82 X-Migadu-Scanner: scn0.migadu.com X-TUID: OP5EW0M9XXZY Joseph Vidal-Rosset writes: > 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 > This code should not go in your init file. It is executed each time, and not what you want. I usually put it a src block at the end in a section tagged noexport and run it from there. Alternatively, if this is the only preprocessing you do, I think you can do C-c C-e rh to export to html (this runs the org-ref html exporter. Finally, if you really want something in your init file it should be like this: (defun my-html () (interactive) (let ((org-export-before-parsing-hook '(org-ref-csl-preprocess-buffer))) (org-open-file (org-html-export-to-html)))) and then later you run it with M-x my-html > 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... :( See of the one at https://github.com/jkitchin/org-ref/blob/master/examples/basic-csl.org works. The bib file is in https://github.com/jkitchin/org-ref/blob/master/org-ref.bib. > > Best wishes, > > Le 01/12/2021 =C3=A0 17:33, Andr=C3=A1s Simonyi a =C3=A9crit=C2=A0: >> 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 =3D 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=C3=A1s >> >> On Wed, 1 Dec 2021 at 16:50, Joseph Vidal-Rosset >> 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 >>> =E2=80=98/home/joseph/.emacs.d/init.el=E2=80=99: >>> >>> 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 =E2=80=98--debug-init=E2=80=99 option to view a complete error back= trace. 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") ("=3Dtype=3D" . "InBook") >>> ("=3Dkey=3D" . "curley-nil-on-bennet-spinoz")) nil nil) >>> #f(compiled-function (key entry) #>> -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") ("=3Dtype=3D" . "InBook") >>> ("=3Dkey=3D" . "curley-nil-on-bennet-spinoz"))) >>> maphash(#f(compiled-function (key entry) #>> -0x7fcb46b5c8e80b3>) #) >>> 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(# 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/myorg= export..." >>> "/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(# nil "/home/joseph/.emacs.d/init.el" n= il >>> 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 () #>> 0xec639179d6199fa>) #f(compiled-function () #>> -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 =C3=A0 18:31, John Kitchin a =C3=A9crit : >>>> See https://www.youtube.com/watch?v=3DrRR-5NSpKyE >>>> for an overview of wha= t 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 m= ay >>>> 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 >>>> >>>> >>>> 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 >>>> >>>> >>>> >>>> On Tue, Nov 30, 2021 at 12:16 PM Andr=C3=A1s Simonyi >>>> > 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 pla= n for >>>> a while. I think if you wish to use org-ref 3 then you should sim= ply >>>> remove citeproc-org entirely -- if I understand correctly the lat= est >>>> 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=C3=A1s >>>> >>>> On Tue, 30 Nov 2021 at 18:00, Joseph Vidal-Rosset >>>> > 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 >>>> >>>> > I confess that I am lost. >>>> > >>>> > What have I to do to not waste too much time with this problem? >>>> > >>>> > Best wishes, >>>> > >>>> > Jo. >>>> > >>>> >>> --=20 Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu Pronouns: he/him/his