From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2CniL0mXdGDkYgEAgWs5BA (envelope-from ) for ; Mon, 12 Apr 2021 20:54:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2KSzKUmXdGDLUQAAbx9fmQ (envelope-from ) for ; Mon, 12 Apr 2021 18:54:01 +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 C8CC7224C2 for ; Mon, 12 Apr 2021 20:54:00 +0200 (CEST) Received: from localhost ([::1]:52548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lW1h9-0004IC-VD for larch@yhetil.org; Mon, 12 Apr 2021 14:54:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lW1ge-0004Hk-Sl for emacs-orgmode@gnu.org; Mon, 12 Apr 2021 14:53:28 -0400 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]:34309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lW1gc-0003EE-Js for emacs-orgmode@gnu.org; Mon, 12 Apr 2021 14:53:28 -0400 Received: by mail-io1-xd2b.google.com with SMTP id x16so14552835iob.1 for ; Mon, 12 Apr 2021 11:53:25 -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=Uxt7XQBLCVBihFkj/Bx0QjXGNOMAkGjDEssi5u28Xbw=; b=u38LvvRyac6hN0Olh56lgeBfmk67AgdMtOXUc9qEqtDFNGXdulv2S2V0kl1w0dQto5 fK/H/WP5SpU014zSV02wOUN0p7Mmo+uU5f2iBL+PqNF2vF3iEHqLtOTSsy2gGAyuZfXF LQHVsGXTQ2II1VdaCapzpo3h92X3/6hCtEp3Fg5uD5QKCfVn0iTvuXgqxGLQ9U5gDFEo mTkFfsEJVYyQDB8j23NnOWna5vgcKZXSNA4os6K8Hk+lDHx+spiKdZIxJrcZ2pNOvNvj FgKW8eJD8ATvgamJmAt4FMgPz6n6oe36kh29yq4HRJfPyhOdopZH1ibAWIe/6lJTxyFI fREw== 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=Uxt7XQBLCVBihFkj/Bx0QjXGNOMAkGjDEssi5u28Xbw=; b=DWh9rpRY3X0EJXL3qamFtK59ntVW84v3aaeXIrURHb4RdNlwAwDEql9x4lCTTJdrBT WgM69/TqoS6JsQdEQolNgs8gTP/20JUNE2NIJB6O2h9MjotrBGnxL2PRa0G1hNSvcYHm SE2Dm4k7+bF5QnoMHWCi8Nyjl4CFjnGhnwEgSi9HoYs5u1vuKtAn4+haknVNO8q9GHou zHuCn/HMgBwrYrBaY58jIqncd3a0NkQWWx5y8SDUV+j1JimzU9sWaI4uRdGBXwot3SbE Z5B26YW02TYAQRxIcjDjdo8PLKk23mfruD/zqcYaMFuyJijfFxAdYPMaj8rVAfRggE5z l9sw== X-Gm-Message-State: AOAM530hWeMvJBlRFi4eSF4aCELO+dnZfthq7iN+oJUm2e8hrlgKjeNv QqDOdqH9Mp39BTSjchsBYRHSxNJ2tu6zQrKMUGQ= X-Google-Smtp-Source: ABdhPJw5OGWiSjyiQqMvZKLWBZuln+S/R/pu62wdqnUNH4nlsEdlr7MuOuFqdXtPPF80WNCdMpEbR5XWbYWBVEoRkhU= X-Received: by 2002:a5d:8ad2:: with SMTP id e18mr24107047iot.51.1618253604955; Mon, 12 Apr 2021 11:53:24 -0700 (PDT) MIME-Version: 1.0 References: <874ktu8gr9.fsf@nicolasgoaziou.fr> <87mu5xpm4x.fsf@gnu.org> <87img81ad7.fsf@gnu.org> <20210324182751.GA8721@atlantis> <87czuzprmh.fsf@nicolasgoaziou.fr> In-Reply-To: <87czuzprmh.fsf@nicolasgoaziou.fr> From: =?UTF-8?Q?Andr=C3=A1s_Simonyi?= Date: Mon, 12 Apr 2021 20:53:12 +0200 Message-ID: Subject: Re: wip-cite status question and feedback To: "Bruce D'Arcus" , "emacs-orgmode@gnu.org" , =?UTF-8?Q?Andr=C3=A1s_Simonyi?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::d2b; envelope-from=andras.simonyi@gmail.com; helo=mail-io1-xd2b.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." 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618253641; 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=Uxt7XQBLCVBihFkj/Bx0QjXGNOMAkGjDEssi5u28Xbw=; b=bPO8rccOMLJ2WfjH7inyqUTiv/WhDYZUcEkbzngP1h0Ov8mnxCBschSuPMu4BKOhoVw+Ul QUKpiDbjD4PPHb49LjFuk/81J4sca+1FCjNrAciRiH8K4iXUoHwmTKyhK2JS3qdwWoNqN9 XRkhbbtJIf90NBh3LKMKu8PPueQKNC/tLqLRTt5+VTrYHq4KO9OC+EhPrfQY288h+bxykI gttOzFsIkBZEK9PLMkBYxjNnFVaPHy8izG33R2C9k6EQMQxAULa4lHG3YaVZF9sVZwmeRT Nrtym3V4JyQOieWjKpRpMJVIFKs+rlrGRjy7+eM84fGKn+qt7HME2MQcjMy8dA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618253641; a=rsa-sha256; cv=none; b=i5uSCsBq6XLzVeo9q3ZFhxBGXUFNVtmR/14IHwMllJxLRwr2veilSudXgT8M8WnScxtWqC /cC3O3c3l+wngg7od+nh3L8pGx1u/hoHBbRXyywccHPPzDW/MRHGfbU9r3lGFIllCKWePf fZY8+5+hUcJ58GKHtnaV/x54R6xo+6ZtVdTG5jDlZZWOB46QP85KcsoH5q8CVUU8GT22pT rT12KIxfKVqF/q3gOKVG7xyVT2p+ztjXMQrLarRK5jyDYio1IVWdIjkDJMnMM6vJS0yY2/ sepSedBABWuqNq+JuaoT4YMn0Pb7rz87pFfZFhCo4ru7zvHUjN2BZSjwzKwKvw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=u38LvvRy; 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.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=u38LvvRy; 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: C8CC7224C2 X-Spam-Score: -3.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: cFOqAKuMBwi+ Dear All, thank you very much for bringing this forward and thanks to Nicholas for his work and detailed write-up on the API! Unfortunately, I'm extremely busy right now, but will try to comment in detail on the coming days, most probably on Thursday. I'm very excited by the new developments! best regards, Andr=C3=A1s On Mon, 12 Apr 2021 at 15:19, Nicolas Goaziou wrot= e: > > Hello, > > "Bruce D'Arcus" writes: > > > Maybe since Nicolas has been around lately, he can weigh in? > > I guess I can make a summary about the current state of the citations > branch, i.e., what is done, what is missing. > > There are three major steps to complete in order to add citations in > Org: defining the syntax, designing the Org API for citation processors, > and writing a default processor. > > The syntax is complete in "wip-cite-new" branch. For the record, in its > full glory, it can look like this: > > [cite/style: global prefix; prefix -@key suffix ; ... ; global suffix] > > "/style", "global prefix", "prefix", "-" marker, "suffix" and "global > suffix" are all optional. So, in its minimal form, it can be as simple > as: > > [cite:@Doe:1995a] > > The syntax also includes a new #+bibliography keyword, which, when > paired with a new `org-cite-global-bibliography', defines global or > local bibliographies. > > For exporting needs, I also introduced #+print_bibliography, > #+citation_style and #+bibliography_style keywords. > > Now about the API, which is partly implemented on a local branch. > > Citations processors, in addition to any tools they may provide, can > integrate into Org in three distinct areas: opening (with > `org-open-at-point'), fontification, and export. > > - "opening" action is straightforward. All is needed for the processor > is to provide a function accepting two arguments: the citation key, > as a string, and possibly a universal argument, which it may ignore, > or not. > > All this is already implemented locally. > > - "exporting" action is trickier, because there are multiple ways to > do the integration, and, since I'm not an implementor for citation > processors, I don't have an accurate view about what is the best > design. Anyway, here is the > > First, export happens as pre-process, before export back-ends are > introduced. IOW, export back-ends are never going to see a citation > object, which means no support whatsoever is needed on their end. > > Support export requires two functions. The first function is > responsible for rendering a bibliography. Its arguments are the list > of citations in the document, the list of bibliography files, the > style, if any, and the export back-end. It should return a string. > > The second mandatory function is obviously responsible for rendering > citations. It is called with a citation object, the desired style, > if any, and the export back-end, the full list of citations objets > in the document, and the list of bibliography files. It should also > return a string. Org provides a helper function to determine the > footnote containing a citation (and its label, or number) from > a citation object. > > In the functions described above, I don't know if the arguments are > sufficient. I would love to hear about citeproc-org and org-ref > developers about this. > > Also, note that style is an indication. Export is requested to > handle regular [cite:...] syntax. Unknown styles should fall-back to > this. > > - "fontification" is meant to give full access to face selection, what > is really displayed, additional keymaps, all using a single > function. > > At the moment, I have no idea about what arguments would be useful. > I think John Kitchin gave ideas about this already on this ML. > I have to re-read his posts on the subject. In any case, feedback > welcome. > > This not implemented yet. > > A citation processor does not need to provide integration in all these > areas. Users may be able to mix and match processors. This is another > (minor) point which is yet to be designed. How is a user supposed to > select a processor for each integration area? It could be done through > three variables, e.g., > > (setq org-cite-display-processor 'org-ref) > (setq org-cite-export-processor 'citeproc) > (setq org-cite-follow-processor 'default) > > I think it is unlikely for a user to locally select "display" and > "follow" processors. However, we need a way to use a local export > processor for a given document. I may need to introduce > a #+citation_processor keyword during export. Any other idea? > > The last step is implementing a default processor. The point is to > provide a self-contained, very basic processor handling all three areas > described above. > > I started implementing one. It relies on built-in bibtex.el library, so > it assumes bibliography is written as a BibTex file. At the moment it > properly "follows" citations. It also exports citations as (Name, date). > However, it doesn't export bibliographies yet. It does not fontify > either. > > As a conclusion, besides the syntax, the branch is not ready for > inclusion yet. There are a few design questions about the API to answer. > Once done, and as long as no one has high expectations about the default > processor, this last part should not be too hard to complete. > > > Regards, > -- > Nicolas Goaziou