From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Citations, continued Date: Tue, 10 Feb 2015 09:49:47 +0100 Message-ID: <87386eywus.fsf@nicolasgoaziou.fr> References: <87vbjmn6wy.fsf@berkeley.edu> <87sieokx8e.fsf@berkeley.edu> <54d04780.cb58460a.5243.2603@mx.google.com> <87h9v3li8t.fsf@berkeley.edu> <54d078ff.b044440a.06ec.3cf6@mx.google.com> <87d25rkmag.fsf@berkeley.edu> <54d1bc7b.c57d440a.3c5d.2dca@mx.google.com> <87vbjh284z.fsf@nicolasgoaziou.fr> <87mw4tk4m7.fsf@berkeley.edu> <87oap7z664.fsf@nicolasgoaziou.fr> <87fvaibr3k.fsf@berkeley.edu> <87y4o9s5qc.fsf@nicolasgoaziou.fr> <87d25kpxap.fsf@pank.eu> <87k2zsso3w.fsf@nicolasgoaziou.fr> <87vbjcoewx.fsf@gmx.us> <87bnl4shqg.fsf@nicolasgoaziou.fr> <87h9uwwmgt.fsf@gmx.us> <87zj8oqqtz.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YL6Uw-0005xu-O7 for emacs-orgmode@gnu.org; Tue, 10 Feb 2015 03:48:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YL6Ut-0005jY-Gr for emacs-orgmode@gnu.org; Tue, 10 Feb 2015 03:48:46 -0500 Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:41145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YL6Ut-0005jP-AW for emacs-orgmode@gnu.org; Tue, 10 Feb 2015 03:48:43 -0500 In-Reply-To: (John Kitchin's message of "Mon, 09 Feb 2015 17:54:11 -0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Kitchin Cc: emacs-orgmode@gnu.org, Rasmus John Kitchin writes: > Why cannot there be a list of acceptable keywords eg > > [citenum: > [citeyear: > [citeauthor: > > which a backend would be responsible for handling, including a default > handler for unknown keywords? It has the same problem as [pre @key post] syntax: it is slower to parser. This is because you cannot know beforehand the keyword, so you have to check almost every [...] in the document. Another option is to mimic custom links, if that's what you're thinking of, which means to store every user-defined keyword in a variable and build a regexp out of it. I dislike it even more because the document is not portable anymore, as it requires you to share your custom keywords. If year, or author, are needed, I suggested to append some optional parameter to the key, e.g., [cite: pre @key:year post] Note that it rules out colons from KEY syntax (but we can use another less common character, e.g. "|"). Regards,