From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qNpALVkOYmMVBQEAbAwnHQ (envelope-from ) for ; Wed, 02 Nov 2022 07:29:45 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id YJJOLVkOYmOsZgEA9RJhRA (envelope-from ) for ; Wed, 02 Nov 2022 07:29:45 +0100 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 6EB9C9827 for ; Wed, 2 Nov 2022 07:29:45 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oq7F0-0001WZ-EW; Wed, 02 Nov 2022 02:28:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oq7Ey-0001WD-Lf for emacs-orgmode@gnu.org; Wed, 02 Nov 2022 02:28:44 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oq7Ew-000061-HD for emacs-orgmode@gnu.org; Wed, 02 Nov 2022 02:28:44 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 355C9240101 for ; Wed, 2 Nov 2022 07:28:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667370520; bh=4HwuSB4vam2eBLALgdz0NC0QiTtBo/xtKNDCKk+CIt4=; h=From:To:Cc:Subject:Date:From; b=gB7nvKjcIp3wx6fGgFksA39AeiCdYc5WMo3pCUEZiDrZu6ZD6ZEvfb7pxfoH3zW1w zD7mBurybTdzdWqLIURnuBAeSwYfsXnGXLfmjzRMaNNSoXNnUWI+Kzwi4KXGG9LXmX B9ApbExpA6k8Q/hkdiHVgzqQ569Z9GgjJJ7sviVdMzT+0Uu1NZszAHWzCh72FJCJHP c/jy1NPqcEFZpIb19JpR5bZtfR/xm3s8+M3557RPYftvG+7znOCM4BT3orNmipfR7e chP3F72AQl60Ty5YFQHxcMa1vFO31aqhOtQwQ47K8IX1knduO0zmgoYFjnu5WYT/Cf Xk1LCMKxu3r4w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N2H5d2mR8z6tqr; Wed, 2 Nov 2022 07:28:37 +0100 (CET) From: Ihor Radchenko To: =?utf-8?Q?Andr=C3=A1s?= Simonyi Cc: emacs-orgmode list Subject: Re: [PATCH][oc-csl] Improve reference parsing In-Reply-To: References: <87r0ytoqi6.fsf@localhost> Date: Wed, 02 Nov 2022 06:29:13 +0000 Message-ID: <87k04dlvie.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org 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=1667370585; 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=LsfNG0z8JM4Y1OyYEtcH4ZN3AFi2yMjQC4Qu0QAADJ8=; b=W0sXc2JclfVGde2FXjtC8YMa0rQI/WZcdKwrXgfYlbEwaYgD9DDpvldtq+bMLmlQo8w0ok PnMRzFCCnm0E+6+QHoyXIr2gWlbfVMNIhIT4CgPOGTEl5iPp1J+4Gk80rdqA30cxRnaSrR Aq3Y2h3BiXpKo3QKfuQd6jTQtu+ThpeoTju1IRJT7T8KAlQ0ZiuigWPARTQJdh+n2VGYC2 rm6S7tGzW+SFHGRn7Ux76Y9c0Sbx8S7QNWMToI1dMaoqwjhZgGwDXgMzH+8PPzkq7BenmE 0SAqQIsSpOVv3VL/KtWNTX7ifi9zT1EXseh/Bwr6l3fhW0Z7utRsQ8fMxBtB1Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667370585; a=rsa-sha256; cv=none; b=U+3UXwOMLZ7ZwBuKJYFWtjKXf2TZas0/sapS0YVuY9+Cqx3Egf3tn405Ip0xwslhh6Tko4 Qo8nVHvF0YFA2DZ6GAJ0xNuVzJdbYrd1gP5qnlRGawwRR05jXIckxKKfXzG50KNd3uxN/3 v5vGSI9lXbMpUq8FHOHM9tu8GUp0mg9sa0hWCqvCLJ3ZYokjy534AowbdC/1C9QNNmKoPg kmrJ/m8pSv0s/0IlJXyRvryBLQjtdUKRO6GezUc4LUaf0kHFEQFGR8Mrm0a400FotTYGce jEvSTjWy1eh/yudENa42nA/2WelV8M642RVY3T+J8no1E1muYnqBOFbc+l0rgg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=gB7nvKjc; dmarc=pass (policy=none) header.from=posteo.net; 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.48 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=gB7nvKjc; dmarc=pass (policy=none) header.from=posteo.net; 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: 6EB9C9827 X-Spam-Score: -3.48 X-Migadu-Scanner: scn1.migadu.com X-TUID: o14NffBsyukA Andr=C3=A1s Simonyi writes: > thanks for pointing out the problem!! I've attached a new version of > the patch, in which the custom exporter backend has an (in many cases > trivial) translator for all currently allowed objects. Thanks! >> And we may add more, as discussed in >> https://orgmode.org/list/87k04xhhw3.fsf@localhost > > I don't think that it would make much sense to add a lot more, with > the possible exception of links, since citations are at most > sentence-sized textual units, not to mention the possible > complications arising for the existing export processors. (What type > of objects could the various LaTeX-based exporters support without > complex changes?) Since CSL has only a few types of formatting > attributes (font-style, font-variant, font-weight, text-decoration and > vertical-align), if the set of allowed object is radically expanded > then it will probably be more reasonable to define a derived backed, > maybe based on the ascii exporter, but I feel that the current set > doesn't require this solution. I do not think that CSL limitations are really limiting us. - Allowing macros will be handled by ox.el itself automatically - Export snippets can also be processed without much issue (consider direct LaTeX code) - inline-babel-call and inline src blocks may be useful with :exports results when some auto-generation of text is needed. They will also be handled automatically by ob-exp. - latex-fragments are either equivalent to direct LaTeX or to inserting an image - timestamps could be exported as text, although I do not see any obvious utility of timestamps inside references. However, oc-csl should not ignore the export processor to support all the above. I am not sure why you need a dedicated export processor instead of passing the string to current processor (or derivative) instead. If you really need to mark certain constructs specially for CSL, you can create a derived export backend for the current backend and replace the transcoders for the object types that must be treated specially. > +(defconst org-cite-csl--export-backend > + (org-export-create-backend=20 > + :transcoders > + '((bold . (lambda (_bold contents _info) (format "%s" contents= ))) > + (code . org-cite-csl--element-value) > + (entity . (lambda (entity _contents _info) > + (format "\\%s" (org-element-property :name entity)))) Why :name, but not :html? --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at