From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
Received: from mp0 ([2001:41d0:2:4a6f::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms0.migadu.com with LMTPS
	id OKTYGK2Qs2A7VwEAgWs5BA
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Sun, 30 May 2021 15:18:37 +0200
Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp0 with LMTPS
	id KOcOFK2Qs2A4NwAA1q6Kng
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Sun, 30 May 2021 13:18:37 +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 CEB90BF06
	for <larch@yhetil.org>; Sun, 30 May 2021 15:18:36 +0200 (CEST)
Received: from localhost ([::1]:52746 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	id 1lnLKr-0000DZ-99
	for larch@yhetil.org; Sun, 30 May 2021 09:18:33 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51752)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <bdarcus@gmail.com>) id 1lnLKV-0000DR-BL
 for emacs-orgmode@gnu.org; Sun, 30 May 2021 09:18:11 -0400
Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:44900)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <bdarcus@gmail.com>) id 1lnLKT-0006un-N7
 for emacs-orgmode@gnu.org; Sun, 30 May 2021 09:18:11 -0400
Received: by mail-wm1-x335.google.com with SMTP id
 y184-20020a1ce1c10000b02901769b409001so4978348wmg.3
 for <emacs-orgmode@gnu.org>; Sun, 30 May 2021 06:18:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :content-transfer-encoding;
 bh=EWunuyAnPTHhlTq4Lw65ehG7NAtW1aU5idlwnrq/dAI=;
 b=eJGDTrJXY/rXQJGLXYXQ5M1cNtceo7NxE0AqKD+zP01RHzxsaMxHRWxEmyOeMCn2AH
 I3x47OhGtuMAzGgGP1oZEu5z0QU0C0GXXTf47Qy2sq0QqjKFvpndSF/TjtbknamzrqSI
 bEP9QW/G5lZyyBeGBWvyM0l8Xyso+B5gD/x8hwm1pydZpa35Se8JEl/kZpLebeQ8TveA
 DE+BPkRBhJYuVvLJgZT6xnTbuMnzvxR9WkKxhTTdo0LlxX+b/YmM3UW0sth3GC1+Pwqx
 DL/EvKM2Nkmk+mirLtgJr/0tTNMAKepdnMimF7jP3XVxi2dUueZXtt2yYg/u2fAr4Qlc
 e0Hw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:content-transfer-encoding;
 bh=EWunuyAnPTHhlTq4Lw65ehG7NAtW1aU5idlwnrq/dAI=;
 b=Ayp4mcZJ+kPEXtZ0xp8Q7U4ooowiBlVBLyXi4Ug3lk2scs2O/50RuCRpwAbFyFKiUj
 6MqhFfTq73XoqFgvfkvaN8cjmWEmLA1S9hw0oAL8B4nXAZT2sSkis1XbNeQtpmkAwk8F
 fZSKbgwrlVKxloEpAGSLHkehbJkOImgbVuenRc+cn9CofBLomEQ4ARA4C0cUq9RWRXIn
 4DCl5cO71qXNCAuo0OxutirbTYHdZaNs0fychICbQ9ACUd3d7JOgYoUydqISOOl2SG/v
 4H2fZoR0OiklzYmnnEtXF3/MOUHxpu9meSIssUnwGmKBYlHdnC6Fx7r8eT3Uvw1EfgmZ
 qIaw==
X-Gm-Message-State: AOAM5323sTvSOFqlXLmQGY1Hsou4O4Kbn6NPPiSOJXWN0cEO+vpjAfPM
 wpHcO1uN0IEsKD5ib5T5+wyUJC1CXNTixWlb29o=
X-Google-Smtp-Source: ABdhPJzj0B6JA7pkFUZ6AJC2NlscJZrl6VkZ7a1PGMZlCm1ZmJDTQbX3p1g7hPlfKkKDriTCPNZqBGhA0E8+oSvCJX8=
X-Received: by 2002:a7b:c252:: with SMTP id b18mr17219090wmj.32.1622380688110; 
 Sun, 30 May 2021 06:18:08 -0700 (PDT)
MIME-Version: 1.0
References: <87y2c1dym9.fsf@nicolasgoaziou.fr>
 <CAF-FPGPgEO=KjnnUgi2X_y4iaARgj-21Vs+gEk7ObtZP8WL-Hw@mail.gmail.com>
 <875yz2c0r0.fsf@nicolasgoaziou.fr> <87fsy6n8d2.fsf@gmail.com>
 <87y2byaim4.fsf@nicolasgoaziou.fr> <877djin4qg.fsf@gmail.com>
 <87eedqahd6.fsf@nicolasgoaziou.fr> <874kemn3qt.fsf@gmail.com>
 <CAF-FPGO2vhYZ7OQqLchKnB9iW2a=u_pSWDR8WpRkg+GoFmMPxA@mail.gmail.com>
 <87y2by8x4p.fsf@nicolasgoaziou.fr>
 <CAOWRwxCCKAixRet4PNhyyGToCFtGY3x23KV7QVPNM1xKcPy8EA@mail.gmail.com>
 <CAF-FPGN-wHv_vy=4UbH089DK=0p8VTMBu70ke02SkQOwELdPTA@mail.gmail.com>
 <87sg25zf0z.fsf@nicolasgoaziou.fr>
