From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QDvnM7pH2GJH3AAAbAwnHQ (envelope-from ) for ; Wed, 20 Jul 2022 20:21:46 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 8GXvMrpH2GJjfwAAG6o9tA (envelope-from ) for ; Wed, 20 Jul 2022 20:21:46 +0200 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 1D5B5BDA0 for ; Wed, 20 Jul 2022 20:21:45 +0200 (CEST) Received: from localhost ([::1]:38496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oEEKO-0000nB-9d for larch@yhetil.org; Wed, 20 Jul 2022 14:21:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEEJe-0000P5-KA for emacs-orgmode@gnu.org; Wed, 20 Jul 2022 14:20:58 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:45849) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oEEJc-0001Rw-6L for emacs-orgmode@gnu.org; Wed, 20 Jul 2022 14:20:58 -0400 Received: by mail-ej1-x62b.google.com with SMTP id fy29so33402240ejc.12 for ; Wed, 20 Jul 2022 11:20:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew.cmu.edu; s=google-2021; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2ugfAgG2EdJj3s9IS3vKZKRuLpyn0vsiYB2o5nrtr9U=; b=KY50RnFbj7kbXcvunenPC/gBWoplBZoCh4ojXu7wh94X7TdzUGik3d650JrZRlJ284 9k5nWglG6cdueqtTJI31dJfXKshSLjAAhahA0RzFvUim0BV1x6pvJxBA9JDfsgXhbw1o 8fTM8pDevvO4Gx4uZaVFPJA+mXu6lc3zJqL+CElmz93OJx7iFcgSe0437rG+udJDusEt gtCks/sPumJ/dY+ktRGvqEAv927bHUgYKYtfLoezE5S07bFwOitTC2zwucjS2WarhYd7 ey6Au/M/fWqi3WrqyFi+/+y38JHhY315CPlYGESY0zuOePQwUWQXB85m7JREWPLpOtJd 4Fdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2ugfAgG2EdJj3s9IS3vKZKRuLpyn0vsiYB2o5nrtr9U=; b=u4E+MbMEJqieyqSpNiWV1AQpC2ESLTZQg5CSB01befF0J+rux+f25KR1Z/ah/0EmQy aRnmosBsWmd5Y9ExKbSGrX+G8whrDDz9O7AMKKz3lUWbDRxMdAOHRTjaBYqzi3SWJTXc 51QLkLqDrdf3YQKMu7sq5rzjhzqAs7FjCX6c+HZc2gjN0+DLO/mLnP1tKF61YyDpPhtM GrrRhNyaWXOEZkNv3FUu9VdCtHydevBS7Y0t2m6qMOl3zFGzHKRWUsimZs41I7FfaUY3 dFQimFDgZrHrt0KEBwBLkrdCLPHuUV7aJ965lGcabfXbzRXfxvHVicKWk13mmpXm56bZ 99jQ== X-Gm-Message-State: AJIora9tjmlCxU2mdBW+Nb3LJT7/uhPn0Rihapq4C0+GC0WCBeV+wDfO OC7wjBz94Gvs/ZisoPzlUnOjy7hd/o7DVsAmRpJwHa4Koqw= X-Google-Smtp-Source: AGRyM1sav4Pcs164Hc6H+cma1tcOGZyBxXog+dkSNInsd2vA3gBxW1cNt4HSqIFnzO53CiDSUhOLFdT5DGMIJ3BJrB0= X-Received: by 2002:a17:907:6e0e:b0:72b:9ec4:2ba2 with SMTP id sd14-20020a1709076e0e00b0072b9ec42ba2mr35449051ejc.300.1658341253395; Wed, 20 Jul 2022 11:20:53 -0700 (PDT) MIME-Version: 1.0 References: <9e7e014f-bd84-c6cd-62ce-1038495fc3a5@vidal-rosset.net> In-Reply-To: <9e7e014f-bd84-c6cd-62ce-1038495fc3a5@vidal-rosset.net> From: John Kitchin Date: Wed, 20 Jul 2022 14:20:42 -0400 Message-ID: Subject: Re: org-ref 3 setup To: Joseph Vidal-Rosset Cc: org-mode-email , bozhidar@batsov.dev Content-Type: multipart/alternative; boundary="000000000000533c8f05e440a9d8" Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=johnrkitchin@gmail.com; helo=mail-ej1-x62b.google.com X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URI_DOTEDU=1.246 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658341306; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=2ugfAgG2EdJj3s9IS3vKZKRuLpyn0vsiYB2o5nrtr9U=; b=MEQMwvn6TupdLQvUi2X6GhRDiJ3z1OqQ8r/hFrL2QzwWzbW8AdxZo+cnKJpayE0WMhVzIs zoU3k8ionqe4d5EmhWus60kvEkCjodTanihHayUSc5I+5QmIFcax2FG20c+Rw6YZSyOXdV VuSKYLJPpHvW+xKCmMeKi2U+w4j9f9i6tiPNRPXLK3Qj/OMkGQs54WL5GIOiasG5ZeqZMN d+T0cV/QvNNBkzlJe7q413LQ27EJQEQoEVINHFimWWxaV6mIB7S0TlM/GA70BP2XUmlaH2 8IOpbgZ7tCVDZlvqy8Z/BgDrDciTQD/MYNplKr6TckvnCrZDavZAnYCTrRclHw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658341306; a=rsa-sha256; cv=none; b=Vpur3gUliPbRP+MYz2JLfQPadE9JqK0/9apef9UWZAYTy6MwbhLubOXdgvQM5r5g4C0dzV ceM++0CYxtLkuOUCyL1w5Mebij6+qnXOnpY4kN6rO35G5VyKRT261QrWfSyKip8vaB5RwJ zPtVjAm0VBmHOo6Z4H4BBwrR24/zzRhdNwJfbf5YoVOsBXP7QapFSCfW3z8Cx78g8rkaXA fByIHcpC8AJh94HZW12gq0ucljQjxxadz3C7uX8Io/ydNDcrqvhJrq1RsD5k5yCnaI26KM +C3aYPaQmqhJKljLAaz+M5+8eEhAmWZIz8QmFGVgxZeLf6frGkKFd8q+OxcY1Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=andrew.cmu.edu header.s=google-2021 header.b=KY50RnFb; dmarc=pass (policy=none) header.from=andrew.cmu.edu; 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: -3.43 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=andrew.cmu.edu header.s=google-2021 header.b=KY50RnFb; dmarc=pass (policy=none) header.from=andrew.cmu.edu; 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: 1D5B5BDA0 X-Spam-Score: -3.43 X-Migadu-Scanner: scn1.migadu.com X-TUID: 5wJooLIuA1N1 --000000000000533c8f05e440a9d8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable indeed, you should only use that before parsing hook for non-latex exports. See the documentation for org-export-before-parsing-hook. You need to write a function that takes one argument and does nothing for latex, and calls the csl processor otherwise. perhaps something like this: (defun org-ref-preprocessing (backend) (unless (eq backend 'latex) (org-ref-csl-preprocess-buffer backend))) (setq org-export-before-parsing-hook '(org-ref-preprocessing)) John ----------------------------------- Professor John Kitchin (he/him/his) Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin https://kitchingroup.cheme.cmu.edu https://pointbreezepubs.gumroad.com/ pycse bookstore On Wed, Jul 20, 2022 at 10:48 AM Joseph Vidal-Rosset < joseph@vidal-rosset.net> wrote: > > Le 20/07/2022 =C3=A0 16:20, Joseph Vidal-Rosset a =C3=A9crit : > > > > > > Le 20/07/2022 =C3=A0 15:38, John Kitchin a =C3=A9crit : > > > >> (let ((org-export-with-broken-links t) > >> (org-latex-pdf-process > >> '("pdflatex -interaction nonstopmode -shell-escape > >> -output-directory %o %f" > >> "bibtex %b" > >> "makeindex %b" > >> "pdflatex -interaction nonstopmode -shell-escape > >> -output-directory %o %f" > >> "pdflatex -interaction nonstopmode -shell-escape > >> -output-directory %o > >> %f"))) > >> (org-open-file (org-latex-export-to-pdf))) > >> > >> > >> this doesn't do anything in your init file to change anything. it only > >> temporarily (let) defines some variables, and then tries to export the > >> current buffer (an elisp file) to pdf and open it. that is a mistake > >> to try. > > > > You are certainly right. I believe that these lines block a > > configuration file that is responsible for the fact that the export via > > pdflatex does not work correctly. This file is therefore loaded after > > myorgexport.el, like mysnippets.el that is not loaded, for example. It > > is also possible that myorgexport.el itself is somewhere incorrect. > > > > I will go to make tests, I'll keep you informed. > > The BIG advantage of launching Emacs Prelude with emacs --daemon is that > it is possible to identify (with your help in this case, John) the > reason of a problem in such or such setup, every personal setup being > located in possible several small files ~/.emacs.d/personal/myfile1.el, > ~/.emacs.d/personal/myfile2.el, etc. > (I am really thankful to Bozhidar Batsov - hence this cc. to his email > address - and to all the contributors of Prelude Emacs, and I recommend > this nice starter kit for Emacs.) > > John, you kindly gave me a solution to get the bibliography in an html > email exported via gnus and orgmode, and in my > .emacs.d/personal/myorgmime.el I had this line of code: > > > (setq org-export-before-parsing-hook '(org-ref-csl-preprocess-buffer)) > ;; to get the bibliography in email (thanks to John Kitchin) > > Deactivated, the export in pdflatex works correctly for the > bibliography... I now have to find a coherent way to get both exports of > bibliography... > > Many thanks John for your so kind, so constant, and so patient help ! > > All the best, > > Jo. > > --000000000000533c8f05e440a9d8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
indeed, you should only use that before parsing hook for n= on-latex exports.=C2=A0

See the documentation for=C2=A0= =C2=A0org-export-before-parsing-hook. You need to write a function that tak= es one argument and does nothing for latex, and calls the csl processor oth= erwise.
perhaps something=C2=A0like this:

(defun org-ref-preprocessing (backend)
=C2=A0 (unless (eq backend '= ;latex)
=C2=A0 =C2=A0 (org-ref-csl-preprocess-buffer backend)))

(setq org-export-before-parsing-hook '(org-ref-preproc= essing))


John

-----------------------------------
Prof= essor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chem= ical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
4= 12-268-7803
=


On Wed, Jul 20, 2022 at 10:48 AM Jo= seph Vidal-Rosset <joseph@vid= al-rosset.net> wrote:

Le 20/07/2022 =C3=A0 16:20, Joseph Vidal-Rosset a =C3=A9crit=C2=A0:
>
>
> Le 20/07/2022 =C3=A0 15:38, John Kitchin a =C3=A9crit=C2=A0:
>
>> =C2=A0=C2=A0=C2=A0 (let=C2=A0 ((org-export-with-broken-links t) >> =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 (org-latex-pdf-proce= ss
>> =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '("p= dflatex -interaction nonstopmode -shell-escape
>> =C2=A0=C2=A0=C2=A0 -output-directory %o %f"
>> =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"b= ibtex %b"
>> =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"m= akeindex %b"
>> =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"p= dflatex -interaction nonstopmode -shell-escape
>> =C2=A0=C2=A0=C2=A0 -output-directory %o %f"
>> =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"p= dflatex -interaction nonstopmode -shell-escape
>> =C2=A0=C2=A0=C2=A0 -output-directory %o
>> =C2=A0=C2=A0=C2=A0 %f")))
>> =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0(org-open-file (org-latex-ex= port-to-pdf)))
>>
>>
>> this doesn't do anything in your init file to change anything.= it only
>> temporarily (let) defines some variables, and then tries to export= the
>> current buffer (an elisp file) to pdf and open it. that is a mista= ke
>> to try.
>
> You are certainly right. I believe that these lines block a
> configuration file that is responsible for the fact that the export vi= a
> pdflatex does not work correctly. This file is therefore loaded after<= br> > myorgexport.el, like mysnippets.el=C2=A0 that is not loaded, for examp= le. It
> is also possible that myorgexport.el itself is somewhere incorrect. >
> I will go to make tests, I'll keep you informed.

The BIG advantage of launching Emacs Prelude with emacs --daemon is that it is possible to identify (with your help in this case, John) the
reason of=C2=A0 a problem in such or such setup, every personal setup being=
located in possible several small files=C2=A0 ~/.emacs.d/personal/myfile1.e= l,
=C2=A0 ~/.emacs.d/personal/myfile2.el, etc.
(I am really thankful to Bozhidar Batsov - hence this cc. to his email
address - and to all the contributors of Prelude Emacs, and I recommend
this nice starter kit for Emacs.)

John, you kindly gave me a solution to get the bibliography in an html
email exported via gnus and orgmode, and in my
.emacs.d/personal/myorgmime.el I had this line of code:

> (setq org-export-before-parsing-hook '(org-ref-csl-preprocess-buff= er))=C2=A0 ;; to get the bibliography in email (thanks to John Kitchin)

Deactivated, the export in pdflatex works correctly for the
bibliography... I now have to find a coherent way to get both exports of bibliography...

Many thanks John for your so kind, so constant, and so patient help !

All the best,

Jo.

--000000000000533c8f05e440a9d8--