From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id yBtmAU9jpF5fZAAA0tVLHw (envelope-from ) for ; Sat, 25 Apr 2020 16:20:31 +0000 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 EDFWIlZjpF7wbwAAbx9fmQ (envelope-from ) for ; Sat, 25 Apr 2020 16:20:38 +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 0AEAE942128 for ; Sat, 25 Apr 2020 16:20:36 +0000 (UTC) Received: from localhost ([::1]:40354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSNXe-00013M-Nz for larch@yhetil.org; Sat, 25 Apr 2020 12:20:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57214) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSNXD-00012x-NR for emacs-orgmode@gnu.org; Sat, 25 Apr 2020 12:20:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSNXC-0005WP-HT for emacs-orgmode@gnu.org; Sat, 25 Apr 2020 12:20:07 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:34227) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jSNXB-0004ad-O8 for emacs-orgmode@gnu.org; Sat, 25 Apr 2020 12:20:06 -0400 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 89BBA240004; Sat, 25 Apr 2020 16:19:58 +0000 (UTC) From: Nicolas Goaziou To: Richard Lawrence Subject: Re: wip-cite status question and feedback References: <777184861.71192.1586510991834@office.mailbox.org> <87imi72bn0.fsf@nicolasgoaziou.fr> <1016821769.78551.1586641375789@office.mailbox.org> <87h7xp0z1y.fsf@nicolasgoaziou.fr> <874kto245n.fsf@nicolasgoaziou.fr> <87sgh8zpmg.fsf@nicolasgoaziou.fr> <1084456979.81820.1586724551265@office.mailbox.org> <877dykz6ri.fsf@nicolasgoaziou.fr> <87r1wrwvam.fsf@fastmail.fm> <87wo6hfg4k.fsf@aquinas> <87v9lx6ju6.fsf@aquinas> <87r1wj7scc.fsf@aquinas> Mail-Followup-To: Richard Lawrence , Bruce D'Arcus , org-mode-email , John Kitchin Date: Sat, 25 Apr 2020 18:19:57 +0200 In-Reply-To: <87r1wj7scc.fsf@aquinas> (Richard Lawrence's message of "Sun, 19 Apr 2020 11:11:31 +0200") Message-ID: <87lfmjzgeq.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.178.230; envelope-from=mail@nicolasgoaziou.fr; helo=relay10.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/25 12:20:00 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Received-From: 217.70.178.230 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: , Cc: org-mode-email , Bruce D'Arcus , John Kitchin Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 X-Spam-Score: -1.01 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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-Scan-Result: default: False [-1.01 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.55988066243526]; DWL_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.20), country: US(-0.00), ip: 209.51.188.17(-0.56)]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; FROM_NEQ_ENVFROM(0.00)[mail@nicolasgoaziou.fr,emacs-orgmode-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MIME_GOOD(-0.10)[text/plain]; R_DKIM_NA(0.00)[]; DMARC_NA(0.00)[nicolasgoaziou.fr]; HAS_LIST_UNSUB(-0.01)[]; DNSWL_BLOCKED(0.00)[209.51.188.17:from]; FREEMAIL_CC(0.00)[gnu.org,gmail.com,andrew.cmu.edu]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: b0/jkSTAxmac Hello, I cannot answer all open questions as the thread would spread too thin. So, I'll try to subsume where Org is at the moment, and what need to be decided. First things first, I pushed a new branch, "wip-cite-new" in the repository, with an modified implementation of citation syntax, hopefully taking into consideration remarks made so far. I didn't squash "wip-cite" because citeproc-org library suggests to use it, and I didn't want to break it. Instead of formally describing the syntax, here are a few boring examples: [cite:@key] [cite:-@key] [cite:pre @key post] [cite:pre @key post; pre -@key2 post] [cite: common prefix; pre @key post; pre @key2 post; common suffix] There is a limitation for prefixes and suffixes: they cannot contain semicolons or closing square brackets. I'm not sure it is worth implementing some character escape mechanism, tho. Now with styles: [cite/style: ...] [cite/style/substyle: ...] [cite/mycitationprocessor/fullcite: ...] [cite/foot/text: ...] [cite/style/substyle/subsubstyle/OMG: ...] The forward slash separator gives us local citation style and a name space. There's no limit on the depth of sub-styles. However style strings are limited to alphanumeric characters only. I also removed short citations: Lorem ipsum @doe09 dolor sit amet They look nice, but I realized this was the same mistake as allowing [1] to be a footnote reference. False positives are way too common. This could generate frustration upon export. I assume [cite:...] is the default citation style, defined at the citation processor's level. Styled citations override locally the default style. Again, a processor not handling a given style is expected to fallback to default style. As a consequence, there is no special syntax for "author-in-text" style. But we can suggest one for back-end processors. We might want to stick to the most complete one, BibLaTeX, IIUC, and /require/ processors to support, at least: [cite/text: ...] [cite/paren: ...] With this bare minimum, we ensure documents are somehow portable between processors, and, therefore, export back-ends. Again, this is only a proposal, feedback is welcome. Hopefully we can move onto the next step: how should we interface citation processors and Org? First, I think we agreed on the BIBLIOGRAPHY keyword, with the following syntax: #+BIBLIOGRAPHY: file #+BIBLIOGRAPHY: "file" There can be multiple BIBLIOGRAPHY keywords in a document (and equivalent node properties). Also, I think Org should support a global variable, e.g., `org-citation-default-bibliography'. I also think we defined a keyword to insert a bibliography: #+PRINT_BIBLIOGRAPHY: ... options ... (may be specific to citation processors) I expect the processors to provide Org with a maximum two different actions: manage and export. For example, AFAIK, Org Ref manages and exports, citeproc-org/citeproc-el only exports, and a default processor might realistically limit export to LaTeX and derived and management to a default fontification of citations. - Management :: As suggested by John Kitchin, we want something like `org-link-parameters'. However, I don't think it makes much sense to let different citation processors handle different citations in the same buffer. Instead we can provide one global function for each of these features: - completion - fontification (possibly special keymaps, help-echo, etc) - following - am I missing something? Citation processors may operate on the bibliography file, but that's out of the scope of Org. For example, we could introduce the variable `org-citation-follow-function', which contains a function called with two arguments: the key of the citation to follow, and the list of bibliography files active in the buffer. Each citation processor could set this function. By default, it would probably be (defun org-citation-follow-default (&rest _) (message "Please activate a citation processor to follow citations") nil) - Export :: In this case, we may want to allow multiple processors for various export back-ends. I thought about declaring active processors in a document with a keyword, e.g., #+CITATION_PROCESSOR: org-ref :default-style foo :back-ends (latex) #+CITATION_PROCESSOR: citeproc :default-style bar and with a global variable, e.g., `org-citation-export-default' which could be, e.g., '((default :defaut-style "authoryear" :back-ends (latex))) but could become, with appropriate libraries '((org-ref :defaut-style "authoryear" :back-ends (latex)) (citeproc-org :default-style "style-file.csl" :back-ends nil)) where more specialized back-ends are used first. Note that `latex' would mean `latex' and derived back-ends, e.g., `beamer'. Well, that's all for now. Again, I am not a citation specialist, so I need feedback. Let's keep the ball rolling! Regards, -- Nicolas Goaziou