In-Reply-To: <87sg25zf0z.fsf@nicolasgoaziou.fr>
From: "Bruce D'Arcus" <bdarcus@gmail.com>
Date: Sun, 30 May 2021 09:17:56 -0400
Message-ID: <CAF-FPGPjjb9wQmT32Un1y9i+q6BKtE3hQiSTYkNAYpeoivoN7A@mail.gmail.com>
Subject: Re: [wip-cite-new] Initial implementation of `csl' citation processor
To: "Bruce D'Arcus" <bdarcus@gmail.com>,
 =?UTF-8?Q?Andr=C3=A1s_Simonyi?= <andras.simonyi@gmail.com>, 
 org-mode-email <emacs-orgmode@gnu.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=2a00:1450:4864:20::335;
 envelope-from=bdarcus@gmail.com; helo=mail-wm1-x335.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: emacs-orgmode@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org
Sender: "Emacs-orgmode" <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
X-Migadu-Flow: FLOW_IN
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1622380717;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to: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=EWunuyAnPTHhlTq4Lw65ehG7NAtW1aU5idlwnrq/dAI=;
	b=Yw54qul5kSG1o81TWMmxdjnOnIvFiYWbpXXGdjX5ZRidNIwdzhodhHvkTSa4Wm6dkLp5Ll
	2O8hGXVWKV4fvfIPzSpa/cbON649o77UAEGMw26VDyowZPxB0FHezqTV4iBqaSu/mhBX6B
	BSuesyQKjjNtoLSsH6YPhhVFZLpTFqwmLMD2Aoelrat6Yv0BHjSeREJIGArAB1CM+uO8kY
	ix9aGAE0qh8rEuQswF5ahKoZf+durQpcNjuYlmfGmRnBZsZAc+bEKYr2j+tyddLrnVO/X3
	eYfzugTLQvJSRYEJbiLiUOgm5lK4anAmH17+E4zMgG2iIbGGa4n7MIP+iw+gKQ==
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622380717; a=rsa-sha256; cv=none;
	b=d1hK7Q8irJggBuFkETBni9D2Qpa5+lCZYIzj0Hi9aYpeRKtxgkw12/NBoh5hNojM3GqT7n
	ViP8nvB+FkWlVAsmu7XuLmx5QstP7KmMvSWdlcDI0rKW149x1eynSKZrKzKr8m0do6cQzJ
	B49WxSd1GY5KwnGEXWm9/Elj8t7DuwXsYvDkjCNi2VmNqwWL0yPgjc0BL1wdwwV49Z6byM
	ga7T5+mzQn1gLbh2fw0G/Cu+dLngIBWv4SyAm+NFfwgsOmVMbUAvTRkgwOdfK6DFzijDtI
	ClSLVjTcYaNCTSU8Xm9zFYf2vmuAaIbHw760+vx5WWpbhfvf5i0RmpUzvGE0xw==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=gmail.com header.s=20161025 header.b=eJGDTrJX;
	dmarc=pass (policy=none) header.from=gmail.com;
	spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org
X-Migadu-Spam-Score: -3.13
Authentication-Results: aspmx1.migadu.com;
	dkim=pass header.d=gmail.com header.s=20161025 header.b=eJGDTrJX;
	dmarc=pass (policy=none) header.from=gmail.com;
	spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org
X-Migadu-Queue-Id: CEB90BF06
X-Spam-Score: -3.13
X-Migadu-Scanner: scn0.migadu.com
X-TUID: K5d+URDuUyUE

On Sat, May 29, 2021 at 12:22 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> w=
rote:
>
> Hello,
>
> "Bruce D'Arcus" <bdarcus@gmail.com> writes:
>
> > On Fri, May 28, 2021 at 4:31 PM Andr=C3=A1s Simonyi <andras.simonyi@gma=
il.com> wrote:
> >
> >> Maybe instead of a full alist mapping backends to citation processors
> >> we could have only options to declare a separate processor for
> >> latex-based backends and another for non-latex ones?
> >
> > This would go a long way, and is probably all that's necessary.
> >
> > Really "latex" is the unique output mode here.
>
> But one may want to use a different processor for, say, beamer and
> regular latex. Both are "latex" based. Worse, all custom back-ends
> derived from "latex" are bound to use the same processor.

I indeed hadn't thought about that.

> Here's another proposal:
>
> `org-cite-export-processor' is now an alist, where keys are export
> back-ends or t, which is the default key.
>
>   '((latex biblatex bibstyle citestyle)
>     (beamer natbib nil nil)
>     (my-latex natbib bibstyle)
>     (t csl nil nil))
>
> The selected processor is the one associated to the back-ends closest to
> the current one used for export, by `org-export-derived-backend-p'
> order. So if `my-other-latex' is derived from beamer, it will use
> (natbib nil nil).
>
> OTOH, I suggest to stick to a single "cite_export" keyword, which
> overrides any selected processor above. IOW
>
>    #+cite_export: basic
>
> will use basic whatever the current export back-end is.
>
> In practice, I think it is sufficient. The only case where it may be
> limiting is if you need to export with two different back-ends with two
> processors different from those set in `org-cite-export-processor'. But
> in that situation, I think swapping the cite_export keyword is
> acceptable.
>
> So overall, I think it is a good compromise between simplicity and
> power.
>
> WDYT?

I'm not the best person to weigh in on org details, but in general, it
looks good to me.

Just to confirm, then, this would allow me to specify:

1. oc-csl as default
2. oc-biblatex as default for latex
3. locally override

With 3, if on a particular document I didn't want 2, I'd just do this
in the document, which would suppress 2 in effect?

#+cite_export: csl style

...?

Would you have this nil by default, or is there a reasonable default
you could set?

Bruce